aws.s3control.AccessGrant
Explore with Pulumi AI
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={
"s3_sub_prefix": "string",
},
account_id="string",
grantee={
"grantee_identifier": "string",
"grantee_type": "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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AccessGrant resource accepts the following input properties:
- Access
Grants stringLocation Id - 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
. - Access
Grants AccessLocation Configuration Grant Access Grants Location Configuration - See Location Configuration below for more details.
- Account
Id string - Grantee
Access
Grant Grantee - See Grantee below for more details.
- S3Prefix
Type string - If you are creating an access grant that grants access to only one object, set this to
Object
. Valid values:Object
. - 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.
- Access
Grants stringLocation Id - 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
. - Access
Grants AccessLocation Configuration Grant Access Grants Location Configuration Args - See Location Configuration below for more details.
- Account
Id string - Grantee
Access
Grant Grantee Args - See Grantee below for more details.
- S3Prefix
Type string - If you are creating an access grant that grants access to only one object, set this to
Object
. Valid values:Object
. - 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.
- access
Grants StringLocation Id - 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
. - access
Grants AccessLocation Configuration Grant Access Grants Location Configuration - See Location Configuration below for more details.
- account
Id String - grantee
Access
Grant Grantee - See Grantee below for more details.
- s3Prefix
Type String - If you are creating an access grant that grants access to only one object, set this to
Object
. Valid values:Object
. - 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.
- access
Grants stringLocation Id - 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
. - access
Grants AccessLocation Configuration Grant Access Grants Location Configuration - See Location Configuration below for more details.
- account
Id string - grantee
Access
Grant Grantee - See Grantee below for more details.
- s3Prefix
Type string - If you are creating an access grant that grants access to only one object, set this to
Object
. Valid values:Object
. - {[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_ strlocation_ id - 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_ Accesslocation_ configuration Grant Access Grants Location Configuration Args - See Location Configuration below for more details.
- account_
id str - grantee
Access
Grant Grantee Args - See Grantee below for more details.
- s3_
prefix_ strtype - If you are creating an access grant that grants access to only one object, set this to
Object
. Valid values:Object
. - 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.
- access
Grants StringLocation Id - 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
. - access
Grants Property MapLocation Configuration - See Location Configuration below for more details.
- account
Id String - grantee Property Map
- See Grantee below for more details.
- s3Prefix
Type String - If you are creating an access grant that grants access to only one object, set this to
Object
. Valid values:Object
. - 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:
- Access
Grant stringArn - Amazon Resource Name (ARN) of the S3 Access Grant.
- Access
Grant stringId - Unique ID of the S3 Access Grant.
- Grant
Scope string - The access grant's scope.
- Id string
- The provider-assigned unique ID for this managed resource.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Access
Grant stringArn - Amazon Resource Name (ARN) of the S3 Access Grant.
- Access
Grant stringId - Unique ID of the S3 Access Grant.
- Grant
Scope string - The access grant's scope.
- Id string
- The provider-assigned unique ID for this managed resource.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- access
Grant StringArn - Amazon Resource Name (ARN) of the S3 Access Grant.
- access
Grant StringId - Unique ID of the S3 Access Grant.
- grant
Scope String - The access grant's scope.
- id String
- The provider-assigned unique ID for this managed resource.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- access
Grant stringArn - Amazon Resource Name (ARN) of the S3 Access Grant.
- access
Grant stringId - Unique ID of the S3 Access Grant.
- grant
Scope string - The access grant's scope.
- id string
- The provider-assigned unique ID for this managed resource.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- access_
grant_ strarn - Amazon Resource Name (ARN) of the S3 Access Grant.
- access_
grant_ strid - 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.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- access
Grant StringArn - Amazon Resource Name (ARN) of the S3 Access Grant.
- access
Grant StringId - Unique ID of the S3 Access Grant.
- grant
Scope String - The access grant's scope.
- id String
- The provider-assigned unique ID for this managed resource.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
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.
- Access
Grant stringArn - Amazon Resource Name (ARN) of the S3 Access Grant.
- Access
Grant stringId - Unique ID of the S3 Access Grant.
- Access
Grants AccessLocation Configuration Grant Access Grants Location Configuration - See Location Configuration below for more details.
- Access
Grants stringLocation Id - The ID of the S3 Access Grants location to with the access grant is giving access.
- Account
Id string - Grant
Scope string - The access grant's scope.
- Grantee
Access
Grant Grantee - See Grantee below for more details.
- Permission string
- The access grant's level of access. Valid values:
READ
,WRITE
,READWRITE
. - S3Prefix
Type string - If you are creating an access grant that grants access to only one object, set this to
Object
. Valid values:Object
. - 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. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Access
Grant stringArn - Amazon Resource Name (ARN) of the S3 Access Grant.
- Access
Grant stringId - Unique ID of the S3 Access Grant.
- Access
Grants AccessLocation Configuration Grant Access Grants Location Configuration Args - See Location Configuration below for more details.
- Access
Grants stringLocation Id - The ID of the S3 Access Grants location to with the access grant is giving access.
- Account
Id string - Grant
Scope string - The access grant's scope.
- Grantee
Access
Grant Grantee Args - See Grantee below for more details.
- Permission string
- The access grant's level of access. Valid values:
READ
,WRITE
,READWRITE
. - S3Prefix
Type string - If you are creating an access grant that grants access to only one object, set this to
Object
. Valid values:Object
. - 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. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- access
Grant StringArn - Amazon Resource Name (ARN) of the S3 Access Grant.
- access
Grant StringId - Unique ID of the S3 Access Grant.
- access
Grants AccessLocation Configuration Grant Access Grants Location Configuration - See Location Configuration below for more details.
- access
Grants StringLocation Id - The ID of the S3 Access Grants location to with the access grant is giving access.
- account
Id String - grant
Scope String - The access grant's scope.
- grantee
Access
Grant Grantee - See Grantee below for more details.
- permission String
- The access grant's level of access. Valid values:
READ
,WRITE
,READWRITE
. - s3Prefix
Type String - If you are creating an access grant that grants access to only one object, set this to
Object
. Valid values:Object
. - 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. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- access
Grant stringArn - Amazon Resource Name (ARN) of the S3 Access Grant.
- access
Grant stringId - Unique ID of the S3 Access Grant.
- access
Grants AccessLocation Configuration Grant Access Grants Location Configuration - See Location Configuration below for more details.
- access
Grants stringLocation Id - The ID of the S3 Access Grants location to with the access grant is giving access.
- account
Id string - grant
Scope string - The access grant's scope.
- grantee
Access
Grant Grantee - See Grantee below for more details.
- permission string
- The access grant's level of access. Valid values:
READ
,WRITE
,READWRITE
. - s3Prefix
Type string - If you are creating an access grant that grants access to only one object, set this to
Object
. Valid values:Object
. - {[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. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- access_
grant_ strarn - Amazon Resource Name (ARN) of the S3 Access Grant.
- access_
grant_ strid - Unique ID of the S3 Access Grant.
- access_
grants_ Accesslocation_ configuration Grant Access Grants Location Configuration Args - See Location Configuration below for more details.
- access_
grants_ strlocation_ id - 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
Access
Grant Grantee Args - See Grantee below for more details.
- permission str
- The access grant's level of access. Valid values:
READ
,WRITE
,READWRITE
. - s3_
prefix_ strtype - If you are creating an access grant that grants access to only one object, set this to
Object
. Valid values:Object
. - 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. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- access
Grant StringArn - Amazon Resource Name (ARN) of the S3 Access Grant.
- access
Grant StringId - Unique ID of the S3 Access Grant.
- access
Grants Property MapLocation Configuration - See Location Configuration below for more details.
- access
Grants StringLocation Id - The ID of the S3 Access Grants location to with the access grant is giving access.
- account
Id String - grant
Scope 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
. - s3Prefix
Type String - If you are creating an access grant that grants access to only one object, set this to
Object
. Valid values:Object
. - 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. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Supporting Types
AccessGrantAccessGrantsLocationConfiguration, AccessGrantAccessGrantsLocationConfigurationArgs
- S3Sub
Prefix string - Sub-prefix.
- S3Sub
Prefix string - Sub-prefix.
- s3Sub
Prefix String - Sub-prefix.
- s3Sub
Prefix string - Sub-prefix.
- s3_
sub_ strprefix - Sub-prefix.
- s3Sub
Prefix String - Sub-prefix.
AccessGrantGrantee, AccessGrantGranteeArgs
- Grantee
Identifier string - Grantee identifier.
- Grantee
Type string - Grantee types. Valid values:
DIRECTORY_USER
,DIRECTORY_GROUP
,IAM
.
- Grantee
Identifier string - Grantee identifier.
- Grantee
Type string - Grantee types. Valid values:
DIRECTORY_USER
,DIRECTORY_GROUP
,IAM
.
- grantee
Identifier String - Grantee identifier.
- grantee
Type String - Grantee types. Valid values:
DIRECTORY_USER
,DIRECTORY_GROUP
,IAM
.
- grantee
Identifier string - Grantee identifier.
- grantee
Type 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
.
- grantee
Identifier String - Grantee identifier.
- grantee
Type 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.