UNPKG

@pulumi/aws

Version:

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

120 lines 5.77 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.Smsvoicev2PhoneNumber = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages an AWS End User Messaging SMS phone number. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.pinpoint.Smsvoicev2PhoneNumber("example", { * isoCountryCode: "US", * messageType: "TRANSACTIONAL", * numberType: "TOLL_FREE", * numberCapabilities: ["SMS"], * }); * ``` * * ## Import * * Using `pulumi import`, import phone numbers using the `id`. For example: * * ```sh * $ pulumi import aws:pinpoint/smsvoicev2PhoneNumber:Smsvoicev2PhoneNumber example phone-abcdef0123456789abcdef0123456789 * ``` */ class Smsvoicev2PhoneNumber extends pulumi.CustomResource { /** * Get an existing Smsvoicev2PhoneNumber 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 Smsvoicev2PhoneNumber(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Smsvoicev2PhoneNumber. 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'] === Smsvoicev2PhoneNumber.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["deletionProtectionEnabled"] = state?.deletionProtectionEnabled; resourceInputs["isoCountryCode"] = state?.isoCountryCode; resourceInputs["messageType"] = state?.messageType; resourceInputs["monthlyLeasingPrice"] = state?.monthlyLeasingPrice; resourceInputs["numberCapabilities"] = state?.numberCapabilities; resourceInputs["numberType"] = state?.numberType; resourceInputs["optOutListName"] = state?.optOutListName; resourceInputs["phoneNumber"] = state?.phoneNumber; resourceInputs["region"] = state?.region; resourceInputs["registrationId"] = state?.registrationId; resourceInputs["selfManagedOptOutsEnabled"] = state?.selfManagedOptOutsEnabled; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["timeouts"] = state?.timeouts; resourceInputs["twoWayChannelArn"] = state?.twoWayChannelArn; resourceInputs["twoWayChannelEnabled"] = state?.twoWayChannelEnabled; resourceInputs["twoWayChannelRole"] = state?.twoWayChannelRole; } else { const args = argsOrState; if (args?.isoCountryCode === undefined && !opts.urn) { throw new Error("Missing required property 'isoCountryCode'"); } if (args?.messageType === undefined && !opts.urn) { throw new Error("Missing required property 'messageType'"); } if (args?.numberCapabilities === undefined && !opts.urn) { throw new Error("Missing required property 'numberCapabilities'"); } if (args?.numberType === undefined && !opts.urn) { throw new Error("Missing required property 'numberType'"); } resourceInputs["deletionProtectionEnabled"] = args?.deletionProtectionEnabled; resourceInputs["isoCountryCode"] = args?.isoCountryCode; resourceInputs["messageType"] = args?.messageType; resourceInputs["numberCapabilities"] = args?.numberCapabilities; resourceInputs["numberType"] = args?.numberType; resourceInputs["optOutListName"] = args?.optOutListName; resourceInputs["region"] = args?.region; resourceInputs["registrationId"] = args?.registrationId; resourceInputs["selfManagedOptOutsEnabled"] = args?.selfManagedOptOutsEnabled; resourceInputs["tags"] = args?.tags; resourceInputs["timeouts"] = args?.timeouts; resourceInputs["twoWayChannelArn"] = args?.twoWayChannelArn; resourceInputs["twoWayChannelEnabled"] = args?.twoWayChannelEnabled; resourceInputs["twoWayChannelRole"] = args?.twoWayChannelRole; resourceInputs["arn"] = undefined /*out*/; resourceInputs["monthlyLeasingPrice"] = undefined /*out*/; resourceInputs["phoneNumber"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Smsvoicev2PhoneNumber.__pulumiType, name, resourceInputs, opts); } } exports.Smsvoicev2PhoneNumber = Smsvoicev2PhoneNumber; /** @internal */ Smsvoicev2PhoneNumber.__pulumiType = 'aws:pinpoint/smsvoicev2PhoneNumber:Smsvoicev2PhoneNumber'; //# sourceMappingURL=smsvoicev2PhoneNumber.js.map