aws-sdk-s3control 1.118.0

AWS SDK for AWS S3 Control
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::associate_access_grants_identity_center::_associate_access_grants_identity_center_input::AssociateAccessGrantsIdentityCenterInputBuilder;

pub use crate::operation::associate_access_grants_identity_center::_associate_access_grants_identity_center_output::AssociateAccessGrantsIdentityCenterOutputBuilder;

impl crate::operation::associate_access_grants_identity_center::builders::AssociateAccessGrantsIdentityCenterInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::associate_access_grants_identity_center::AssociateAccessGrantsIdentityCenterOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::associate_access_grants_identity_center::AssociateAccessGrantsIdentityCenterError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.associate_access_grants_identity_center();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `AssociateAccessGrantsIdentityCenter`.
///
/// <p>Associate your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance. Use this action if you want to create access grants for users or groups from your corporate identity directory. First, you must add your corporate identity directory to Amazon Web Services IAM Identity Center. Then, you can associate this IAM Identity Center instance with your S3 Access Grants instance.</p>
/// <dl>
/// <dt>
/// Permissions
/// </dt>
/// <dd>
/// <p>You must have the <code>s3:AssociateAccessGrantsIdentityCenter</code> permission to use this operation.</p>
/// </dd>
/// <dt>
/// Additional Permissions
/// </dt>
/// <dd>
/// <p>You must also have the following permissions: <code>sso:CreateApplication</code>, <code>sso:PutApplicationGrant</code>, and <code>sso:PutApplicationAuthenticationMethod</code>.</p>
/// </dd>
/// </dl>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct AssociateAccessGrantsIdentityCenterFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::associate_access_grants_identity_center::builders::AssociateAccessGrantsIdentityCenterInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::associate_access_grants_identity_center::AssociateAccessGrantsIdentityCenterOutput,
        crate::operation::associate_access_grants_identity_center::AssociateAccessGrantsIdentityCenterError,
    > for AssociateAccessGrantsIdentityCenterFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::associate_access_grants_identity_center::AssociateAccessGrantsIdentityCenterOutput,
            crate::operation::associate_access_grants_identity_center::AssociateAccessGrantsIdentityCenterError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl AssociateAccessGrantsIdentityCenterFluentBuilder {
    /// Creates a new `AssociateAccessGrantsIdentityCenterFluentBuilder`.
    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 AssociateAccessGrantsIdentityCenter as a reference.
    pub fn as_input(&self) -> &crate::operation::associate_access_grants_identity_center::builders::AssociateAccessGrantsIdentityCenterInputBuilder {
        &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::associate_access_grants_identity_center::AssociateAccessGrantsIdentityCenterOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::associate_access_grants_identity_center::AssociateAccessGrantsIdentityCenterError,
            ::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::associate_access_grants_identity_center::AssociateAccessGrantsIdentityCenter::operation_runtime_plugins(
                self.handle.runtime_plugins.clone(),
                &self.handle.conf,
                self.config_override,
            );
        crate::operation::associate_access_grants_identity_center::AssociateAccessGrantsIdentityCenter::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::associate_access_grants_identity_center::AssociateAccessGrantsIdentityCenterOutput,
        crate::operation::associate_access_grants_identity_center::AssociateAccessGrantsIdentityCenterError,
        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 Amazon Web Services account ID of the S3 Access Grants instance.</p>
    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.account_id(input.into());
        self
    }
    /// <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_account_id(input);
        self
    }
    /// <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_account_id()
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services IAM Identity Center instance that you are associating with your S3 Access Grants instance. An IAM Identity Center instance is your corporate identity directory that you added to the IAM Identity Center. You can use the <a href="https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_ListInstances.html">ListInstances</a> API operation to retrieve a list of your Identity Center instances and their ARNs.</p>
    pub fn identity_center_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.identity_center_arn(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services IAM Identity Center instance that you are associating with your S3 Access Grants instance. An IAM Identity Center instance is your corporate identity directory that you added to the IAM Identity Center. You can use the <a href="https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_ListInstances.html">ListInstances</a> API operation to retrieve a list of your Identity Center instances and their ARNs.</p>
    pub fn set_identity_center_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_identity_center_arn(input);
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services IAM Identity Center instance that you are associating with your S3 Access Grants instance. An IAM Identity Center instance is your corporate identity directory that you added to the IAM Identity Center. You can use the <a href="https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_ListInstances.html">ListInstances</a> API operation to retrieve a list of your Identity Center instances and their ARNs.</p>
    pub fn get_identity_center_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_identity_center_arn()
    }
}