ResourceType class
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)
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 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
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
data "aws_s3_getbucket" "example" {
bucket = "an-example-bucket"
}
resource "aws_lakeformation_resource" "example" {
arn = data.aws_s3_getbucket.example.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.ArrayList;
import java.util.Arrays;
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
Constructors
- ResourceType(String name, {ResourceArgs? args, CustomResourceOptions? options})
-
Creates a new ResourceType.
nameThe Pulumi resource name.argsArguments used to configure this ResourceType. The set of arguments for Resource.optionsResource options controlling this resource's behavior. - ResourceType.reference(String urn)
- Creates a typed reference to an existing ResourceType resource.
Properties
-
arn
↔ Output<
String> -
ARN of the resource.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
hybridAccessEnabled
↔ Output<
bool> -
Flag to enable AWS LakeFormation hybrid access permission mode.
latefinal
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
lastModified
↔ Output<
String> -
Date and time the resource was last modified in RFC 3339 format.
latefinal
-
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
-
roleArn
↔ Output<
String> -
Role that has read/write access to the resource.
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
-
useServiceLinkedRole
↔ Output<
bool?> -
Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
latefinal
-
withFederation
↔ Output<
bool> -
Whether or not the resource is a federated resource. Set to true when registering AWS Glue connections for federated catalog functionality.
latefinal
-
withPrivilegedAccess
↔ Output<
bool> -
Boolean to grant the calling principal the permissions to perform all supported Lake Formation operations on the registered data location.
latefinal
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {ResourceState? state, CustomResourceOptions? options}) → ResourceType -
Gets an existing ResourceType resource's state with the given
nameandid.