@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
88 lines • 3.3 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.LfTag = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Creates an LF-Tag with the specified name and values. Each key must have at least one value. The maximum number of values permitted is 1000.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.lakeformation.LfTag("example", {
* key: "module",
* values: [
* "Orders",
* "Sales",
* "Customers",
* ],
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Lake Formation LF-Tags using the `catalog_id:key`. If you have not set a Catalog ID specify the AWS Account ID that the database is in. For example:
*
* ```sh
* $ pulumi import aws:lakeformation/lfTag:LfTag example 123456789012:some_key
* ```
*/
class LfTag extends pulumi.CustomResource {
/**
* Get an existing LfTag 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 LfTag(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of LfTag. 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'] === LfTag.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["catalogId"] = state?.catalogId;
resourceInputs["key"] = state?.key;
resourceInputs["region"] = state?.region;
resourceInputs["values"] = state?.values;
}
else {
const args = argsOrState;
if (args?.key === undefined && !opts.urn) {
throw new Error("Missing required property 'key'");
}
if (args?.values === undefined && !opts.urn) {
throw new Error("Missing required property 'values'");
}
resourceInputs["catalogId"] = args?.catalogId;
resourceInputs["key"] = args?.key;
resourceInputs["region"] = args?.region;
resourceInputs["values"] = args?.values;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(LfTag.__pulumiType, name, resourceInputs, opts);
}
}
exports.LfTag = LfTag;
/** @internal */
LfTag.__pulumiType = 'aws:lakeformation/lfTag:LfTag';
//# sourceMappingURL=lfTag.js.map