@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
150 lines • 5.95 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.Queue = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides an Amazon Connect Queue resource. For more information see
* [Amazon Connect: Getting Started](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-get-started.html)
*
* ## Example Usage
*
* ### Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = new aws.connect.Queue("test", {
* instanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111",
* name: "Example Name",
* description: "Example Description",
* hoursOfOperationId: "12345678-1234-1234-1234-123456789012",
* tags: {
* Name: "Example Queue",
* },
* });
* ```
*
* ### With Quick Connect IDs
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = new aws.connect.Queue("test", {
* instanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111",
* name: "Example Name",
* description: "Example Description",
* hoursOfOperationId: "12345678-1234-1234-1234-123456789012",
* quickConnectIds: ["12345678-abcd-1234-abcd-123456789012"],
* tags: {
* Name: "Example Queue with Quick Connect IDs",
* },
* });
* ```
*
* ### With Outbound Caller Config
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = new aws.connect.Queue("test", {
* instanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111",
* name: "Example Name",
* description: "Example Description",
* hoursOfOperationId: "12345678-1234-1234-1234-123456789012",
* outboundCallerConfig: {
* outboundCallerIdName: "example",
* outboundCallerIdNumberId: "12345678-abcd-1234-abcd-123456789012",
* outboundFlowId: "87654321-defg-1234-defg-987654321234",
* },
* tags: {
* Name: "Example Queue with Outbound Caller Config",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Amazon Connect Queues using the `instance_id` and `queue_id` separated by a colon (`:`). For example:
*
* ```sh
* $ pulumi import aws:connect/queue:Queue example f1288a1f-6193-445a-b47e-af739b2:c1d4e5f6-1b3c-1b3c-1b3c-c1d4e5f6c1d4e5
* ```
*/
class Queue extends pulumi.CustomResource {
/**
* Get an existing Queue 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 Queue(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Queue. 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'] === Queue.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["description"] = state?.description;
resourceInputs["hoursOfOperationId"] = state?.hoursOfOperationId;
resourceInputs["instanceId"] = state?.instanceId;
resourceInputs["maxContacts"] = state?.maxContacts;
resourceInputs["name"] = state?.name;
resourceInputs["outboundCallerConfig"] = state?.outboundCallerConfig;
resourceInputs["queueId"] = state?.queueId;
resourceInputs["quickConnectIds"] = state?.quickConnectIds;
resourceInputs["region"] = state?.region;
resourceInputs["status"] = state?.status;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
if (args?.hoursOfOperationId === undefined && !opts.urn) {
throw new Error("Missing required property 'hoursOfOperationId'");
}
if (args?.instanceId === undefined && !opts.urn) {
throw new Error("Missing required property 'instanceId'");
}
resourceInputs["description"] = args?.description;
resourceInputs["hoursOfOperationId"] = args?.hoursOfOperationId;
resourceInputs["instanceId"] = args?.instanceId;
resourceInputs["maxContacts"] = args?.maxContacts;
resourceInputs["name"] = args?.name;
resourceInputs["outboundCallerConfig"] = args?.outboundCallerConfig;
resourceInputs["quickConnectIds"] = args?.quickConnectIds;
resourceInputs["region"] = args?.region;
resourceInputs["status"] = args?.status;
resourceInputs["tags"] = args?.tags;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["queueId"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Queue.__pulumiType, name, resourceInputs, opts);
}
}
exports.Queue = Queue;
/** @internal */
Queue.__pulumiType = 'aws:connect/queue:Queue';
//# sourceMappingURL=queue.js.map