aws-sdk-sagemaker 1.189.0

AWS SDK for Amazon SageMaker Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_domain::_update_domain_input::UpdateDomainInputBuilder;

pub use crate::operation::update_domain::_update_domain_output::UpdateDomainOutputBuilder;

impl crate::operation::update_domain::builders::UpdateDomainInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::update_domain::UpdateDomainOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_domain::UpdateDomainError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_domain();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateDomain`.
///
/// <p>Updates the default settings for new user profiles in the domain.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateDomainFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_domain::builders::UpdateDomainInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_domain::UpdateDomainOutput,
        crate::operation::update_domain::UpdateDomainError,
    > for UpdateDomainFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_domain::UpdateDomainOutput,
            crate::operation::update_domain::UpdateDomainError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateDomainFluentBuilder {
    /// Creates a new `UpdateDomainFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the UpdateDomain as a reference.
    pub fn as_input(&self) -> &crate::operation::update_domain::builders::UpdateDomainInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_domain::UpdateDomainOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_domain::UpdateDomainError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::update_domain::UpdateDomain::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_domain::UpdateDomain::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::update_domain::UpdateDomainOutput,
        crate::operation::update_domain::UpdateDomainError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// <p>The ID of the domain to be updated.</p>
    pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.domain_id(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.inner = self.inner.set_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.inner.get_domain_id()
    }
    /// <p>A collection of settings.</p>
    pub fn default_user_settings(mut self, input: crate::types::UserSettings) -> Self {
        self.inner = self.inner.default_user_settings(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.inner = self.inner.set_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.inner.get_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.inner = self.inner.domain_settings_for_update(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.inner = self.inner.set_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.inner.get_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.inner = self.inner.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 set_app_security_group_management(mut self, input: ::std::option::Option<crate::types::AppSecurityGroupManagement>) -> Self {
        self.inner = self.inner.set_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.inner.get_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.inner = self.inner.default_space_settings(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.inner = self.inner.set_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.inner.get_default_space_settings()
    }
    ///
    /// Appends an item to `SubnetIds`.
    ///
    /// 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 {
        self.inner = self.inner.subnet_ids(input.into());
        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.inner = self.inner.set_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.inner.get_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.inner = self.inner.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 set_app_network_access_type(mut self, input: ::std::option::Option<crate::types::AppNetworkAccessType>) -> Self {
        self.inner = self.inner.set_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.inner.get_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.inner = self.inner.tag_propagation(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.inner = self.inner.set_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.inner.get_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.inner = self.inner.vpc_id(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.inner = self.inner.set_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.inner.get_vpc_id()
    }
}