@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
223 lines (222 loc) • 8.98 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Provides an Amazon Connect Phone Number resource. For more information see
* [Amazon Connect: Getting Started](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-get-started.html)
*
* ## Example Usage
*
* ### Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.connect.PhoneNumber("example", {
* targetArn: exampleAwsConnectInstance.arn,
* countryCode: "US",
* type: "DID",
* tags: {
* hello: "world",
* },
* });
* ```
*
* ### Description
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.connect.PhoneNumber("example", {
* targetArn: exampleAwsConnectInstance.arn,
* countryCode: "US",
* type: "DID",
* description: "example description",
* });
* ```
*
* ### Prefix to filter phone numbers
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.connect.PhoneNumber("example", {
* targetArn: exampleAwsConnectInstance.arn,
* countryCode: "US",
* type: "DID",
* prefix: "+18005",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Amazon Connect Phone Numbers using its `id`. For example:
*
* ```sh
* $ pulumi import aws:connect/phoneNumber:PhoneNumber example 12345678-abcd-1234-efgh-9876543210ab
* ```
*/
export declare class PhoneNumber extends pulumi.CustomResource {
/**
* Get an existing PhoneNumber 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: string, id: pulumi.Input<pulumi.ID>, state?: PhoneNumberState, opts?: pulumi.CustomResourceOptions): PhoneNumber;
/**
* Returns true if the given object is an instance of PhoneNumber. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is PhoneNumber;
/**
* The ARN of the phone number.
*/
readonly arn: pulumi.Output<string>;
/**
* The ISO country code. For a list of Valid values, refer to [PhoneNumberCountryCode](https://docs.aws.amazon.com/connect/latest/APIReference/API_SearchAvailablePhoneNumbers.html#connect-SearchAvailablePhoneNumbers-request-PhoneNumberCountryCode).
*/
readonly countryCode: pulumi.Output<string>;
/**
* The description of the phone number.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The phone number. Phone numbers are formatted `[+] [country code] [subscriber number including area code]`.
*/
readonly phoneNumber: pulumi.Output<string>;
/**
* The prefix of the phone number that is used to filter available phone numbers. If provided, it must contain `+` as part of the country code. Do not specify this argument when importing the resource.
*/
readonly prefix: pulumi.Output<string | undefined>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
readonly region: pulumi.Output<string>;
/**
* The status of the phone number. Valid Values: `CLAIMED` | `IN_PROGRESS` | `FAILED`.
*/
readonly statuses: pulumi.Output<outputs.connect.PhoneNumberStatus[]>;
/**
* Tags to apply to the Phone Number. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
*/
readonly tagsAll: pulumi.Output<{
[key: string]: string;
}>;
/**
* The Amazon Resource Name (ARN) for Amazon Connect instances that phone numbers are claimed to.
*/
readonly targetArn: pulumi.Output<string>;
/**
* The type of phone number. Valid Values: `TOLL_FREE` | `DID`.
*/
readonly type: pulumi.Output<string>;
/**
* Create a PhoneNumber resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: PhoneNumberArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering PhoneNumber resources.
*/
export interface PhoneNumberState {
/**
* The ARN of the phone number.
*/
arn?: pulumi.Input<string>;
/**
* The ISO country code. For a list of Valid values, refer to [PhoneNumberCountryCode](https://docs.aws.amazon.com/connect/latest/APIReference/API_SearchAvailablePhoneNumbers.html#connect-SearchAvailablePhoneNumbers-request-PhoneNumberCountryCode).
*/
countryCode?: pulumi.Input<string>;
/**
* The description of the phone number.
*/
description?: pulumi.Input<string>;
/**
* The phone number. Phone numbers are formatted `[+] [country code] [subscriber number including area code]`.
*/
phoneNumber?: pulumi.Input<string>;
/**
* The prefix of the phone number that is used to filter available phone numbers. If provided, it must contain `+` as part of the country code. Do not specify this argument when importing the resource.
*/
prefix?: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* The status of the phone number. Valid Values: `CLAIMED` | `IN_PROGRESS` | `FAILED`.
*/
statuses?: pulumi.Input<pulumi.Input<inputs.connect.PhoneNumberStatus>[]>;
/**
* Tags to apply to the Phone Number. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
*/
tagsAll?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The Amazon Resource Name (ARN) for Amazon Connect instances that phone numbers are claimed to.
*/
targetArn?: pulumi.Input<string>;
/**
* The type of phone number. Valid Values: `TOLL_FREE` | `DID`.
*/
type?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a PhoneNumber resource.
*/
export interface PhoneNumberArgs {
/**
* The ISO country code. For a list of Valid values, refer to [PhoneNumberCountryCode](https://docs.aws.amazon.com/connect/latest/APIReference/API_SearchAvailablePhoneNumbers.html#connect-SearchAvailablePhoneNumbers-request-PhoneNumberCountryCode).
*/
countryCode: pulumi.Input<string>;
/**
* The description of the phone number.
*/
description?: pulumi.Input<string>;
/**
* The prefix of the phone number that is used to filter available phone numbers. If provided, it must contain `+` as part of the country code. Do not specify this argument when importing the resource.
*/
prefix?: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* Tags to apply to the Phone Number. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The Amazon Resource Name (ARN) for Amazon Connect instances that phone numbers are claimed to.
*/
targetArn: pulumi.Input<string>;
/**
* The type of phone number. Valid Values: `TOLL_FREE` | `DID`.
*/
type: pulumi.Input<string>;
}