1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreateAccessGrant`](crate::operation::create_access_grant::builders::CreateAccessGrantFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`account_id(impl Into<String>)`](crate::operation::create_access_grant::builders::CreateAccessGrantFluentBuilder::account_id) / [`set_account_id(Option<String>)`](crate::operation::create_access_grant::builders::CreateAccessGrantFluentBuilder::set_account_id):<br>required: **true**<br><p>The ID of the Amazon Web Services account that is making this request.</p><br>
    ///   - [`access_grants_location_id(impl Into<String>)`](crate::operation::create_access_grant::builders::CreateAccessGrantFluentBuilder::access_grants_location_id) / [`set_access_grants_location_id(Option<String>)`](crate::operation::create_access_grant::builders::CreateAccessGrantFluentBuilder::set_access_grants_location_id):<br>required: **true**<br><p>The ID of the registered location to which you are granting access. S3 Access Grants assigns this ID when you register the location. S3 Access Grants assigns the ID <code>default</code> to the default location <code>s3://</code> and assigns an auto-generated ID to other locations that you register.</p> <p>If you are passing the <code>default</code> location, you cannot create an access grant for the entire default location. You must also specify a bucket or a bucket and prefix in the <code>Subprefix</code> field.</p><br>
    ///   - [`access_grants_location_configuration(AccessGrantsLocationConfiguration)`](crate::operation::create_access_grant::builders::CreateAccessGrantFluentBuilder::access_grants_location_configuration) / [`set_access_grants_location_configuration(Option<AccessGrantsLocationConfiguration>)`](crate::operation::create_access_grant::builders::CreateAccessGrantFluentBuilder::set_access_grants_location_configuration):<br>required: **false**<br><p>The configuration options of the grant location. The grant location is the S3 path to the data to which you are granting access. It contains the <code>S3SubPrefix</code> field. The grant scope is the result of appending the subprefix to the location scope of the registered location.</p><br>
    ///   - [`grantee(Grantee)`](crate::operation::create_access_grant::builders::CreateAccessGrantFluentBuilder::grantee) / [`set_grantee(Option<Grantee>)`](crate::operation::create_access_grant::builders::CreateAccessGrantFluentBuilder::set_grantee):<br>required: **true**<br><p>The user, group, or role to which you are granting access. You can grant access to an IAM user or role. If you have added your corporate directory to Amazon Web Services IAM Identity Center and associated your Identity Center instance with your S3 Access Grants instance, the grantee can also be a corporate directory user or group.</p><br>
    ///   - [`permission(Permission)`](crate::operation::create_access_grant::builders::CreateAccessGrantFluentBuilder::permission) / [`set_permission(Option<Permission>)`](crate::operation::create_access_grant::builders::CreateAccessGrantFluentBuilder::set_permission):<br>required: **true**<br><p>The type of access that you are granting to your S3 data, which can be set to one of the following values:</p> <ul>  <li>   <p><code>READ</code> – Grant read-only access to the S3 data.</p></li>  <li>   <p><code>WRITE</code> – Grant write-only access to the S3 data.</p></li>  <li>   <p><code>READWRITE</code> – Grant both read and write access to the S3 data.</p></li> </ul><br>
    ///   - [`application_arn(impl Into<String>)`](crate::operation::create_access_grant::builders::CreateAccessGrantFluentBuilder::application_arn) / [`set_application_arn(Option<String>)`](crate::operation::create_access_grant::builders::CreateAccessGrantFluentBuilder::set_application_arn):<br>required: **false**<br><p>The Amazon Resource Name (ARN) of an Amazon Web Services IAM Identity Center application associated with your Identity Center instance. If an application ARN is included in the request to create an access grant, the grantee can only access the S3 data through this application.</p><br>
    ///   - [`s3_prefix_type(S3PrefixType)`](crate::operation::create_access_grant::builders::CreateAccessGrantFluentBuilder::s3_prefix_type) / [`set_s3_prefix_type(Option<S3PrefixType>)`](crate::operation::create_access_grant::builders::CreateAccessGrantFluentBuilder::set_s3_prefix_type):<br>required: **false**<br><p>The type of <code>S3SubPrefix</code>. The only possible value is <code>Object</code>. Pass this value if the access grant scope is an object. Do not pass this value if the access grant scope is a bucket or a bucket and a prefix.</p><br>
    ///   - [`tags(Tag)`](crate::operation::create_access_grant::builders::CreateAccessGrantFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_access_grant::builders::CreateAccessGrantFluentBuilder::set_tags):<br>required: **false**<br><p>The Amazon Web Services resource tags that you are adding to the access grant. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.</p><br>
    /// - On success, responds with [`CreateAccessGrantOutput`](crate::operation::create_access_grant::CreateAccessGrantOutput) with field(s):
    ///   - [`created_at(Option<DateTime>)`](crate::operation::create_access_grant::CreateAccessGrantOutput::created_at): <p>The date and time when you created the access grant.</p>
    ///   - [`access_grant_id(Option<String>)`](crate::operation::create_access_grant::CreateAccessGrantOutput::access_grant_id): <p>The ID of the access grant. S3 Access Grants auto-generates this ID when you create the access grant.</p>
    ///   - [`access_grant_arn(Option<String>)`](crate::operation::create_access_grant::CreateAccessGrantOutput::access_grant_arn): <p>The Amazon Resource Name (ARN) of the access grant.</p>
    ///   - [`grantee(Option<Grantee>)`](crate::operation::create_access_grant::CreateAccessGrantOutput::grantee): <p>The user, group, or role to which you are granting access. You can grant access to an IAM user or role. If you have added your corporate directory to Amazon Web Services IAM Identity Center and associated your Identity Center instance with your S3 Access Grants instance, the grantee can also be a corporate directory user or group.</p>
    ///   - [`access_grants_location_id(Option<String>)`](crate::operation::create_access_grant::CreateAccessGrantOutput::access_grants_location_id): <p>The ID of the registered location to which you are granting access. S3 Access Grants assigns this ID when you register the location. S3 Access Grants assigns the ID <code>default</code> to the default location <code>s3://</code> and assigns an auto-generated ID to other locations that you register.</p>
    ///   - [`access_grants_location_configuration(Option<AccessGrantsLocationConfiguration>)`](crate::operation::create_access_grant::CreateAccessGrantOutput::access_grants_location_configuration): <p>The configuration options of the grant location. The grant location is the S3 path to the data to which you are granting access.</p>
    ///   - [`permission(Option<Permission>)`](crate::operation::create_access_grant::CreateAccessGrantOutput::permission): <p>The type of access that you are granting to your S3 data, which can be set to one of the following values:</p> <ul>  <li>   <p><code>READ</code> – Grant read-only access to the S3 data.</p></li>  <li>   <p><code>WRITE</code> – Grant write-only access to the S3 data.</p></li>  <li>   <p><code>READWRITE</code> – Grant both read and write access to the S3 data.</p></li> </ul>
    ///   - [`application_arn(Option<String>)`](crate::operation::create_access_grant::CreateAccessGrantOutput::application_arn): <p>The Amazon Resource Name (ARN) of an Amazon Web Services IAM Identity Center application associated with your Identity Center instance. If the grant includes an application ARN, the grantee can only access the S3 data through this application.</p>
    ///   - [`grant_scope(Option<String>)`](crate::operation::create_access_grant::CreateAccessGrantOutput::grant_scope): <p>The S3 path of the data to which you are granting access. It is the result of appending the <code>Subprefix</code> to the location scope.</p>
    /// - On failure, responds with [`SdkError<CreateAccessGrantError>`](crate::operation::create_access_grant::CreateAccessGrantError)
    pub fn create_access_grant(&self) -> crate::operation::create_access_grant::builders::CreateAccessGrantFluentBuilder {
        crate::operation::create_access_grant::builders::CreateAccessGrantFluentBuilder::new(self.handle.clone())
    }
}