1. Packages
  2. AWS Classic
  3. API Docs
  4. lakeformation
  5. Resource

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

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.lakeformation.Resource

Explore with Pulumi AI

aws logo

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

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Registers a Lake Formation resource (e.g., S3 bucket) as managed by the Data Catalog. In other words, the S3 path is added to the data lake.

    Choose a role that has read/write access to the chosen Amazon S3 path or use the service-linked role. When you register the S3 path, the service-linked role and a new inline policy are created on your behalf. Lake Formation adds the first path to the inline policy and attaches it to the service-linked role. When you register subsequent paths, Lake Formation adds the path to the existing policy.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.s3.getBucket({
        bucket: "an-example-bucket",
    });
    const exampleResource = new aws.lakeformation.Resource("example", {arn: example.then(example => example.arn)});
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.s3.get_bucket(bucket="an-example-bucket")
    example_resource = aws.lakeformation.Resource("example", arn=example.arn)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lakeformation"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := s3.LookupBucket(ctx, &s3.LookupBucketArgs{
    			Bucket: "an-example-bucket",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = lakeformation.NewResource(ctx, "example", &lakeformation.ResourceArgs{
    			Arn: pulumi.String(example.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 = Aws.S3.GetBucket.Invoke(new()
        {
            Bucket = "an-example-bucket",
        });
    
        var exampleResource = new Aws.LakeFormation.Resource("example", new()
        {
            Arn = example.Apply(getBucketResult => getBucketResult.Arn),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.s3.S3Functions;
    import com.pulumi.aws.s3.inputs.GetBucketArgs;
    import com.pulumi.aws.lakeformation.Resource;
    import com.pulumi.aws.lakeformation.ResourceArgs;
    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) {
            final var example = S3Functions.getBucket(GetBucketArgs.builder()
                .bucket("an-example-bucket")
                .build());
    
            var exampleResource = new Resource("exampleResource", ResourceArgs.builder()
                .arn(example.applyValue(getBucketResult -> getBucketResult.arn()))
                .build());
    
        }
    }
    
    resources:
      exampleResource:
        type: aws:lakeformation:Resource
        name: example
        properties:
          arn: ${example.arn}
    variables:
      example:
        fn::invoke:
          Function: aws:s3:getBucket
          Arguments:
            bucket: an-example-bucket
    

    Create Resource Resource

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

    Constructor syntax

    new Resource(name: string, args: ResourceArgs, opts?: CustomResourceOptions);
    @overload
    def Resource(resource_name: str,
                 args: ResourceArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Resource(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 arn: Optional[str] = None,
                 hybrid_access_enabled: Optional[bool] = None,
                 role_arn: Optional[str] = None,
                 use_service_linked_role: Optional[bool] = None,
                 with_federation: Optional[bool] = None)
    func NewResource(ctx *Context, name string, args ResourceArgs, opts ...ResourceOption) (*Resource, error)
    public Resource(string name, ResourceArgs args, CustomResourceOptions? opts = null)
    public Resource(String name, ResourceArgs args)
    public Resource(String name, ResourceArgs args, CustomResourceOptions options)
    
    type: aws:lakeformation:Resource
    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 ResourceArgs
    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 ResourceArgs
    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 ResourceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ResourceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ResourceArgs
    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 exampleresourceResourceResourceFromLakeformationresource = new Aws.LakeFormation.Resource("exampleresourceResourceResourceFromLakeformationresource", new()
    {
        Arn = "string",
        HybridAccessEnabled = false,
        RoleArn = "string",
        UseServiceLinkedRole = false,
        WithFederation = false,
    });
    
    example, err := lakeformation.NewResource(ctx, "exampleresourceResourceResourceFromLakeformationresource", &lakeformation.ResourceArgs{
    	Arn:                  pulumi.String("string"),
    	HybridAccessEnabled:  pulumi.Bool(false),
    	RoleArn:              pulumi.String("string"),
    	UseServiceLinkedRole: pulumi.Bool(false),
    	WithFederation:       pulumi.Bool(false),
    })
    
    var exampleresourceResourceResourceFromLakeformationresource = new Resource("exampleresourceResourceResourceFromLakeformationresource", ResourceArgs.builder()
        .arn("string")
        .hybridAccessEnabled(false)
        .roleArn("string")
        .useServiceLinkedRole(false)
        .withFederation(false)
        .build());
    
    exampleresource_resource_resource_from_lakeformationresource = aws.lakeformation.Resource("exampleresourceResourceResourceFromLakeformationresource",
        arn="string",
        hybrid_access_enabled=False,
        role_arn="string",
        use_service_linked_role=False,
        with_federation=False)
    
    const exampleresourceResourceResourceFromLakeformationresource = new aws.lakeformation.Resource("exampleresourceResourceResourceFromLakeformationresource", {
        arn: "string",
        hybridAccessEnabled: false,
        roleArn: "string",
        useServiceLinkedRole: false,
        withFederation: false,
    });
    
    type: aws:lakeformation:Resource
    properties:
        arn: string
        hybridAccessEnabled: false
        roleArn: string
        useServiceLinkedRole: false
        withFederation: false
    

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

    Arn string

    Amazon Resource Name (ARN) of the resource.

    The following arguments are optional:

    HybridAccessEnabled bool

    Flag to enable AWS LakeFormation hybrid access permission mode.

    NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.

    RoleArn string
    Role that has read/write access to the resource.
    UseServiceLinkedRole bool
    Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
    WithFederation bool
    Arn string

    Amazon Resource Name (ARN) of the resource.

    The following arguments are optional:

    HybridAccessEnabled bool

    Flag to enable AWS LakeFormation hybrid access permission mode.

    NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.

    RoleArn string
    Role that has read/write access to the resource.
    UseServiceLinkedRole bool
    Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
    WithFederation bool
    arn String

    Amazon Resource Name (ARN) of the resource.

    The following arguments are optional:

    hybridAccessEnabled Boolean

    Flag to enable AWS LakeFormation hybrid access permission mode.

    NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.

    roleArn String
    Role that has read/write access to the resource.
    useServiceLinkedRole Boolean
    Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
    withFederation Boolean
    arn string

    Amazon Resource Name (ARN) of the resource.

    The following arguments are optional:

    hybridAccessEnabled boolean

    Flag to enable AWS LakeFormation hybrid access permission mode.

    NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.

    roleArn string
    Role that has read/write access to the resource.
    useServiceLinkedRole boolean
    Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
    withFederation boolean
    arn str

    Amazon Resource Name (ARN) of the resource.

    The following arguments are optional:

    hybrid_access_enabled bool

    Flag to enable AWS LakeFormation hybrid access permission mode.

    NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.

    role_arn str
    Role that has read/write access to the resource.
    use_service_linked_role bool
    Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
    with_federation bool
    arn String

    Amazon Resource Name (ARN) of the resource.

    The following arguments are optional:

    hybridAccessEnabled Boolean

    Flag to enable AWS LakeFormation hybrid access permission mode.

    NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.

    roleArn String
    Role that has read/write access to the resource.
    useServiceLinkedRole Boolean
    Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
    withFederation Boolean

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    LastModified string
    Date and time the resource was last modified in RFC 3339 format.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModified string
    Date and time the resource was last modified in RFC 3339 format.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModified String
    Date and time the resource was last modified in RFC 3339 format.
    id string
    The provider-assigned unique ID for this managed resource.
    lastModified string
    Date and time the resource was last modified in RFC 3339 format.
    id str
    The provider-assigned unique ID for this managed resource.
    last_modified str
    Date and time the resource was last modified in RFC 3339 format.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModified String
    Date and time the resource was last modified in RFC 3339 format.

    Look up Existing Resource Resource

    Get an existing Resource 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?: ResourceState, opts?: CustomResourceOptions): Resource
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            hybrid_access_enabled: Optional[bool] = None,
            last_modified: Optional[str] = None,
            role_arn: Optional[str] = None,
            use_service_linked_role: Optional[bool] = None,
            with_federation: Optional[bool] = None) -> Resource
    func GetResource(ctx *Context, name string, id IDInput, state *ResourceState, opts ...ResourceOption) (*Resource, error)
    public static Resource Get(string name, Input<string> id, ResourceState? state, CustomResourceOptions? opts = null)
    public static Resource get(String name, Output<String> id, ResourceState 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:
    Arn string

    Amazon Resource Name (ARN) of the resource.

    The following arguments are optional:

    HybridAccessEnabled bool

    Flag to enable AWS LakeFormation hybrid access permission mode.

    NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.

    LastModified string
    Date and time the resource was last modified in RFC 3339 format.
    RoleArn string
    Role that has read/write access to the resource.
    UseServiceLinkedRole bool
    Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
    WithFederation bool
    Arn string

    Amazon Resource Name (ARN) of the resource.

    The following arguments are optional:

    HybridAccessEnabled bool

    Flag to enable AWS LakeFormation hybrid access permission mode.

    NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.

    LastModified string
    Date and time the resource was last modified in RFC 3339 format.
    RoleArn string
    Role that has read/write access to the resource.
    UseServiceLinkedRole bool
    Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
    WithFederation bool
    arn String

    Amazon Resource Name (ARN) of the resource.

    The following arguments are optional:

    hybridAccessEnabled Boolean

    Flag to enable AWS LakeFormation hybrid access permission mode.

    NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.

    lastModified String
    Date and time the resource was last modified in RFC 3339 format.
    roleArn String
    Role that has read/write access to the resource.
    useServiceLinkedRole Boolean
    Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
    withFederation Boolean
    arn string

    Amazon Resource Name (ARN) of the resource.

    The following arguments are optional:

    hybridAccessEnabled boolean

    Flag to enable AWS LakeFormation hybrid access permission mode.

    NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.

    lastModified string
    Date and time the resource was last modified in RFC 3339 format.
    roleArn string
    Role that has read/write access to the resource.
    useServiceLinkedRole boolean
    Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
    withFederation boolean
    arn str

    Amazon Resource Name (ARN) of the resource.

    The following arguments are optional:

    hybrid_access_enabled bool

    Flag to enable AWS LakeFormation hybrid access permission mode.

    NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.

    last_modified str
    Date and time the resource was last modified in RFC 3339 format.
    role_arn str
    Role that has read/write access to the resource.
    use_service_linked_role bool
    Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
    with_federation bool
    arn String

    Amazon Resource Name (ARN) of the resource.

    The following arguments are optional:

    hybridAccessEnabled Boolean

    Flag to enable AWS LakeFormation hybrid access permission mode.

    NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.

    lastModified String
    Date and time the resource was last modified in RFC 3339 format.
    roleArn String
    Role that has read/write access to the resource.
    useServiceLinkedRole Boolean
    Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
    withFederation Boolean

    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.42.0 published on Wednesday, Jun 26, 2024 by Pulumi