aws-sdk-databasemigration 1.112.0

AWS SDK for AWS Database Migration Service
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 ModifyInstanceProfileInput {
    /// <p>The identifier of the instance profile. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen, or contain two consecutive hyphens.</p>
    pub instance_profile_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The Availability Zone where the instance profile runs.</p>
    pub availability_zone: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the connection parameters for the instance profile.</p>
    /// <p>If you don't specify a value for the <code>KmsKeyArn</code> parameter, then DMS uses an Amazon Web Services owned encryption key to encrypt your resources.</p>
    pub kms_key_arn: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the accessibility options for the instance profile. A value of <code>true</code> represents an instance profile with a public IP address. A value of <code>false</code> represents an instance profile with a private IP address. The default value is <code>true</code>.</p>
    pub publicly_accessible: ::std::option::Option<bool>,
    /// <p>Specifies the network type for the instance profile. A value of <code>IPV4</code> represents an instance profile with IPv4 network type and only supports IPv4 addressing. A value of <code>IPV6</code> represents an instance profile with IPv6 network type and only supports IPv6 addressing. A value of <code>DUAL</code> represents an instance profile with dual network type that supports IPv4 and IPv6 addressing.</p>
    pub network_type: ::std::option::Option<::std::string::String>,
    /// <p>A user-friendly name for the instance profile.</p>
    pub instance_profile_name: ::std::option::Option<::std::string::String>,
    /// <p>A user-friendly description for the instance profile.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>A subnet group to associate with the instance profile.</p>
    pub subnet_group_identifier: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the VPC security groups to be used with the instance profile. The VPC security group must work with the VPC containing the instance profile.</p>
    pub vpc_security_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl ModifyInstanceProfileInput {
    /// <p>The identifier of the instance profile. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen, or contain two consecutive hyphens.</p>
    pub fn instance_profile_identifier(&self) -> ::std::option::Option<&str> {
        self.instance_profile_identifier.as_deref()
    }
    /// <p>The Availability Zone where the instance profile runs.</p>
    pub fn availability_zone(&self) -> ::std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the connection parameters for the instance profile.</p>
    /// <p>If you don't specify a value for the <code>KmsKeyArn</code> parameter, then DMS uses an Amazon Web Services owned encryption key to encrypt your resources.</p>
    pub fn kms_key_arn(&self) -> ::std::option::Option<&str> {
        self.kms_key_arn.as_deref()
    }
    /// <p>Specifies the accessibility options for the instance profile. A value of <code>true</code> represents an instance profile with a public IP address. A value of <code>false</code> represents an instance profile with a private IP address. The default value is <code>true</code>.</p>
    pub fn publicly_accessible(&self) -> ::std::option::Option<bool> {
        self.publicly_accessible
    }
    /// <p>Specifies the network type for the instance profile. A value of <code>IPV4</code> represents an instance profile with IPv4 network type and only supports IPv4 addressing. A value of <code>IPV6</code> represents an instance profile with IPv6 network type and only supports IPv6 addressing. A value of <code>DUAL</code> represents an instance profile with dual network type that supports IPv4 and IPv6 addressing.</p>
    pub fn network_type(&self) -> ::std::option::Option<&str> {
        self.network_type.as_deref()
    }
    /// <p>A user-friendly name for the instance profile.</p>
    pub fn instance_profile_name(&self) -> ::std::option::Option<&str> {
        self.instance_profile_name.as_deref()
    }
    /// <p>A user-friendly description for the instance profile.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>A subnet group to associate with the instance profile.</p>
    pub fn subnet_group_identifier(&self) -> ::std::option::Option<&str> {
        self.subnet_group_identifier.as_deref()
    }
    /// <p>Specifies the VPC security groups to be used with the instance profile. The VPC security group must work with the VPC containing the instance profile.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.vpc_security_groups.is_none()`.
    pub fn vpc_security_groups(&self) -> &[::std::string::String] {
        self.vpc_security_groups.as_deref().unwrap_or_default()
    }
}
impl ModifyInstanceProfileInput {
    /// Creates a new builder-style object to manufacture [`ModifyInstanceProfileInput`](crate::operation::modify_instance_profile::ModifyInstanceProfileInput).
    pub fn builder() -> crate::operation::modify_instance_profile::builders::ModifyInstanceProfileInputBuilder {
        crate::operation::modify_instance_profile::builders::ModifyInstanceProfileInputBuilder::default()
    }
}

/// A builder for [`ModifyInstanceProfileInput`](crate::operation::modify_instance_profile::ModifyInstanceProfileInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ModifyInstanceProfileInputBuilder {
    pub(crate) instance_profile_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) availability_zone: ::std::option::Option<::std::string::String>,
    pub(crate) kms_key_arn: ::std::option::Option<::std::string::String>,
    pub(crate) publicly_accessible: ::std::option::Option<bool>,
    pub(crate) network_type: ::std::option::Option<::std::string::String>,
    pub(crate) instance_profile_name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) subnet_group_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) vpc_security_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl ModifyInstanceProfileInputBuilder {
    /// <p>The identifier of the instance profile. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen, or contain two consecutive hyphens.</p>
    /// This field is required.
    pub fn instance_profile_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_profile_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the instance profile. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen, or contain two consecutive hyphens.</p>
    pub fn set_instance_profile_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_profile_identifier = input;
        self
    }
    /// <p>The identifier of the instance profile. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen, or contain two consecutive hyphens.</p>
    pub fn get_instance_profile_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_profile_identifier
    }
    /// <p>The Availability Zone where the instance profile runs.</p>
    pub fn availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.availability_zone = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Availability Zone where the instance profile runs.</p>
    pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.availability_zone = input;
        self
    }
    /// <p>The Availability Zone where the instance profile runs.</p>
    pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
        &self.availability_zone
    }
    /// <p>The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the connection parameters for the instance profile.</p>
    /// <p>If you don't specify a value for the <code>KmsKeyArn</code> parameter, then DMS uses an Amazon Web Services owned encryption key to encrypt your resources.</p>
    pub fn kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kms_key_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the connection parameters for the instance profile.</p>
    /// <p>If you don't specify a value for the <code>KmsKeyArn</code> parameter, then DMS uses an Amazon Web Services owned encryption key to encrypt your resources.</p>
    pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_key_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the connection parameters for the instance profile.</p>
    /// <p>If you don't specify a value for the <code>KmsKeyArn</code> parameter, then DMS uses an Amazon Web Services owned encryption key to encrypt your resources.</p>
    pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_key_arn
    }
    /// <p>Specifies the accessibility options for the instance profile. A value of <code>true</code> represents an instance profile with a public IP address. A value of <code>false</code> represents an instance profile with a private IP address. The default value is <code>true</code>.</p>
    pub fn publicly_accessible(mut self, input: bool) -> Self {
        self.publicly_accessible = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the accessibility options for the instance profile. A value of <code>true</code> represents an instance profile with a public IP address. A value of <code>false</code> represents an instance profile with a private IP address. The default value is <code>true</code>.</p>
    pub fn set_publicly_accessible(mut self, input: ::std::option::Option<bool>) -> Self {
        self.publicly_accessible = input;
        self
    }
    /// <p>Specifies the accessibility options for the instance profile. A value of <code>true</code> represents an instance profile with a public IP address. A value of <code>false</code> represents an instance profile with a private IP address. The default value is <code>true</code>.</p>
    pub fn get_publicly_accessible(&self) -> &::std::option::Option<bool> {
        &self.publicly_accessible
    }
    /// <p>Specifies the network type for the instance profile. A value of <code>IPV4</code> represents an instance profile with IPv4 network type and only supports IPv4 addressing. A value of <code>IPV6</code> represents an instance profile with IPv6 network type and only supports IPv6 addressing. A value of <code>DUAL</code> represents an instance profile with dual network type that supports IPv4 and IPv6 addressing.</p>
    pub fn network_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.network_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies the network type for the instance profile. A value of <code>IPV4</code> represents an instance profile with IPv4 network type and only supports IPv4 addressing. A value of <code>IPV6</code> represents an instance profile with IPv6 network type and only supports IPv6 addressing. A value of <code>DUAL</code> represents an instance profile with dual network type that supports IPv4 and IPv6 addressing.</p>
    pub fn set_network_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.network_type = input;
        self
    }
    /// <p>Specifies the network type for the instance profile. A value of <code>IPV4</code> represents an instance profile with IPv4 network type and only supports IPv4 addressing. A value of <code>IPV6</code> represents an instance profile with IPv6 network type and only supports IPv6 addressing. A value of <code>DUAL</code> represents an instance profile with dual network type that supports IPv4 and IPv6 addressing.</p>
    pub fn get_network_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.network_type
    }
    /// <p>A user-friendly name for the instance profile.</p>
    pub fn instance_profile_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_profile_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A user-friendly name for the instance profile.</p>
    pub fn set_instance_profile_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_profile_name = input;
        self
    }
    /// <p>A user-friendly name for the instance profile.</p>
    pub fn get_instance_profile_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_profile_name
    }
    /// <p>A user-friendly description for the instance profile.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A user-friendly description for the instance profile.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A user-friendly description for the instance profile.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>A subnet group to associate with the instance profile.</p>
    pub fn subnet_group_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.subnet_group_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A subnet group to associate with the instance profile.</p>
    pub fn set_subnet_group_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.subnet_group_identifier = input;
        self
    }
    /// <p>A subnet group to associate with the instance profile.</p>
    pub fn get_subnet_group_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.subnet_group_identifier
    }
    /// Appends an item to `vpc_security_groups`.
    ///
    /// To override the contents of this collection use [`set_vpc_security_groups`](Self::set_vpc_security_groups).
    ///
    /// <p>Specifies the VPC security groups to be used with the instance profile. The VPC security group must work with the VPC containing the instance profile.</p>
    pub fn vpc_security_groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.vpc_security_groups.unwrap_or_default();
        v.push(input.into());
        self.vpc_security_groups = ::std::option::Option::Some(v);
        self
    }
    /// <p>Specifies the VPC security groups to be used with the instance profile. The VPC security group must work with the VPC containing the instance profile.</p>
    pub fn set_vpc_security_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.vpc_security_groups = input;
        self
    }
    /// <p>Specifies the VPC security groups to be used with the instance profile. The VPC security group must work with the VPC containing the instance profile.</p>
    pub fn get_vpc_security_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.vpc_security_groups
    }
    /// Consumes the builder and constructs a [`ModifyInstanceProfileInput`](crate::operation::modify_instance_profile::ModifyInstanceProfileInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::modify_instance_profile::ModifyInstanceProfileInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::modify_instance_profile::ModifyInstanceProfileInput {
            instance_profile_identifier: self.instance_profile_identifier,
            availability_zone: self.availability_zone,
            kms_key_arn: self.kms_key_arn,
            publicly_accessible: self.publicly_accessible,
            network_type: self.network_type,
            instance_profile_name: self.instance_profile_name,
            description: self.description,
            subnet_group_identifier: self.subnet_group_identifier,
            vpc_security_groups: self.vpc_security_groups,
        })
    }
}