AWS SDK for C++  1.9.71
AWS SDK for C++
SecurityGroup.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
12 #include <aws/ec2/model/Tag.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace Utils
18 {
19 namespace Xml
20 {
21  class XmlNode;
22 } // namespace Xml
23 } // namespace Utils
24 namespace EC2
25 {
26 namespace Model
27 {
28 
35  {
36  public:
40 
41  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
42  void OutputToStream(Aws::OStream& oStream, const char* location) const;
43 
44 
48  inline const Aws::String& GetDescription() const{ return m_description; }
49 
53  inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
54 
58  inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
59 
63  inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
64 
68  inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
69 
73  inline SecurityGroup& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
74 
78  inline SecurityGroup& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
79 
83  inline SecurityGroup& WithDescription(const char* value) { SetDescription(value); return *this;}
84 
85 
89  inline const Aws::String& GetGroupName() const{ return m_groupName; }
90 
94  inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; }
95 
99  inline void SetGroupName(const Aws::String& value) { m_groupNameHasBeenSet = true; m_groupName = value; }
100 
104  inline void SetGroupName(Aws::String&& value) { m_groupNameHasBeenSet = true; m_groupName = std::move(value); }
105 
109  inline void SetGroupName(const char* value) { m_groupNameHasBeenSet = true; m_groupName.assign(value); }
110 
114  inline SecurityGroup& WithGroupName(const Aws::String& value) { SetGroupName(value); return *this;}
115 
119  inline SecurityGroup& WithGroupName(Aws::String&& value) { SetGroupName(std::move(value)); return *this;}
120 
124  inline SecurityGroup& WithGroupName(const char* value) { SetGroupName(value); return *this;}
125 
126 
130  inline const Aws::Vector<IpPermission>& GetIpPermissions() const{ return m_ipPermissions; }
131 
135  inline bool IpPermissionsHasBeenSet() const { return m_ipPermissionsHasBeenSet; }
136 
140  inline void SetIpPermissions(const Aws::Vector<IpPermission>& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions = value; }
141 
145  inline void SetIpPermissions(Aws::Vector<IpPermission>&& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions = std::move(value); }
146 
150  inline SecurityGroup& WithIpPermissions(const Aws::Vector<IpPermission>& value) { SetIpPermissions(value); return *this;}
151 
155  inline SecurityGroup& WithIpPermissions(Aws::Vector<IpPermission>&& value) { SetIpPermissions(std::move(value)); return *this;}
156 
160  inline SecurityGroup& AddIpPermissions(const IpPermission& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions.push_back(value); return *this; }
161 
165  inline SecurityGroup& AddIpPermissions(IpPermission&& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions.push_back(std::move(value)); return *this; }
166 
167 
171  inline const Aws::String& GetOwnerId() const{ return m_ownerId; }
172 
176  inline bool OwnerIdHasBeenSet() const { return m_ownerIdHasBeenSet; }
177 
181  inline void SetOwnerId(const Aws::String& value) { m_ownerIdHasBeenSet = true; m_ownerId = value; }
182 
186  inline void SetOwnerId(Aws::String&& value) { m_ownerIdHasBeenSet = true; m_ownerId = std::move(value); }
187 
191  inline void SetOwnerId(const char* value) { m_ownerIdHasBeenSet = true; m_ownerId.assign(value); }
192 
196  inline SecurityGroup& WithOwnerId(const Aws::String& value) { SetOwnerId(value); return *this;}
197 
201  inline SecurityGroup& WithOwnerId(Aws::String&& value) { SetOwnerId(std::move(value)); return *this;}
202 
206  inline SecurityGroup& WithOwnerId(const char* value) { SetOwnerId(value); return *this;}
207 
208 
212  inline const Aws::String& GetGroupId() const{ return m_groupId; }
213 
217  inline bool GroupIdHasBeenSet() const { return m_groupIdHasBeenSet; }
218 
222  inline void SetGroupId(const Aws::String& value) { m_groupIdHasBeenSet = true; m_groupId = value; }
223 
227  inline void SetGroupId(Aws::String&& value) { m_groupIdHasBeenSet = true; m_groupId = std::move(value); }
228 
232  inline void SetGroupId(const char* value) { m_groupIdHasBeenSet = true; m_groupId.assign(value); }
233 
237  inline SecurityGroup& WithGroupId(const Aws::String& value) { SetGroupId(value); return *this;}
238 
242  inline SecurityGroup& WithGroupId(Aws::String&& value) { SetGroupId(std::move(value)); return *this;}
243 
247  inline SecurityGroup& WithGroupId(const char* value) { SetGroupId(value); return *this;}
248 
249 
253  inline const Aws::Vector<IpPermission>& GetIpPermissionsEgress() const{ return m_ipPermissionsEgress; }
254 
258  inline bool IpPermissionsEgressHasBeenSet() const { return m_ipPermissionsEgressHasBeenSet; }
259 
263  inline void SetIpPermissionsEgress(const Aws::Vector<IpPermission>& value) { m_ipPermissionsEgressHasBeenSet = true; m_ipPermissionsEgress = value; }
264 
268  inline void SetIpPermissionsEgress(Aws::Vector<IpPermission>&& value) { m_ipPermissionsEgressHasBeenSet = true; m_ipPermissionsEgress = std::move(value); }
269 
273  inline SecurityGroup& WithIpPermissionsEgress(const Aws::Vector<IpPermission>& value) { SetIpPermissionsEgress(value); return *this;}
274 
278  inline SecurityGroup& WithIpPermissionsEgress(Aws::Vector<IpPermission>&& value) { SetIpPermissionsEgress(std::move(value)); return *this;}
279 
283  inline SecurityGroup& AddIpPermissionsEgress(const IpPermission& value) { m_ipPermissionsEgressHasBeenSet = true; m_ipPermissionsEgress.push_back(value); return *this; }
284 
288  inline SecurityGroup& AddIpPermissionsEgress(IpPermission&& value) { m_ipPermissionsEgressHasBeenSet = true; m_ipPermissionsEgress.push_back(std::move(value)); return *this; }
289 
290 
294  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
295 
299  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
300 
304  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
305 
309  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
310 
314  inline SecurityGroup& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
315 
319  inline SecurityGroup& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
320 
324  inline SecurityGroup& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
325 
329  inline SecurityGroup& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
330 
331 
335  inline const Aws::String& GetVpcId() const{ return m_vpcId; }
336 
340  inline bool VpcIdHasBeenSet() const { return m_vpcIdHasBeenSet; }
341 
345  inline void SetVpcId(const Aws::String& value) { m_vpcIdHasBeenSet = true; m_vpcId = value; }
346 
350  inline void SetVpcId(Aws::String&& value) { m_vpcIdHasBeenSet = true; m_vpcId = std::move(value); }
351 
355  inline void SetVpcId(const char* value) { m_vpcIdHasBeenSet = true; m_vpcId.assign(value); }
356 
360  inline SecurityGroup& WithVpcId(const Aws::String& value) { SetVpcId(value); return *this;}
361 
365  inline SecurityGroup& WithVpcId(Aws::String&& value) { SetVpcId(std::move(value)); return *this;}
366 
370  inline SecurityGroup& WithVpcId(const char* value) { SetVpcId(value); return *this;}
371 
372  private:
373 
374  Aws::String m_description;
375  bool m_descriptionHasBeenSet;
376 
377  Aws::String m_groupName;
378  bool m_groupNameHasBeenSet;
379 
380  Aws::Vector<IpPermission> m_ipPermissions;
381  bool m_ipPermissionsHasBeenSet;
382 
383  Aws::String m_ownerId;
384  bool m_ownerIdHasBeenSet;
385 
386  Aws::String m_groupId;
387  bool m_groupIdHasBeenSet;
388 
389  Aws::Vector<IpPermission> m_ipPermissionsEgress;
390  bool m_ipPermissionsEgressHasBeenSet;
391 
392  Aws::Vector<Tag> m_tags;
393  bool m_tagsHasBeenSet;
394 
395  Aws::String m_vpcId;
396  bool m_vpcIdHasBeenSet;
397  };
398 
399 } // namespace Model
400 } // namespace EC2
401 } // namespace Aws
Aws::EC2::Model::SecurityGroup::GroupIdHasBeenSet
bool GroupIdHasBeenSet() const
Definition: SecurityGroup.h:217
Aws::EC2::Model::SecurityGroup::SetVpcId
void SetVpcId(const Aws::String &value)
Definition: SecurityGroup.h:345
Aws::EC2::Model::SecurityGroup::SetVpcId
void SetVpcId(const char *value)
Definition: SecurityGroup.h:355
IpPermission.h
Aws::EC2::Model::SecurityGroup::SetGroupName
void SetGroupName(const Aws::String &value)
Definition: SecurityGroup.h:99
Aws::EC2::Model::SecurityGroup::GetVpcId
const Aws::String & GetVpcId() const
Definition: SecurityGroup.h:335
Aws::EC2::Model::Tag
Definition: Tag.h:32
Aws::EC2::Model::SecurityGroup::WithTags
SecurityGroup & WithTags(const Aws::Vector< Tag > &value)
Definition: SecurityGroup.h:314
Aws::EC2::Model::SecurityGroup::WithOwnerId
SecurityGroup & WithOwnerId(Aws::String &&value)
Definition: SecurityGroup.h:201
Aws::EC2::Model::SecurityGroup::AddIpPermissionsEgress
SecurityGroup & AddIpPermissionsEgress(IpPermission &&value)
Definition: SecurityGroup.h:288
Aws::EC2::Model::SecurityGroup::SetDescription
void SetDescription(const char *value)
Definition: SecurityGroup.h:68
Aws::EC2::Model::SecurityGroup::WithOwnerId
SecurityGroup & WithOwnerId(const char *value)
Definition: SecurityGroup.h:206
Aws::EC2::Model::SecurityGroup::WithIpPermissionsEgress
SecurityGroup & WithIpPermissionsEgress(const Aws::Vector< IpPermission > &value)
Definition: SecurityGroup.h:273
Aws::EC2::Model::SecurityGroup::WithTags
SecurityGroup & WithTags(Aws::Vector< Tag > &&value)
Definition: SecurityGroup.h:319
Aws::EC2::Model::SecurityGroup::SetIpPermissionsEgress
void SetIpPermissionsEgress(const Aws::Vector< IpPermission > &value)
Definition: SecurityGroup.h:263
Aws::EC2::Model::SecurityGroup::SetOwnerId
void SetOwnerId(const Aws::String &value)
Definition: SecurityGroup.h:181
Aws::EC2::Model::SecurityGroup::AddIpPermissions
SecurityGroup & AddIpPermissions(const IpPermission &value)
Definition: SecurityGroup.h:160
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::SecurityGroup::WithVpcId
SecurityGroup & WithVpcId(const char *value)
Definition: SecurityGroup.h:370
Aws::EC2::Model::SecurityGroup::GetIpPermissionsEgress
const Aws::Vector< IpPermission > & GetIpPermissionsEgress() const
Definition: SecurityGroup.h:253
Aws::EC2::Model::SecurityGroup::OwnerIdHasBeenSet
bool OwnerIdHasBeenSet() const
Definition: SecurityGroup.h:176
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::EC2::Model::SecurityGroup::GroupNameHasBeenSet
bool GroupNameHasBeenSet() const
Definition: SecurityGroup.h:94
Aws::EC2::Model::SecurityGroup::SetIpPermissionsEgress
void SetIpPermissionsEgress(Aws::Vector< IpPermission > &&value)
Definition: SecurityGroup.h:268
Aws::EC2::Model::SecurityGroup::AddTags
SecurityGroup & AddTags(const Tag &value)
Definition: SecurityGroup.h:324
Aws::EC2::Model::SecurityGroup::SetIpPermissions
void SetIpPermissions(Aws::Vector< IpPermission > &&value)
Definition: SecurityGroup.h:145
AWSStreamFwd.h
Aws::EC2::Model::SecurityGroup::AddIpPermissions
SecurityGroup & AddIpPermissions(IpPermission &&value)
Definition: SecurityGroup.h:165
Aws::EC2::Model::SecurityGroup::WithOwnerId
SecurityGroup & WithOwnerId(const Aws::String &value)
Definition: SecurityGroup.h:196
Aws::EC2::Model::SecurityGroup::WithGroupName
SecurityGroup & WithGroupName(const char *value)
Definition: SecurityGroup.h:124
Aws::EC2::Model::SecurityGroup::SetDescription
void SetDescription(Aws::String &&value)
Definition: SecurityGroup.h:63
Aws::EC2::Model::SecurityGroup::SetGroupName
void SetGroupName(const char *value)
Definition: SecurityGroup.h:109
Aws::EC2::Model::SecurityGroup::WithVpcId
SecurityGroup & WithVpcId(const Aws::String &value)
Definition: SecurityGroup.h:360
Aws::EC2::Model::SecurityGroup::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: SecurityGroup.h:309
Aws::EC2::Model::SecurityGroup::OutputToStream
void OutputToStream(Aws::OStream &oStream, const char *location) const
Aws::EC2::Model::SecurityGroup::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: SecurityGroup.h:299
AWSVector.h
Tag.h
Aws::EC2::Model::SecurityGroup::OutputToStream
void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
Aws::EC2::Model::SecurityGroup::SetIpPermissions
void SetIpPermissions(const Aws::Vector< IpPermission > &value)
Definition: SecurityGroup.h:140
Aws::EC2::Model::SecurityGroup::VpcIdHasBeenSet
bool VpcIdHasBeenSet() const
Definition: SecurityGroup.h:340
Aws::EC2::Model::SecurityGroup::WithGroupName
SecurityGroup & WithGroupName(Aws::String &&value)
Definition: SecurityGroup.h:119
Aws::EC2::Model::SecurityGroup::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: SecurityGroup.h:304
Aws::EC2::Model::SecurityGroup::GetOwnerId
const Aws::String & GetOwnerId() const
Definition: SecurityGroup.h:171
Aws::EC2::Model::SecurityGroup::SetDescription
void SetDescription(const Aws::String &value)
Definition: SecurityGroup.h:58
Aws::OStream
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:21
Aws::EC2::Model::SecurityGroup::AddIpPermissionsEgress
SecurityGroup & AddIpPermissionsEgress(const IpPermission &value)
Definition: SecurityGroup.h:283
Aws::EC2::Model::SecurityGroup::operator=
SecurityGroup & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
Aws::EC2::Model::SecurityGroup::WithVpcId
SecurityGroup & WithVpcId(Aws::String &&value)
Definition: SecurityGroup.h:365
Aws::Utils::Xml::XmlNode
Definition: XmlSerializer.h:53
Aws::EC2::Model::SecurityGroup::WithGroupId
SecurityGroup & WithGroupId(const char *value)
Definition: SecurityGroup.h:247
Aws::EC2::Model::SecurityGroup::GetGroupId
const Aws::String & GetGroupId() const
Definition: SecurityGroup.h:212
Aws::EC2::Model::SecurityGroup::GetDescription
const Aws::String & GetDescription() const
Definition: SecurityGroup.h:48
Aws::EC2::Model::IpPermission
Definition: IpPermission.h:38
Aws::EC2::Model::SecurityGroup::WithDescription
SecurityGroup & WithDescription(Aws::String &&value)
Definition: SecurityGroup.h:78
Aws::EC2::Model::SecurityGroup::SetGroupName
void SetGroupName(Aws::String &&value)
Definition: SecurityGroup.h:104
Aws::EC2::Model::SecurityGroup::IpPermissionsEgressHasBeenSet
bool IpPermissionsEgressHasBeenSet() const
Definition: SecurityGroup.h:258
AWSString.h
Aws::EC2::Model::SecurityGroup::SetOwnerId
void SetOwnerId(const char *value)
Definition: SecurityGroup.h:191
Aws::EC2::Model::SecurityGroup::SetVpcId
void SetVpcId(Aws::String &&value)
Definition: SecurityGroup.h:350
Aws::EC2::Model::SecurityGroup::SecurityGroup
SecurityGroup(const Aws::Utils::Xml::XmlNode &xmlNode)
Aws::EC2::Model::SecurityGroup::AddTags
SecurityGroup & AddTags(Tag &&value)
Definition: SecurityGroup.h:329
Aws::EC2::Model::SecurityGroup::SetGroupId
void SetGroupId(Aws::String &&value)
Definition: SecurityGroup.h:227
Aws::EC2::Model::SecurityGroup::WithGroupId
SecurityGroup & WithGroupId(Aws::String &&value)
Definition: SecurityGroup.h:242
Aws::EC2::Model::SecurityGroup::GetIpPermissions
const Aws::Vector< IpPermission > & GetIpPermissions() const
Definition: SecurityGroup.h:130
Aws
Definition: AccessManagementClient.h:15
Aws::EC2::Model::SecurityGroup::WithDescription
SecurityGroup & WithDescription(const char *value)
Definition: SecurityGroup.h:83
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::EC2::Model::SecurityGroup::SetGroupId
void SetGroupId(const Aws::String &value)
Definition: SecurityGroup.h:222
index
int index
Definition: cJSON.h:181
Aws::EC2::Model::SecurityGroup::WithIpPermissionsEgress
SecurityGroup & WithIpPermissionsEgress(Aws::Vector< IpPermission > &&value)
Definition: SecurityGroup.h:278
Aws::EC2::Model::SecurityGroup::WithIpPermissions
SecurityGroup & WithIpPermissions(const Aws::Vector< IpPermission > &value)
Definition: SecurityGroup.h:150
Aws::EC2::Model::SecurityGroup::WithGroupId
SecurityGroup & WithGroupId(const Aws::String &value)
Definition: SecurityGroup.h:237
Aws::EC2::Model::SecurityGroup::WithDescription
SecurityGroup & WithDescription(const Aws::String &value)
Definition: SecurityGroup.h:73
Aws::EC2::Model::SecurityGroup::SetGroupId
void SetGroupId(const char *value)
Definition: SecurityGroup.h:232
Aws::EC2::Model::SecurityGroup::SetOwnerId
void SetOwnerId(Aws::String &&value)
Definition: SecurityGroup.h:186
Aws::EC2::Model::SecurityGroup::IpPermissionsHasBeenSet
bool IpPermissionsHasBeenSet() const
Definition: SecurityGroup.h:135
Aws::EC2::Model::SecurityGroup::SecurityGroup
SecurityGroup()
EC2_EXPORTS.h
Aws::EC2::Model::SecurityGroup::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: SecurityGroup.h:294
Aws::EC2::Model::SecurityGroup::GetGroupName
const Aws::String & GetGroupName() const
Definition: SecurityGroup.h:89
Aws::EC2::Model::SecurityGroup
Definition: SecurityGroup.h:35
Aws::EC2::Model::SecurityGroup::WithIpPermissions
SecurityGroup & WithIpPermissions(Aws::Vector< IpPermission > &&value)
Definition: SecurityGroup.h:155
Aws::EC2::Model::SecurityGroup::WithGroupName
SecurityGroup & WithGroupName(const Aws::String &value)
Definition: SecurityGroup.h:114
Aws::EC2::Model::SecurityGroup::DescriptionHasBeenSet
bool DescriptionHasBeenSet() const
Definition: SecurityGroup.h:53