AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
SecurityGroup.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/ec2/model/IpPermission.h>
12#include <aws/ec2/model/Tag.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Utils
18{
19namespace Xml
20{
21 class XmlNode;
22} // namespace Xml
23} // namespace Utils
24namespace EC2
25{
26namespace Model
27{
28
35 {
36 public:
37 AWS_EC2_API SecurityGroup();
38 AWS_EC2_API SecurityGroup(const Aws::Utils::Xml::XmlNode& xmlNode);
39 AWS_EC2_API SecurityGroup& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
40
41 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
42 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
43
44
46
49 inline const Aws::String& GetGroupId() const{ return m_groupId; }
50 inline bool GroupIdHasBeenSet() const { return m_groupIdHasBeenSet; }
51 inline void SetGroupId(const Aws::String& value) { m_groupIdHasBeenSet = true; m_groupId = value; }
52 inline void SetGroupId(Aws::String&& value) { m_groupIdHasBeenSet = true; m_groupId = std::move(value); }
53 inline void SetGroupId(const char* value) { m_groupIdHasBeenSet = true; m_groupId.assign(value); }
54 inline SecurityGroup& WithGroupId(const Aws::String& value) { SetGroupId(value); return *this;}
55 inline SecurityGroup& WithGroupId(Aws::String&& value) { SetGroupId(std::move(value)); return *this;}
56 inline SecurityGroup& WithGroupId(const char* value) { SetGroupId(value); return *this;}
58
60
63 inline const Aws::Vector<IpPermission>& GetIpPermissionsEgress() const{ return m_ipPermissionsEgress; }
64 inline bool IpPermissionsEgressHasBeenSet() const { return m_ipPermissionsEgressHasBeenSet; }
65 inline void SetIpPermissionsEgress(const Aws::Vector<IpPermission>& value) { m_ipPermissionsEgressHasBeenSet = true; m_ipPermissionsEgress = value; }
66 inline void SetIpPermissionsEgress(Aws::Vector<IpPermission>&& value) { m_ipPermissionsEgressHasBeenSet = true; m_ipPermissionsEgress = std::move(value); }
69 inline SecurityGroup& AddIpPermissionsEgress(const IpPermission& value) { m_ipPermissionsEgressHasBeenSet = true; m_ipPermissionsEgress.push_back(value); return *this; }
70 inline SecurityGroup& AddIpPermissionsEgress(IpPermission&& value) { m_ipPermissionsEgressHasBeenSet = true; m_ipPermissionsEgress.push_back(std::move(value)); return *this; }
72
74
77 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
78 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
79 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
80 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
81 inline SecurityGroup& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
82 inline SecurityGroup& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
83 inline SecurityGroup& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
84 inline SecurityGroup& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
86
88
91 inline const Aws::String& GetVpcId() const{ return m_vpcId; }
92 inline bool VpcIdHasBeenSet() const { return m_vpcIdHasBeenSet; }
93 inline void SetVpcId(const Aws::String& value) { m_vpcIdHasBeenSet = true; m_vpcId = value; }
94 inline void SetVpcId(Aws::String&& value) { m_vpcIdHasBeenSet = true; m_vpcId = std::move(value); }
95 inline void SetVpcId(const char* value) { m_vpcIdHasBeenSet = true; m_vpcId.assign(value); }
96 inline SecurityGroup& WithVpcId(const Aws::String& value) { SetVpcId(value); return *this;}
97 inline SecurityGroup& WithVpcId(Aws::String&& value) { SetVpcId(std::move(value)); return *this;}
98 inline SecurityGroup& WithVpcId(const char* value) { SetVpcId(value); return *this;}
100
102
105 inline const Aws::String& GetSecurityGroupArn() const{ return m_securityGroupArn; }
106 inline bool SecurityGroupArnHasBeenSet() const { return m_securityGroupArnHasBeenSet; }
107 inline void SetSecurityGroupArn(const Aws::String& value) { m_securityGroupArnHasBeenSet = true; m_securityGroupArn = value; }
108 inline void SetSecurityGroupArn(Aws::String&& value) { m_securityGroupArnHasBeenSet = true; m_securityGroupArn = std::move(value); }
109 inline void SetSecurityGroupArn(const char* value) { m_securityGroupArnHasBeenSet = true; m_securityGroupArn.assign(value); }
110 inline SecurityGroup& WithSecurityGroupArn(const Aws::String& value) { SetSecurityGroupArn(value); return *this;}
111 inline SecurityGroup& WithSecurityGroupArn(Aws::String&& value) { SetSecurityGroupArn(std::move(value)); return *this;}
112 inline SecurityGroup& WithSecurityGroupArn(const char* value) { SetSecurityGroupArn(value); return *this;}
114
116
119 inline const Aws::String& GetOwnerId() const{ return m_ownerId; }
120 inline bool OwnerIdHasBeenSet() const { return m_ownerIdHasBeenSet; }
121 inline void SetOwnerId(const Aws::String& value) { m_ownerIdHasBeenSet = true; m_ownerId = value; }
122 inline void SetOwnerId(Aws::String&& value) { m_ownerIdHasBeenSet = true; m_ownerId = std::move(value); }
123 inline void SetOwnerId(const char* value) { m_ownerIdHasBeenSet = true; m_ownerId.assign(value); }
124 inline SecurityGroup& WithOwnerId(const Aws::String& value) { SetOwnerId(value); return *this;}
125 inline SecurityGroup& WithOwnerId(Aws::String&& value) { SetOwnerId(std::move(value)); return *this;}
126 inline SecurityGroup& WithOwnerId(const char* value) { SetOwnerId(value); return *this;}
128
130
133 inline const Aws::String& GetGroupName() const{ return m_groupName; }
134 inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; }
135 inline void SetGroupName(const Aws::String& value) { m_groupNameHasBeenSet = true; m_groupName = value; }
136 inline void SetGroupName(Aws::String&& value) { m_groupNameHasBeenSet = true; m_groupName = std::move(value); }
137 inline void SetGroupName(const char* value) { m_groupNameHasBeenSet = true; m_groupName.assign(value); }
138 inline SecurityGroup& WithGroupName(const Aws::String& value) { SetGroupName(value); return *this;}
139 inline SecurityGroup& WithGroupName(Aws::String&& value) { SetGroupName(std::move(value)); return *this;}
140 inline SecurityGroup& WithGroupName(const char* value) { SetGroupName(value); return *this;}
142
144
147 inline const Aws::String& GetDescription() const{ return m_description; }
148 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
149 inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
150 inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
151 inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
152 inline SecurityGroup& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
153 inline SecurityGroup& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
154 inline SecurityGroup& WithDescription(const char* value) { SetDescription(value); return *this;}
156
158
161 inline const Aws::Vector<IpPermission>& GetIpPermissions() const{ return m_ipPermissions; }
162 inline bool IpPermissionsHasBeenSet() const { return m_ipPermissionsHasBeenSet; }
163 inline void SetIpPermissions(const Aws::Vector<IpPermission>& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions = value; }
164 inline void SetIpPermissions(Aws::Vector<IpPermission>&& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions = std::move(value); }
165 inline SecurityGroup& WithIpPermissions(const Aws::Vector<IpPermission>& value) { SetIpPermissions(value); return *this;}
166 inline SecurityGroup& WithIpPermissions(Aws::Vector<IpPermission>&& value) { SetIpPermissions(std::move(value)); return *this;}
167 inline SecurityGroup& AddIpPermissions(const IpPermission& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions.push_back(value); return *this; }
168 inline SecurityGroup& AddIpPermissions(IpPermission&& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions.push_back(std::move(value)); return *this; }
170 private:
171
172 Aws::String m_groupId;
173 bool m_groupIdHasBeenSet = false;
174
175 Aws::Vector<IpPermission> m_ipPermissionsEgress;
176 bool m_ipPermissionsEgressHasBeenSet = false;
177
178 Aws::Vector<Tag> m_tags;
179 bool m_tagsHasBeenSet = false;
180
181 Aws::String m_vpcId;
182 bool m_vpcIdHasBeenSet = false;
183
184 Aws::String m_securityGroupArn;
185 bool m_securityGroupArnHasBeenSet = false;
186
187 Aws::String m_ownerId;
188 bool m_ownerIdHasBeenSet = false;
189
190 Aws::String m_groupName;
191 bool m_groupNameHasBeenSet = false;
192
193 Aws::String m_description;
194 bool m_descriptionHasBeenSet = false;
195
196 Aws::Vector<IpPermission> m_ipPermissions;
197 bool m_ipPermissionsHasBeenSet = false;
198 };
199
200} // namespace Model
201} // namespace EC2
202} // namespace Aws
const Aws::Vector< IpPermission > & GetIpPermissionsEgress() const
const Aws::Vector< IpPermission > & GetIpPermissions() const
AWS_EC2_API SecurityGroup & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetVpcId(const Aws::String &value)
SecurityGroup & WithTags(Aws::Vector< Tag > &&value)
SecurityGroup & WithIpPermissions(const Aws::Vector< IpPermission > &value)
SecurityGroup & WithGroupId(Aws::String &&value)
void SetOwnerId(Aws::String &&value)
void SetDescription(const char *value)
SecurityGroup & AddIpPermissionsEgress(IpPermission &&value)
SecurityGroup & WithVpcId(const Aws::String &value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
const Aws::String & GetSecurityGroupArn() const
void SetIpPermissionsEgress(Aws::Vector< IpPermission > &&value)
void SetIpPermissionsEgress(const Aws::Vector< IpPermission > &value)
SecurityGroup & WithSecurityGroupArn(Aws::String &&value)
SecurityGroup & WithDescription(const Aws::String &value)
void SetSecurityGroupArn(const Aws::String &value)
void SetGroupName(const Aws::String &value)
SecurityGroup & WithOwnerId(const Aws::String &value)
SecurityGroup & AddIpPermissions(IpPermission &&value)
SecurityGroup & WithSecurityGroupArn(const Aws::String &value)
void SetGroupId(const Aws::String &value)
const Aws::String & GetGroupName() const
SecurityGroup & WithIpPermissionsEgress(const Aws::Vector< IpPermission > &value)
SecurityGroup & WithIpPermissionsEgress(Aws::Vector< IpPermission > &&value)
SecurityGroup & WithSecurityGroupArn(const char *value)
void SetDescription(const Aws::String &value)
void SetSecurityGroupArn(const char *value)
AWS_EC2_API SecurityGroup(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetDescription() const
void SetVpcId(Aws::String &&value)
SecurityGroup & WithGroupId(const char *value)
void SetOwnerId(const Aws::String &value)
SecurityGroup & WithOwnerId(Aws::String &&value)
SecurityGroup & WithGroupId(const Aws::String &value)
SecurityGroup & AddIpPermissions(const IpPermission &value)
const Aws::String & GetOwnerId() const
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetVpcId(const char *value)
void SetGroupName(const char *value)
const Aws::String & GetVpcId() const
void SetIpPermissions(const Aws::Vector< IpPermission > &value)
const Aws::Vector< Tag > & GetTags() const
void SetSecurityGroupArn(Aws::String &&value)
SecurityGroup & WithGroupName(const Aws::String &value)
SecurityGroup & WithOwnerId(const char *value)
void SetGroupName(Aws::String &&value)
SecurityGroup & WithDescription(const char *value)
SecurityGroup & WithVpcId(Aws::String &&value)
void SetGroupId(const char *value)
void SetOwnerId(const char *value)
void SetTags(const Aws::Vector< Tag > &value)
SecurityGroup & WithVpcId(const char *value)
void SetTags(Aws::Vector< Tag > &&value)
bool IpPermissionsEgressHasBeenSet() const
SecurityGroup & AddTags(Tag &&value)
SecurityGroup & AddIpPermissionsEgress(const IpPermission &value)
SecurityGroup & WithTags(const Aws::Vector< Tag > &value)
const Aws::String & GetGroupId() const
SecurityGroup & AddTags(const Tag &value)
SecurityGroup & WithGroupName(const char *value)
SecurityGroup & WithGroupName(Aws::String &&value)
void SetDescription(Aws::String &&value)
SecurityGroup & WithDescription(Aws::String &&value)
void SetGroupId(Aws::String &&value)
void SetIpPermissions(Aws::Vector< IpPermission > &&value)
SecurityGroup & WithIpPermissions(Aws::Vector< IpPermission > &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream