Try AWS Native preview for resources not in the classic version.
aws.lakeformation.Resource
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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:
- Hybrid
Access boolEnabled 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 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
- 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.
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 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
- 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.
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 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
- 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.
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 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
- 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.
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_ boollinked_ role - 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:
- hybrid
Access BooleanEnabled 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 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
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,
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.
- 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.
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 string - Date and time the resource was last modified in RFC 3339 format.
- 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
- 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.
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 string - Date and time the resource was last modified in RFC 3339 format.
- 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
- 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.
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 String - Date and time the resource was last modified in RFC 3339 format.
- 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
- 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.
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 string - Date and time the resource was last modified in RFC 3339 format.
- 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
- 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.
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_ boollinked_ role - 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:
- hybrid
Access BooleanEnabled 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 String - Date and time the resource was last modified in RFC 3339 format.
- 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
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.