Skip to content

CloudFormation  >  Operations  >  get_stack_policy

get_stack_policy

Operation

get_stack_policy async

get_stack_policy(input: GetStackPolicyInput, plugins: list[Plugin] | None = None) -> GetStackPolicyOutput

Returns the stack policy for a specified stack. If a stack doesn't have a policy, a null value is returned.

Parameters:

Name Type Description Default
input GetStackPolicyInput

An instance of GetStackPolicyInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
GetStackPolicyOutput

An instance of GetStackPolicyOutput.

Input

GetStackPolicyInput dataclass

Bases: _SerdeShape

The input for the GetStackPolicy action.

Attributes

stack_name class-attribute instance-attribute
stack_name: str | None = ...

The name or unique stack ID that's associated with the stack whose policy you want to get.

Output

GetStackPolicyOutput dataclass

Bases: _SerdeShape

The output for the GetStackPolicy action.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

stack_policy_body class-attribute instance-attribute
stack_policy_body: str | None = ...

Structure that contains the stack policy body. For more information, see Prevent updates to stack resources in the CloudFormation User Guide.