aws-sdk-ec2 1.222.0

AWS SDK for Amazon Elastic Compute Cloud
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DisableIpamPolicyInput {
    /// <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
    pub dry_run: ::std::option::Option<bool>,
    /// <p>The ID of the IPAM policy to disable.</p>
    pub ipam_policy_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the Amazon Web Services Organizations target for which to disable the IPAM policy. This parameter is required only when IPAM is integrated with Amazon Web Services Organizations. When IPAM is not integrated with Amazon Web Services Organizations, omit this parameter and the policy will be disabled for the current account.</p>
    /// <p>A target can be an individual Amazon Web Services account or an entity within an Amazon Web Services Organization to which an IPAM policy can be applied.</p>
    pub organization_target_id: ::std::option::Option<::std::string::String>,
}
impl DisableIpamPolicyInput {
    /// <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
    pub fn dry_run(&self) -> ::std::option::Option<bool> {
        self.dry_run
    }
    /// <p>The ID of the IPAM policy to disable.</p>
    pub fn ipam_policy_id(&self) -> ::std::option::Option<&str> {
        self.ipam_policy_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services Organizations target for which to disable the IPAM policy. This parameter is required only when IPAM is integrated with Amazon Web Services Organizations. When IPAM is not integrated with Amazon Web Services Organizations, omit this parameter and the policy will be disabled for the current account.</p>
    /// <p>A target can be an individual Amazon Web Services account or an entity within an Amazon Web Services Organization to which an IPAM policy can be applied.</p>
    pub fn organization_target_id(&self) -> ::std::option::Option<&str> {
        self.organization_target_id.as_deref()
    }
}
impl DisableIpamPolicyInput {
    /// Creates a new builder-style object to manufacture [`DisableIpamPolicyInput`](crate::operation::disable_ipam_policy::DisableIpamPolicyInput).
    pub fn builder() -> crate::operation::disable_ipam_policy::builders::DisableIpamPolicyInputBuilder {
        crate::operation::disable_ipam_policy::builders::DisableIpamPolicyInputBuilder::default()
    }
}

/// A builder for [`DisableIpamPolicyInput`](crate::operation::disable_ipam_policy::DisableIpamPolicyInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DisableIpamPolicyInputBuilder {
    pub(crate) dry_run: ::std::option::Option<bool>,
    pub(crate) ipam_policy_id: ::std::option::Option<::std::string::String>,
    pub(crate) organization_target_id: ::std::option::Option<::std::string::String>,
}
impl DisableIpamPolicyInputBuilder {
    /// <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
    pub fn dry_run(mut self, input: bool) -> Self {
        self.dry_run = ::std::option::Option::Some(input);
        self
    }
    /// <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
        self.dry_run = input;
        self
    }
    /// <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
        &self.dry_run
    }
    /// <p>The ID of the IPAM policy to disable.</p>
    /// This field is required.
    pub fn ipam_policy_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ipam_policy_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the IPAM policy to disable.</p>
    pub fn set_ipam_policy_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ipam_policy_id = input;
        self
    }
    /// <p>The ID of the IPAM policy to disable.</p>
    pub fn get_ipam_policy_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.ipam_policy_id
    }
    /// <p>The ID of the Amazon Web Services Organizations target for which to disable the IPAM policy. This parameter is required only when IPAM is integrated with Amazon Web Services Organizations. When IPAM is not integrated with Amazon Web Services Organizations, omit this parameter and the policy will be disabled for the current account.</p>
    /// <p>A target can be an individual Amazon Web Services account or an entity within an Amazon Web Services Organization to which an IPAM policy can be applied.</p>
    pub fn organization_target_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.organization_target_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Amazon Web Services Organizations target for which to disable the IPAM policy. This parameter is required only when IPAM is integrated with Amazon Web Services Organizations. When IPAM is not integrated with Amazon Web Services Organizations, omit this parameter and the policy will be disabled for the current account.</p>
    /// <p>A target can be an individual Amazon Web Services account or an entity within an Amazon Web Services Organization to which an IPAM policy can be applied.</p>
    pub fn set_organization_target_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.organization_target_id = input;
        self
    }
    /// <p>The ID of the Amazon Web Services Organizations target for which to disable the IPAM policy. This parameter is required only when IPAM is integrated with Amazon Web Services Organizations. When IPAM is not integrated with Amazon Web Services Organizations, omit this parameter and the policy will be disabled for the current account.</p>
    /// <p>A target can be an individual Amazon Web Services account or an entity within an Amazon Web Services Organization to which an IPAM policy can be applied.</p>
    pub fn get_organization_target_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.organization_target_id
    }
    /// Consumes the builder and constructs a [`DisableIpamPolicyInput`](crate::operation::disable_ipam_policy::DisableIpamPolicyInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::disable_ipam_policy::DisableIpamPolicyInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::disable_ipam_policy::DisableIpamPolicyInput {
            dry_run: self.dry_run,
            ipam_policy_id: self.ipam_policy_id,
            organization_target_id: self.organization_target_id,
        })
    }
}