1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>[Service-managed permissions] Describes whether StackSets automatically deploys to Organizations accounts that are added to a target organization or organizational unit (OU).</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AutoDeployment {
/// <p>If set to <code>true</code>, StackSets automatically deploys additional stack instances to Organizations accounts that are added to a target organization or organizational unit (OU) in the specified Regions. If an account is removed from a target organization or OU, StackSets deletes stack instances from the account in the specified Regions.</p>
pub enabled: ::std::option::Option<bool>,
/// <p>If set to <code>true</code>, stack resources are retained when an account is removed from a target organization or OU. If set to <code>false</code>, stack resources are deleted. Specify only if <code>Enabled</code> is set to <code>True</code>.</p>
pub retain_stacks_on_account_removal: ::std::option::Option<bool>,
}
impl AutoDeployment {
/// <p>If set to <code>true</code>, StackSets automatically deploys additional stack instances to Organizations accounts that are added to a target organization or organizational unit (OU) in the specified Regions. If an account is removed from a target organization or OU, StackSets deletes stack instances from the account in the specified Regions.</p>
pub fn enabled(&self) -> ::std::option::Option<bool> {
self.enabled
}
/// <p>If set to <code>true</code>, stack resources are retained when an account is removed from a target organization or OU. If set to <code>false</code>, stack resources are deleted. Specify only if <code>Enabled</code> is set to <code>True</code>.</p>
pub fn retain_stacks_on_account_removal(&self) -> ::std::option::Option<bool> {
self.retain_stacks_on_account_removal
}
}
impl AutoDeployment {
/// Creates a new builder-style object to manufacture [`AutoDeployment`](crate::types::AutoDeployment).
pub fn builder() -> crate::types::builders::AutoDeploymentBuilder {
crate::types::builders::AutoDeploymentBuilder::default()
}
}
/// A builder for [`AutoDeployment`](crate::types::AutoDeployment).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AutoDeploymentBuilder {
pub(crate) enabled: ::std::option::Option<bool>,
pub(crate) retain_stacks_on_account_removal: ::std::option::Option<bool>,
}
impl AutoDeploymentBuilder {
/// <p>If set to <code>true</code>, StackSets automatically deploys additional stack instances to Organizations accounts that are added to a target organization or organizational unit (OU) in the specified Regions. If an account is removed from a target organization or OU, StackSets deletes stack instances from the account in the specified Regions.</p>
pub fn enabled(mut self, input: bool) -> Self {
self.enabled = ::std::option::Option::Some(input);
self
}
/// <p>If set to <code>true</code>, StackSets automatically deploys additional stack instances to Organizations accounts that are added to a target organization or organizational unit (OU) in the specified Regions. If an account is removed from a target organization or OU, StackSets deletes stack instances from the account in the specified Regions.</p>
pub fn set_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
self.enabled = input;
self
}
/// <p>If set to <code>true</code>, StackSets automatically deploys additional stack instances to Organizations accounts that are added to a target organization or organizational unit (OU) in the specified Regions. If an account is removed from a target organization or OU, StackSets deletes stack instances from the account in the specified Regions.</p>
pub fn get_enabled(&self) -> &::std::option::Option<bool> {
&self.enabled
}
/// <p>If set to <code>true</code>, stack resources are retained when an account is removed from a target organization or OU. If set to <code>false</code>, stack resources are deleted. Specify only if <code>Enabled</code> is set to <code>True</code>.</p>
pub fn retain_stacks_on_account_removal(mut self, input: bool) -> Self {
self.retain_stacks_on_account_removal = ::std::option::Option::Some(input);
self
}
/// <p>If set to <code>true</code>, stack resources are retained when an account is removed from a target organization or OU. If set to <code>false</code>, stack resources are deleted. Specify only if <code>Enabled</code> is set to <code>True</code>.</p>
pub fn set_retain_stacks_on_account_removal(mut self, input: ::std::option::Option<bool>) -> Self {
self.retain_stacks_on_account_removal = input;
self
}
/// <p>If set to <code>true</code>, stack resources are retained when an account is removed from a target organization or OU. If set to <code>false</code>, stack resources are deleted. Specify only if <code>Enabled</code> is set to <code>True</code>.</p>
pub fn get_retain_stacks_on_account_removal(&self) -> &::std::option::Option<bool> {
&self.retain_stacks_on_account_removal
}
/// Consumes the builder and constructs a [`AutoDeployment`](crate::types::AutoDeployment).
pub fn build(self) -> crate::types::AutoDeployment {
crate::types::AutoDeployment {
enabled: self.enabled,
retain_stacks_on_account_removal: self.retain_stacks_on_account_removal,
}
}
}