Skip to content

CloudFormationClient.set_stack_policy

rboto-cloudformation==0.4.0 · Service index · Types

Model summary (excerpt): Sets a stack policy for a specified stack.

Install and imports

python -m pip install "rboto[cloudformation]==0.4.0"
from rboto import CloudFormationClient

Signature

async def set_stack_policy(
    *,
    stack_name: str,
    stack_policy_body: str | None = None,
    stack_policy_url: str | None = None,
) -> None: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
stack_name Yes The name or unique stack ID that you want to associate a policy with.
stack_policy_body No Structure that contains the stack policy body. For more information, see Prevent updates to stack resources in the CloudFormation User Guide . You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.
stack_policy_url No Location of a file that contains 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. The location for an Amazon S3 bucket must start with https:// . URLs from S3 static websites are not supported. You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.

Output

None.

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

—

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

No modeled service errors for this operation.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model