@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
145 lines • 4.67 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.ResourceLfTags = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages an attachment between one or more existing LF-tags and an existing Lake Formation resource.
*
* ## Example Usage
*
* ### Database Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.lakeformation.LfTag("example", {
* key: "right",
* values: [
* "abbey",
* "village",
* "luffield",
* "woodcote",
* "copse",
* "chapel",
* "stowe",
* "club",
* ],
* });
* const exampleResourceLfTags = new aws.lakeformation.ResourceLfTags("example", {
* database: {
* name: exampleAwsGlueCatalogDatabase.name,
* },
* lfTags: [{
* key: example.key,
* value: "stowe",
* }],
* });
* ```
*
* ### Multiple Tags Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.lakeformation.LfTag("example", {
* key: "right",
* values: [
* "abbey",
* "village",
* "luffield",
* "woodcote",
* "copse",
* "chapel",
* "stowe",
* "club",
* ],
* });
* const example2 = new aws.lakeformation.LfTag("example2", {
* key: "left",
* values: [
* "farm",
* "theloop",
* "aintree",
* "brooklands",
* "maggotts",
* "becketts",
* "vale",
* ],
* });
* const exampleResourceLfTags = new aws.lakeformation.ResourceLfTags("example", {
* database: {
* name: exampleAwsGlueCatalogDatabase.name,
* },
* lfTags: [
* {
* key: "right",
* value: "luffield",
* },
* {
* key: "left",
* value: "aintree",
* },
* ],
* });
* ```
*/
class ResourceLfTags extends pulumi.CustomResource {
/**
* Get an existing ResourceLfTags resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new ResourceLfTags(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ResourceLfTags. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === ResourceLfTags.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["catalogId"] = state?.catalogId;
resourceInputs["database"] = state?.database;
resourceInputs["lfTags"] = state?.lfTags;
resourceInputs["region"] = state?.region;
resourceInputs["table"] = state?.table;
resourceInputs["tableWithColumns"] = state?.tableWithColumns;
}
else {
const args = argsOrState;
if (args?.lfTags === undefined && !opts.urn) {
throw new Error("Missing required property 'lfTags'");
}
resourceInputs["catalogId"] = args?.catalogId;
resourceInputs["database"] = args?.database;
resourceInputs["lfTags"] = args?.lfTags;
resourceInputs["region"] = args?.region;
resourceInputs["table"] = args?.table;
resourceInputs["tableWithColumns"] = args?.tableWithColumns;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ResourceLfTags.__pulumiType, name, resourceInputs, opts);
}
}
exports.ResourceLfTags = ResourceLfTags;
/** @internal */
ResourceLfTags.__pulumiType = 'aws:lakeformation/resourceLfTags:ResourceLfTags';
//# sourceMappingURL=resourceLfTags.js.map