AWS SDK for C++  1.9.71
AWS SDK for C++
CreateSecurityGroupRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
8 #include <aws/ec2/EC2Request.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace EC2
17 {
18 namespace Model
19 {
20 
24  {
25  public:
27 
28  // Service request name is the Operation name which will send this request out,
29  // each operation should has unique request name, so that we can get operation's name from this request.
30  // Note: this is not true for response, multiple operations may have the same response name,
31  // so we can not get operation's name from response.
32  inline virtual const char* GetServiceRequestName() const override { return "CreateSecurityGroup"; }
33 
34  Aws::String SerializePayload() const override;
35 
36  protected:
37  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
38 
39  public:
40 
47  inline const Aws::String& GetDescription() const{ return m_description; }
48 
55  inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
56 
63  inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
64 
71  inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
72 
79  inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
80 
87  inline CreateSecurityGroupRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
88 
95  inline CreateSecurityGroupRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
96 
103  inline CreateSecurityGroupRequest& WithDescription(const char* value) { SetDescription(value); return *this;}
104 
105 
112  inline const Aws::String& GetGroupName() const{ return m_groupName; }
113 
120  inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; }
121 
128  inline void SetGroupName(const Aws::String& value) { m_groupNameHasBeenSet = true; m_groupName = value; }
129 
136  inline void SetGroupName(Aws::String&& value) { m_groupNameHasBeenSet = true; m_groupName = std::move(value); }
137 
144  inline void SetGroupName(const char* value) { m_groupNameHasBeenSet = true; m_groupName.assign(value); }
145 
152  inline CreateSecurityGroupRequest& WithGroupName(const Aws::String& value) { SetGroupName(value); return *this;}
153 
160  inline CreateSecurityGroupRequest& WithGroupName(Aws::String&& value) { SetGroupName(std::move(value)); return *this;}
161 
168  inline CreateSecurityGroupRequest& WithGroupName(const char* value) { SetGroupName(value); return *this;}
169 
170 
174  inline const Aws::String& GetVpcId() const{ return m_vpcId; }
175 
179  inline bool VpcIdHasBeenSet() const { return m_vpcIdHasBeenSet; }
180 
184  inline void SetVpcId(const Aws::String& value) { m_vpcIdHasBeenSet = true; m_vpcId = value; }
185 
189  inline void SetVpcId(Aws::String&& value) { m_vpcIdHasBeenSet = true; m_vpcId = std::move(value); }
190 
194  inline void SetVpcId(const char* value) { m_vpcIdHasBeenSet = true; m_vpcId.assign(value); }
195 
199  inline CreateSecurityGroupRequest& WithVpcId(const Aws::String& value) { SetVpcId(value); return *this;}
200 
204  inline CreateSecurityGroupRequest& WithVpcId(Aws::String&& value) { SetVpcId(std::move(value)); return *this;}
205 
209  inline CreateSecurityGroupRequest& WithVpcId(const char* value) { SetVpcId(value); return *this;}
210 
211 
215  inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const{ return m_tagSpecifications; }
216 
220  inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
221 
225  inline void SetTagSpecifications(const Aws::Vector<TagSpecification>& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; }
226 
230  inline void SetTagSpecifications(Aws::Vector<TagSpecification>&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); }
231 
235  inline CreateSecurityGroupRequest& WithTagSpecifications(const Aws::Vector<TagSpecification>& value) { SetTagSpecifications(value); return *this;}
236 
240  inline CreateSecurityGroupRequest& WithTagSpecifications(Aws::Vector<TagSpecification>&& value) { SetTagSpecifications(std::move(value)); return *this;}
241 
245  inline CreateSecurityGroupRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; }
246 
250  inline CreateSecurityGroupRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; }
251 
252 
259  inline bool GetDryRun() const{ return m_dryRun; }
260 
267  inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
268 
275  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
276 
283  inline CreateSecurityGroupRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
284 
285  private:
286 
287  Aws::String m_description;
288  bool m_descriptionHasBeenSet;
289 
290  Aws::String m_groupName;
291  bool m_groupNameHasBeenSet;
292 
293  Aws::String m_vpcId;
294  bool m_vpcIdHasBeenSet;
295 
296  Aws::Vector<TagSpecification> m_tagSpecifications;
297  bool m_tagSpecificationsHasBeenSet;
298 
299  bool m_dryRun;
300  bool m_dryRunHasBeenSet;
301  };
302 
303 } // namespace Model
304 } // namespace EC2
305 } // namespace Aws
TagSpecification.h
Aws::EC2::Model::CreateSecurityGroupRequest::SetGroupName
void SetGroupName(const char *value)
Definition: CreateSecurityGroupRequest.h:144
Aws::EC2::Model::CreateSecurityGroupRequest::SetGroupName
void SetGroupName(Aws::String &&value)
Definition: CreateSecurityGroupRequest.h:136
Aws::EC2::Model::CreateSecurityGroupRequest::SetDescription
void SetDescription(const char *value)
Definition: CreateSecurityGroupRequest.h:79
Aws::EC2::Model::CreateSecurityGroupRequest::WithDescription
CreateSecurityGroupRequest & WithDescription(const char *value)
Definition: CreateSecurityGroupRequest.h:103
Aws::EC2::Model::CreateSecurityGroupRequest::SetDescription
void SetDescription(Aws::String &&value)
Definition: CreateSecurityGroupRequest.h:71
Aws::Http::URI
Definition: URI.h:32
Aws::EC2::Model::CreateSecurityGroupRequest::WithDryRun
CreateSecurityGroupRequest & WithDryRun(bool value)
Definition: CreateSecurityGroupRequest.h:283
Aws::EC2::Model::CreateSecurityGroupRequest::SetVpcId
void SetVpcId(const char *value)
Definition: CreateSecurityGroupRequest.h:194
Aws::EC2::Model::CreateSecurityGroupRequest::GetDryRun
bool GetDryRun() const
Definition: CreateSecurityGroupRequest.h:259
Aws::EC2::Model::CreateSecurityGroupRequest::SetDryRun
void SetDryRun(bool value)
Definition: CreateSecurityGroupRequest.h:275
Aws::EC2::Model::CreateSecurityGroupRequest::DescriptionHasBeenSet
bool DescriptionHasBeenSet() const
Definition: CreateSecurityGroupRequest.h:55
Aws::EC2::Model::CreateSecurityGroupRequest::DryRunHasBeenSet
bool DryRunHasBeenSet() const
Definition: CreateSecurityGroupRequest.h:267
Aws::EC2::Model::CreateSecurityGroupRequest::GroupNameHasBeenSet
bool GroupNameHasBeenSet() const
Definition: CreateSecurityGroupRequest.h:120
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::CreateSecurityGroupRequest::WithDescription
CreateSecurityGroupRequest & WithDescription(Aws::String &&value)
Definition: CreateSecurityGroupRequest.h:95
Aws::EC2::Model::CreateSecurityGroupRequest::WithTagSpecifications
CreateSecurityGroupRequest & WithTagSpecifications(const Aws::Vector< TagSpecification > &value)
Definition: CreateSecurityGroupRequest.h:235
Aws::EC2::Model::CreateSecurityGroupRequest::SetTagSpecifications
void SetTagSpecifications(Aws::Vector< TagSpecification > &&value)
Definition: CreateSecurityGroupRequest.h:230
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::EC2::Model::CreateSecurityGroupRequest::GetGroupName
const Aws::String & GetGroupName() const
Definition: CreateSecurityGroupRequest.h:112
Aws::EC2::Model::CreateSecurityGroupRequest::WithVpcId
CreateSecurityGroupRequest & WithVpcId(const Aws::String &value)
Definition: CreateSecurityGroupRequest.h:199
AWSVector.h
Aws::EC2::Model::CreateSecurityGroupRequest::WithVpcId
CreateSecurityGroupRequest & WithVpcId(Aws::String &&value)
Definition: CreateSecurityGroupRequest.h:204
Aws::EC2::Model::CreateSecurityGroupRequest::SetVpcId
void SetVpcId(const Aws::String &value)
Definition: CreateSecurityGroupRequest.h:184
Aws::EC2::Model::CreateSecurityGroupRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: CreateSecurityGroupRequest.h:32
Aws::EC2::Model::CreateSecurityGroupRequest::GetDescription
const Aws::String & GetDescription() const
Definition: CreateSecurityGroupRequest.h:47
Aws::EC2::Model::CreateSecurityGroupRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::EC2::Model::CreateSecurityGroupRequest
Definition: CreateSecurityGroupRequest.h:24
Aws::EC2::Model::CreateSecurityGroupRequest::SetDescription
void SetDescription(const Aws::String &value)
Definition: CreateSecurityGroupRequest.h:63
EC2Request.h
AWSString.h
Aws::EC2::Model::CreateSecurityGroupRequest::WithTagSpecifications
CreateSecurityGroupRequest & WithTagSpecifications(Aws::Vector< TagSpecification > &&value)
Definition: CreateSecurityGroupRequest.h:240
Aws::EC2::Model::CreateSecurityGroupRequest::TagSpecificationsHasBeenSet
bool TagSpecificationsHasBeenSet() const
Definition: CreateSecurityGroupRequest.h:220
Aws::EC2::Model::CreateSecurityGroupRequest::WithVpcId
CreateSecurityGroupRequest & WithVpcId(const char *value)
Definition: CreateSecurityGroupRequest.h:209
Aws::EC2::Model::CreateSecurityGroupRequest::AddTagSpecifications
CreateSecurityGroupRequest & AddTagSpecifications(TagSpecification &&value)
Definition: CreateSecurityGroupRequest.h:250
Aws::EC2::Model::CreateSecurityGroupRequest::VpcIdHasBeenSet
bool VpcIdHasBeenSet() const
Definition: CreateSecurityGroupRequest.h:179
Aws::EC2::Model::CreateSecurityGroupRequest::AddTagSpecifications
CreateSecurityGroupRequest & AddTagSpecifications(const TagSpecification &value)
Definition: CreateSecurityGroupRequest.h:245
Aws::EC2::Model::CreateSecurityGroupRequest::WithDescription
CreateSecurityGroupRequest & WithDescription(const Aws::String &value)
Definition: CreateSecurityGroupRequest.h:87
Aws::EC2::Model::CreateSecurityGroupRequest::SetTagSpecifications
void SetTagSpecifications(const Aws::Vector< TagSpecification > &value)
Definition: CreateSecurityGroupRequest.h:225
Aws::EC2::Model::CreateSecurityGroupRequest::SetVpcId
void SetVpcId(Aws::String &&value)
Definition: CreateSecurityGroupRequest.h:189
Aws
Definition: AccessManagementClient.h:15
Aws::EC2::Model::CreateSecurityGroupRequest::CreateSecurityGroupRequest
CreateSecurityGroupRequest()
Aws::EC2::Model::CreateSecurityGroupRequest::WithGroupName
CreateSecurityGroupRequest & WithGroupName(Aws::String &&value)
Definition: CreateSecurityGroupRequest.h:160
Aws::EC2::Model::CreateSecurityGroupRequest::GetVpcId
const Aws::String & GetVpcId() const
Definition: CreateSecurityGroupRequest.h:174
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::EC2::Model::CreateSecurityGroupRequest::WithGroupName
CreateSecurityGroupRequest & WithGroupName(const char *value)
Definition: CreateSecurityGroupRequest.h:168
Aws::EC2::Model::CreateSecurityGroupRequest::GetTagSpecifications
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
Definition: CreateSecurityGroupRequest.h:215
Aws::EC2::EC2Request
Definition: EC2Request.h:17
Aws::EC2::Model::CreateSecurityGroupRequest::SetGroupName
void SetGroupName(const Aws::String &value)
Definition: CreateSecurityGroupRequest.h:128
Aws::EC2::Model::CreateSecurityGroupRequest::WithGroupName
CreateSecurityGroupRequest & WithGroupName(const Aws::String &value)
Definition: CreateSecurityGroupRequest.h:152
Aws::EC2::Model::TagSpecification
Definition: TagSpecification.h:35
EC2_EXPORTS.h
Aws::EC2::Model::CreateSecurityGroupRequest::DumpBodyToUrl
void DumpBodyToUrl(Aws::Http::URI &uri) const override