aws.lakeformation.Resource
Explore with Pulumi AI
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/v7/go/aws/lakeformation"
"github.com/pulumi/pulumi-aws/sdk/v7/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.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,
region: Optional[str] = None,
role_arn: Optional[str] = None,
use_service_linked_role: Optional[bool] = None,
with_federation: Optional[bool] = None,
with_privileged_access: 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,
Region = "string",
RoleArn = "string",
UseServiceLinkedRole = false,
WithFederation = false,
WithPrivilegedAccess = false,
});
example, err := lakeformation.NewResource(ctx, "exampleresourceResourceResourceFromLakeformationresource", &lakeformation.ResourceArgs{
Arn: pulumi.String("string"),
HybridAccessEnabled: pulumi.Bool(false),
Region: pulumi.String("string"),
RoleArn: pulumi.String("string"),
UseServiceLinkedRole: pulumi.Bool(false),
WithFederation: pulumi.Bool(false),
WithPrivilegedAccess: pulumi.Bool(false),
})
var exampleresourceResourceResourceFromLakeformationresource = new com.pulumi.aws.lakeformation.Resource("exampleresourceResourceResourceFromLakeformationresource", com.pulumi.aws.lakeformation.ResourceArgs.builder()
.arn("string")
.hybridAccessEnabled(false)
.region("string")
.roleArn("string")
.useServiceLinkedRole(false)
.withFederation(false)
.withPrivilegedAccess(false)
.build());
exampleresource_resource_resource_from_lakeformationresource = aws.lakeformation.Resource("exampleresourceResourceResourceFromLakeformationresource",
arn="string",
hybrid_access_enabled=False,
region="string",
role_arn="string",
use_service_linked_role=False,
with_federation=False,
with_privileged_access=False)
const exampleresourceResourceResourceFromLakeformationresource = new aws.lakeformation.Resource("exampleresourceResourceResourceFromLakeformationresource", {
arn: "string",
hybridAccessEnabled: false,
region: "string",
roleArn: "string",
useServiceLinkedRole: false,
withFederation: false,
withPrivilegedAccess: false,
});
type: aws:lakeformation:Resource
properties:
arn: string
hybridAccessEnabled: false
region: string
roleArn: string
useServiceLinkedRole: false
withFederation: false
withPrivilegedAccess: 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Resource resource accepts the following input properties:
- Arn string
Amazon Resource Name (ARN) of the resource.
The following arguments are optional:
- Hybrid
Access boolEnabled - Flag to enable AWS LakeFormation hybrid access permission mode.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Role
Arn string - Role that has read/write access to the resource.
- Use
Service boolLinked Role - Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
- With
Federation bool - Whether or not the resource is a federated resource. Set to true when registering AWS Glue connections for federated catalog functionality.
- With
Privileged boolAccess Boolean to grant the calling principal the permissions to perform all supported Lake Formation operations on the registered data location.
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.
- Arn string
Amazon Resource Name (ARN) of the resource.
The following arguments are optional:
- Hybrid
Access boolEnabled - Flag to enable AWS LakeFormation hybrid access permission mode.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Role
Arn string - Role that has read/write access to the resource.
- Use
Service boolLinked Role - Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
- With
Federation bool - Whether or not the resource is a federated resource. Set to true when registering AWS Glue connections for federated catalog functionality.
- With
Privileged boolAccess Boolean to grant the calling principal the permissions to perform all supported Lake Formation operations on the registered data location.
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.
- arn String
Amazon Resource Name (ARN) of the resource.
The following arguments are optional:
- hybrid
Access BooleanEnabled - Flag to enable AWS LakeFormation hybrid access permission mode.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- role
Arn String - Role that has read/write access to the resource.
- use
Service BooleanLinked Role - Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
- with
Federation Boolean - Whether or not the resource is a federated resource. Set to true when registering AWS Glue connections for federated catalog functionality.
- with
Privileged BooleanAccess Boolean to grant the calling principal the permissions to perform all supported Lake Formation operations on the registered data location.
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.
- arn string
Amazon Resource Name (ARN) of the resource.
The following arguments are optional:
- hybrid
Access booleanEnabled - Flag to enable AWS LakeFormation hybrid access permission mode.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- role
Arn string - Role that has read/write access to the resource.
- use
Service booleanLinked Role - Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
- with
Federation boolean - Whether or not the resource is a federated resource. Set to true when registering AWS Glue connections for federated catalog functionality.
- with
Privileged booleanAccess Boolean to grant the calling principal the permissions to perform all supported Lake Formation operations on the registered data location.
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.
- arn str
Amazon Resource Name (ARN) of the resource.
The following arguments are optional:
- hybrid_
access_ boolenabled - Flag to enable AWS LakeFormation hybrid access permission mode.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- role_
arn str - Role that has read/write access to the resource.
- use_
service_ boollinked_ role - Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
- with_
federation bool - Whether or not the resource is a federated resource. Set to true when registering AWS Glue connections for federated catalog functionality.
- with_
privileged_ boolaccess Boolean to grant the calling principal the permissions to perform all supported Lake Formation operations on the registered data location.
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.
- arn String
Amazon Resource Name (ARN) of the resource.
The following arguments are optional:
- hybrid
Access BooleanEnabled - Flag to enable AWS LakeFormation hybrid access permission mode.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- role
Arn String - Role that has read/write access to the resource.
- use
Service BooleanLinked Role - Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
- with
Federation Boolean - Whether or not the resource is a federated resource. Set to true when registering AWS Glue connections for federated catalog functionality.
- with
Privileged BooleanAccess Boolean to grant the calling principal the permissions to perform all supported Lake Formation operations on the registered data location.
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.
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.
- Last
Modified string - Date and time the resource was last modified in RFC 3339 format.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified string - Date and time the resource was last modified in RFC 3339 format.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Modified String - Date and time the resource was last modified in RFC 3339 format.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Modified 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.
- last
Modified 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,
region: Optional[str] = None,
role_arn: Optional[str] = None,
use_service_linked_role: Optional[bool] = None,
with_federation: Optional[bool] = None,
with_privileged_access: 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)
resources: _: type: aws:lakeformation:Resource get: id: ${id}
- 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.
- Arn string
Amazon Resource Name (ARN) of the resource.
The following arguments are optional:
- Hybrid
Access boolEnabled - Flag to enable AWS LakeFormation hybrid access permission mode.
- Last
Modified string - Date and time the resource was last modified in RFC 3339 format.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Role
Arn string - Role that has read/write access to the resource.
- Use
Service boolLinked Role - Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
- With
Federation bool - Whether or not the resource is a federated resource. Set to true when registering AWS Glue connections for federated catalog functionality.
- With
Privileged boolAccess Boolean to grant the calling principal the permissions to perform all supported Lake Formation operations on the registered data location.
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.
- Arn string
Amazon Resource Name (ARN) of the resource.
The following arguments are optional:
- Hybrid
Access boolEnabled - Flag to enable AWS LakeFormation hybrid access permission mode.
- Last
Modified string - Date and time the resource was last modified in RFC 3339 format.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Role
Arn string - Role that has read/write access to the resource.
- Use
Service boolLinked Role - Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
- With
Federation bool - Whether or not the resource is a federated resource. Set to true when registering AWS Glue connections for federated catalog functionality.
- With
Privileged boolAccess Boolean to grant the calling principal the permissions to perform all supported Lake Formation operations on the registered data location.
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.
- arn String
Amazon Resource Name (ARN) of the resource.
The following arguments are optional:
- hybrid
Access BooleanEnabled - Flag to enable AWS LakeFormation hybrid access permission mode.
- last
Modified String - Date and time the resource was last modified in RFC 3339 format.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- role
Arn String - Role that has read/write access to the resource.
- use
Service BooleanLinked Role - Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
- with
Federation Boolean - Whether or not the resource is a federated resource. Set to true when registering AWS Glue connections for federated catalog functionality.
- with
Privileged BooleanAccess Boolean to grant the calling principal the permissions to perform all supported Lake Formation operations on the registered data location.
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.
- arn string
Amazon Resource Name (ARN) of the resource.
The following arguments are optional:
- hybrid
Access booleanEnabled - Flag to enable AWS LakeFormation hybrid access permission mode.
- last
Modified string - Date and time the resource was last modified in RFC 3339 format.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- role
Arn string - Role that has read/write access to the resource.
- use
Service booleanLinked Role - Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
- with
Federation boolean - Whether or not the resource is a federated resource. Set to true when registering AWS Glue connections for federated catalog functionality.
- with
Privileged booleanAccess Boolean to grant the calling principal the permissions to perform all supported Lake Formation operations on the registered data location.
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.
- arn str
Amazon Resource Name (ARN) of the resource.
The following arguments are optional:
- hybrid_
access_ boolenabled - Flag to enable AWS LakeFormation hybrid access permission mode.
- last_
modified str - Date and time the resource was last modified in RFC 3339 format.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- role_
arn str - Role that has read/write access to the resource.
- use_
service_ boollinked_ role - Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
- with_
federation bool - Whether or not the resource is a federated resource. Set to true when registering AWS Glue connections for federated catalog functionality.
- with_
privileged_ boolaccess Boolean to grant the calling principal the permissions to perform all supported Lake Formation operations on the registered data location.
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.
- arn String
Amazon Resource Name (ARN) of the resource.
The following arguments are optional:
- hybrid
Access BooleanEnabled - Flag to enable AWS LakeFormation hybrid access permission mode.
- last
Modified String - Date and time the resource was last modified in RFC 3339 format.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- role
Arn String - Role that has read/write access to the resource.
- use
Service BooleanLinked Role - Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
- with
Federation Boolean - Whether or not the resource is a federated resource. Set to true when registering AWS Glue connections for federated catalog functionality.
- with
Privileged BooleanAccess Boolean to grant the calling principal the permissions to perform all supported Lake Formation operations on the registered data location.
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.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.