// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::register_workspace_directory::_register_workspace_directory_input::RegisterWorkspaceDirectoryInputBuilder;
pub use crate::operation::register_workspace_directory::_register_workspace_directory_output::RegisterWorkspaceDirectoryOutputBuilder;
impl crate::operation::register_workspace_directory::builders::RegisterWorkspaceDirectoryInputBuilder {
/// Sends a request with this input using the given client.
pub async fn send_with(
self,
client: &crate::Client,
) -> ::std::result::Result<
crate::operation::register_workspace_directory::RegisterWorkspaceDirectoryOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::register_workspace_directory::RegisterWorkspaceDirectoryError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let mut fluent_builder = client.register_workspace_directory();
fluent_builder.inner = self;
fluent_builder.send().await
}
}
/// Fluent builder constructing a request to `RegisterWorkspaceDirectory`.
///
/// <p>Registers the specified directory. This operation is asynchronous and returns before the WorkSpace directory is registered. If this is the first time you are registering a directory, you will need to create the workspaces_DefaultRole role before you can register a directory. For more information, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/workspaces-access-control.html#create-default-role"> Creating the workspaces_DefaultRole Role</a>.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct RegisterWorkspaceDirectoryFluentBuilder {
handle: ::std::sync::Arc<crate::client::Handle>,
inner: crate::operation::register_workspace_directory::builders::RegisterWorkspaceDirectoryInputBuilder,
config_override: ::std::option::Option<crate::config::Builder>,
}
impl
crate::client::customize::internal::CustomizableSend<
crate::operation::register_workspace_directory::RegisterWorkspaceDirectoryOutput,
crate::operation::register_workspace_directory::RegisterWorkspaceDirectoryError,
> for RegisterWorkspaceDirectoryFluentBuilder
{
fn send(
self,
config_override: crate::config::Builder,
) -> crate::client::customize::internal::BoxFuture<
crate::client::customize::internal::SendResult<
crate::operation::register_workspace_directory::RegisterWorkspaceDirectoryOutput,
crate::operation::register_workspace_directory::RegisterWorkspaceDirectoryError,
>,
> {
::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
}
}
impl RegisterWorkspaceDirectoryFluentBuilder {
/// Creates a new `RegisterWorkspaceDirectoryFluentBuilder`.
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 RegisterWorkspaceDirectory as a reference.
pub fn as_input(&self) -> &crate::operation::register_workspace_directory::builders::RegisterWorkspaceDirectoryInputBuilder {
&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::register_workspace_directory::RegisterWorkspaceDirectoryOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::register_workspace_directory::RegisterWorkspaceDirectoryError,
::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::register_workspace_directory::RegisterWorkspaceDirectory::operation_runtime_plugins(
self.handle.runtime_plugins.clone(),
&self.handle.conf,
self.config_override,
);
crate::operation::register_workspace_directory::RegisterWorkspaceDirectory::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::register_workspace_directory::RegisterWorkspaceDirectoryOutput,
crate::operation::register_workspace_directory::RegisterWorkspaceDirectoryError,
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 identifier of the directory. You cannot register a directory if it does not have a status of Active. If the directory does not have a status of Active, you will receive an InvalidResourceStateException error. If you have already registered the maximum number of directories that you can register with Amazon WorkSpaces, you will receive a ResourceLimitExceededException error. Deregister directories that you are not using for WorkSpaces, and try again.</p>
pub fn directory_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.directory_id(input.into());
self
}
/// <p>The identifier of the directory. You cannot register a directory if it does not have a status of Active. If the directory does not have a status of Active, you will receive an InvalidResourceStateException error. If you have already registered the maximum number of directories that you can register with Amazon WorkSpaces, you will receive a ResourceLimitExceededException error. Deregister directories that you are not using for WorkSpaces, and try again.</p>
pub fn set_directory_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_directory_id(input);
self
}
/// <p>The identifier of the directory. You cannot register a directory if it does not have a status of Active. If the directory does not have a status of Active, you will receive an InvalidResourceStateException error. If you have already registered the maximum number of directories that you can register with Amazon WorkSpaces, you will receive a ResourceLimitExceededException error. Deregister directories that you are not using for WorkSpaces, and try again.</p>
pub fn get_directory_id(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_directory_id()
}
///
/// Appends an item to `SubnetIds`.
///
/// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
///
/// <p>The identifiers of the subnets for your virtual private cloud (VPC). Make sure that the subnets are in supported Availability Zones. The subnets must also be in separate Availability Zones. If these conditions are not met, you will receive an OperationNotSupportedException error.</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 identifiers of the subnets for your virtual private cloud (VPC). Make sure that the subnets are in supported Availability Zones. The subnets must also be in separate Availability Zones. If these conditions are not met, you will receive an OperationNotSupportedException error.</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 identifiers of the subnets for your virtual private cloud (VPC). Make sure that the subnets are in supported Availability Zones. The subnets must also be in separate Availability Zones. If these conditions are not met, you will receive an OperationNotSupportedException error.</p>
pub fn get_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
self.inner.get_subnet_ids()
}
/// <p>Indicates whether self-service capabilities are enabled or disabled.</p>
pub fn enable_self_service(mut self, input: bool) -> Self {
self.inner = self.inner.enable_self_service(input);
self
}
/// <p>Indicates whether self-service capabilities are enabled or disabled.</p>
pub fn set_enable_self_service(mut self, input: ::std::option::Option<bool>) -> Self {
self.inner = self.inner.set_enable_self_service(input);
self
}
/// <p>Indicates whether self-service capabilities are enabled or disabled.</p>
pub fn get_enable_self_service(&self) -> &::std::option::Option<bool> {
self.inner.get_enable_self_service()
}
/// <p>Indicates whether your WorkSpace directory is dedicated or shared. To use Bring Your Own License (BYOL) images, this value must be set to <code>DEDICATED</code> and your Amazon Web Services account must be enabled for BYOL. If your account has not been enabled for BYOL, you will receive an InvalidParameterValuesException error. For more information about BYOL images, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.html">Bring Your Own Windows Desktop Images</a>.</p>
pub fn tenancy(mut self, input: crate::types::Tenancy) -> Self {
self.inner = self.inner.tenancy(input);
self
}
/// <p>Indicates whether your WorkSpace directory is dedicated or shared. To use Bring Your Own License (BYOL) images, this value must be set to <code>DEDICATED</code> and your Amazon Web Services account must be enabled for BYOL. If your account has not been enabled for BYOL, you will receive an InvalidParameterValuesException error. For more information about BYOL images, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.html">Bring Your Own Windows Desktop Images</a>.</p>
pub fn set_tenancy(mut self, input: ::std::option::Option<crate::types::Tenancy>) -> Self {
self.inner = self.inner.set_tenancy(input);
self
}
/// <p>Indicates whether your WorkSpace directory is dedicated or shared. To use Bring Your Own License (BYOL) images, this value must be set to <code>DEDICATED</code> and your Amazon Web Services account must be enabled for BYOL. If your account has not been enabled for BYOL, you will receive an InvalidParameterValuesException error. For more information about BYOL images, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.html">Bring Your Own Windows Desktop Images</a>.</p>
pub fn get_tenancy(&self) -> &::std::option::Option<crate::types::Tenancy> {
self.inner.get_tenancy()
}
///
/// Appends an item to `Tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The tags associated with the directory.</p>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
self.inner = self.inner.tags(input);
self
}
/// <p>The tags associated with the directory.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.inner = self.inner.set_tags(input);
self
}
/// <p>The tags associated with the directory.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
self.inner.get_tags()
}
/// <p>The name of the directory to register.</p>
pub fn workspace_directory_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.workspace_directory_name(input.into());
self
}
/// <p>The name of the directory to register.</p>
pub fn set_workspace_directory_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_workspace_directory_name(input);
self
}
/// <p>The name of the directory to register.</p>
pub fn get_workspace_directory_name(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_workspace_directory_name()
}
/// <p>Description of the directory to register.</p>
pub fn workspace_directory_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.workspace_directory_description(input.into());
self
}
/// <p>Description of the directory to register.</p>
pub fn set_workspace_directory_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_workspace_directory_description(input);
self
}
/// <p>Description of the directory to register.</p>
pub fn get_workspace_directory_description(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_workspace_directory_description()
}
/// <p>The type of identity management the user is using.</p>
pub fn user_identity_type(mut self, input: crate::types::UserIdentityType) -> Self {
self.inner = self.inner.user_identity_type(input);
self
}
/// <p>The type of identity management the user is using.</p>
pub fn set_user_identity_type(mut self, input: ::std::option::Option<crate::types::UserIdentityType>) -> Self {
self.inner = self.inner.set_user_identity_type(input);
self
}
/// <p>The type of identity management the user is using.</p>
pub fn get_user_identity_type(&self) -> &::std::option::Option<crate::types::UserIdentityType> {
self.inner.get_user_identity_type()
}
/// <p>The Amazon Resource Name (ARN) of the identity center instance.</p>
pub fn idc_instance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.idc_instance_arn(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the identity center instance.</p>
pub fn set_idc_instance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_idc_instance_arn(input);
self
}
/// <p>The Amazon Resource Name (ARN) of the identity center instance.</p>
pub fn get_idc_instance_arn(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_idc_instance_arn()
}
/// <p>The details about Microsoft Entra config.</p>
pub fn microsoft_entra_config(mut self, input: crate::types::MicrosoftEntraConfig) -> Self {
self.inner = self.inner.microsoft_entra_config(input);
self
}
/// <p>The details about Microsoft Entra config.</p>
pub fn set_microsoft_entra_config(mut self, input: ::std::option::Option<crate::types::MicrosoftEntraConfig>) -> Self {
self.inner = self.inner.set_microsoft_entra_config(input);
self
}
/// <p>The details about Microsoft Entra config.</p>
pub fn get_microsoft_entra_config(&self) -> &::std::option::Option<crate::types::MicrosoftEntraConfig> {
self.inner.get_microsoft_entra_config()
}
/// <p>Indicates whether the directory's WorkSpace type is personal or pools.</p>
pub fn workspace_type(mut self, input: crate::types::WorkspaceType) -> Self {
self.inner = self.inner.workspace_type(input);
self
}
/// <p>Indicates whether the directory's WorkSpace type is personal or pools.</p>
pub fn set_workspace_type(mut self, input: ::std::option::Option<crate::types::WorkspaceType>) -> Self {
self.inner = self.inner.set_workspace_type(input);
self
}
/// <p>Indicates whether the directory's WorkSpace type is personal or pools.</p>
pub fn get_workspace_type(&self) -> &::std::option::Option<crate::types::WorkspaceType> {
self.inner.get_workspace_type()
}
/// <p>The active directory config of the directory.</p>
pub fn active_directory_config(mut self, input: crate::types::ActiveDirectoryConfig) -> Self {
self.inner = self.inner.active_directory_config(input);
self
}
/// <p>The active directory config of the directory.</p>
pub fn set_active_directory_config(mut self, input: ::std::option::Option<crate::types::ActiveDirectoryConfig>) -> Self {
self.inner = self.inner.set_active_directory_config(input);
self
}
/// <p>The active directory config of the directory.</p>
pub fn get_active_directory_config(&self) -> &::std::option::Option<crate::types::ActiveDirectoryConfig> {
self.inner.get_active_directory_config()
}
}