v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-14132465739.8 KB

Sets a stack policy for a specified stack.

get/#Action=SetStackPolicy

Query parameters

StackNamestring required

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

StackPolicyBodystring

Structure containing the stack policy body. For more information, go to <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html"> Prevent updates to stack resources</a> in the CloudFormation User Guide. You can specify either the <code>StackPolicyBody</code> or the <code>StackPolicyURL</code> parameter, but not both.

StackPolicyURLstring

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 <code>StackPolicyBody</code> or the <code>StackPolicyURL</code> parameter, but not both.

Action'SetStackPolicy' required
Version'2010-05-15' required

Response

Success