@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
112 lines • 4.79 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.Vocabulary = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides an Amazon Connect Vocabulary resource. For more information see
* [Amazon Connect: Getting Started](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-get-started.html)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.connect.Vocabulary("example", {
* instanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111",
* name: "example",
* content: `Phrase\x09IPA\x09SoundsLike\x09DisplayAs
* Los-Angeles\x09\x09\x09Los Angeles
* F.B.I.\x09ɛ f b i aɪ\x09\x09FBI
* Etienne\x09\x09eh-tee-en\x09`,
* languageCode: "en-US",
* tags: {
* Key1: "Value1",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Amazon Connect Vocabularies using the `instance_id` and `vocabulary_id` separated by a colon (`:`). For example:
*
* ```sh
* $ pulumi import aws:connect/vocabulary:Vocabulary example f1288a1f-6193-445a-b47e-af739b2:c1d4e5f6-1b3c-1b3c-1b3c-c1d4e5f6c1d4e5
* ```
*/
class Vocabulary extends pulumi.CustomResource {
/**
* Get an existing Vocabulary 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 Vocabulary(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Vocabulary. 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'] === Vocabulary.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["content"] = state?.content;
resourceInputs["failureReason"] = state?.failureReason;
resourceInputs["instanceId"] = state?.instanceId;
resourceInputs["languageCode"] = state?.languageCode;
resourceInputs["lastModifiedTime"] = state?.lastModifiedTime;
resourceInputs["name"] = state?.name;
resourceInputs["region"] = state?.region;
resourceInputs["state"] = state?.state;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["vocabularyId"] = state?.vocabularyId;
}
else {
const args = argsOrState;
if (args?.content === undefined && !opts.urn) {
throw new Error("Missing required property 'content'");
}
if (args?.instanceId === undefined && !opts.urn) {
throw new Error("Missing required property 'instanceId'");
}
if (args?.languageCode === undefined && !opts.urn) {
throw new Error("Missing required property 'languageCode'");
}
resourceInputs["content"] = args?.content;
resourceInputs["instanceId"] = args?.instanceId;
resourceInputs["languageCode"] = args?.languageCode;
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["failureReason"] = undefined /*out*/;
resourceInputs["lastModifiedTime"] = undefined /*out*/;
resourceInputs["state"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
resourceInputs["vocabularyId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Vocabulary.__pulumiType, name, resourceInputs, opts);
}
}
exports.Vocabulary = Vocabulary;
/** @internal */
Vocabulary.__pulumiType = 'aws:connect/vocabulary:Vocabulary';
//# sourceMappingURL=vocabulary.js.map
;