aws_sdk_s3control/client/
put_access_point_policy.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 [`PutAccessPointPolicy`](crate::operation::put_access_point_policy::builders::PutAccessPointPolicyFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`account_id(impl Into<String>)`](crate::operation::put_access_point_policy::builders::PutAccessPointPolicyFluentBuilder::account_id) / [`set_account_id(Option<String>)`](crate::operation::put_access_point_policy::builders::PutAccessPointPolicyFluentBuilder::set_account_id):<br>required: **true**<br><p>The Amazon Web Services account ID for owner of the bucket associated with the specified access point.</p><br>
7    ///   - [`name(impl Into<String>)`](crate::operation::put_access_point_policy::builders::PutAccessPointPolicyFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::put_access_point_policy::builders::PutAccessPointPolicyFluentBuilder::set_name):<br>required: **true**<br><p>The name of the access point that you want to associate with the specified policy.</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 access point accessed in the format <code>arn:aws:s3-outposts:<region>    :    <account-id>     :outpost/     <outpost-id>      /accesspoint/      <my-accesspoint-name></my-accesspoint-name>     </outpost-id>    </account-id>   </region></code>. For example, to access the access point <code>reports-ap</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/accesspoint/reports-ap</code>. The value must be URL encoded.</p><br>
8    ///   - [`policy(impl Into<String>)`](crate::operation::put_access_point_policy::builders::PutAccessPointPolicyFluentBuilder::policy) / [`set_policy(Option<String>)`](crate::operation::put_access_point_policy::builders::PutAccessPointPolicyFluentBuilder::set_policy):<br>required: **true**<br><p>The policy that you want to apply to the specified access point. For more information about access point policies, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html">Managing data access with Amazon S3 access points</a> or <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>
9    /// - On success, responds with [`PutAccessPointPolicyOutput`](crate::operation::put_access_point_policy::PutAccessPointPolicyOutput)
10    /// - On failure, responds with [`SdkError<PutAccessPointPolicyError>`](crate::operation::put_access_point_policy::PutAccessPointPolicyError)
11    pub fn put_access_point_policy(&self) -> crate::operation::put_access_point_policy::builders::PutAccessPointPolicyFluentBuilder {
12        crate::operation::put_access_point_policy::builders::PutAccessPointPolicyFluentBuilder::new(self.handle.clone())
13    }
14}