@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
132 lines • 5.59 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.RoutingProfile = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides an Amazon Connect Routing Profile 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.RoutingProfile("example", {
* instanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111",
* name: "example",
* defaultOutboundQueueId: "12345678-1234-1234-1234-123456789012",
* description: "example description",
* mediaConcurrencies: [
* {
* channel: "VOICE",
* concurrency: 1,
* crossChannelBehavior: {
* behaviorType: "ROUTE_ANY_CHANNEL",
* },
* },
* {
* channel: "CHAT",
* concurrency: 3,
* crossChannelBehavior: {
* behaviorType: "ROUTE_CURRENT_CHANNEL_ONLY",
* },
* },
* ],
* queueConfigs: [{
* channel: "VOICE",
* delay: 2,
* priority: 1,
* queueId: "12345678-1234-1234-1234-123456789012",
* }],
* tags: {
* Name: "Example Routing Profile",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Amazon Connect Routing Profiles using the `instance_id` and `routing_profile_id` separated by a colon (`:`). For example:
*
* ```sh
* $ pulumi import aws:connect/routingProfile:RoutingProfile example f1288a1f-6193-445a-b47e-af739b2:c1d4e5f6-1b3c-1b3c-1b3c-c1d4e5f6c1d4e5
* ```
*/
class RoutingProfile extends pulumi.CustomResource {
/**
* Get an existing RoutingProfile 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 RoutingProfile(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of RoutingProfile. 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'] === RoutingProfile.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["defaultOutboundQueueId"] = state?.defaultOutboundQueueId;
resourceInputs["description"] = state?.description;
resourceInputs["instanceId"] = state?.instanceId;
resourceInputs["mediaConcurrencies"] = state?.mediaConcurrencies;
resourceInputs["name"] = state?.name;
resourceInputs["queueConfigs"] = state?.queueConfigs;
resourceInputs["region"] = state?.region;
resourceInputs["routingProfileId"] = state?.routingProfileId;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
if (args?.defaultOutboundQueueId === undefined && !opts.urn) {
throw new Error("Missing required property 'defaultOutboundQueueId'");
}
if (args?.description === undefined && !opts.urn) {
throw new Error("Missing required property 'description'");
}
if (args?.instanceId === undefined && !opts.urn) {
throw new Error("Missing required property 'instanceId'");
}
if (args?.mediaConcurrencies === undefined && !opts.urn) {
throw new Error("Missing required property 'mediaConcurrencies'");
}
resourceInputs["defaultOutboundQueueId"] = args?.defaultOutboundQueueId;
resourceInputs["description"] = args?.description;
resourceInputs["instanceId"] = args?.instanceId;
resourceInputs["mediaConcurrencies"] = args?.mediaConcurrencies;
resourceInputs["name"] = args?.name;
resourceInputs["queueConfigs"] = args?.queueConfigs;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["routingProfileId"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(RoutingProfile.__pulumiType, name, resourceInputs, opts);
}
}
exports.RoutingProfile = RoutingProfile;
/** @internal */
RoutingProfile.__pulumiType = 'aws:connect/routingProfile:RoutingProfile';
//# sourceMappingURL=routingProfile.js.map