aws_sdk_cloudformation/client/
set_stack_policy.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`SetStackPolicy`](crate::operation::set_stack_policy::builders::SetStackPolicyFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`stack_name(impl Into<String>)`](crate::operation::set_stack_policy::builders::SetStackPolicyFluentBuilder::stack_name) / [`set_stack_name(Option<String>)`](crate::operation::set_stack_policy::builders::SetStackPolicyFluentBuilder::set_stack_name):<br>required: **true**<br><p>The name or unique stack ID that you want to associate a policy with.</p><br>
7    ///   - [`stack_policy_body(impl Into<String>)`](crate::operation::set_stack_policy::builders::SetStackPolicyFluentBuilder::stack_policy_body) / [`set_stack_policy_body(Option<String>)`](crate::operation::set_stack_policy::builders::SetStackPolicyFluentBuilder::set_stack_policy_body):<br>required: **false**<br><p>Structure containing the stack policy body. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html">Prevent updates to stack resources</a> in the <i>CloudFormation User Guide</i>. You can specify either the <code>StackPolicyBody</code> or the <code>StackPolicyURL</code> parameter, but not both.</p><br>
8    ///   - [`stack_policy_url(impl Into<String>)`](crate::operation::set_stack_policy::builders::SetStackPolicyFluentBuilder::stack_policy_url) / [`set_stack_policy_url(Option<String>)`](crate::operation::set_stack_policy::builders::SetStackPolicyFluentBuilder::set_stack_policy_url):<br>required: **false**<br><p>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. The location for an Amazon S3 bucket must start with <code>https://</code>. You can specify either the <code>StackPolicyBody</code> or the <code>StackPolicyURL</code> parameter, but not both.</p><br>
9    /// - On success, responds with [`SetStackPolicyOutput`](crate::operation::set_stack_policy::SetStackPolicyOutput)
10    /// - On failure, responds with [`SdkError<SetStackPolicyError>`](crate::operation::set_stack_policy::SetStackPolicyError)
11    pub fn set_stack_policy(&self) -> crate::operation::set_stack_policy::builders::SetStackPolicyFluentBuilder {
12        crate::operation::set_stack_policy::builders::SetStackPolicyFluentBuilder::new(self.handle.clone())
13    }
14}