AWS::Connect::PhoneNumber
Claims a phone number to the specified Amazon Connect instance or traffic distribution group.
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
, "SourcePhoneNumberArn" :String
, "Tags" :[ Tag, ... ]
, "TargetArn" :String
, "Type" :String
} }
YAML
Type: AWS::Connect::PhoneNumber Properties: CountryCode:
String
Description:String
Prefix:String
SourcePhoneNumberArn:String
Tags:- Tag
TargetArn:String
Type:String
Properties
CountryCode
-
The ISO country code.
Required: No
Type: String
Pattern:
^[A-Z]{2}
Update requires: Replacement
Description
-
The description of the phone number.
Required: No
Type: String
Minimum:
1
Maximum:
500
Update requires: No interruption
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
Pattern:
^\+[0-9]{1,15}
Update requires: Replacement
SourcePhoneNumberArn
-
The claimed phone number ARN that was previously imported from the external service, such as AWS End User Messaging. If it is from AWS End User Messaging, it looks like the ARN of the phone number that was imported from AWS End User Messaging.
Required: No
Type: String
Update requires: Replacement
-
The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
Required: No
Type: Array of Tag
Maximum:
50
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
Pattern:
^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:(instance|traffic-distribution-group)/[-a-zA-Z0-9]*$
Update requires: No interruption
Type
-
The type of phone number.
Required: No
Type: String
Pattern:
TOLL_FREE|DID|UIFN|SHARED|THIRD_PARTY_DID|THIRD_PARTY_TF|SHORT_CODE
Update requires: Replacement
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