AWS SDK for C++

AWS SDK for C++ Version 1.11.606

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() = default;
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 template<typename GroupIdT = Aws::String>
52 void SetGroupId(GroupIdT&& value) { m_groupIdHasBeenSet = true; m_groupId = std::forward<GroupIdT>(value); }
53 template<typename GroupIdT = Aws::String>
54 SecurityGroup& WithGroupId(GroupIdT&& value) { SetGroupId(std::forward<GroupIdT>(value)); return *this;}
56
58
61 inline const Aws::Vector<IpPermission>& GetIpPermissionsEgress() const { return m_ipPermissionsEgress; }
62 inline bool IpPermissionsEgressHasBeenSet() const { return m_ipPermissionsEgressHasBeenSet; }
63 template<typename IpPermissionsEgressT = Aws::Vector<IpPermission>>
64 void SetIpPermissionsEgress(IpPermissionsEgressT&& value) { m_ipPermissionsEgressHasBeenSet = true; m_ipPermissionsEgress = std::forward<IpPermissionsEgressT>(value); }
65 template<typename IpPermissionsEgressT = Aws::Vector<IpPermission>>
66 SecurityGroup& WithIpPermissionsEgress(IpPermissionsEgressT&& value) { SetIpPermissionsEgress(std::forward<IpPermissionsEgressT>(value)); return *this;}
67 template<typename IpPermissionsEgressT = IpPermission>
68 SecurityGroup& AddIpPermissionsEgress(IpPermissionsEgressT&& value) { m_ipPermissionsEgressHasBeenSet = true; m_ipPermissionsEgress.emplace_back(std::forward<IpPermissionsEgressT>(value)); return *this; }
70
72
75 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
76 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
77 template<typename TagsT = Aws::Vector<Tag>>
78 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
79 template<typename TagsT = Aws::Vector<Tag>>
80 SecurityGroup& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
81 template<typename TagsT = Tag>
82 SecurityGroup& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
84
86
89 inline const Aws::String& GetVpcId() const { return m_vpcId; }
90 inline bool VpcIdHasBeenSet() const { return m_vpcIdHasBeenSet; }
91 template<typename VpcIdT = Aws::String>
92 void SetVpcId(VpcIdT&& value) { m_vpcIdHasBeenSet = true; m_vpcId = std::forward<VpcIdT>(value); }
93 template<typename VpcIdT = Aws::String>
94 SecurityGroup& WithVpcId(VpcIdT&& value) { SetVpcId(std::forward<VpcIdT>(value)); return *this;}
96
98
101 inline const Aws::String& GetSecurityGroupArn() const { return m_securityGroupArn; }
102 inline bool SecurityGroupArnHasBeenSet() const { return m_securityGroupArnHasBeenSet; }
103 template<typename SecurityGroupArnT = Aws::String>
104 void SetSecurityGroupArn(SecurityGroupArnT&& value) { m_securityGroupArnHasBeenSet = true; m_securityGroupArn = std::forward<SecurityGroupArnT>(value); }
105 template<typename SecurityGroupArnT = Aws::String>
106 SecurityGroup& WithSecurityGroupArn(SecurityGroupArnT&& value) { SetSecurityGroupArn(std::forward<SecurityGroupArnT>(value)); return *this;}
108
110
113 inline const Aws::String& GetOwnerId() const { return m_ownerId; }
114 inline bool OwnerIdHasBeenSet() const { return m_ownerIdHasBeenSet; }
115 template<typename OwnerIdT = Aws::String>
116 void SetOwnerId(OwnerIdT&& value) { m_ownerIdHasBeenSet = true; m_ownerId = std::forward<OwnerIdT>(value); }
117 template<typename OwnerIdT = Aws::String>
118 SecurityGroup& WithOwnerId(OwnerIdT&& value) { SetOwnerId(std::forward<OwnerIdT>(value)); return *this;}
120
122
125 inline const Aws::String& GetGroupName() const { return m_groupName; }
126 inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; }
127 template<typename GroupNameT = Aws::String>
128 void SetGroupName(GroupNameT&& value) { m_groupNameHasBeenSet = true; m_groupName = std::forward<GroupNameT>(value); }
129 template<typename GroupNameT = Aws::String>
130 SecurityGroup& WithGroupName(GroupNameT&& value) { SetGroupName(std::forward<GroupNameT>(value)); return *this;}
132
134
137 inline const Aws::String& GetDescription() const { return m_description; }
138 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
139 template<typename DescriptionT = Aws::String>
140 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
141 template<typename DescriptionT = Aws::String>
142 SecurityGroup& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
144
146
149 inline const Aws::Vector<IpPermission>& GetIpPermissions() const { return m_ipPermissions; }
150 inline bool IpPermissionsHasBeenSet() const { return m_ipPermissionsHasBeenSet; }
151 template<typename IpPermissionsT = Aws::Vector<IpPermission>>
152 void SetIpPermissions(IpPermissionsT&& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions = std::forward<IpPermissionsT>(value); }
153 template<typename IpPermissionsT = Aws::Vector<IpPermission>>
154 SecurityGroup& WithIpPermissions(IpPermissionsT&& value) { SetIpPermissions(std::forward<IpPermissionsT>(value)); return *this;}
155 template<typename IpPermissionsT = IpPermission>
156 SecurityGroup& AddIpPermissions(IpPermissionsT&& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions.emplace_back(std::forward<IpPermissionsT>(value)); return *this; }
158 private:
159
160 Aws::String m_groupId;
161 bool m_groupIdHasBeenSet = false;
162
163 Aws::Vector<IpPermission> m_ipPermissionsEgress;
164 bool m_ipPermissionsEgressHasBeenSet = false;
165
166 Aws::Vector<Tag> m_tags;
167 bool m_tagsHasBeenSet = false;
168
169 Aws::String m_vpcId;
170 bool m_vpcIdHasBeenSet = false;
171
172 Aws::String m_securityGroupArn;
173 bool m_securityGroupArnHasBeenSet = false;
174
175 Aws::String m_ownerId;
176 bool m_ownerIdHasBeenSet = false;
177
178 Aws::String m_groupName;
179 bool m_groupNameHasBeenSet = false;
180
181 Aws::String m_description;
182 bool m_descriptionHasBeenSet = false;
183
184 Aws::Vector<IpPermission> m_ipPermissions;
185 bool m_ipPermissionsHasBeenSet = false;
186 };
187
188} // namespace Model
189} // namespace EC2
190} // namespace Aws
const Aws::Vector< IpPermission > & GetIpPermissionsEgress() const
void SetTags(TagsT &&value)
const Aws::Vector< IpPermission > & GetIpPermissions() const
AWS_EC2_API SecurityGroup & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetIpPermissions(IpPermissionsT &&value)
void SetIpPermissionsEgress(IpPermissionsEgressT &&value)
void SetVpcId(VpcIdT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
const Aws::String & GetSecurityGroupArn() const
void SetSecurityGroupArn(SecurityGroupArnT &&value)
SecurityGroup & WithSecurityGroupArn(SecurityGroupArnT &&value)
void SetGroupName(GroupNameT &&value)
const Aws::String & GetGroupName() const
void SetOwnerId(OwnerIdT &&value)
SecurityGroup & WithIpPermissions(IpPermissionsT &&value)
SecurityGroup & WithTags(TagsT &&value)
AWS_EC2_API SecurityGroup(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetDescription() const
SecurityGroup & WithGroupName(GroupNameT &&value)
const Aws::String & GetOwnerId() const
SecurityGroup & AddTags(TagsT &&value)
SecurityGroup & WithDescription(DescriptionT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
SecurityGroup & AddIpPermissionsEgress(IpPermissionsEgressT &&value)
void SetGroupId(GroupIdT &&value)
SecurityGroup & AddIpPermissions(IpPermissionsT &&value)
const Aws::String & GetVpcId() const
const Aws::Vector< Tag > & GetTags() const
void SetDescription(DescriptionT &&value)
bool IpPermissionsEgressHasBeenSet() const
const Aws::String & GetGroupId() const
SecurityGroup & WithOwnerId(OwnerIdT &&value)
SecurityGroup & WithIpPermissionsEgress(IpPermissionsEgressT &&value)
SecurityGroup & WithGroupId(GroupIdT &&value)
AWS_EC2_API SecurityGroup()=default
SecurityGroup & WithVpcId(VpcIdT &&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