aws-sdk-ec2 1.223.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 EnableIpamPolicyInput {
    /// <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 enable.</p>
    pub ipam_policy_id: ::std::option::Option<::std::string::String>,
    /// <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>
    /// <p>The ID of the Amazon Web Services Organizations target for which to enable 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 apply to the current account.</p>
    pub organization_target_id: ::std::option::Option<::std::string::String>,
}
impl EnableIpamPolicyInput {
    /// <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 enable.</p>
    pub fn ipam_policy_id(&self) -> ::std::option::Option<&str> {
        self.ipam_policy_id.as_deref()
    }
    /// <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>
    /// <p>The ID of the Amazon Web Services Organizations target for which to enable 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 apply to the current account.</p>
    pub fn organization_target_id(&self) -> ::std::option::Option<&str> {
        self.organization_target_id.as_deref()
    }
}
impl EnableIpamPolicyInput {
    /// Creates a new builder-style object to manufacture [`EnableIpamPolicyInput`](crate::operation::enable_ipam_policy::EnableIpamPolicyInput).
    pub fn builder() -> crate::operation::enable_ipam_policy::builders::EnableIpamPolicyInputBuilder {
        crate::operation::enable_ipam_policy::builders::EnableIpamPolicyInputBuilder::default()
    }
}

/// A builder for [`EnableIpamPolicyInput`](crate::operation::enable_ipam_policy::EnableIpamPolicyInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct EnableIpamPolicyInputBuilder {
    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 EnableIpamPolicyInputBuilder {
    /// <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 enable.</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 enable.</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 enable.</p>
    pub fn get_ipam_policy_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.ipam_policy_id
    }
    /// <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>
    /// <p>The ID of the Amazon Web Services Organizations target for which to enable 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 apply to the current account.</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>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>
    /// <p>The ID of the Amazon Web Services Organizations target for which to enable 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 apply to the current account.</p>
    pub fn set_organization_target_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.organization_target_id = input;
        self
    }
    /// <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>
    /// <p>The ID of the Amazon Web Services Organizations target for which to enable 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 apply to the current account.</p>
    pub fn get_organization_target_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.organization_target_id
    }
    /// Consumes the builder and constructs a [`EnableIpamPolicyInput`](crate::operation::enable_ipam_policy::EnableIpamPolicyInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::enable_ipam_policy::EnableIpamPolicyInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::enable_ipam_policy::EnableIpamPolicyInput {
            dry_run: self.dry_run,
            ipam_policy_id: self.ipam_policy_id,
            organization_target_id: self.organization_target_id,
        })
    }
}