UNPKG

@pulumi/aws

Version:

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

88 lines 4.08 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.PhoneNumberContactFlowAssociation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Associates a flow with a phone number claimed to an Amazon Connect instance. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.connect.PhoneNumberContactFlowAssociation("example", { * phoneNumberId: exampleAwsConnectPhoneNumber.id, * instanceId: exampleAwsConnectInstance.id, * contactFlowId: exampleAwsConnectContactFlow.contactFlowId, * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_connect_phone_number_contact_flow_association` using the `phone_number_id`, `instance_id` and `contact_flow_id` separated by a comma (`,`). For example: * * ```sh * $ pulumi import aws:connect/phoneNumberContactFlowAssociation:PhoneNumberContactFlowAssociation example 36727a4c-4683-4e49-880c-3347c61110a4,fa6c1691-e2eb-4487-bdb9-1aaed6268ebd,c4acdc79-395e-4280-a294-9062f56b07bb * ``` */ class PhoneNumberContactFlowAssociation extends pulumi.CustomResource { /** * Get an existing PhoneNumberContactFlowAssociation 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 PhoneNumberContactFlowAssociation(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of PhoneNumberContactFlowAssociation. 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'] === PhoneNumberContactFlowAssociation.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["contactFlowId"] = state?.contactFlowId; resourceInputs["instanceId"] = state?.instanceId; resourceInputs["phoneNumberId"] = state?.phoneNumberId; resourceInputs["region"] = state?.region; } else { const args = argsOrState; if (args?.contactFlowId === undefined && !opts.urn) { throw new Error("Missing required property 'contactFlowId'"); } if (args?.instanceId === undefined && !opts.urn) { throw new Error("Missing required property 'instanceId'"); } if (args?.phoneNumberId === undefined && !opts.urn) { throw new Error("Missing required property 'phoneNumberId'"); } resourceInputs["contactFlowId"] = args?.contactFlowId; resourceInputs["instanceId"] = args?.instanceId; resourceInputs["phoneNumberId"] = args?.phoneNumberId; resourceInputs["region"] = args?.region; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(PhoneNumberContactFlowAssociation.__pulumiType, name, resourceInputs, opts); } } exports.PhoneNumberContactFlowAssociation = PhoneNumberContactFlowAssociation; /** @internal */ PhoneNumberContactFlowAssociation.__pulumiType = 'aws:connect/phoneNumberContactFlowAssociation:PhoneNumberContactFlowAssociation'; //# sourceMappingURL=phoneNumberContactFlowAssociation.js.map