AWS::Connect::PhoneNumber - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

AWS::Connect::PhoneNumber

Claims a phone number to the specified Amazon Connect instance or traffic distribution group.

Syntax

To declare this entity in your Amazon CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::Connect::PhoneNumber", "Properties" : { "CountryCode" : String, "Description" : String, "Prefix" : String, "Tags" : [ Tag, ... ], "TargetArn" : String, "Type" : String } }

YAML

Type: AWS::Connect::PhoneNumber Properties: CountryCode: String Description: String Prefix: String Tags: - Tag TargetArn: String Type: String

Properties

CountryCode

The ISO country code.

Required: Yes

Type: String

Allowed values: AD | AE | AF | AG | AI | AL | AM | AN | AO | AQ | AR | AS | AT | AU | AW | AZ | BA | BB | BD | BE | BF | BG | BH | BI | BJ | BL | BM | BN | BO | BR | BS | BT | BW | BY | BZ | CA | CC | CD | CF | CG | CH | CI | CK | CL | CM | CN | CO | CR | CU | CV | CW | CX | CY | CZ | DE | DJ | DK | DM | DO | DZ | EC | EE | EG | EH | ER | ES | ET | FI | FJ | FK | FM | FO | FR | GA | GB | GD | GE | GG | GH | GI | GL | GM | GN | GQ | GR | GT | GU | GW | GY | HK | HN | HR | HT | HU | ID | IE | IL | IM | IN | IO | IQ | IR | IS | IT | JE | JM | JO | JP | KE | KG | KH | KI | KM | KN | KP | KR | KW | KY | KZ | LA | LB | LC | LI | LK | LR | LS | LT | LU | LV | LY | MA | MC | MD | ME | MF | MG | MH | MK | ML | MM | MN | MO | MP | MR | MS | MT | MU | MV | MW | MX | MY | MZ | NA | NC | NE | NG | NI | NL | NO | NP | NR | NU | NZ | OM | PA | PE | PF | PG | PH | PK | PL | PM | PN | PR | PT | PW | PY | QA | RE | RO | RS | RU | RW | SA | SB | SC | SD | SE | SG | SH | SI | SJ | SK | SL | SM | SN | SO | SR | ST | SV | SX | SY | SZ | TC | TD | TG | TH | TJ | TK | TL | TM | TN | TO | TR | TT | TV | TW | TZ | UA | UG | US | UY | UZ | VA | VC | VE | VG | VI | VN | VU | WF | WS | YE | YT | ZA | ZM | ZW

Update requires: Replacement

Description

The description of the phone number.

Required: No

Type: String

Minimum: 0

Maximum: 500

Pattern: ^[\W\S_]*

Update requires: Replacement

Prefix

The prefix of the phone number. If provided, it must contain + as part of the country code.

Pattern: ^\\+[0-9]{1,15}

Required: No

Type: String

Update requires: Replacement

Tags

The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.

Required: No

Type: List of Tag

Update requires: No interruption

TargetArn

The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution group that phone numbers are claimed to.

Required: Yes

Type: String

Update requires: No interruption

Type

The type of phone number.

Required: Yes

Type: String

Allowed values: DID | SHARED | THIRD_PARTY_DID | THIRD_PARTY_TF | TOLL_FREE | UIFN

Update requires: Replacement

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Reffunction, Refreturns the phone number. For example:

{ "Ref": "myPhoneNumber" }

For more information about using the Reffunction, see Ref.

Fn::GetAtt

The Fn::GetAttintrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAttintrinsic function, see Fn::GetAtt.

Address

The phone number, in E.164 format.

PhoneNumberArn

The Amazon Resource Name (ARN) of the phone number.

Examples

Specify a phone number resource

The following example specifies a phone number resource for an Amazon Connect instance.

YAML

AWSTemplateFormatVersion: 2010-09-09 Description: Specifies a phone number for Amazon Connect instance Resources: PhoneNumber: Type: 'AWS::Connect::PhoneNumber' Properties: TargetArn: arn:aws:connect:region-name:aws-account-id:instance/instance-arn Description: phone number created using cfn Type: DID CountryCode: US Tags: - Key: testkey Value: testValue