@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
159 lines • 6.21 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.GlossaryTerm = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an AWS DataZone Glossary Term.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.iam.Role("example", {
* name: "example",
* assumeRolePolicy: JSON.stringify({
* Version: "2012-10-17",
* Statement: [
* {
* Action: [
* "sts:AssumeRole",
* "sts:TagSession",
* ],
* Effect: "Allow",
* Principal: {
* Service: "datazone.amazonaws.com",
* },
* },
* {
* Action: [
* "sts:AssumeRole",
* "sts:TagSession",
* ],
* Effect: "Allow",
* Principal: {
* Service: "cloudformation.amazonaws.com",
* },
* },
* ],
* }),
* inlinePolicies: [{
* name: "example",
* policy: JSON.stringify({
* Version: "2012-10-17",
* Statement: [{
* Action: [
* "datazone:*",
* "ram:*",
* "sso:*",
* "kms:*",
* ],
* Effect: "Allow",
* Resource: "*",
* }],
* }),
* }],
* });
* const exampleDomain = new aws.datazone.Domain("example", {
* name: "example_name",
* domainExecutionRole: example.arn,
* });
* const exampleSecurityGroup = new aws.ec2.SecurityGroup("example", {name: "example_name"});
* const exampleProject = new aws.datazone.Project("example", {
* domainIdentifier: exampleDomain.id,
* glossaryTerms: ["2N8w6XJCwZf"],
* name: "example",
* skipDeletionCheck: true,
* });
* const exampleGlossary = new aws.datazone.Glossary("example", {
* description: "description",
* name: "example",
* owningProjectIdentifier: exampleProject.id,
* status: "ENABLED",
* domainIdentifier: exampleProject.domainIdentifier,
* });
* const exampleGlossaryTerm = new aws.datazone.GlossaryTerm("example", {
* domainIdentifier: exampleDomain.id,
* glossaryIdentifier: exampleGlossary.id,
* name: "example",
* status: "ENABLED",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import DataZone Glossary Term using a comma-delimited string combining the `domain_identifier`, `id`, and the `glossary_identifier`. For example:
*
* ```sh
* $ pulumi import aws:datazone/glossaryTerm:GlossaryTerm example domain-id,glossary-term-id,glossary-id
* ```
*/
class GlossaryTerm extends pulumi.CustomResource {
/**
* Get an existing GlossaryTerm 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 GlossaryTerm(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of GlossaryTerm. 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'] === GlossaryTerm.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["createdBy"] = state?.createdBy;
resourceInputs["domainIdentifier"] = state?.domainIdentifier;
resourceInputs["glossaryIdentifier"] = state?.glossaryIdentifier;
resourceInputs["longDescription"] = state?.longDescription;
resourceInputs["name"] = state?.name;
resourceInputs["region"] = state?.region;
resourceInputs["shortDescription"] = state?.shortDescription;
resourceInputs["status"] = state?.status;
resourceInputs["termRelations"] = state?.termRelations;
resourceInputs["timeouts"] = state?.timeouts;
}
else {
const args = argsOrState;
if (args?.glossaryIdentifier === undefined && !opts.urn) {
throw new Error("Missing required property 'glossaryIdentifier'");
}
resourceInputs["domainIdentifier"] = args?.domainIdentifier;
resourceInputs["glossaryIdentifier"] = args?.glossaryIdentifier;
resourceInputs["longDescription"] = args?.longDescription;
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
resourceInputs["shortDescription"] = args?.shortDescription;
resourceInputs["status"] = args?.status;
resourceInputs["termRelations"] = args?.termRelations;
resourceInputs["timeouts"] = args?.timeouts;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["createdBy"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(GlossaryTerm.__pulumiType, name, resourceInputs, opts);
}
}
exports.GlossaryTerm = GlossaryTerm;
/** @internal */
GlossaryTerm.__pulumiType = 'aws:datazone/glossaryTerm:GlossaryTerm';
//# sourceMappingURL=glossaryTerm.js.map