UNPKG

@pulumi/aws

Version:

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

150 lines 7.38 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 * * Using `pulumi import`, import Connect instances using the `id`. For example: * * ```sh * $ pulumi import aws:connect/instance: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, Object.assign(Object.assign({}, 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 ? state.arn : undefined; resourceInputs["autoResolveBestVoicesEnabled"] = state ? state.autoResolveBestVoicesEnabled : undefined; resourceInputs["contactFlowLogsEnabled"] = state ? state.contactFlowLogsEnabled : undefined; resourceInputs["contactLensEnabled"] = state ? state.contactLensEnabled : undefined; resourceInputs["createdTime"] = state ? state.createdTime : undefined; resourceInputs["directoryId"] = state ? state.directoryId : undefined; resourceInputs["earlyMediaEnabled"] = state ? state.earlyMediaEnabled : undefined; resourceInputs["identityManagementType"] = state ? state.identityManagementType : undefined; resourceInputs["inboundCallsEnabled"] = state ? state.inboundCallsEnabled : undefined; resourceInputs["instanceAlias"] = state ? state.instanceAlias : undefined; resourceInputs["multiPartyConferenceEnabled"] = state ? state.multiPartyConferenceEnabled : undefined; resourceInputs["outboundCallsEnabled"] = state ? state.outboundCallsEnabled : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["serviceRole"] = state ? state.serviceRole : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; } else { const args = argsOrState; if ((!args || args.identityManagementType === undefined) && !opts.urn) { throw new Error("Missing required property 'identityManagementType'"); } if ((!args || args.inboundCallsEnabled === undefined) && !opts.urn) { throw new Error("Missing required property 'inboundCallsEnabled'"); } if ((!args || args.outboundCallsEnabled === undefined) && !opts.urn) { throw new Error("Missing required property 'outboundCallsEnabled'"); } resourceInputs["autoResolveBestVoicesEnabled"] = args ? args.autoResolveBestVoicesEnabled : undefined; resourceInputs["contactFlowLogsEnabled"] = args ? args.contactFlowLogsEnabled : undefined; resourceInputs["contactLensEnabled"] = args ? args.contactLensEnabled : undefined; resourceInputs["directoryId"] = args ? args.directoryId : undefined; resourceInputs["earlyMediaEnabled"] = args ? args.earlyMediaEnabled : undefined; resourceInputs["identityManagementType"] = args ? args.identityManagementType : undefined; resourceInputs["inboundCallsEnabled"] = args ? args.inboundCallsEnabled : undefined; resourceInputs["instanceAlias"] = args ? args.instanceAlias : undefined; resourceInputs["multiPartyConferenceEnabled"] = args ? args.multiPartyConferenceEnabled : undefined; resourceInputs["outboundCallsEnabled"] = args ? args.outboundCallsEnabled : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["tags"] = args ? args.tags : undefined; 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