aws_sdk_s3control/client/
create_access_point.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`CreateAccessPoint`](crate::operation::create_access_point::builders::CreateAccessPointFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`account_id(impl Into<String>)`](crate::operation::create_access_point::builders::CreateAccessPointFluentBuilder::account_id) / [`set_account_id(Option<String>)`](crate::operation::create_access_point::builders::CreateAccessPointFluentBuilder::set_account_id):<br>required: **true**<br><p>The Amazon Web Services account ID for the account that owns the specified access point.</p><br>
7    ///   - [`name(impl Into<String>)`](crate::operation::create_access_point::builders::CreateAccessPointFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_access_point::builders::CreateAccessPointFluentBuilder::set_name):<br>required: **true**<br><p>The name you want to assign to this access point.</p> <p>For directory buckets, the access point name must consist of a base name that you provide and suffix that includes the <code>ZoneID</code> (Amazon Web Services Availability Zone or Local Zone) of your bucket location, followed by <code>--xa-s3</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points-directory-buckets.html">Managing access to shared datasets in directory buckets with access points</a> in the <i>Amazon S3 User Guide</i>.</p><br>
8    ///   - [`bucket(impl Into<String>)`](crate::operation::create_access_point::builders::CreateAccessPointFluentBuilder::bucket) / [`set_bucket(Option<String>)`](crate::operation::create_access_point::builders::CreateAccessPointFluentBuilder::set_bucket):<br>required: **true**<br><p>The name of the bucket that you want to associate this access point with.</p> <p>For using this parameter with Amazon S3 on Outposts with the REST API, you must specify the name and the x-amz-outpost-id as well.</p> <p>For using this parameter with S3 on Outposts with the Amazon Web Services SDK and CLI, you must specify the ARN of the bucket accessed in the format <code>arn:aws:s3-outposts:<region>    :    <account-id>     :outpost/     <outpost-id>      /bucket/      <my-bucket-name></my-bucket-name>     </outpost-id>    </account-id>   </region></code>. For example, to access the bucket <code>reports</code> through Outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/bucket/reports</code>. The value must be URL encoded.</p><br>
9    ///   - [`vpc_configuration(VpcConfiguration)`](crate::operation::create_access_point::builders::CreateAccessPointFluentBuilder::vpc_configuration) / [`set_vpc_configuration(Option<VpcConfiguration>)`](crate::operation::create_access_point::builders::CreateAccessPointFluentBuilder::set_vpc_configuration):<br>required: **false**<br><p>If you include this field, Amazon S3 restricts access to this access point to requests from the specified virtual private cloud (VPC).</p><note>  <p>This is required for creating an access point for Amazon S3 on Outposts buckets.</p> </note><br>
10    ///   - [`public_access_block_configuration(PublicAccessBlockConfiguration)`](crate::operation::create_access_point::builders::CreateAccessPointFluentBuilder::public_access_block_configuration) / [`set_public_access_block_configuration(Option<PublicAccessBlockConfiguration>)`](crate::operation::create_access_point::builders::CreateAccessPointFluentBuilder::set_public_access_block_configuration):<br>required: **false**<br><p>The <code>PublicAccessBlock</code> configuration that you want to apply to the access point.</p><br>
11    ///   - [`bucket_account_id(impl Into<String>)`](crate::operation::create_access_point::builders::CreateAccessPointFluentBuilder::bucket_account_id) / [`set_bucket_account_id(Option<String>)`](crate::operation::create_access_point::builders::CreateAccessPointFluentBuilder::set_bucket_account_id):<br>required: **false**<br><p>The Amazon Web Services account ID associated with the S3 bucket associated with this access point.</p> <p>For same account access point when your bucket and access point belong to the same account owner, the <code>BucketAccountId</code> is not required. For cross-account access point when your bucket and access point are not in the same account, the <code>BucketAccountId</code> is required.</p><br>
12    ///   - [`scope(Scope)`](crate::operation::create_access_point::builders::CreateAccessPointFluentBuilder::scope) / [`set_scope(Option<Scope>)`](crate::operation::create_access_point::builders::CreateAccessPointFluentBuilder::set_scope):<br>required: **false**<br><p>For directory buckets, you can filter access control to specific prefixes, API operations, or a combination of both. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points-directory-buckets.html">Managing access to shared datasets in directory buckets with access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>  <p>Scope is only supported for access points attached to directory buckets.</p> </note><br>
13    ///   - [`tags(Tag)`](crate::operation::create_access_point::builders::CreateAccessPointFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_access_point::builders::CreateAccessPointFluentBuilder::set_tags):<br>required: **false**<br><p>An array of tags that you can apply to an access point. Tags are key-value pairs of metadata used to control access to your access points. For more information about tags, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html">Using tags with Amazon S3</a>. For information about tagging access points, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html#using-tags-for-abac">Using tags for attribute-based access control (ABAC)</a>.</p><note>  <ul>   <li>    <p>You must have the <code>s3:TagResource</code> permission to create an access point with tags for a general purpose bucket.</p></li>   <li>    <p>You must have the <code>s3express:TagResource</code> permission to create an access point with tags for a directory bucket.</p></li>  </ul> </note><br>
14    /// - On success, responds with [`CreateAccessPointOutput`](crate::operation::create_access_point::CreateAccessPointOutput) with field(s):
15    ///   - [`access_point_arn(Option<String>)`](crate::operation::create_access_point::CreateAccessPointOutput::access_point_arn): <p>The ARN of the access point.</p><note>  <p>This is only supported by Amazon S3 on Outposts.</p> </note>
16    ///   - [`alias(Option<String>)`](crate::operation::create_access_point::CreateAccessPointOutput::alias): <p>The name or alias of the access point.</p>
17    /// - On failure, responds with [`SdkError<CreateAccessPointError>`](crate::operation::create_access_point::CreateAccessPointError)
18    pub fn create_access_point(&self) -> crate::operation::create_access_point::builders::CreateAccessPointFluentBuilder {
19        crate::operation::create_access_point::builders::CreateAccessPointFluentBuilder::new(self.handle.clone())
20    }
21}