aws-sdk-cloudwatchomni 1.2.0

AWS SDK for CloudWatch Omni
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::create_domain_for_organization::_create_domain_for_organization_input::CreateDomainForOrganizationInputBuilder;

pub use crate::operation::create_domain_for_organization::_create_domain_for_organization_output::CreateDomainForOrganizationOutputBuilder;

impl crate::operation::create_domain_for_organization::builders::CreateDomainForOrganizationInputBuilder {
    /// 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_domain_for_organization::CreateDomainForOrganizationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_domain_for_organization::CreateDomainForOrganizationError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.create_domain_for_organization();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `CreateDomainForOrganization`.
///
/// Creates an organization-scoped domain for the caller's AWS Organization. Only the organization's management account can call this operation.
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct CreateDomainForOrganizationFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::create_domain_for_organization::builders::CreateDomainForOrganizationInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::create_domain_for_organization::CreateDomainForOrganizationOutput,
        crate::operation::create_domain_for_organization::CreateDomainForOrganizationError,
    > for CreateDomainForOrganizationFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::create_domain_for_organization::CreateDomainForOrganizationOutput,
            crate::operation::create_domain_for_organization::CreateDomainForOrganizationError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl CreateDomainForOrganizationFluentBuilder {
    /// Creates a new `CreateDomainForOrganizationFluentBuilder`.
    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 CreateDomainForOrganization as a reference.
    pub fn as_input(&self) -> &crate::operation::create_domain_for_organization::builders::CreateDomainForOrganizationInputBuilder {
        &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_domain_for_organization::CreateDomainForOrganizationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_domain_for_organization::CreateDomainForOrganizationError,
            ::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_domain_for_organization::CreateDomainForOrganization::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::create_domain_for_organization::CreateDomainForOrganization::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_domain_for_organization::CreateDomainForOrganizationOutput,
        crate::operation::create_domain_for_organization::CreateDomainForOrganizationError,
        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
    }
    /// A name that identifies the organization domain. Must be 3-63 characters: lowercase letters, numbers, and hyphens. It must begin and end with a letter or number and cannot contain consecutive hyphens.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.name(input.into());
        self
    }
    /// A name that identifies the organization domain. Must be 3-63 characters: lowercase letters, numbers, and hyphens. It must begin and end with a letter or number and cannot contain consecutive hyphens.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_name(input);
        self
    }
    /// A name that identifies the organization domain. Must be 3-63 characters: lowercase letters, numbers, and hyphens. It must begin and end with a letter or number and cannot contain consecutive hyphens.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_name()
    }
    ///
    /// Appends an item to `identityProviders`.
    ///
    /// To override the contents of this collection use [`set_identity_providers`](Self::set_identity_providers).
    ///
    /// The identity providers to configure for the domain.
    pub fn identity_providers(mut self, input: crate::types::IdentityProvider) -> Self {
        self.inner = self.inner.identity_providers(input);
        self
    }
    /// The identity providers to configure for the domain.
    pub fn set_identity_providers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::IdentityProvider>>) -> Self {
        self.inner = self.inner.set_identity_providers(input);
        self
    }
    /// The identity providers to configure for the domain.
    pub fn get_identity_providers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IdentityProvider>> {
        self.inner.get_identity_providers()
    }
    /// Identity provider configuration for the domain.
    pub fn identity_provider_configuration(mut self, input: crate::types::IdentityProviderConfiguration) -> Self {
        self.inner = self.inner.identity_provider_configuration(input);
        self
    }
    /// Identity provider configuration for the domain.
    pub fn set_identity_provider_configuration(mut self, input: ::std::option::Option<crate::types::IdentityProviderConfiguration>) -> Self {
        self.inner = self.inner.set_identity_provider_configuration(input);
        self
    }
    /// Identity provider configuration for the domain.
    pub fn get_identity_provider_configuration(&self) -> &::std::option::Option<crate::types::IdentityProviderConfiguration> {
        self.inner.get_identity_provider_configuration()
    }
    /// The ARN of an IAM role in the management account used for domain access. You must create this role, and its trust policy must allow the service principal to assume it.
    pub fn domain_access_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.domain_access_role_arn(input.into());
        self
    }
    /// The ARN of an IAM role in the management account used for domain access. You must create this role, and its trust policy must allow the service principal to assume it.
    pub fn set_domain_access_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_domain_access_role_arn(input);
        self
    }
    /// The ARN of an IAM role in the management account used for domain access. You must create this role, and its trust policy must allow the service principal to assume it.
    pub fn get_domain_access_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_domain_access_role_arn()
    }
    ///
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// The tags to associate with the domain.
    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
    }
    /// The tags to associate with the domain.
    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
    }
    /// The tags to associate with the domain.
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.inner.get_tags()
    }
    /// Idempotency token for safe retries. Repeated requests with the same token return the original result instead of creating a duplicate.
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.client_token(input.into());
        self
    }
    /// Idempotency token for safe retries. Repeated requests with the same token return the original result instead of creating a duplicate.
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_client_token(input);
        self
    }
    /// Idempotency token for safe retries. Repeated requests with the same token return the original result instead of creating a duplicate.
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_client_token()
    }
}