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 CreateInstanceProfileInput {
    /// <p>The Availability Zone where the instance profile will be created. The default value is a random, system-chosen Availability Zone in the Amazon Web Services Region where your data provider is created, for examplem <code>us-east-1d</code>.</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>One or more tags to be assigned to the instance profile.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    /// <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 of 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 group names 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 CreateInstanceProfileInput {
    /// <p>The Availability Zone where the instance profile will be created. The default value is a random, system-chosen Availability Zone in the Amazon Web Services Region where your data provider is created, for examplem <code>us-east-1d</code>.</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>One or more tags to be assigned to 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 `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
    /// <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 of 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 group names 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 CreateInstanceProfileInput {
    /// Creates a new builder-style object to manufacture [`CreateInstanceProfileInput`](crate::operation::create_instance_profile::CreateInstanceProfileInput).
    pub fn builder() -> crate::operation::create_instance_profile::builders::CreateInstanceProfileInputBuilder {
        crate::operation::create_instance_profile::builders::CreateInstanceProfileInputBuilder::default()
    }
}

/// A builder for [`CreateInstanceProfileInput`](crate::operation::create_instance_profile::CreateInstanceProfileInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateInstanceProfileInputBuilder {
    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) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    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 CreateInstanceProfileInputBuilder {
    /// <p>The Availability Zone where the instance profile will be created. The default value is a random, system-chosen Availability Zone in the Amazon Web Services Region where your data provider is created, for examplem <code>us-east-1d</code>.</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 will be created. The default value is a random, system-chosen Availability Zone in the Amazon Web Services Region where your data provider is created, for examplem <code>us-east-1d</code>.</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 will be created. The default value is a random, system-chosen Availability Zone in the Amazon Web Services Region where your data provider is created, for examplem <code>us-east-1d</code>.</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
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>One or more tags to be assigned to the instance profile.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>One or more tags to be assigned to the instance profile.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>One or more tags to be assigned to the instance profile.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// <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 of 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 of 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 of 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 group names 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 group names 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 group names 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 [`CreateInstanceProfileInput`](crate::operation::create_instance_profile::CreateInstanceProfileInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_instance_profile::CreateInstanceProfileInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::create_instance_profile::CreateInstanceProfileInput {
            availability_zone: self.availability_zone,
            kms_key_arn: self.kms_key_arn,
            publicly_accessible: self.publicly_accessible,
            tags: self.tags,
            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,
        })
    }
}