aws-sdk-appstream 1.112.0

AWS SDK for Amazon AppStream
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::create_stack::_create_stack_input::CreateStackInputBuilder;

pub use crate::operation::create_stack::_create_stack_output::CreateStackOutputBuilder;

impl crate::operation::create_stack::builders::CreateStackInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::create_stack::CreateStackOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_stack::CreateStackError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.create_stack();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `CreateStack`.
///
/// <p>Creates a stack to start streaming applications to users. A stack consists of an associated fleet, user access policies, and storage configurations.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct CreateStackFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::create_stack::builders::CreateStackInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::create_stack::CreateStackOutput,
        crate::operation::create_stack::CreateStackError,
    > for CreateStackFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::create_stack::CreateStackOutput,
            crate::operation::create_stack::CreateStackError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl CreateStackFluentBuilder {
    /// Creates a new `CreateStackFluentBuilder`.
    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 CreateStack as a reference.
    pub fn as_input(&self) -> &crate::operation::create_stack::builders::CreateStackInputBuilder {
        &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::create_stack::CreateStackOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_stack::CreateStackError,
            ::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::create_stack::CreateStack::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::create_stack::CreateStack::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::create_stack::CreateStackOutput,
        crate::operation::create_stack::CreateStackError,
        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 name of the stack.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.name(input.into());
        self
    }
    /// <p>The name of the stack.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_name(input);
        self
    }
    /// <p>The name of the stack.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_name()
    }
    /// <p>The description to display.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.description(input.into());
        self
    }
    /// <p>The description to display.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_description(input);
        self
    }
    /// <p>The description to display.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_description()
    }
    /// <p>The stack name to display.</p>
    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.display_name(input.into());
        self
    }
    /// <p>The stack name to display.</p>
    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_display_name(input);
        self
    }
    /// <p>The stack name to display.</p>
    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_display_name()
    }
    ///
    /// Appends an item to `StorageConnectors`.
    ///
    /// To override the contents of this collection use [`set_storage_connectors`](Self::set_storage_connectors).
    ///
    /// <p>The storage connectors to enable.</p>
    pub fn storage_connectors(mut self, input: crate::types::StorageConnector) -> Self {
        self.inner = self.inner.storage_connectors(input);
        self
    }
    /// <p>The storage connectors to enable.</p>
    pub fn set_storage_connectors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StorageConnector>>) -> Self {
        self.inner = self.inner.set_storage_connectors(input);
        self
    }
    /// <p>The storage connectors to enable.</p>
    pub fn get_storage_connectors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StorageConnector>> {
        self.inner.get_storage_connectors()
    }
    /// <p>The URL that users are redirected to after their streaming session ends.</p>
    pub fn redirect_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.redirect_url(input.into());
        self
    }
    /// <p>The URL that users are redirected to after their streaming session ends.</p>
    pub fn set_redirect_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_redirect_url(input);
        self
    }
    /// <p>The URL that users are redirected to after their streaming session ends.</p>
    pub fn get_redirect_url(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_redirect_url()
    }
    /// <p>The URL that users are redirected to after they click the Send Feedback link. If no URL is specified, no Send Feedback link is displayed.</p>
    pub fn feedback_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.feedback_url(input.into());
        self
    }
    /// <p>The URL that users are redirected to after they click the Send Feedback link. If no URL is specified, no Send Feedback link is displayed.</p>
    pub fn set_feedback_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_feedback_url(input);
        self
    }
    /// <p>The URL that users are redirected to after they click the Send Feedback link. If no URL is specified, no Send Feedback link is displayed.</p>
    pub fn get_feedback_url(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_feedback_url()
    }
    ///
    /// Appends an item to `UserSettings`.
    ///
    /// To override the contents of this collection use [`set_user_settings`](Self::set_user_settings).
    ///
    /// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
    pub fn user_settings(mut self, input: crate::types::UserSetting) -> Self {
        self.inner = self.inner.user_settings(input);
        self
    }
    /// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
    pub fn set_user_settings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UserSetting>>) -> Self {
        self.inner = self.inner.set_user_settings(input);
        self
    }
    /// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
    pub fn get_user_settings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UserSetting>> {
        self.inner.get_user_settings()
    }
    /// <p>The persistent application settings for users of a stack. When these settings are enabled, changes that users make to applications and Windows settings are automatically saved after each session and applied to the next session.</p>
    pub fn application_settings(mut self, input: crate::types::ApplicationSettings) -> Self {
        self.inner = self.inner.application_settings(input);
        self
    }
    /// <p>The persistent application settings for users of a stack. When these settings are enabled, changes that users make to applications and Windows settings are automatically saved after each session and applied to the next session.</p>
    pub fn set_application_settings(mut self, input: ::std::option::Option<crate::types::ApplicationSettings>) -> Self {
        self.inner = self.inner.set_application_settings(input);
        self
    }
    /// <p>The persistent application settings for users of a stack. When these settings are enabled, changes that users make to applications and Windows settings are automatically saved after each session and applied to the next session.</p>
    pub fn get_application_settings(&self) -> &::std::option::Option<crate::types::ApplicationSettings> {
        self.inner.get_application_settings()
    }
    ///
    /// Adds a key-value pair to `Tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags to associate with the stack. A tag is a key-value pair, and the value is optional. For example, Environment=Test. If you do not specify a value, Environment=.</p>
    /// <p>If you do not specify a value, the value is set to an empty string.</p>
    /// <p>Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters:</p>
    /// <p>_ . : / = + \ - @</p>
    /// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/appstream2/latest/developerguide/tagging-basic.html">Tagging Your Resources</a> in the <i>Amazon WorkSpaces Applications Administration Guide</i>.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.tags(k.into(), v.into());
        self
    }
    /// <p>The tags to associate with the stack. A tag is a key-value pair, and the value is optional. For example, Environment=Test. If you do not specify a value, Environment=.</p>
    /// <p>If you do not specify a value, the value is set to an empty string.</p>
    /// <p>Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters:</p>
    /// <p>_ . : / = + \ - @</p>
    /// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/appstream2/latest/developerguide/tagging-basic.html">Tagging Your Resources</a> in the <i>Amazon WorkSpaces Applications Administration Guide</i>.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.inner = self.inner.set_tags(input);
        self
    }
    /// <p>The tags to associate with the stack. A tag is a key-value pair, and the value is optional. For example, Environment=Test. If you do not specify a value, Environment=.</p>
    /// <p>If you do not specify a value, the value is set to an empty string.</p>
    /// <p>Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters:</p>
    /// <p>_ . : / = + \ - @</p>
    /// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/appstream2/latest/developerguide/tagging-basic.html">Tagging Your Resources</a> in the <i>Amazon WorkSpaces Applications Administration Guide</i>.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.inner.get_tags()
    }
    ///
    /// Appends an item to `AccessEndpoints`.
    ///
    /// To override the contents of this collection use [`set_access_endpoints`](Self::set_access_endpoints).
    ///
    /// <p>The list of interface VPC endpoint (interface endpoint) objects. Users of the stack can connect to WorkSpaces Applications only through the specified endpoints.</p>
    pub fn access_endpoints(mut self, input: crate::types::AccessEndpoint) -> Self {
        self.inner = self.inner.access_endpoints(input);
        self
    }
    /// <p>The list of interface VPC endpoint (interface endpoint) objects. Users of the stack can connect to WorkSpaces Applications only through the specified endpoints.</p>
    pub fn set_access_endpoints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AccessEndpoint>>) -> Self {
        self.inner = self.inner.set_access_endpoints(input);
        self
    }
    /// <p>The list of interface VPC endpoint (interface endpoint) objects. Users of the stack can connect to WorkSpaces Applications only through the specified endpoints.</p>
    pub fn get_access_endpoints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AccessEndpoint>> {
        self.inner.get_access_endpoints()
    }
    ///
    /// Appends an item to `EmbedHostDomains`.
    ///
    /// To override the contents of this collection use [`set_embed_host_domains`](Self::set_embed_host_domains).
    ///
    /// <p>The domains where WorkSpaces Applications streaming sessions can be embedded in an iframe. You must approve the domains that you want to host embedded WorkSpaces Applications streaming sessions.</p>
    pub fn embed_host_domains(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.embed_host_domains(input.into());
        self
    }
    /// <p>The domains where WorkSpaces Applications streaming sessions can be embedded in an iframe. You must approve the domains that you want to host embedded WorkSpaces Applications streaming sessions.</p>
    pub fn set_embed_host_domains(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.inner = self.inner.set_embed_host_domains(input);
        self
    }
    /// <p>The domains where WorkSpaces Applications streaming sessions can be embedded in an iframe. You must approve the domains that you want to host embedded WorkSpaces Applications streaming sessions.</p>
    pub fn get_embed_host_domains(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        self.inner.get_embed_host_domains()
    }
    /// <p>The streaming protocol you want your stack to prefer. This can be UDP or TCP. Currently, UDP is only supported in the Windows native client.</p>
    pub fn streaming_experience_settings(mut self, input: crate::types::StreamingExperienceSettings) -> Self {
        self.inner = self.inner.streaming_experience_settings(input);
        self
    }
    /// <p>The streaming protocol you want your stack to prefer. This can be UDP or TCP. Currently, UDP is only supported in the Windows native client.</p>
    pub fn set_streaming_experience_settings(mut self, input: ::std::option::Option<crate::types::StreamingExperienceSettings>) -> Self {
        self.inner = self.inner.set_streaming_experience_settings(input);
        self
    }
    /// <p>The streaming protocol you want your stack to prefer. This can be UDP or TCP. Currently, UDP is only supported in the Windows native client.</p>
    pub fn get_streaming_experience_settings(&self) -> &::std::option::Option<crate::types::StreamingExperienceSettings> {
        self.inner.get_streaming_experience_settings()
    }
    /// <p>Configuration for bidirectional URL redirection between the streaming session and the local client. Use HostToClient to redirect URLs from the remote desktop to the local browser.</p>
    pub fn content_redirection(mut self, input: crate::types::ContentRedirection) -> Self {
        self.inner = self.inner.content_redirection(input);
        self
    }
    /// <p>Configuration for bidirectional URL redirection between the streaming session and the local client. Use HostToClient to redirect URLs from the remote desktop to the local browser.</p>
    pub fn set_content_redirection(mut self, input: ::std::option::Option<crate::types::ContentRedirection>) -> Self {
        self.inner = self.inner.set_content_redirection(input);
        self
    }
    /// <p>Configuration for bidirectional URL redirection between the streaming session and the local client. Use HostToClient to redirect URLs from the remote desktop to the local browser.</p>
    pub fn get_content_redirection(&self) -> &::std::option::Option<crate::types::ContentRedirection> {
        self.inner.get_content_redirection()
    }
    /// <p>The configuration for agent access on the stack. If specified, agent access is enabled for the stack.</p>
    pub fn agent_access_config(mut self, input: crate::types::AgentAccessConfig) -> Self {
        self.inner = self.inner.agent_access_config(input);
        self
    }
    /// <p>The configuration for agent access on the stack. If specified, agent access is enabled for the stack.</p>
    pub fn set_agent_access_config(mut self, input: ::std::option::Option<crate::types::AgentAccessConfig>) -> Self {
        self.inner = self.inner.set_agent_access_config(input);
        self
    }
    /// <p>The configuration for agent access on the stack. If specified, agent access is enabled for the stack.</p>
    pub fn get_agent_access_config(&self) -> &::std::option::Option<crate::types::AgentAccessConfig> {
        self.inner.get_agent_access_config()
    }
}