aws-sdk-directory 1.107.0

AWS SDK for AWS Directory Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::start_ad_assessment::_start_ad_assessment_input::StartAdAssessmentInputBuilder;

pub use crate::operation::start_ad_assessment::_start_ad_assessment_output::StartAdAssessmentOutputBuilder;

impl crate::operation::start_ad_assessment::builders::StartAdAssessmentInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::start_ad_assessment::StartAdAssessmentOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::start_ad_assessment::StartADAssessmentError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.start_ad_assessment();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `StartADAssessment`.
///
/// <p>Initiates a directory assessment to validate your self-managed AD environment for hybrid domain join. The assessment checks compatibility and connectivity of the self-managed AD environment.</p>
/// <p>A directory assessment is automatically created when you create a hybrid directory. There are two types of assessments: <code>CUSTOMER</code> and <code>SYSTEM</code>. Your Amazon Web Services account has a limit of 100 <code>CUSTOMER</code> directory assessments.</p>
/// <p>The assessment process typically takes 30 minutes or more to complete. The assessment process is asynchronous and you can monitor it with <code>DescribeADAssessment</code>.</p>
/// <p>The InstanceIds must have a one-to-one correspondence with CustomerDnsIps, meaning that if the IP address for instance i-10243410 is 10.24.34.100 and the IP address for instance i-10243420 is 10.24.34.200, then the input arrays must maintain the same order relationship, either \[10.24.34.100, 10.24.34.200\] paired with \[i-10243410, i-10243420\] or \[10.24.34.200, 10.24.34.100\] paired with \[i-10243420, i-10243410\].</p>
/// <p>Note: You must provide exactly one <code>DirectoryId</code> or <code>AssessmentConfiguration</code>.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct StartADAssessmentFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::start_ad_assessment::builders::StartAdAssessmentInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::start_ad_assessment::StartAdAssessmentOutput,
        crate::operation::start_ad_assessment::StartADAssessmentError,
    > for StartADAssessmentFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::start_ad_assessment::StartAdAssessmentOutput,
            crate::operation::start_ad_assessment::StartADAssessmentError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl StartADAssessmentFluentBuilder {
    /// Creates a new `StartADAssessmentFluentBuilder`.
    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 StartADAssessment as a reference.
    pub fn as_input(&self) -> &crate::operation::start_ad_assessment::builders::StartAdAssessmentInputBuilder {
        &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::start_ad_assessment::StartAdAssessmentOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::start_ad_assessment::StartADAssessmentError,
            ::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::start_ad_assessment::StartADAssessment::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::start_ad_assessment::StartADAssessment::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::start_ad_assessment::StartAdAssessmentOutput,
        crate::operation::start_ad_assessment::StartADAssessmentError,
        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>Configuration parameters for the directory assessment, including DNS server information, domain name, Amazon VPC subnet, and Amazon Web Services System Manager managed node details.</p>
    pub fn assessment_configuration(mut self, input: crate::types::AssessmentConfiguration) -> Self {
        self.inner = self.inner.assessment_configuration(input);
        self
    }
    /// <p>Configuration parameters for the directory assessment, including DNS server information, domain name, Amazon VPC subnet, and Amazon Web Services System Manager managed node details.</p>
    pub fn set_assessment_configuration(mut self, input: ::std::option::Option<crate::types::AssessmentConfiguration>) -> Self {
        self.inner = self.inner.set_assessment_configuration(input);
        self
    }
    /// <p>Configuration parameters for the directory assessment, including DNS server information, domain name, Amazon VPC subnet, and Amazon Web Services System Manager managed node details.</p>
    pub fn get_assessment_configuration(&self) -> &::std::option::Option<crate::types::AssessmentConfiguration> {
        self.inner.get_assessment_configuration()
    }
    /// <p>The identifier of the directory for which to perform the assessment. This should be an existing directory. If the assessment is not for an existing directory, this parameter should be omitted.</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 for which to perform the assessment. This should be an existing directory. If the assessment is not for an existing directory, this parameter should be omitted.</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 for which to perform the assessment. This should be an existing directory. If the assessment is not for an existing directory, this parameter should be omitted.</p>
    pub fn get_directory_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_directory_id()
    }
}