AWS::Connect::PhoneNumber - AWS CloudFormation

AWS::Connect::PhoneNumber

Claims a phone number to the specified Amazon Connect instance.

Syntax

To declare this entity in your AWS 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: Updates are not supported.

Description

The description of the phone number.

Required: No

Type: String

Minimum: 0

Maximum: 500

Pattern: ^[\W\S_]*

Update requires: Updates are not supported.

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: Updates are not supported.

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 that phone numbers are claimed to.

Required: Yes

Type: String

Update requires: Some interruptions

Type

The type of phone number.

Required: Yes

Type: String

Allowed values: DID | TOLL_FREE

Update requires: Updates are not supported.

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the phone number. For example:

{ "Ref": "myPhoneNumber" }

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic 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::GetAtt intrinsic 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