aws-sdk-sagemaker 1.193.0

AWS SDK for Amazon SageMaker 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 UpdateDomainInput {
    /// <p>The ID of the domain to be updated.</p>
    pub domain_id: ::std::option::Option<::std::string::String>,
    /// <p>A collection of settings.</p>
    pub default_user_settings: ::std::option::Option<crate::types::UserSettings>,
    /// <p>A collection of <code>DomainSettings</code> configuration values to update.</p>
    pub domain_settings_for_update: ::std::option::Option<crate::types::DomainSettingsForUpdate>,
    /// <p>The entity that creates and manages the required security groups for inter-app communication in <code>VPCOnly</code> mode. Required when <code>CreateDomain.AppNetworkAccessType</code> is <code>VPCOnly</code> and <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is provided. If setting up the domain for use with RStudio, this value must be set to <code>Service</code>.</p>
    pub app_security_group_management: ::std::option::Option<crate::types::AppSecurityGroupManagement>,
    /// <p>The default settings for shared spaces that users create in the domain.</p>
    pub default_space_settings: ::std::option::Option<crate::types::DefaultSpaceSettings>,
    /// <p>The VPC subnets that Studio uses for communication.</p>
    /// <p>If removing subnets, ensure there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state.</p>
    pub subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Specifies the VPC used for non-EFS traffic.</p>
    /// <ul>
    /// <li>
    /// <p><code>PublicInternetOnly</code> - Non-EFS traffic is through a VPC managed by Amazon SageMaker AI, which allows direct internet access.</p></li>
    /// <li>
    /// <p><code>VpcOnly</code> - All Studio traffic is through the specified VPC and subnets.</p></li>
    /// </ul>
    /// <p>This configuration can only be modified if there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state. The configuration cannot be updated if <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is already set or <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is provided as part of the same request.</p>
    pub app_network_access_type: ::std::option::Option<crate::types::AppNetworkAccessType>,
    /// <p>Indicates whether custom tag propagation is supported for the domain. Defaults to <code>DISABLED</code>.</p>
    pub tag_propagation: ::std::option::Option<crate::types::TagPropagation>,
    /// <p>The identifier for the VPC used by the domain for network communication. Use this field only when adding VPC configuration to a SageMaker AI domain used in Amazon SageMaker Unified Studio that was created without VPC settings. SageMaker AI doesn't automatically apply VPC updates to existing applications. Stop and restart your applications to apply the changes.</p>
    pub vpc_id: ::std::option::Option<::std::string::String>,
}
impl UpdateDomainInput {
    /// <p>The ID of the domain to be updated.</p>
    pub fn domain_id(&self) -> ::std::option::Option<&str> {
        self.domain_id.as_deref()
    }
    /// <p>A collection of settings.</p>
    pub fn default_user_settings(&self) -> ::std::option::Option<&crate::types::UserSettings> {
        self.default_user_settings.as_ref()
    }
    /// <p>A collection of <code>DomainSettings</code> configuration values to update.</p>
    pub fn domain_settings_for_update(&self) -> ::std::option::Option<&crate::types::DomainSettingsForUpdate> {
        self.domain_settings_for_update.as_ref()
    }
    /// <p>The entity that creates and manages the required security groups for inter-app communication in <code>VPCOnly</code> mode. Required when <code>CreateDomain.AppNetworkAccessType</code> is <code>VPCOnly</code> and <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is provided. If setting up the domain for use with RStudio, this value must be set to <code>Service</code>.</p>
    pub fn app_security_group_management(&self) -> ::std::option::Option<&crate::types::AppSecurityGroupManagement> {
        self.app_security_group_management.as_ref()
    }
    /// <p>The default settings for shared spaces that users create in the domain.</p>
    pub fn default_space_settings(&self) -> ::std::option::Option<&crate::types::DefaultSpaceSettings> {
        self.default_space_settings.as_ref()
    }
    /// <p>The VPC subnets that Studio uses for communication.</p>
    /// <p>If removing subnets, ensure there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state.</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 `.subnet_ids.is_none()`.
    pub fn subnet_ids(&self) -> &[::std::string::String] {
        self.subnet_ids.as_deref().unwrap_or_default()
    }
    /// <p>Specifies the VPC used for non-EFS traffic.</p>
    /// <ul>
    /// <li>
    /// <p><code>PublicInternetOnly</code> - Non-EFS traffic is through a VPC managed by Amazon SageMaker AI, which allows direct internet access.</p></li>
    /// <li>
    /// <p><code>VpcOnly</code> - All Studio traffic is through the specified VPC and subnets.</p></li>
    /// </ul>
    /// <p>This configuration can only be modified if there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state. The configuration cannot be updated if <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is already set or <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is provided as part of the same request.</p>
    pub fn app_network_access_type(&self) -> ::std::option::Option<&crate::types::AppNetworkAccessType> {
        self.app_network_access_type.as_ref()
    }
    /// <p>Indicates whether custom tag propagation is supported for the domain. Defaults to <code>DISABLED</code>.</p>
    pub fn tag_propagation(&self) -> ::std::option::Option<&crate::types::TagPropagation> {
        self.tag_propagation.as_ref()
    }
    /// <p>The identifier for the VPC used by the domain for network communication. Use this field only when adding VPC configuration to a SageMaker AI domain used in Amazon SageMaker Unified Studio that was created without VPC settings. SageMaker AI doesn't automatically apply VPC updates to existing applications. Stop and restart your applications to apply the changes.</p>
    pub fn vpc_id(&self) -> ::std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
}
impl UpdateDomainInput {
    /// Creates a new builder-style object to manufacture [`UpdateDomainInput`](crate::operation::update_domain::UpdateDomainInput).
    pub fn builder() -> crate::operation::update_domain::builders::UpdateDomainInputBuilder {
        crate::operation::update_domain::builders::UpdateDomainInputBuilder::default()
    }
}

/// A builder for [`UpdateDomainInput`](crate::operation::update_domain::UpdateDomainInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateDomainInputBuilder {
    pub(crate) domain_id: ::std::option::Option<::std::string::String>,
    pub(crate) default_user_settings: ::std::option::Option<crate::types::UserSettings>,
    pub(crate) domain_settings_for_update: ::std::option::Option<crate::types::DomainSettingsForUpdate>,
    pub(crate) app_security_group_management: ::std::option::Option<crate::types::AppSecurityGroupManagement>,
    pub(crate) default_space_settings: ::std::option::Option<crate::types::DefaultSpaceSettings>,
    pub(crate) subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) app_network_access_type: ::std::option::Option<crate::types::AppNetworkAccessType>,
    pub(crate) tag_propagation: ::std::option::Option<crate::types::TagPropagation>,
    pub(crate) vpc_id: ::std::option::Option<::std::string::String>,
}
impl UpdateDomainInputBuilder {
    /// <p>The ID of the domain to be updated.</p>
    /// This field is required.
    pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the domain to be updated.</p>
    pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_id = input;
        self
    }
    /// <p>The ID of the domain to be updated.</p>
    pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_id
    }
    /// <p>A collection of settings.</p>
    pub fn default_user_settings(mut self, input: crate::types::UserSettings) -> Self {
        self.default_user_settings = ::std::option::Option::Some(input);
        self
    }
    /// <p>A collection of settings.</p>
    pub fn set_default_user_settings(mut self, input: ::std::option::Option<crate::types::UserSettings>) -> Self {
        self.default_user_settings = input;
        self
    }
    /// <p>A collection of settings.</p>
    pub fn get_default_user_settings(&self) -> &::std::option::Option<crate::types::UserSettings> {
        &self.default_user_settings
    }
    /// <p>A collection of <code>DomainSettings</code> configuration values to update.</p>
    pub fn domain_settings_for_update(mut self, input: crate::types::DomainSettingsForUpdate) -> Self {
        self.domain_settings_for_update = ::std::option::Option::Some(input);
        self
    }
    /// <p>A collection of <code>DomainSettings</code> configuration values to update.</p>
    pub fn set_domain_settings_for_update(mut self, input: ::std::option::Option<crate::types::DomainSettingsForUpdate>) -> Self {
        self.domain_settings_for_update = input;
        self
    }
    /// <p>A collection of <code>DomainSettings</code> configuration values to update.</p>
    pub fn get_domain_settings_for_update(&self) -> &::std::option::Option<crate::types::DomainSettingsForUpdate> {
        &self.domain_settings_for_update
    }
    /// <p>The entity that creates and manages the required security groups for inter-app communication in <code>VPCOnly</code> mode. Required when <code>CreateDomain.AppNetworkAccessType</code> is <code>VPCOnly</code> and <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is provided. If setting up the domain for use with RStudio, this value must be set to <code>Service</code>.</p>
    pub fn app_security_group_management(mut self, input: crate::types::AppSecurityGroupManagement) -> Self {
        self.app_security_group_management = ::std::option::Option::Some(input);
        self
    }
    /// <p>The entity that creates and manages the required security groups for inter-app communication in <code>VPCOnly</code> mode. Required when <code>CreateDomain.AppNetworkAccessType</code> is <code>VPCOnly</code> and <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is provided. If setting up the domain for use with RStudio, this value must be set to <code>Service</code>.</p>
    pub fn set_app_security_group_management(mut self, input: ::std::option::Option<crate::types::AppSecurityGroupManagement>) -> Self {
        self.app_security_group_management = input;
        self
    }
    /// <p>The entity that creates and manages the required security groups for inter-app communication in <code>VPCOnly</code> mode. Required when <code>CreateDomain.AppNetworkAccessType</code> is <code>VPCOnly</code> and <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is provided. If setting up the domain for use with RStudio, this value must be set to <code>Service</code>.</p>
    pub fn get_app_security_group_management(&self) -> &::std::option::Option<crate::types::AppSecurityGroupManagement> {
        &self.app_security_group_management
    }
    /// <p>The default settings for shared spaces that users create in the domain.</p>
    pub fn default_space_settings(mut self, input: crate::types::DefaultSpaceSettings) -> Self {
        self.default_space_settings = ::std::option::Option::Some(input);
        self
    }
    /// <p>The default settings for shared spaces that users create in the domain.</p>
    pub fn set_default_space_settings(mut self, input: ::std::option::Option<crate::types::DefaultSpaceSettings>) -> Self {
        self.default_space_settings = input;
        self
    }
    /// <p>The default settings for shared spaces that users create in the domain.</p>
    pub fn get_default_space_settings(&self) -> &::std::option::Option<crate::types::DefaultSpaceSettings> {
        &self.default_space_settings
    }
    /// Appends an item to `subnet_ids`.
    ///
    /// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
    ///
    /// <p>The VPC subnets that Studio uses for communication.</p>
    /// <p>If removing subnets, ensure there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state.</p>
    pub fn subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.subnet_ids.unwrap_or_default();
        v.push(input.into());
        self.subnet_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>The VPC subnets that Studio uses for communication.</p>
    /// <p>If removing subnets, ensure there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state.</p>
    pub fn set_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.subnet_ids = input;
        self
    }
    /// <p>The VPC subnets that Studio uses for communication.</p>
    /// <p>If removing subnets, ensure there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state.</p>
    pub fn get_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.subnet_ids
    }
    /// <p>Specifies the VPC used for non-EFS traffic.</p>
    /// <ul>
    /// <li>
    /// <p><code>PublicInternetOnly</code> - Non-EFS traffic is through a VPC managed by Amazon SageMaker AI, which allows direct internet access.</p></li>
    /// <li>
    /// <p><code>VpcOnly</code> - All Studio traffic is through the specified VPC and subnets.</p></li>
    /// </ul>
    /// <p>This configuration can only be modified if there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state. The configuration cannot be updated if <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is already set or <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is provided as part of the same request.</p>
    pub fn app_network_access_type(mut self, input: crate::types::AppNetworkAccessType) -> Self {
        self.app_network_access_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the VPC used for non-EFS traffic.</p>
    /// <ul>
    /// <li>
    /// <p><code>PublicInternetOnly</code> - Non-EFS traffic is through a VPC managed by Amazon SageMaker AI, which allows direct internet access.</p></li>
    /// <li>
    /// <p><code>VpcOnly</code> - All Studio traffic is through the specified VPC and subnets.</p></li>
    /// </ul>
    /// <p>This configuration can only be modified if there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state. The configuration cannot be updated if <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is already set or <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is provided as part of the same request.</p>
    pub fn set_app_network_access_type(mut self, input: ::std::option::Option<crate::types::AppNetworkAccessType>) -> Self {
        self.app_network_access_type = input;
        self
    }
    /// <p>Specifies the VPC used for non-EFS traffic.</p>
    /// <ul>
    /// <li>
    /// <p><code>PublicInternetOnly</code> - Non-EFS traffic is through a VPC managed by Amazon SageMaker AI, which allows direct internet access.</p></li>
    /// <li>
    /// <p><code>VpcOnly</code> - All Studio traffic is through the specified VPC and subnets.</p></li>
    /// </ul>
    /// <p>This configuration can only be modified if there are no apps in the <code>InService</code>, <code>Pending</code>, or <code>Deleting</code> state. The configuration cannot be updated if <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is already set or <code>DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn</code> is provided as part of the same request.</p>
    pub fn get_app_network_access_type(&self) -> &::std::option::Option<crate::types::AppNetworkAccessType> {
        &self.app_network_access_type
    }
    /// <p>Indicates whether custom tag propagation is supported for the domain. Defaults to <code>DISABLED</code>.</p>
    pub fn tag_propagation(mut self, input: crate::types::TagPropagation) -> Self {
        self.tag_propagation = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether custom tag propagation is supported for the domain. Defaults to <code>DISABLED</code>.</p>
    pub fn set_tag_propagation(mut self, input: ::std::option::Option<crate::types::TagPropagation>) -> Self {
        self.tag_propagation = input;
        self
    }
    /// <p>Indicates whether custom tag propagation is supported for the domain. Defaults to <code>DISABLED</code>.</p>
    pub fn get_tag_propagation(&self) -> &::std::option::Option<crate::types::TagPropagation> {
        &self.tag_propagation
    }
    /// <p>The identifier for the VPC used by the domain for network communication. Use this field only when adding VPC configuration to a SageMaker AI domain used in Amazon SageMaker Unified Studio that was created without VPC settings. SageMaker AI doesn't automatically apply VPC updates to existing applications. Stop and restart your applications to apply the changes.</p>
    pub fn vpc_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.vpc_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier for the VPC used by the domain for network communication. Use this field only when adding VPC configuration to a SageMaker AI domain used in Amazon SageMaker Unified Studio that was created without VPC settings. SageMaker AI doesn't automatically apply VPC updates to existing applications. Stop and restart your applications to apply the changes.</p>
    pub fn set_vpc_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.vpc_id = input;
        self
    }
    /// <p>The identifier for the VPC used by the domain for network communication. Use this field only when adding VPC configuration to a SageMaker AI domain used in Amazon SageMaker Unified Studio that was created without VPC settings. SageMaker AI doesn't automatically apply VPC updates to existing applications. Stop and restart your applications to apply the changes.</p>
    pub fn get_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.vpc_id
    }
    /// Consumes the builder and constructs a [`UpdateDomainInput`](crate::operation::update_domain::UpdateDomainInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_domain::UpdateDomainInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_domain::UpdateDomainInput {
            domain_id: self.domain_id,
            default_user_settings: self.default_user_settings,
            domain_settings_for_update: self.domain_settings_for_update,
            app_security_group_management: self.app_security_group_management,
            default_space_settings: self.default_space_settings,
            subnet_ids: self.subnet_ids,
            app_network_access_type: self.app_network_access_type,
            tag_propagation: self.tag_propagation,
            vpc_id: self.vpc_id,
        })
    }
}