set_stack_policy
async
¶
set_stack_policy(
*,
config_overrides: Optional[AsyncCloudFormationClientConfig] = None,
stack_name: Optional[StackName] = None,
stack_policy_body: Optional[StackPolicyBody] = None,
stack_policy_url: Optional[StackPolicyURL] = None,
) -> None
Sets a stack policy for a specified stack.
Parameters:
-
stack_name(Optional[StackName], default:None) –The name or unique stack ID that you want to associate a policy with.
-
stack_policy_body(Optional[StackPolicyBody], default:None) –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
StackPolicyBodyor theStackPolicyURLparameter, but not both. -
stack_policy_url(Optional[StackPolicyURL], default:None) –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
StackPolicyBodyor theStackPolicyURLparameter, but not both.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.