

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::SMSVOICE::PhoneNumber
<a name="aws-resource-smsvoice-phonenumber"></a>

Request an origination phone number for use in your account. For more information on phone number request see [Request a phone number](https://docs.aws.amazon.com/sms-voice/latest/userguide/phone-numbers-request.html) in the *AWS End User Messaging SMS User Guide*.

**Note**  
Registering phone numbers is not supported by AWS CloudFormation. You can import phone numbers and sender IDs that are automatically provisioned at registration.

## Syntax
<a name="aws-resource-smsvoice-phonenumber-syntax"></a>

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

### JSON
<a name="aws-resource-smsvoice-phonenumber-syntax.json"></a>

```
{
  "Type" : "AWS::SMSVOICE::PhoneNumber",
  "Properties" : {
      "[DeletionProtectionEnabled](#cfn-smsvoice-phonenumber-deletionprotectionenabled)" : Boolean,
      "[IsoCountryCode](#cfn-smsvoice-phonenumber-isocountrycode)" : String,
      "[MandatoryKeywords](#cfn-smsvoice-phonenumber-mandatorykeywords)" : MandatoryKeywords,
      "[NumberCapabilities](#cfn-smsvoice-phonenumber-numbercapabilities)" : [ String, ... ],
      "[NumberType](#cfn-smsvoice-phonenumber-numbertype)" : String,
      "[OptionalKeywords](#cfn-smsvoice-phonenumber-optionalkeywords)" : [ OptionalKeyword, ... ],
      "[OptOutListName](#cfn-smsvoice-phonenumber-optoutlistname)" : String,
      "[SelfManagedOptOutsEnabled](#cfn-smsvoice-phonenumber-selfmanagedoptoutsenabled)" : Boolean,
      "[Tags](#cfn-smsvoice-phonenumber-tags)" : [ Tag, ... ],
      "[TwoWay](#cfn-smsvoice-phonenumber-twoway)" : TwoWay
    }
}
```

### YAML
<a name="aws-resource-smsvoice-phonenumber-syntax.yaml"></a>

```
Type: AWS::SMSVOICE::PhoneNumber
Properties:
  [DeletionProtectionEnabled](#cfn-smsvoice-phonenumber-deletionprotectionenabled): Boolean
  [IsoCountryCode](#cfn-smsvoice-phonenumber-isocountrycode): String
  [MandatoryKeywords](#cfn-smsvoice-phonenumber-mandatorykeywords): 
    MandatoryKeywords
  [NumberCapabilities](#cfn-smsvoice-phonenumber-numbercapabilities): 
    - String
  [NumberType](#cfn-smsvoice-phonenumber-numbertype): String
  [OptionalKeywords](#cfn-smsvoice-phonenumber-optionalkeywords): 
    - OptionalKeyword
  [OptOutListName](#cfn-smsvoice-phonenumber-optoutlistname): String
  [SelfManagedOptOutsEnabled](#cfn-smsvoice-phonenumber-selfmanagedoptoutsenabled): Boolean
  [Tags](#cfn-smsvoice-phonenumber-tags): 
    - Tag
  [TwoWay](#cfn-smsvoice-phonenumber-twoway): 
    TwoWay
```

## Properties
<a name="aws-resource-smsvoice-phonenumber-properties"></a>

`DeletionProtectionEnabled`  <a name="cfn-smsvoice-phonenumber-deletionprotectionenabled"></a>
By default this is set to false. When set to true the phone number can't be deleted.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IsoCountryCode`  <a name="cfn-smsvoice-phonenumber-isocountrycode"></a>
The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.   
*Required*: Yes  
*Type*: String  
*Pattern*: `^[A-Z]{2}$`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`MandatoryKeywords`  <a name="cfn-smsvoice-phonenumber-mandatorykeywords"></a>
Creates or updates a `MandatoryKeyword` configuration on an origination phone number For more information, see [Keywords](https://docs.aws.amazon.com/sms-voice/latest/userguide/keywords.html) in the AWS End User Messaging SMS User Guide.  
*Required*: Yes  
*Type*: [MandatoryKeywords](aws-properties-smsvoice-phonenumber-mandatorykeywords.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`NumberCapabilities`  <a name="cfn-smsvoice-phonenumber-numbercapabilities"></a>
Indicates if the phone number will be used for text messages, voice messages, or both.   
*Required*: Yes  
*Type*: Array of String  
*Allowed values*: `SMS | VOICE | MMS`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`NumberType`  <a name="cfn-smsvoice-phonenumber-numbertype"></a>
The type of phone number to request.  
The `ShortCode` number type is not supported in AWS CloudFormation.
*Required*: Yes  
*Type*: String  
*Allowed values*: `LONG_CODE | TOLL_FREE | TEN_DLC | SIMULATOR`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`OptionalKeywords`  <a name="cfn-smsvoice-phonenumber-optionalkeywords"></a>
A keyword is a word that you can search for on a particular phone number or pool. It is also a specific word or phrase that an end user can send to your number to elicit a response, such as an informational message or a special offer. When your number receives a message that begins with a keyword, AWS End User Messaging SMS responds with a customizable message. Optional keywords are differentiated from mandatory keywords. For more information, see [Keywords](https://docs.aws.amazon.com/sms-voice/latest/userguide/keywords.html) in the AWS End User Messaging SMS User Guide.  
*Required*: No  
*Type*: Array of [OptionalKeyword](aws-properties-smsvoice-phonenumber-optionalkeyword.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OptOutListName`  <a name="cfn-smsvoice-phonenumber-optoutlistname"></a>
The name of the OptOutList associated with the phone number.  
*Required*: No  
*Type*: String  
*Pattern*: `^[A-Za-z0-9_:/-]+$`  
*Minimum*: `1`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SelfManagedOptOutsEnabled`  <a name="cfn-smsvoice-phonenumber-selfmanagedoptoutsenabled"></a>
When set to false and an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, AWS End User Messaging SMS automatically replies with a customizable message and adds the end recipient to the OptOutList. When set to true you're responsible for responding to HELP and STOP requests. You're also responsible for tracking and honoring opt-out request. For more information see [Self-managed opt-outs](https://docs.aws.amazon.com/sms-voice/latest/userguide/opt-out-list-self-managed.html)  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-smsvoice-phonenumber-tags"></a>
An array of tags (key and value pairs) to associate with the requested phone number.   
*Required*: No  
*Type*: Array of [Tag](aws-properties-smsvoice-phonenumber-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TwoWay`  <a name="cfn-smsvoice-phonenumber-twoway"></a>
Describes the two-way SMS configuration for a phone number. For more information, see [Two-way SMS messaging](https://docs.aws.amazon.com/sms-voice/latest/userguide/two-way-sms.html) in the AWS End User Messaging SMS User Guide.  
*Required*: No  
*Type*: [TwoWay](aws-properties-smsvoice-phonenumber-twoway.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-smsvoice-phonenumber-return-values"></a>

### Ref
<a name="aws-resource-smsvoice-phonenumber-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns`PhoneNumberId`.

### Fn::GetAtt
<a name="aws-resource-smsvoice-phonenumber-return-values-fn--getatt"></a>

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 [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-smsvoice-phonenumber-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The `PhoneNumber`'s Amazon Resource Name (ARN)

`PhoneNumber`  <a name="PhoneNumber-fn::getatt"></a>
The phone number in E.164 format.

`PhoneNumberId`  <a name="PhoneNumberId-fn::getatt"></a>
The unique identifier for the phone number.

# AWS::SMSVOICE::PhoneNumber MandatoryKeyword
<a name="aws-properties-smsvoice-phonenumber-mandatorykeyword"></a>

The keywords `HELP` and `STOP` are mandatory keywords that each phone number must have. For more information, see [Keywords](https://docs.aws.amazon.com/sms-voice/latest/userguide/keywords.html) in the AWS End User Messaging SMS User Guide.

## Syntax
<a name="aws-properties-smsvoice-phonenumber-mandatorykeyword-syntax"></a>

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

### JSON
<a name="aws-properties-smsvoice-phonenumber-mandatorykeyword-syntax.json"></a>

```
{
  "[Message](#cfn-smsvoice-phonenumber-mandatorykeyword-message)" : String
}
```

### YAML
<a name="aws-properties-smsvoice-phonenumber-mandatorykeyword-syntax.yaml"></a>

```
  [Message](#cfn-smsvoice-phonenumber-mandatorykeyword-message): String
```

## Properties
<a name="aws-properties-smsvoice-phonenumber-mandatorykeyword-properties"></a>

`Message`  <a name="cfn-smsvoice-phonenumber-mandatorykeyword-message"></a>
The message associated with the keyword.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^(?!\s*$)[\s\S]+$`  
*Maximum*: `1600`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::SMSVOICE::PhoneNumber MandatoryKeywords
<a name="aws-properties-smsvoice-phonenumber-mandatorykeywords"></a>

The keywords `HELP` and `STOP` are mandatory keywords that each phone number must have. For more information, see [Keywords](https://docs.aws.amazon.com/sms-voice/latest/userguide/keywords.html) in the AWS End User Messaging SMS User Guide.

## Syntax
<a name="aws-properties-smsvoice-phonenumber-mandatorykeywords-syntax"></a>

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

### JSON
<a name="aws-properties-smsvoice-phonenumber-mandatorykeywords-syntax.json"></a>

```
{
  "[HELP](#cfn-smsvoice-phonenumber-mandatorykeywords-help)" : MandatoryKeyword,
  "[STOP](#cfn-smsvoice-phonenumber-mandatorykeywords-stop)" : MandatoryKeyword
}
```

### YAML
<a name="aws-properties-smsvoice-phonenumber-mandatorykeywords-syntax.yaml"></a>

```
  [HELP](#cfn-smsvoice-phonenumber-mandatorykeywords-help): 
    MandatoryKeyword
  [STOP](#cfn-smsvoice-phonenumber-mandatorykeywords-stop): 
    MandatoryKeyword
```

## Properties
<a name="aws-properties-smsvoice-phonenumber-mandatorykeywords-properties"></a>

`HELP`  <a name="cfn-smsvoice-phonenumber-mandatorykeywords-help"></a>
Specifies the `HELP` keyword that customers use to obtain customer support for this phone number. For more information, see [Keywords](https://docs.aws.amazon.com/sms-voice/latest/userguide/keywords.html) in the AWS End User Messaging SMS User Guide.  
*Required*: Yes  
*Type*: [MandatoryKeyword](aws-properties-smsvoice-phonenumber-mandatorykeyword.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`STOP`  <a name="cfn-smsvoice-phonenumber-mandatorykeywords-stop"></a>
Specifies the `STOP` keyword that customers use to opt out of receiving messages from this phone number. For more information, see [Required opt-out keywords](https://docs.aws.amazon.com/sms-voice/latest/userguide/keywords-required.html) in the AWS End User Messaging SMS User Guide.  
*Required*: Yes  
*Type*: [MandatoryKeyword](aws-properties-smsvoice-phonenumber-mandatorykeyword.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::SMSVOICE::PhoneNumber OptionalKeyword
<a name="aws-properties-smsvoice-phonenumber-optionalkeyword"></a>

The `OptionalKeyword `configuration. For more information, see [Keywords](https://docs.aws.amazon.com/sms-voice/latest/userguide/keywords.html) in the AWS End User Messaging SMS User Guide.

## Syntax
<a name="aws-properties-smsvoice-phonenumber-optionalkeyword-syntax"></a>

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

### JSON
<a name="aws-properties-smsvoice-phonenumber-optionalkeyword-syntax.json"></a>

```
{
  "[Action](#cfn-smsvoice-phonenumber-optionalkeyword-action)" : String,
  "[Keyword](#cfn-smsvoice-phonenumber-optionalkeyword-keyword)" : String,
  "[Message](#cfn-smsvoice-phonenumber-optionalkeyword-message)" : String
}
```

### YAML
<a name="aws-properties-smsvoice-phonenumber-optionalkeyword-syntax.yaml"></a>

```
  [Action](#cfn-smsvoice-phonenumber-optionalkeyword-action): String
  [Keyword](#cfn-smsvoice-phonenumber-optionalkeyword-keyword): String
  [Message](#cfn-smsvoice-phonenumber-optionalkeyword-message): String
```

## Properties
<a name="aws-properties-smsvoice-phonenumber-optionalkeyword-properties"></a>

`Action`  <a name="cfn-smsvoice-phonenumber-optionalkeyword-action"></a>
The action to perform when the keyword is used.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `AUTOMATIC_RESPONSE | OPT_OUT | OPT_IN`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Keyword`  <a name="cfn-smsvoice-phonenumber-optionalkeyword-keyword"></a>
The new keyword to add.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^(?!(?i)(stop|help)$)[ \S]+`  
*Maximum*: `30`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Message`  <a name="cfn-smsvoice-phonenumber-optionalkeyword-message"></a>
The message associated with the keyword.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^(?!\s*$)[\s\S]+$`  
*Maximum*: `1600`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::SMSVOICE::PhoneNumber Tag
<a name="aws-properties-smsvoice-phonenumber-tag"></a>

The list of tags to be added to the specified topic.

## Syntax
<a name="aws-properties-smsvoice-phonenumber-tag-syntax"></a>

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

### JSON
<a name="aws-properties-smsvoice-phonenumber-tag-syntax.json"></a>

```
{
  "[Key](#cfn-smsvoice-phonenumber-tag-key)" : String,
  "[Value](#cfn-smsvoice-phonenumber-tag-value)" : String
}
```

### YAML
<a name="aws-properties-smsvoice-phonenumber-tag-syntax.yaml"></a>

```
  [Key](#cfn-smsvoice-phonenumber-tag-key): String
  [Value](#cfn-smsvoice-phonenumber-tag-value): String
```

## Properties
<a name="aws-properties-smsvoice-phonenumber-tag-properties"></a>

`Key`  <a name="cfn-smsvoice-phonenumber-tag-key"></a>
The key identifier, or name, of the tag.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-smsvoice-phonenumber-tag-value"></a>
The string value associated with the key of the tag.  
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::SMSVOICE::PhoneNumber TwoWay
<a name="aws-properties-smsvoice-phonenumber-twoway"></a>

The phone number's two-way SMS configuration object.

## Syntax
<a name="aws-properties-smsvoice-phonenumber-twoway-syntax"></a>

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

### JSON
<a name="aws-properties-smsvoice-phonenumber-twoway-syntax.json"></a>

```
{
  "[ChannelArn](#cfn-smsvoice-phonenumber-twoway-channelarn)" : String,
  "[ChannelRole](#cfn-smsvoice-phonenumber-twoway-channelrole)" : String,
  "[Enabled](#cfn-smsvoice-phonenumber-twoway-enabled)" : Boolean
}
```

### YAML
<a name="aws-properties-smsvoice-phonenumber-twoway-syntax.yaml"></a>

```
  [ChannelArn](#cfn-smsvoice-phonenumber-twoway-channelarn): String
  [ChannelRole](#cfn-smsvoice-phonenumber-twoway-channelrole): String
  [Enabled](#cfn-smsvoice-phonenumber-twoway-enabled): Boolean
```

## Properties
<a name="aws-properties-smsvoice-phonenumber-twoway-properties"></a>

`ChannelArn`  <a name="cfn-smsvoice-phonenumber-twoway-channelarn"></a>
The Amazon Resource Name (ARN) of the two way channel.  
*Required*: No  
*Type*: String  
*Pattern*: `^arn:\S+$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ChannelRole`  <a name="cfn-smsvoice-phonenumber-twoway-channelrole"></a>
An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.  
*Required*: No  
*Type*: String  
*Pattern*: `^arn:\S+$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Enabled`  <a name="cfn-smsvoice-phonenumber-twoway-enabled"></a>
By default this is set to false. When set to true you can receive incoming text messages from your end recipients using the TwoWayChannelArn.  
*Required*: Yes  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)