1. Packages
  2. AWS Classic
  3. API Docs
  4. s3control
  5. AccessGrantsLocation

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.33.1 published on Thursday, May 2, 2024 by Pulumi

aws.s3control.AccessGrantsLocation

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.33.1 published on Thursday, May 2, 2024 by Pulumi

    Provides a resource to manage an S3 Access Grants location. A location is an S3 resource (bucket or prefix) in a permission grant that the grantee can access. The S3 data must be in the same Region as your S3 Access Grants instance. When you register a location, you must include the IAM role that has permission to manage the S3 location that you are registering.

    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://",
    }, {
        dependsOn: [example],
    });
    
    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="s3://",
        opts=pulumi.ResourceOptions(depends_on=[example]))
    
    package main
    
    import (
    	"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
    		}
    		_, err = s3control.NewAccessGrantsLocation(ctx, "example", &s3control.AccessGrantsLocationArgs{
    			IamRoleArn:    pulumi.Any(exampleAwsIamRole.Arn),
    			LocationScope: pulumi.String("s3://"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			example,
    		}))
    		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://",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                example,
            },
        });
    
    });
    
    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.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("s3://")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(example)
                    .build());
    
        }
    }
    
    resources:
      example:
        type: aws:s3control:AccessGrantsInstance
      exampleAccessGrantsLocation:
        type: aws:s3control:AccessGrantsLocation
        name: example
        properties:
          iamRoleArn: ${exampleAwsIamRole.arn}
          locationScope: s3://
        options:
          dependson:
            - ${example}
    

    Create AccessGrantsLocation Resource

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

    Constructor syntax

    new AccessGrantsLocation(name: string, args: AccessGrantsLocationArgs, opts?: CustomResourceOptions);
    @overload
    def AccessGrantsLocation(resource_name: str,
                             args: AccessGrantsLocationArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def AccessGrantsLocation(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             iam_role_arn: Optional[str] = None,
                             location_scope: Optional[str] = None,
                             account_id: Optional[str] = None,
                             tags: Optional[Mapping[str, str]] = None)
    func NewAccessGrantsLocation(ctx *Context, name string, args AccessGrantsLocationArgs, opts ...ResourceOption) (*AccessGrantsLocation, error)
    public AccessGrantsLocation(string name, AccessGrantsLocationArgs args, CustomResourceOptions? opts = null)
    public AccessGrantsLocation(String name, AccessGrantsLocationArgs args)
    public AccessGrantsLocation(String name, AccessGrantsLocationArgs args, CustomResourceOptions options)
    
    type: aws:s3control:AccessGrantsLocation
    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 AccessGrantsLocationArgs
    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 AccessGrantsLocationArgs
    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 AccessGrantsLocationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AccessGrantsLocationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AccessGrantsLocationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var accessGrantsLocationResource = new Aws.S3Control.AccessGrantsLocation("accessGrantsLocationResource", new()
    {
        IamRoleArn = "string",
        LocationScope = "string",
        AccountId = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := s3control.NewAccessGrantsLocation(ctx, "accessGrantsLocationResource", &s3control.AccessGrantsLocationArgs{
    	IamRoleArn:    pulumi.String("string"),
    	LocationScope: pulumi.String("string"),
    	AccountId:     pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var accessGrantsLocationResource = new AccessGrantsLocation("accessGrantsLocationResource", AccessGrantsLocationArgs.builder()        
        .iamRoleArn("string")
        .locationScope("string")
        .accountId("string")
        .tags(Map.of("string", "string"))
        .build());
    
    access_grants_location_resource = aws.s3control.AccessGrantsLocation("accessGrantsLocationResource",
        iam_role_arn="string",
        location_scope="string",
        account_id="string",
        tags={
            "string": "string",
        })
    
    const accessGrantsLocationResource = new aws.s3control.AccessGrantsLocation("accessGrantsLocationResource", {
        iamRoleArn: "string",
        locationScope: "string",
        accountId: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:s3control:AccessGrantsLocation
    properties:
        accountId: string
        iamRoleArn: string
        locationScope: string
        tags:
            string: string
    

    AccessGrantsLocation 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 AccessGrantsLocation resource accepts the following input properties:

    IamRoleArn string
    The ARN of the IAM role that S3 Access Grants should use when fulfilling runtime access requests to the location.
    LocationScope string
    The default S3 URI s3:// or the URI to a custom location, a specific bucket or prefix.
    AccountId string
    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.
    IamRoleArn string
    The ARN of the IAM role that S3 Access Grants should use when fulfilling runtime access requests to the location.
    LocationScope string
    The default S3 URI s3:// or the URI to a custom location, a specific bucket or prefix.
    AccountId string
    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.
    iamRoleArn String
    The ARN of the IAM role that S3 Access Grants should use when fulfilling runtime access requests to the location.
    locationScope String
    The default S3 URI s3:// or the URI to a custom location, a specific bucket or prefix.
    accountId String
    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.
    iamRoleArn string
    The ARN of the IAM role that S3 Access Grants should use when fulfilling runtime access requests to the location.
    locationScope string
    The default S3 URI s3:// or the URI to a custom location, a specific bucket or prefix.
    accountId string
    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.
    iam_role_arn str
    The ARN of the IAM role that S3 Access Grants should use when fulfilling runtime access requests to the location.
    location_scope str
    The default S3 URI s3:// or the URI to a custom location, a specific bucket or prefix.
    account_id str
    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.
    iamRoleArn String
    The ARN of the IAM role that S3 Access Grants should use when fulfilling runtime access requests to the location.
    locationScope String
    The default S3 URI s3:// or the URI to a custom location, a specific bucket or prefix.
    accountId String
    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 AccessGrantsLocation resource produces the following output properties:

    AccessGrantsLocationArn string
    Amazon Resource Name (ARN) of the S3 Access Grants location.
    AccessGrantsLocationId string
    Unique ID of the S3 Access Grants location.
    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.

    AccessGrantsLocationArn string
    Amazon Resource Name (ARN) of the S3 Access Grants location.
    AccessGrantsLocationId string
    Unique ID of the S3 Access Grants location.
    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.

    accessGrantsLocationArn String
    Amazon Resource Name (ARN) of the S3 Access Grants location.
    accessGrantsLocationId String
    Unique ID of the S3 Access Grants location.
    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.

    accessGrantsLocationArn string
    Amazon Resource Name (ARN) of the S3 Access Grants location.
    accessGrantsLocationId string
    Unique ID of the S3 Access Grants location.
    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_grants_location_arn str
    Amazon Resource Name (ARN) of the S3 Access Grants location.
    access_grants_location_id str
    Unique ID of the S3 Access Grants location.
    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.

    accessGrantsLocationArn String
    Amazon Resource Name (ARN) of the S3 Access Grants location.
    accessGrantsLocationId String
    Unique ID of the S3 Access Grants location.
    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 AccessGrantsLocation Resource

    Get an existing AccessGrantsLocation 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?: AccessGrantsLocationState, opts?: CustomResourceOptions): AccessGrantsLocation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_grants_location_arn: Optional[str] = None,
            access_grants_location_id: Optional[str] = None,
            account_id: Optional[str] = None,
            iam_role_arn: Optional[str] = None,
            location_scope: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None) -> AccessGrantsLocation
    func GetAccessGrantsLocation(ctx *Context, name string, id IDInput, state *AccessGrantsLocationState, opts ...ResourceOption) (*AccessGrantsLocation, error)
    public static AccessGrantsLocation Get(string name, Input<string> id, AccessGrantsLocationState? state, CustomResourceOptions? opts = null)
    public static AccessGrantsLocation get(String name, Output<String> id, AccessGrantsLocationState 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:
    AccessGrantsLocationArn string
    Amazon Resource Name (ARN) of the S3 Access Grants location.
    AccessGrantsLocationId string
    Unique ID of the S3 Access Grants location.
    AccountId string
    IamRoleArn string
    The ARN of the IAM role that S3 Access Grants should use when fulfilling runtime access requests to the location.
    LocationScope string
    The default S3 URI s3:// or the URI to a custom location, a specific bucket or prefix.
    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.

    AccessGrantsLocationArn string
    Amazon Resource Name (ARN) of the S3 Access Grants location.
    AccessGrantsLocationId string
    Unique ID of the S3 Access Grants location.
    AccountId string
    IamRoleArn string
    The ARN of the IAM role that S3 Access Grants should use when fulfilling runtime access requests to the location.
    LocationScope string
    The default S3 URI s3:// or the URI to a custom location, a specific bucket or prefix.
    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.

    accessGrantsLocationArn String
    Amazon Resource Name (ARN) of the S3 Access Grants location.
    accessGrantsLocationId String
    Unique ID of the S3 Access Grants location.
    accountId String
    iamRoleArn String
    The ARN of the IAM role that S3 Access Grants should use when fulfilling runtime access requests to the location.
    locationScope String
    The default S3 URI s3:// or the URI to a custom location, a specific bucket or prefix.
    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.

    accessGrantsLocationArn string
    Amazon Resource Name (ARN) of the S3 Access Grants location.
    accessGrantsLocationId string
    Unique ID of the S3 Access Grants location.
    accountId string
    iamRoleArn string
    The ARN of the IAM role that S3 Access Grants should use when fulfilling runtime access requests to the location.
    locationScope string
    The default S3 URI s3:// or the URI to a custom location, a specific bucket or prefix.
    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_grants_location_arn str
    Amazon Resource Name (ARN) of the S3 Access Grants location.
    access_grants_location_id str
    Unique ID of the S3 Access Grants location.
    account_id str
    iam_role_arn str
    The ARN of the IAM role that S3 Access Grants should use when fulfilling runtime access requests to the location.
    location_scope str
    The default S3 URI s3:// or the URI to a custom location, a specific bucket or prefix.
    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.

    accessGrantsLocationArn String
    Amazon Resource Name (ARN) of the S3 Access Grants location.
    accessGrantsLocationId String
    Unique ID of the S3 Access Grants location.
    accountId String
    iamRoleArn String
    The ARN of the IAM role that S3 Access Grants should use when fulfilling runtime access requests to the location.
    locationScope String
    The default S3 URI s3:// or the URI to a custom location, a specific bucket or prefix.
    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.

    Import

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

    $ pulumi import aws:s3control/accessGrantsLocation:AccessGrantsLocation example 123456789012,default
    

    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

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.33.1 published on Thursday, May 2, 2024 by Pulumi