/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace CloudFormation { namespace Model { /** *

The input for the SetStackPolicy action.

See Also:

AWS * API Reference

*/ class SetStackPolicyRequest : public CloudFormationRequest { public: AWS_CLOUDFORMATION_API SetStackPolicyRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "SetStackPolicy"; } AWS_CLOUDFORMATION_API Aws::String SerializePayload() const override; protected: AWS_CLOUDFORMATION_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The name or unique stack ID that you want to associate a policy with.

*/ inline const Aws::String& GetStackName() const{ return m_stackName; } /** *

The name or unique stack ID that you want to associate a policy with.

*/ inline bool StackNameHasBeenSet() const { return m_stackNameHasBeenSet; } /** *

The name or unique stack ID that you want to associate a policy with.

*/ inline void SetStackName(const Aws::String& value) { m_stackNameHasBeenSet = true; m_stackName = value; } /** *

The name or unique stack ID that you want to associate a policy with.

*/ inline void SetStackName(Aws::String&& value) { m_stackNameHasBeenSet = true; m_stackName = std::move(value); } /** *

The name or unique stack ID that you want to associate a policy with.

*/ inline void SetStackName(const char* value) { m_stackNameHasBeenSet = true; m_stackName.assign(value); } /** *

The name or unique stack ID that you want to associate a policy with.

*/ inline SetStackPolicyRequest& WithStackName(const Aws::String& value) { SetStackName(value); return *this;} /** *

The name or unique stack ID that you want to associate a policy with.

*/ inline SetStackPolicyRequest& WithStackName(Aws::String&& value) { SetStackName(std::move(value)); return *this;} /** *

The name or unique stack ID that you want to associate a policy with.

*/ inline SetStackPolicyRequest& WithStackName(const char* value) { SetStackName(value); return *this;} /** *

Structure containing the stack policy body. For more information, go to * Prevent updates to stack resources in the CloudFormation User Guide. You can * specify either the StackPolicyBody or the * StackPolicyURL parameter, but not both.

*/ inline const Aws::String& GetStackPolicyBody() const{ return m_stackPolicyBody; } /** *

Structure containing the stack policy body. For more information, go to * Prevent updates to stack resources in the CloudFormation User Guide. You can * specify either the StackPolicyBody or the * StackPolicyURL parameter, but not both.

*/ inline bool StackPolicyBodyHasBeenSet() const { return m_stackPolicyBodyHasBeenSet; } /** *

Structure containing the stack policy body. For more information, go to * Prevent updates to stack resources in the CloudFormation User Guide. You can * specify either the StackPolicyBody or the * StackPolicyURL parameter, but not both.

*/ inline void SetStackPolicyBody(const Aws::String& value) { m_stackPolicyBodyHasBeenSet = true; m_stackPolicyBody = value; } /** *

Structure containing the stack policy body. For more information, go to * Prevent updates to stack resources in the CloudFormation User Guide. You can * specify either the StackPolicyBody or the * StackPolicyURL parameter, but not both.

*/ inline void SetStackPolicyBody(Aws::String&& value) { m_stackPolicyBodyHasBeenSet = true; m_stackPolicyBody = std::move(value); } /** *

Structure containing the stack policy body. For more information, go to * Prevent updates to stack resources in the CloudFormation User Guide. You can * specify either the StackPolicyBody or the * StackPolicyURL parameter, but not both.

*/ inline void SetStackPolicyBody(const char* value) { m_stackPolicyBodyHasBeenSet = true; m_stackPolicyBody.assign(value); } /** *

Structure containing the stack policy body. For more information, go to * Prevent updates to stack resources in the CloudFormation User Guide. You can * specify either the StackPolicyBody or the * StackPolicyURL parameter, but not both.

*/ inline SetStackPolicyRequest& WithStackPolicyBody(const Aws::String& value) { SetStackPolicyBody(value); return *this;} /** *

Structure containing the stack policy body. For more information, go to * Prevent updates to stack resources in the CloudFormation User Guide. You can * specify either the StackPolicyBody or the * StackPolicyURL parameter, but not both.

*/ inline SetStackPolicyRequest& WithStackPolicyBody(Aws::String&& value) { SetStackPolicyBody(std::move(value)); return *this;} /** *

Structure containing the stack policy body. For more information, go to * Prevent updates to stack resources in the CloudFormation User Guide. You can * specify either the StackPolicyBody or the * StackPolicyURL parameter, but not both.

*/ inline SetStackPolicyRequest& WithStackPolicyBody(const char* value) { SetStackPolicyBody(value); return *this;} /** *

Location of a file containing the stack policy. The URL must point to a * policy (maximum size: 16 KB) located in an Amazon S3 bucket in the same Amazon * Web Services Region as the stack. You can specify either the * StackPolicyBody or the StackPolicyURL parameter, but * not both.

*/ inline const Aws::String& GetStackPolicyURL() const{ return m_stackPolicyURL; } /** *

Location of a file containing the stack policy. The URL must point to a * policy (maximum size: 16 KB) located in an Amazon S3 bucket in the same Amazon * Web Services Region as the stack. You can specify either the * StackPolicyBody or the StackPolicyURL parameter, but * not both.

*/ inline bool StackPolicyURLHasBeenSet() const { return m_stackPolicyURLHasBeenSet; } /** *

Location of a file containing the stack policy. The URL must point to a * policy (maximum size: 16 KB) located in an Amazon S3 bucket in the same Amazon * Web Services Region as the stack. You can specify either the * StackPolicyBody or the StackPolicyURL parameter, but * not both.

*/ inline void SetStackPolicyURL(const Aws::String& value) { m_stackPolicyURLHasBeenSet = true; m_stackPolicyURL = value; } /** *

Location of a file containing the stack policy. The URL must point to a * policy (maximum size: 16 KB) located in an Amazon S3 bucket in the same Amazon * Web Services Region as the stack. You can specify either the * StackPolicyBody or the StackPolicyURL parameter, but * not both.

*/ inline void SetStackPolicyURL(Aws::String&& value) { m_stackPolicyURLHasBeenSet = true; m_stackPolicyURL = std::move(value); } /** *

Location of a file containing the stack policy. The URL must point to a * policy (maximum size: 16 KB) located in an Amazon S3 bucket in the same Amazon * Web Services Region as the stack. You can specify either the * StackPolicyBody or the StackPolicyURL parameter, but * not both.

*/ inline void SetStackPolicyURL(const char* value) { m_stackPolicyURLHasBeenSet = true; m_stackPolicyURL.assign(value); } /** *

Location of a file containing the stack policy. The URL must point to a * policy (maximum size: 16 KB) located in an Amazon S3 bucket in the same Amazon * Web Services Region as the stack. You can specify either the * StackPolicyBody or the StackPolicyURL parameter, but * not both.

*/ inline SetStackPolicyRequest& WithStackPolicyURL(const Aws::String& value) { SetStackPolicyURL(value); return *this;} /** *

Location of a file containing the stack policy. The URL must point to a * policy (maximum size: 16 KB) located in an Amazon S3 bucket in the same Amazon * Web Services Region as the stack. You can specify either the * StackPolicyBody or the StackPolicyURL parameter, but * not both.

*/ inline SetStackPolicyRequest& WithStackPolicyURL(Aws::String&& value) { SetStackPolicyURL(std::move(value)); return *this;} /** *

Location of a file containing the stack policy. The URL must point to a * policy (maximum size: 16 KB) located in an Amazon S3 bucket in the same Amazon * Web Services Region as the stack. You can specify either the * StackPolicyBody or the StackPolicyURL parameter, but * not both.

*/ inline SetStackPolicyRequest& WithStackPolicyURL(const char* value) { SetStackPolicyURL(value); return *this;} private: Aws::String m_stackName; bool m_stackNameHasBeenSet = false; Aws::String m_stackPolicyBody; bool m_stackPolicyBodyHasBeenSet = false; Aws::String m_stackPolicyURL; bool m_stackPolicyURLHasBeenSet = false; }; } // namespace Model } // namespace CloudFormation } // namespace Aws