Returns the stack policy for a specified stack. If a stack doesn't have a policy, a null value is returned.
Request ParametersFor information about the parameters that are common to all actions, see Common Parameters.
The name or unique stack ID that's associated with the stack whose policy you want to get.
Type: String
Required: Yes
The following element is returned by the service.
Structure that contains the stack policy body. (For more information, see Prevent updates to stack resources in the AWS CloudFormation User Guide.)
Type: String
Length Constraints: Minimum length of 1. Maximum length of 16384.
For information about the errors that are common to all actions, see Common Errors.
Examples GetStackPolicyThis example illustrates one usage of GetStackPolicy.
Sample Request
https://cloudformation.us-east-1.amazonaws.com/
?Action=GetStackPolicy
&StackName=MyStack
&Version=2010-05-15
&SignatureVersion=2
&Timestamp=2010-07-27T22%3A26%3A28.000Z
&AWSAccessKeyId=[AWS Access KeyID]
&Signature=[Signature]
Sample Response
<GetStackPolicyResponse xmlns="http://cloudformation.amazonaws.com/doc/2010-05-15/">
<GetStackPolicyResult>
<StackPolicyBody>"{
"Statement" : [
{
"Effect" : "Deny",
"Action" : "Update:*",
"Principal" : "*",
"Resource" : "LogicalResourceId/ProductionDatabase"
},
{
"Effect" : "Allow",
"Action" : "Update:*",
"Principal" : "*",
"Resource" : "*"
}
]
}</StackPolicyBody>
</GetStackPolicyResult>
<ResponseMetadata>
<RequestId>b9b4b068-3a41-11e5-94eb-example</RequestId>
</ResponseMetadata>
</GetStackPolicyResponse>
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4