AWS SDK for C++

AWS SDK for C++ Version 1.11.945

Loading...
Searching...
No Matches
CreateStackRequest.h
1
6#pragma once
7#include <aws/cloudformation/CloudFormationRequest.h>
8#include <aws/cloudformation/CloudFormation_EXPORTS.h>
9#include <aws/cloudformation/model/Capability.h>
10#include <aws/cloudformation/model/DeploymentConfig.h>
11#include <aws/cloudformation/model/OnFailure.h>
12#include <aws/cloudformation/model/Parameter.h>
13#include <aws/cloudformation/model/RollbackConfiguration.h>
14#include <aws/cloudformation/model/Tag.h>
15#include <aws/core/utils/memory/stl/AWSString.h>
16#include <aws/core/utils/memory/stl/AWSVector.h>
17
18#include <utility>
19
20namespace Aws {
21namespace CloudFormation {
22namespace Model {
23
30 public:
31 AWS_CLOUDFORMATION_API CreateStackRequest() = default;
32
33 // Service request name is the Operation name which will send this request out,
34 // each operation should has unique request name, so that we can get operation's name from this request.
35 // Note: this is not true for response, multiple operations may have the same response name,
36 // so we can not get operation's name from response.
37 inline virtual const char* GetServiceRequestName() const override { return "CreateStack"; }
38
39 AWS_CLOUDFORMATION_API Aws::String SerializePayload() const override;
40
41 protected:
42 AWS_CLOUDFORMATION_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
43
44 public:
46
53 inline const Aws::String& GetStackName() const { return m_stackName; }
54 inline bool StackNameHasBeenSet() const { return m_stackNameHasBeenSet; }
55 template <typename StackNameT = Aws::String>
56 void SetStackName(StackNameT&& value) {
57 m_stackNameHasBeenSet = true;
58 m_stackName = std::forward<StackNameT>(value);
59 }
60 template <typename StackNameT = Aws::String>
61 CreateStackRequest& WithStackName(StackNameT&& value) {
62 SetStackName(std::forward<StackNameT>(value));
63 return *this;
64 }
66
68
73 inline const Aws::String& GetTemplateBody() const { return m_templateBody; }
74 inline bool TemplateBodyHasBeenSet() const { return m_templateBodyHasBeenSet; }
75 template <typename TemplateBodyT = Aws::String>
76 void SetTemplateBody(TemplateBodyT&& value) {
77 m_templateBodyHasBeenSet = true;
78 m_templateBody = std::forward<TemplateBodyT>(value);
79 }
80 template <typename TemplateBodyT = Aws::String>
81 CreateStackRequest& WithTemplateBody(TemplateBodyT&& value) {
82 SetTemplateBody(std::forward<TemplateBodyT>(value));
83 return *this;
84 }
86
88
96 inline const Aws::String& GetTemplateURL() const { return m_templateURL; }
97 inline bool TemplateURLHasBeenSet() const { return m_templateURLHasBeenSet; }
98 template <typename TemplateURLT = Aws::String>
99 void SetTemplateURL(TemplateURLT&& value) {
100 m_templateURLHasBeenSet = true;
101 m_templateURL = std::forward<TemplateURLT>(value);
102 }
103 template <typename TemplateURLT = Aws::String>
104 CreateStackRequest& WithTemplateURL(TemplateURLT&& value) {
105 SetTemplateURL(std::forward<TemplateURLT>(value));
106 return *this;
107 }
109
111
117 inline const Aws::Vector<Parameter>& GetParameters() const { return m_parameters; }
118 inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; }
119 template <typename ParametersT = Aws::Vector<Parameter>>
120 void SetParameters(ParametersT&& value) {
121 m_parametersHasBeenSet = true;
122 m_parameters = std::forward<ParametersT>(value);
123 }
124 template <typename ParametersT = Aws::Vector<Parameter>>
125 CreateStackRequest& WithParameters(ParametersT&& value) {
126 SetParameters(std::forward<ParametersT>(value));
127 return *this;
128 }
129 template <typename ParametersT = Parameter>
130 CreateStackRequest& AddParameters(ParametersT&& value) {
131 m_parametersHasBeenSet = true;
132 m_parameters.emplace_back(std::forward<ParametersT>(value));
133 return *this;
134 }
136
138
143 inline bool GetDisableRollback() const { return m_disableRollback; }
144 inline bool DisableRollbackHasBeenSet() const { return m_disableRollbackHasBeenSet; }
145 inline void SetDisableRollback(bool value) {
146 m_disableRollbackHasBeenSet = true;
147 m_disableRollback = value;
148 }
150 SetDisableRollback(value);
151 return *this;
152 }
154
156
160 inline const RollbackConfiguration& GetRollbackConfiguration() const { return m_rollbackConfiguration; }
161 inline bool RollbackConfigurationHasBeenSet() const { return m_rollbackConfigurationHasBeenSet; }
162 template <typename RollbackConfigurationT = RollbackConfiguration>
163 void SetRollbackConfiguration(RollbackConfigurationT&& value) {
164 m_rollbackConfigurationHasBeenSet = true;
165 m_rollbackConfiguration = std::forward<RollbackConfigurationT>(value);
166 }
167 template <typename RollbackConfigurationT = RollbackConfiguration>
168 CreateStackRequest& WithRollbackConfiguration(RollbackConfigurationT&& value) {
169 SetRollbackConfiguration(std::forward<RollbackConfigurationT>(value));
170 return *this;
171 }
173
175
180 inline int GetTimeoutInMinutes() const { return m_timeoutInMinutes; }
181 inline bool TimeoutInMinutesHasBeenSet() const { return m_timeoutInMinutesHasBeenSet; }
182 inline void SetTimeoutInMinutes(int value) {
183 m_timeoutInMinutesHasBeenSet = true;
184 m_timeoutInMinutes = value;
185 }
187 SetTimeoutInMinutes(value);
188 return *this;
189 }
191
193
198 inline const Aws::Vector<Aws::String>& GetNotificationARNs() const { return m_notificationARNs; }
199 inline bool NotificationARNsHasBeenSet() const { return m_notificationARNsHasBeenSet; }
200 template <typename NotificationARNsT = Aws::Vector<Aws::String>>
201 void SetNotificationARNs(NotificationARNsT&& value) {
202 m_notificationARNsHasBeenSet = true;
203 m_notificationARNs = std::forward<NotificationARNsT>(value);
204 }
205 template <typename NotificationARNsT = Aws::Vector<Aws::String>>
206 CreateStackRequest& WithNotificationARNs(NotificationARNsT&& value) {
207 SetNotificationARNs(std::forward<NotificationARNsT>(value));
208 return *this;
209 }
210 template <typename NotificationARNsT = Aws::String>
211 CreateStackRequest& AddNotificationARNs(NotificationARNsT&& value) {
212 m_notificationARNsHasBeenSet = true;
213 m_notificationARNs.emplace_back(std::forward<NotificationARNsT>(value));
214 return *this;
215 }
217
219
281 inline const Aws::Vector<Capability>& GetCapabilities() const { return m_capabilities; }
282 inline bool CapabilitiesHasBeenSet() const { return m_capabilitiesHasBeenSet; }
283 template <typename CapabilitiesT = Aws::Vector<Capability>>
284 void SetCapabilities(CapabilitiesT&& value) {
285 m_capabilitiesHasBeenSet = true;
286 m_capabilities = std::forward<CapabilitiesT>(value);
287 }
288 template <typename CapabilitiesT = Aws::Vector<Capability>>
289 CreateStackRequest& WithCapabilities(CapabilitiesT&& value) {
290 SetCapabilities(std::forward<CapabilitiesT>(value));
291 return *this;
292 }
294 m_capabilitiesHasBeenSet = true;
295 m_capabilities.push_back(value);
296 return *this;
297 }
299
301
314 inline const Aws::Vector<Aws::String>& GetResourceTypes() const { return m_resourceTypes; }
315 inline bool ResourceTypesHasBeenSet() const { return m_resourceTypesHasBeenSet; }
316 template <typename ResourceTypesT = Aws::Vector<Aws::String>>
317 void SetResourceTypes(ResourceTypesT&& value) {
318 m_resourceTypesHasBeenSet = true;
319 m_resourceTypes = std::forward<ResourceTypesT>(value);
320 }
321 template <typename ResourceTypesT = Aws::Vector<Aws::String>>
322 CreateStackRequest& WithResourceTypes(ResourceTypesT&& value) {
323 SetResourceTypes(std::forward<ResourceTypesT>(value));
324 return *this;
325 }
326 template <typename ResourceTypesT = Aws::String>
327 CreateStackRequest& AddResourceTypes(ResourceTypesT&& value) {
328 m_resourceTypesHasBeenSet = true;
329 m_resourceTypes.emplace_back(std::forward<ResourceTypesT>(value));
330 return *this;
331 }
333
335
346 inline const Aws::String& GetRoleARN() const { return m_roleARN; }
347 inline bool RoleARNHasBeenSet() const { return m_roleARNHasBeenSet; }
348 template <typename RoleARNT = Aws::String>
349 void SetRoleARN(RoleARNT&& value) {
350 m_roleARNHasBeenSet = true;
351 m_roleARN = std::forward<RoleARNT>(value);
352 }
353 template <typename RoleARNT = Aws::String>
354 CreateStackRequest& WithRoleARN(RoleARNT&& value) {
355 SetRoleARN(std::forward<RoleARNT>(value));
356 return *this;
357 }
359
361
372 inline OnFailure GetOnFailure() const { return m_onFailure; }
373 inline bool OnFailureHasBeenSet() const { return m_onFailureHasBeenSet; }
374 inline void SetOnFailure(OnFailure value) {
375 m_onFailureHasBeenSet = true;
376 m_onFailure = value;
377 }
379 SetOnFailure(value);
380 return *this;
381 }
383
385
392 inline const Aws::String& GetStackPolicyBody() const { return m_stackPolicyBody; }
393 inline bool StackPolicyBodyHasBeenSet() const { return m_stackPolicyBodyHasBeenSet; }
394 template <typename StackPolicyBodyT = Aws::String>
395 void SetStackPolicyBody(StackPolicyBodyT&& value) {
396 m_stackPolicyBodyHasBeenSet = true;
397 m_stackPolicyBody = std::forward<StackPolicyBodyT>(value);
398 }
399 template <typename StackPolicyBodyT = Aws::String>
400 CreateStackRequest& WithStackPolicyBody(StackPolicyBodyT&& value) {
401 SetStackPolicyBody(std::forward<StackPolicyBodyT>(value));
402 return *this;
403 }
405
407
415 inline const Aws::String& GetStackPolicyURL() const { return m_stackPolicyURL; }
416 inline bool StackPolicyURLHasBeenSet() const { return m_stackPolicyURLHasBeenSet; }
417 template <typename StackPolicyURLT = Aws::String>
418 void SetStackPolicyURL(StackPolicyURLT&& value) {
419 m_stackPolicyURLHasBeenSet = true;
420 m_stackPolicyURL = std::forward<StackPolicyURLT>(value);
421 }
422 template <typename StackPolicyURLT = Aws::String>
423 CreateStackRequest& WithStackPolicyURL(StackPolicyURLT&& value) {
424 SetStackPolicyURL(std::forward<StackPolicyURLT>(value));
425 return *this;
426 }
428
430
435 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
436 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
437 template <typename TagsT = Aws::Vector<Tag>>
438 void SetTags(TagsT&& value) {
439 m_tagsHasBeenSet = true;
440 m_tags = std::forward<TagsT>(value);
441 }
442 template <typename TagsT = Aws::Vector<Tag>>
443 CreateStackRequest& WithTags(TagsT&& value) {
444 SetTags(std::forward<TagsT>(value));
445 return *this;
446 }
447 template <typename TagsT = Tag>
448 CreateStackRequest& AddTags(TagsT&& value) {
449 m_tagsHasBeenSet = true;
450 m_tags.emplace_back(std::forward<TagsT>(value));
451 return *this;
452 }
454
456
474 inline const Aws::String& GetClientRequestToken() const { return m_clientRequestToken; }
475 inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; }
476 template <typename ClientRequestTokenT = Aws::String>
477 void SetClientRequestToken(ClientRequestTokenT&& value) {
478 m_clientRequestTokenHasBeenSet = true;
479 m_clientRequestToken = std::forward<ClientRequestTokenT>(value);
480 }
481 template <typename ClientRequestTokenT = Aws::String>
482 CreateStackRequest& WithClientRequestToken(ClientRequestTokenT&& value) {
483 SetClientRequestToken(std::forward<ClientRequestTokenT>(value));
484 return *this;
485 }
487
489
501 inline bool GetEnableTerminationProtection() const { return m_enableTerminationProtection; }
502 inline bool EnableTerminationProtectionHasBeenSet() const { return m_enableTerminationProtectionHasBeenSet; }
503 inline void SetEnableTerminationProtection(bool value) {
504 m_enableTerminationProtectionHasBeenSet = true;
505 m_enableTerminationProtection = value;
506 }
509 return *this;
510 }
512
514
519 inline bool GetRetainExceptOnCreate() const { return m_retainExceptOnCreate; }
520 inline bool RetainExceptOnCreateHasBeenSet() const { return m_retainExceptOnCreateHasBeenSet; }
521 inline void SetRetainExceptOnCreate(bool value) {
522 m_retainExceptOnCreateHasBeenSet = true;
523 m_retainExceptOnCreate = value;
524 }
527 return *this;
528 }
530
532
536 inline const DeploymentConfig& GetDeploymentConfig() const { return m_deploymentConfig; }
537 inline bool DeploymentConfigHasBeenSet() const { return m_deploymentConfigHasBeenSet; }
538 template <typename DeploymentConfigT = DeploymentConfig>
539 void SetDeploymentConfig(DeploymentConfigT&& value) {
540 m_deploymentConfigHasBeenSet = true;
541 m_deploymentConfig = std::forward<DeploymentConfigT>(value);
542 }
543 template <typename DeploymentConfigT = DeploymentConfig>
544 CreateStackRequest& WithDeploymentConfig(DeploymentConfigT&& value) {
545 SetDeploymentConfig(std::forward<DeploymentConfigT>(value));
546 return *this;
547 }
549
551
555 inline bool GetDisableValidation() const { return m_disableValidation; }
556 inline bool DisableValidationHasBeenSet() const { return m_disableValidationHasBeenSet; }
557 inline void SetDisableValidation(bool value) {
558 m_disableValidationHasBeenSet = true;
559 m_disableValidation = value;
560 }
563 return *this;
564 }
566 private:
567 Aws::String m_stackName;
568
569 Aws::String m_templateBody;
570
571 Aws::String m_templateURL;
572
573 Aws::Vector<Parameter> m_parameters;
574
575 bool m_disableRollback{false};
576
577 RollbackConfiguration m_rollbackConfiguration;
578
579 int m_timeoutInMinutes{0};
580
581 Aws::Vector<Aws::String> m_notificationARNs;
582
583 Aws::Vector<Capability> m_capabilities;
584
585 Aws::Vector<Aws::String> m_resourceTypes;
586
587 Aws::String m_roleARN;
588
589 OnFailure m_onFailure{OnFailure::NOT_SET};
590
591 Aws::String m_stackPolicyBody;
592
593 Aws::String m_stackPolicyURL;
594
595 Aws::Vector<Tag> m_tags;
596
597 Aws::String m_clientRequestToken;
598
599 bool m_enableTerminationProtection{false};
600
601 bool m_retainExceptOnCreate{false};
602
603 DeploymentConfig m_deploymentConfig;
604
605 bool m_disableValidation{false};
606 bool m_stackNameHasBeenSet = false;
607 bool m_templateBodyHasBeenSet = false;
608 bool m_templateURLHasBeenSet = false;
609 bool m_parametersHasBeenSet = false;
610 bool m_disableRollbackHasBeenSet = false;
611 bool m_rollbackConfigurationHasBeenSet = false;
612 bool m_timeoutInMinutesHasBeenSet = false;
613 bool m_notificationARNsHasBeenSet = false;
614 bool m_capabilitiesHasBeenSet = false;
615 bool m_resourceTypesHasBeenSet = false;
616 bool m_roleARNHasBeenSet = false;
617 bool m_onFailureHasBeenSet = false;
618 bool m_stackPolicyBodyHasBeenSet = false;
619 bool m_stackPolicyURLHasBeenSet = false;
620 bool m_tagsHasBeenSet = false;
621 bool m_clientRequestTokenHasBeenSet = false;
622 bool m_enableTerminationProtectionHasBeenSet = false;
623 bool m_retainExceptOnCreateHasBeenSet = false;
624 bool m_deploymentConfigHasBeenSet = false;
625 bool m_disableValidationHasBeenSet = false;
626};
627
628} // namespace Model
629} // namespace CloudFormation
630} // namespace Aws
void SetDeploymentConfig(DeploymentConfigT &&value)
void SetStackPolicyBody(StackPolicyBodyT &&value)
virtual const char * GetServiceRequestName() const override
CreateStackRequest & WithDeploymentConfig(DeploymentConfigT &&value)
CreateStackRequest & AddNotificationARNs(NotificationARNsT &&value)
const RollbackConfiguration & GetRollbackConfiguration() const
CreateStackRequest & WithParameters(ParametersT &&value)
CreateStackRequest & WithOnFailure(OnFailure value)
CreateStackRequest & WithTimeoutInMinutes(int value)
AWS_CLOUDFORMATION_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
CreateStackRequest & WithRollbackConfiguration(RollbackConfigurationT &&value)
CreateStackRequest & WithRoleARN(RoleARNT &&value)
CreateStackRequest & WithRetainExceptOnCreate(bool value)
CreateStackRequest & WithDisableValidation(bool value)
CreateStackRequest & AddCapabilities(Capability value)
const DeploymentConfig & GetDeploymentConfig() const
CreateStackRequest & AddParameters(ParametersT &&value)
const Aws::Vector< Parameter > & GetParameters() const
CreateStackRequest & WithStackPolicyBody(StackPolicyBodyT &&value)
const Aws::Vector< Capability > & GetCapabilities() const
CreateStackRequest & AddResourceTypes(ResourceTypesT &&value)
const Aws::Vector< Tag > & GetTags() const
CreateStackRequest & WithCapabilities(CapabilitiesT &&value)
CreateStackRequest & WithDisableRollback(bool value)
void SetClientRequestToken(ClientRequestTokenT &&value)
CreateStackRequest & WithEnableTerminationProtection(bool value)
CreateStackRequest & AddTags(TagsT &&value)
CreateStackRequest & WithStackPolicyURL(StackPolicyURLT &&value)
CreateStackRequest & WithTemplateBody(TemplateBodyT &&value)
CreateStackRequest & WithTemplateURL(TemplateURLT &&value)
const Aws::Vector< Aws::String > & GetNotificationARNs() const
void SetNotificationARNs(NotificationARNsT &&value)
void SetRollbackConfiguration(RollbackConfigurationT &&value)
const Aws::Vector< Aws::String > & GetResourceTypes() const
CreateStackRequest & WithClientRequestToken(ClientRequestTokenT &&value)
CreateStackRequest & WithResourceTypes(ResourceTypesT &&value)
AWS_CLOUDFORMATION_API CreateStackRequest()=default
CreateStackRequest & WithTags(TagsT &&value)
AWS_CLOUDFORMATION_API Aws::String SerializePayload() const override
CreateStackRequest & WithNotificationARNs(NotificationARNsT &&value)
CreateStackRequest & WithStackName(StackNameT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector