UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

162 lines 7.03 kB
"use strict"; // *** 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.Instance = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides an Amazon Connect instance resource. For more information see * [Amazon Connect: Getting Started](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-get-started.html) * * !> **WARN:** Amazon Connect enforces a limit of [100 combined instance creation and deletions every 30 days](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-service-limits.html#feature-limits). For example, if you create 80 instances and delete 20 of them, you must wait 30 days to create or delete another instance. Use care when creating or deleting instances. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.connect.Instance("test", { * identityManagementType: "CONNECT_MANAGED", * inboundCallsEnabled: true, * instanceAlias: "friendly-name-connect", * outboundCallsEnabled: true, * tags: { * hello: "world", * }, * }); * ``` * * ### With Existing Active Directory * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.connect.Instance("test", { * directoryId: testAwsDirectoryServiceDirectory.id, * identityManagementType: "EXISTING_DIRECTORY", * inboundCallsEnabled: true, * instanceAlias: "friendly-name-connect", * outboundCallsEnabled: true, * }); * ``` * * ### With SAML * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.connect.Instance("test", { * identityManagementType: "SAML", * inboundCallsEnabled: true, * instanceAlias: "friendly-name-connect", * outboundCallsEnabled: true, * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `id` - (String) ID of the connect instance. * * #### Optional * * - `account_id` (String) AWS Account where this resource is managed. * * - `region` (String) Region where this resource is managed. * * Using `pulumi import`, import Connect instances using the `id`. For example: * * console * * % pulumi import aws_connect_instance.example f1288a1f-6193-445a-b47e-af739b2 */ class Instance extends pulumi.CustomResource { /** * Get an existing Instance 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 Instance(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Instance. 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'] === Instance.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["autoResolveBestVoicesEnabled"] = state?.autoResolveBestVoicesEnabled; resourceInputs["contactFlowLogsEnabled"] = state?.contactFlowLogsEnabled; resourceInputs["contactLensEnabled"] = state?.contactLensEnabled; resourceInputs["createdTime"] = state?.createdTime; resourceInputs["directoryId"] = state?.directoryId; resourceInputs["earlyMediaEnabled"] = state?.earlyMediaEnabled; resourceInputs["identityManagementType"] = state?.identityManagementType; resourceInputs["inboundCallsEnabled"] = state?.inboundCallsEnabled; resourceInputs["instanceAlias"] = state?.instanceAlias; resourceInputs["multiPartyConferenceEnabled"] = state?.multiPartyConferenceEnabled; resourceInputs["outboundCallsEnabled"] = state?.outboundCallsEnabled; resourceInputs["region"] = state?.region; resourceInputs["serviceRole"] = state?.serviceRole; resourceInputs["status"] = state?.status; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; } else { const args = argsOrState; if (args?.identityManagementType === undefined && !opts.urn) { throw new Error("Missing required property 'identityManagementType'"); } if (args?.inboundCallsEnabled === undefined && !opts.urn) { throw new Error("Missing required property 'inboundCallsEnabled'"); } if (args?.outboundCallsEnabled === undefined && !opts.urn) { throw new Error("Missing required property 'outboundCallsEnabled'"); } resourceInputs["autoResolveBestVoicesEnabled"] = args?.autoResolveBestVoicesEnabled; resourceInputs["contactFlowLogsEnabled"] = args?.contactFlowLogsEnabled; resourceInputs["contactLensEnabled"] = args?.contactLensEnabled; resourceInputs["directoryId"] = args?.directoryId; resourceInputs["earlyMediaEnabled"] = args?.earlyMediaEnabled; resourceInputs["identityManagementType"] = args?.identityManagementType; resourceInputs["inboundCallsEnabled"] = args?.inboundCallsEnabled; resourceInputs["instanceAlias"] = args?.instanceAlias; resourceInputs["multiPartyConferenceEnabled"] = args?.multiPartyConferenceEnabled; resourceInputs["outboundCallsEnabled"] = args?.outboundCallsEnabled; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["arn"] = undefined /*out*/; resourceInputs["createdTime"] = undefined /*out*/; resourceInputs["serviceRole"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Instance.__pulumiType, name, resourceInputs, opts); } } exports.Instance = Instance; /** @internal */ Instance.__pulumiType = 'aws:connect/instance:Instance'; //# sourceMappingURL=instance.js.map