1. Packages
  2. AWS
  3. API Docs
  4. s3control
  5. AccessGrant
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.s3control.AccessGrant

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    Provides a resource to manage an S3 Access Grant. Each access grant has its own ID and gives an IAM user or role or a directory user, or group (the grantee) access to a registered location. You determine the level of access, such as READ or READWRITE. Before you can create a grant, you must have an S3 Access Grants instance in the same Region as the S3 data.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.s3control.AccessGrantsInstance("example", {});
    const exampleAccessGrantsLocation = new aws.s3control.AccessGrantsLocation("example", {
        iamRoleArn: exampleAwsIamRole.arn,
        locationScope: `s3://${exampleAwsS3Bucket.bucket}/prefixA*`,
    }, {
        dependsOn: [example],
    });
    const exampleAccessGrant = new aws.s3control.AccessGrant("example", {
        accessGrantsLocationId: exampleAccessGrantsLocation.accessGrantsLocationId,
        permission: "READ",
        accessGrantsLocationConfiguration: {
            s3SubPrefix: "prefixB*",
        },
        grantee: {
            granteeType: "IAM",
            granteeIdentifier: exampleAwsIamUser.arn,
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.s3control.AccessGrantsInstance("example")
    example_access_grants_location = aws.s3control.AccessGrantsLocation("example",
        iam_role_arn=example_aws_iam_role["arn"],
        location_scope=f"s3://{example_aws_s3_bucket['bucket']}/prefixA*",
        opts = pulumi.ResourceOptions(depends_on=[example]))
    example_access_grant = aws.s3control.AccessGrant("example",
        access_grants_location_id=example_access_grants_location.access_grants_location_id,
        permission="READ",
        access_grants_location_configuration={
            "s3_sub_prefix": "prefixB*",
        },
        grantee={
            "grantee_type": "IAM",
            "grantee_identifier": example_aws_iam_user["arn"],
        })
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3control"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := s3control.NewAccessGrantsInstance(ctx, "example", nil)
    		if err != nil {
    			return err
    		}
    		exampleAccessGrantsLocation, err := s3control.NewAccessGrantsLocation(ctx, "example", &s3control.AccessGrantsLocationArgs{
    			IamRoleArn:    pulumi.Any(exampleAwsIamRole.Arn),
    			LocationScope: pulumi.Sprintf("s3://%v/prefixA*", exampleAwsS3Bucket.Bucket),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			example,
    		}))
    		if err != nil {
    			return err
    		}
    		_, err = s3control.NewAccessGrant(ctx, "example", &s3control.AccessGrantArgs{
    			AccessGrantsLocationId: exampleAccessGrantsLocation.AccessGrantsLocationId,
    			Permission:             pulumi.String("READ"),
    			AccessGrantsLocationConfiguration: &s3control.AccessGrantAccessGrantsLocationConfigurationArgs{
    				S3SubPrefix: pulumi.String("prefixB*"),
    			},
    			Grantee: &s3control.AccessGrantGranteeArgs{
    				GranteeType:       pulumi.String("IAM"),
    				GranteeIdentifier: pulumi.Any(exampleAwsIamUser.Arn),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.S3Control.AccessGrantsInstance("example");
    
        var exampleAccessGrantsLocation = new Aws.S3Control.AccessGrantsLocation("example", new()
        {
            IamRoleArn = exampleAwsIamRole.Arn,
            LocationScope = $"s3://{exampleAwsS3Bucket.Bucket}/prefixA*",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                example,
            },
        });
    
        var exampleAccessGrant = new Aws.S3Control.AccessGrant("example", new()
        {
            AccessGrantsLocationId = exampleAccessGrantsLocation.AccessGrantsLocationId,
            Permission = "READ",
            AccessGrantsLocationConfiguration = new Aws.S3Control.Inputs.AccessGrantAccessGrantsLocationConfigurationArgs
            {
                S3SubPrefix = "prefixB*",
            },
            Grantee = new Aws.S3Control.Inputs.AccessGrantGranteeArgs
            {
                GranteeType = "IAM",
                GranteeIdentifier = exampleAwsIamUser.Arn,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.s3control.AccessGrantsInstance;
    import com.pulumi.aws.s3control.AccessGrantsLocation;
    import com.pulumi.aws.s3control.AccessGrantsLocationArgs;
    import com.pulumi.aws.s3control.AccessGrant;
    import com.pulumi.aws.s3control.AccessGrantArgs;
    import com.pulumi.aws.s3control.inputs.AccessGrantAccessGrantsLocationConfigurationArgs;
    import com.pulumi.aws.s3control.inputs.AccessGrantGranteeArgs;
    import com.pulumi.resources.CustomResourceOptions;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new AccessGrantsInstance("example");
    
            var exampleAccessGrantsLocation = new AccessGrantsLocation("exampleAccessGrantsLocation", AccessGrantsLocationArgs.builder()
                .iamRoleArn(exampleAwsIamRole.arn())
                .locationScope(String.format("s3://%s/prefixA*", exampleAwsS3Bucket.bucket()))
                .build(), CustomResourceOptions.builder()
                    .dependsOn(example)
                    .build());
    
            var exampleAccessGrant = new AccessGrant("exampleAccessGrant", AccessGrantArgs.builder()
                .accessGrantsLocationId(exampleAccessGrantsLocation.accessGrantsLocationId())
                .permission("READ")
                .accessGrantsLocationConfiguration(AccessGrantAccessGrantsLocationConfigurationArgs.builder()
                    .s3SubPrefix("prefixB*")
                    .build())
                .grantee(AccessGrantGranteeArgs.builder()
                    .granteeType("IAM")
                    .granteeIdentifier(exampleAwsIamUser.arn())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:s3control:AccessGrantsInstance
      exampleAccessGrantsLocation:
        type: aws:s3control:AccessGrantsLocation
        name: example
        properties:
          iamRoleArn: ${exampleAwsIamRole.arn}
          locationScope: s3://${exampleAwsS3Bucket.bucket}/prefixA*
        options:
          dependson:
            - ${example}
      exampleAccessGrant:
        type: aws:s3control:AccessGrant
        name: example
        properties:
          accessGrantsLocationId: ${exampleAccessGrantsLocation.accessGrantsLocationId}
          permission: READ
          accessGrantsLocationConfiguration:
            s3SubPrefix: prefixB*
          grantee:
            granteeType: IAM
            granteeIdentifier: ${exampleAwsIamUser.arn}
    

    Create AccessGrant Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AccessGrant(name: string, args: AccessGrantArgs, opts?: CustomResourceOptions);
    @overload
    def AccessGrant(resource_name: str,
                    args: AccessGrantArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def AccessGrant(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    access_grants_location_id: Optional[str] = None,
                    permission: Optional[str] = None,
                    access_grants_location_configuration: Optional[AccessGrantAccessGrantsLocationConfigurationArgs] = None,
                    account_id: Optional[str] = None,
                    grantee: Optional[AccessGrantGranteeArgs] = None,
                    s3_prefix_type: Optional[str] = None,
                    tags: Optional[Mapping[str, str]] = None)
    func NewAccessGrant(ctx *Context, name string, args AccessGrantArgs, opts ...ResourceOption) (*AccessGrant, error)
    public AccessGrant(string name, AccessGrantArgs args, CustomResourceOptions? opts = null)
    public AccessGrant(String name, AccessGrantArgs args)
    public AccessGrant(String name, AccessGrantArgs args, CustomResourceOptions options)
    
    type: aws:s3control:AccessGrant
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AccessGrantArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AccessGrantArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AccessGrantArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AccessGrantArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AccessGrantArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var accessGrantResource = new Aws.S3Control.AccessGrant("accessGrantResource", new()
    {
        AccessGrantsLocationId = "string",
        Permission = "string",
        AccessGrantsLocationConfiguration = new Aws.S3Control.Inputs.AccessGrantAccessGrantsLocationConfigurationArgs
        {
            S3SubPrefix = "string",
        },
        AccountId = "string",
        Grantee = new Aws.S3Control.Inputs.AccessGrantGranteeArgs
        {
            GranteeIdentifier = "string",
            GranteeType = "string",
        },
        S3PrefixType = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := s3control.NewAccessGrant(ctx, "accessGrantResource", &s3control.AccessGrantArgs{
    	AccessGrantsLocationId: pulumi.String("string"),
    	Permission:             pulumi.String("string"),
    	AccessGrantsLocationConfiguration: &s3control.AccessGrantAccessGrantsLocationConfigurationArgs{
    		S3SubPrefix: pulumi.String("string"),
    	},
    	AccountId: pulumi.String("string"),
    	Grantee: &s3control.AccessGrantGranteeArgs{
    		GranteeIdentifier: pulumi.String("string"),
    		GranteeType:       pulumi.String("string"),
    	},
    	S3PrefixType: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var accessGrantResource = new AccessGrant("accessGrantResource", AccessGrantArgs.builder()
        .accessGrantsLocationId("string")
        .permission("string")
        .accessGrantsLocationConfiguration(AccessGrantAccessGrantsLocationConfigurationArgs.builder()
            .s3SubPrefix("string")
            .build())
        .accountId("string")
        .grantee(AccessGrantGranteeArgs.builder()
            .granteeIdentifier("string")
            .granteeType("string")
            .build())
        .s3PrefixType("string")
        .tags(Map.of("string", "string"))
        .build());
    
    access_grant_resource = aws.s3control.AccessGrant("accessGrantResource",
        access_grants_location_id="string",
        permission="string",
        access_grants_location_configuration={
            "s3SubPrefix": "string",
        },
        account_id="string",
        grantee={
            "granteeIdentifier": "string",
            "granteeType": "string",
        },
        s3_prefix_type="string",
        tags={
            "string": "string",
        })
    
    const accessGrantResource = new aws.s3control.AccessGrant("accessGrantResource", {
        accessGrantsLocationId: "string",
        permission: "string",
        accessGrantsLocationConfiguration: {
            s3SubPrefix: "string",
        },
        accountId: "string",
        grantee: {
            granteeIdentifier: "string",
            granteeType: "string",
        },
        s3PrefixType: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:s3control:AccessGrant
    properties:
        accessGrantsLocationConfiguration:
            s3SubPrefix: string
        accessGrantsLocationId: string
        accountId: string
        grantee:
            granteeIdentifier: string
            granteeType: string
        permission: string
        s3PrefixType: string
        tags:
            string: string
    

    AccessGrant Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The AccessGrant resource accepts the following input properties:

    AccessGrantsLocationId string
    The ID of the S3 Access Grants location to with the access grant is giving access.
    Permission string
    The access grant's level of access. Valid values: READ, WRITE, READWRITE.
    AccessGrantsLocationConfiguration AccessGrantAccessGrantsLocationConfiguration
    See Location Configuration below for more details.
    AccountId string
    Grantee AccessGrantGrantee
    See Grantee below for more details.
    S3PrefixType string
    If you are creating an access grant that grants access to only one object, set this to Object. Valid values: Object.
    Tags Dictionary<string, string>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    AccessGrantsLocationId string
    The ID of the S3 Access Grants location to with the access grant is giving access.
    Permission string
    The access grant's level of access. Valid values: READ, WRITE, READWRITE.
    AccessGrantsLocationConfiguration AccessGrantAccessGrantsLocationConfigurationArgs
    See Location Configuration below for more details.
    AccountId string
    Grantee AccessGrantGranteeArgs
    See Grantee below for more details.
    S3PrefixType string
    If you are creating an access grant that grants access to only one object, set this to Object. Valid values: Object.
    Tags map[string]string
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    accessGrantsLocationId String
    The ID of the S3 Access Grants location to with the access grant is giving access.
    permission String
    The access grant's level of access. Valid values: READ, WRITE, READWRITE.
    accessGrantsLocationConfiguration AccessGrantAccessGrantsLocationConfiguration
    See Location Configuration below for more details.
    accountId String
    grantee AccessGrantGrantee
    See Grantee below for more details.
    s3PrefixType String
    If you are creating an access grant that grants access to only one object, set this to Object. Valid values: Object.
    tags Map<String,String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    accessGrantsLocationId string
    The ID of the S3 Access Grants location to with the access grant is giving access.
    permission string
    The access grant's level of access. Valid values: READ, WRITE, READWRITE.
    accessGrantsLocationConfiguration AccessGrantAccessGrantsLocationConfiguration
    See Location Configuration below for more details.
    accountId string
    grantee AccessGrantGrantee
    See Grantee below for more details.
    s3PrefixType string
    If you are creating an access grant that grants access to only one object, set this to Object. Valid values: Object.
    tags {[key: string]: string}
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    access_grants_location_id str
    The ID of the S3 Access Grants location to with the access grant is giving access.
    permission str
    The access grant's level of access. Valid values: READ, WRITE, READWRITE.
    access_grants_location_configuration AccessGrantAccessGrantsLocationConfigurationArgs
    See Location Configuration below for more details.
    account_id str
    grantee AccessGrantGranteeArgs
    See Grantee below for more details.
    s3_prefix_type str
    If you are creating an access grant that grants access to only one object, set this to Object. Valid values: Object.
    tags Mapping[str, str]
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    accessGrantsLocationId String
    The ID of the S3 Access Grants location to with the access grant is giving access.
    permission String
    The access grant's level of access. Valid values: READ, WRITE, READWRITE.
    accessGrantsLocationConfiguration Property Map
    See Location Configuration below for more details.
    accountId String
    grantee Property Map
    See Grantee below for more details.
    s3PrefixType String
    If you are creating an access grant that grants access to only one object, set this to Object. Valid values: Object.
    tags Map<String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AccessGrant resource produces the following output properties:

    AccessGrantArn string
    Amazon Resource Name (ARN) of the S3 Access Grant.
    AccessGrantId string
    Unique ID of the S3 Access Grant.
    GrantScope string
    The access grant's scope.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    AccessGrantArn string
    Amazon Resource Name (ARN) of the S3 Access Grant.
    AccessGrantId string
    Unique ID of the S3 Access Grant.
    GrantScope string
    The access grant's scope.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    accessGrantArn String
    Amazon Resource Name (ARN) of the S3 Access Grant.
    accessGrantId String
    Unique ID of the S3 Access Grant.
    grantScope String
    The access grant's scope.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    accessGrantArn string
    Amazon Resource Name (ARN) of the S3 Access Grant.
    accessGrantId string
    Unique ID of the S3 Access Grant.
    grantScope string
    The access grant's scope.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    access_grant_arn str
    Amazon Resource Name (ARN) of the S3 Access Grant.
    access_grant_id str
    Unique ID of the S3 Access Grant.
    grant_scope str
    The access grant's scope.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    accessGrantArn String
    Amazon Resource Name (ARN) of the S3 Access Grant.
    accessGrantId String
    Unique ID of the S3 Access Grant.
    grantScope String
    The access grant's scope.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing AccessGrant Resource

    Get an existing AccessGrant resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: AccessGrantState, opts?: CustomResourceOptions): AccessGrant
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_grant_arn: Optional[str] = None,
            access_grant_id: Optional[str] = None,
            access_grants_location_configuration: Optional[AccessGrantAccessGrantsLocationConfigurationArgs] = None,
            access_grants_location_id: Optional[str] = None,
            account_id: Optional[str] = None,
            grant_scope: Optional[str] = None,
            grantee: Optional[AccessGrantGranteeArgs] = None,
            permission: Optional[str] = None,
            s3_prefix_type: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None) -> AccessGrant
    func GetAccessGrant(ctx *Context, name string, id IDInput, state *AccessGrantState, opts ...ResourceOption) (*AccessGrant, error)
    public static AccessGrant Get(string name, Input<string> id, AccessGrantState? state, CustomResourceOptions? opts = null)
    public static AccessGrant get(String name, Output<String> id, AccessGrantState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccessGrantArn string
    Amazon Resource Name (ARN) of the S3 Access Grant.
    AccessGrantId string
    Unique ID of the S3 Access Grant.
    AccessGrantsLocationConfiguration AccessGrantAccessGrantsLocationConfiguration
    See Location Configuration below for more details.
    AccessGrantsLocationId string
    The ID of the S3 Access Grants location to with the access grant is giving access.
    AccountId string
    GrantScope string
    The access grant's scope.
    Grantee AccessGrantGrantee
    See Grantee below for more details.
    Permission string
    The access grant's level of access. Valid values: READ, WRITE, READWRITE.
    S3PrefixType string
    If you are creating an access grant that grants access to only one object, set this to Object. Valid values: Object.
    Tags Dictionary<string, string>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    AccessGrantArn string
    Amazon Resource Name (ARN) of the S3 Access Grant.
    AccessGrantId string
    Unique ID of the S3 Access Grant.
    AccessGrantsLocationConfiguration AccessGrantAccessGrantsLocationConfigurationArgs
    See Location Configuration below for more details.
    AccessGrantsLocationId string
    The ID of the S3 Access Grants location to with the access grant is giving access.
    AccountId string
    GrantScope string
    The access grant's scope.
    Grantee AccessGrantGranteeArgs
    See Grantee below for more details.
    Permission string
    The access grant's level of access. Valid values: READ, WRITE, READWRITE.
    S3PrefixType string
    If you are creating an access grant that grants access to only one object, set this to Object. Valid values: Object.
    Tags map[string]string
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    accessGrantArn String
    Amazon Resource Name (ARN) of the S3 Access Grant.
    accessGrantId String
    Unique ID of the S3 Access Grant.
    accessGrantsLocationConfiguration AccessGrantAccessGrantsLocationConfiguration
    See Location Configuration below for more details.
    accessGrantsLocationId String
    The ID of the S3 Access Grants location to with the access grant is giving access.
    accountId String
    grantScope String
    The access grant's scope.
    grantee AccessGrantGrantee
    See Grantee below for more details.
    permission String
    The access grant's level of access. Valid values: READ, WRITE, READWRITE.
    s3PrefixType String
    If you are creating an access grant that grants access to only one object, set this to Object. Valid values: Object.
    tags Map<String,String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    accessGrantArn string
    Amazon Resource Name (ARN) of the S3 Access Grant.
    accessGrantId string
    Unique ID of the S3 Access Grant.
    accessGrantsLocationConfiguration AccessGrantAccessGrantsLocationConfiguration
    See Location Configuration below for more details.
    accessGrantsLocationId string
    The ID of the S3 Access Grants location to with the access grant is giving access.
    accountId string
    grantScope string
    The access grant's scope.
    grantee AccessGrantGrantee
    See Grantee below for more details.
    permission string
    The access grant's level of access. Valid values: READ, WRITE, READWRITE.
    s3PrefixType string
    If you are creating an access grant that grants access to only one object, set this to Object. Valid values: Object.
    tags {[key: string]: string}
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    access_grant_arn str
    Amazon Resource Name (ARN) of the S3 Access Grant.
    access_grant_id str
    Unique ID of the S3 Access Grant.
    access_grants_location_configuration AccessGrantAccessGrantsLocationConfigurationArgs
    See Location Configuration below for more details.
    access_grants_location_id str
    The ID of the S3 Access Grants location to with the access grant is giving access.
    account_id str
    grant_scope str
    The access grant's scope.
    grantee AccessGrantGranteeArgs
    See Grantee below for more details.
    permission str
    The access grant's level of access. Valid values: READ, WRITE, READWRITE.
    s3_prefix_type str
    If you are creating an access grant that grants access to only one object, set this to Object. Valid values: Object.
    tags Mapping[str, str]
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    accessGrantArn String
    Amazon Resource Name (ARN) of the S3 Access Grant.
    accessGrantId String
    Unique ID of the S3 Access Grant.
    accessGrantsLocationConfiguration Property Map
    See Location Configuration below for more details.
    accessGrantsLocationId String
    The ID of the S3 Access Grants location to with the access grant is giving access.
    accountId String
    grantScope String
    The access grant's scope.
    grantee Property Map
    See Grantee below for more details.
    permission String
    The access grant's level of access. Valid values: READ, WRITE, READWRITE.
    s3PrefixType String
    If you are creating an access grant that grants access to only one object, set this to Object. Valid values: Object.
    tags Map<String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Supporting Types

    AccessGrantAccessGrantsLocationConfiguration, AccessGrantAccessGrantsLocationConfigurationArgs

    S3SubPrefix string
    Sub-prefix.
    S3SubPrefix string
    Sub-prefix.
    s3SubPrefix String
    Sub-prefix.
    s3SubPrefix string
    Sub-prefix.
    s3_sub_prefix str
    Sub-prefix.
    s3SubPrefix String
    Sub-prefix.

    AccessGrantGrantee, AccessGrantGranteeArgs

    GranteeIdentifier string
    Grantee identifier.
    GranteeType string
    Grantee types. Valid values: DIRECTORY_USER, DIRECTORY_GROUP, IAM.
    GranteeIdentifier string
    Grantee identifier.
    GranteeType string
    Grantee types. Valid values: DIRECTORY_USER, DIRECTORY_GROUP, IAM.
    granteeIdentifier String
    Grantee identifier.
    granteeType String
    Grantee types. Valid values: DIRECTORY_USER, DIRECTORY_GROUP, IAM.
    granteeIdentifier string
    Grantee identifier.
    granteeType string
    Grantee types. Valid values: DIRECTORY_USER, DIRECTORY_GROUP, IAM.
    grantee_identifier str
    Grantee identifier.
    grantee_type str
    Grantee types. Valid values: DIRECTORY_USER, DIRECTORY_GROUP, IAM.
    granteeIdentifier String
    Grantee identifier.
    granteeType String
    Grantee types. Valid values: DIRECTORY_USER, DIRECTORY_GROUP, IAM.

    Import

    Using pulumi import, import S3 Access Grants using the account_id and access_grant_id, separated by a comma (,). For example:

    $ pulumi import aws:s3control/accessGrant:AccessGrant example 123456789012,04549c5e-2f3c-4a07-824d-2cafe720aa22
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi