aws-sdk-fsx 1.111.0

AWS SDK for Amazon FSx
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::create_and_attach_s3_access_point::_create_and_attach_s3_access_point_input::CreateAndAttachS3AccessPointInputBuilder;

pub use crate::operation::create_and_attach_s3_access_point::_create_and_attach_s3_access_point_output::CreateAndAttachS3AccessPointOutputBuilder;

impl crate::operation::create_and_attach_s3_access_point::builders::CreateAndAttachS3AccessPointInputBuilder {
    /// 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_and_attach_s3_access_point::CreateAndAttachS3AccessPointOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_and_attach_s3_access_point::CreateAndAttachS3AccessPointError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.create_and_attach_s3_access_point();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `CreateAndAttachS3AccessPoint`.
///
/// <p>Creates an S3 access point and attaches it to an Amazon FSx volume. For FSx for OpenZFS file systems, the volume must be hosted on a high-availability file system, either Single-AZ or Multi-AZ. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/s3accesspoints-for-FSx.html">Accessing your data using Amazon S3 access points</a>. in the Amazon FSx for OpenZFS User Guide.</p>
/// <p>The requester requires the following permissions to perform these actions:</p>
/// <ul>
/// <li>
/// <p><code>fsx:CreateAndAttachS3AccessPoint</code></p></li>
/// <li>
/// <p><code>s3:CreateAccessPoint</code></p></li>
/// <li>
/// <p><code>s3:GetAccessPoint</code></p></li>
/// <li>
/// <p><code>s3:PutAccessPointPolicy</code></p></li>
/// <li>
/// <p><code>s3:DeleteAccessPoint</code></p></li>
/// </ul>
/// <p>The following actions are related to <code>CreateAndAttachS3AccessPoint</code>:</p>
/// <ul>
/// <li>
/// <p><code>DescribeS3AccessPointAttachments</code></p></li>
/// <li>
/// <p><code>DetachAndDeleteS3AccessPoint</code></p></li>
/// </ul>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct CreateAndAttachS3AccessPointFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::create_and_attach_s3_access_point::builders::CreateAndAttachS3AccessPointInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::create_and_attach_s3_access_point::CreateAndAttachS3AccessPointOutput,
        crate::operation::create_and_attach_s3_access_point::CreateAndAttachS3AccessPointError,
    > for CreateAndAttachS3AccessPointFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::create_and_attach_s3_access_point::CreateAndAttachS3AccessPointOutput,
            crate::operation::create_and_attach_s3_access_point::CreateAndAttachS3AccessPointError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl CreateAndAttachS3AccessPointFluentBuilder {
    /// Creates a new `CreateAndAttachS3AccessPointFluentBuilder`.
    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 CreateAndAttachS3AccessPoint as a reference.
    pub fn as_input(&self) -> &crate::operation::create_and_attach_s3_access_point::builders::CreateAndAttachS3AccessPointInputBuilder {
        &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_and_attach_s3_access_point::CreateAndAttachS3AccessPointOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_and_attach_s3_access_point::CreateAndAttachS3AccessPointError,
            ::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_and_attach_s3_access_point::CreateAndAttachS3AccessPoint::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::create_and_attach_s3_access_point::CreateAndAttachS3AccessPoint::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_and_attach_s3_access_point::CreateAndAttachS3AccessPointOutput,
        crate::operation::create_and_attach_s3_access_point::CreateAndAttachS3AccessPointError,
        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>(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.</p>
    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.client_request_token(input.into());
        self
    }
    /// <p>(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.</p>
    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_client_request_token(input);
        self
    }
    /// <p>(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.</p>
    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_client_request_token()
    }
    /// <p>The name you want to assign to this S3 access point.</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 you want to assign to this S3 access point.</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 you want to assign to this S3 access point.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_name()
    }
    /// <p>The type of S3 access point you want to create. Only <code>OpenZFS</code> is supported.</p>
    pub fn r#type(mut self, input: crate::types::S3AccessPointAttachmentType) -> Self {
        self.inner = self.inner.r#type(input);
        self
    }
    /// <p>The type of S3 access point you want to create. Only <code>OpenZFS</code> is supported.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::S3AccessPointAttachmentType>) -> Self {
        self.inner = self.inner.set_type(input);
        self
    }
    /// <p>The type of S3 access point you want to create. Only <code>OpenZFS</code> is supported.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::S3AccessPointAttachmentType> {
        self.inner.get_type()
    }
    /// <p>Specifies the configuration to use when creating and attaching an S3 access point to an FSx for OpenZFS volume.</p>
    pub fn open_zfs_configuration(mut self, input: crate::types::CreateAndAttachS3AccessPointOpenZfsConfiguration) -> Self {
        self.inner = self.inner.open_zfs_configuration(input);
        self
    }
    /// <p>Specifies the configuration to use when creating and attaching an S3 access point to an FSx for OpenZFS volume.</p>
    pub fn set_open_zfs_configuration(
        mut self,
        input: ::std::option::Option<crate::types::CreateAndAttachS3AccessPointOpenZfsConfiguration>,
    ) -> Self {
        self.inner = self.inner.set_open_zfs_configuration(input);
        self
    }
    /// <p>Specifies the configuration to use when creating and attaching an S3 access point to an FSx for OpenZFS volume.</p>
    pub fn get_open_zfs_configuration(&self) -> &::std::option::Option<crate::types::CreateAndAttachS3AccessPointOpenZfsConfiguration> {
        self.inner.get_open_zfs_configuration()
    }
    /// <p>Specifies the FSx for ONTAP volume that the S3 access point will be attached to, and the file system user identity.</p>
    pub fn ontap_configuration(mut self, input: crate::types::CreateAndAttachS3AccessPointOntapConfiguration) -> Self {
        self.inner = self.inner.ontap_configuration(input);
        self
    }
    /// <p>Specifies the FSx for ONTAP volume that the S3 access point will be attached to, and the file system user identity.</p>
    pub fn set_ontap_configuration(mut self, input: ::std::option::Option<crate::types::CreateAndAttachS3AccessPointOntapConfiguration>) -> Self {
        self.inner = self.inner.set_ontap_configuration(input);
        self
    }
    /// <p>Specifies the FSx for ONTAP volume that the S3 access point will be attached to, and the file system user identity.</p>
    pub fn get_ontap_configuration(&self) -> &::std::option::Option<crate::types::CreateAndAttachS3AccessPointOntapConfiguration> {
        self.inner.get_ontap_configuration()
    }
    /// <p>Specifies the virtual private cloud (VPC) configuration if you're creating an access point that is restricted to a VPC. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/access-points-vpc.html">Creating access points restricted to a virtual private cloud</a>.</p>
    pub fn s3_access_point(mut self, input: crate::types::CreateAndAttachS3AccessPointS3Configuration) -> Self {
        self.inner = self.inner.s3_access_point(input);
        self
    }
    /// <p>Specifies the virtual private cloud (VPC) configuration if you're creating an access point that is restricted to a VPC. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/access-points-vpc.html">Creating access points restricted to a virtual private cloud</a>.</p>
    pub fn set_s3_access_point(mut self, input: ::std::option::Option<crate::types::CreateAndAttachS3AccessPointS3Configuration>) -> Self {
        self.inner = self.inner.set_s3_access_point(input);
        self
    }
    /// <p>Specifies the virtual private cloud (VPC) configuration if you're creating an access point that is restricted to a VPC. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/access-points-vpc.html">Creating access points restricted to a virtual private cloud</a>.</p>
    pub fn get_s3_access_point(&self) -> &::std::option::Option<crate::types::CreateAndAttachS3AccessPointS3Configuration> {
        self.inner.get_s3_access_point()
    }
}