AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::SMSVOICE::PhoneNumber

CfnPhoneNumber

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 *End User Messaging User Guide* . > Registering phone numbers is not supported by AWS CloudFormation . You can import phone numbers and sender IDs that are automatically provisioned at registration.

Import

import { CfnPhoneNumber } from 'aws-cdk-lib/aws-smsvoice';

Or use the module namespace:

import * as smsvoice from 'aws-cdk-lib/aws-smsvoice';
// smsvoice.CfnPhoneNumber

Properties

Configuration passed to the constructor as CfnPhoneNumberProps.

isoCountryCodeRequired
string

The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.

mandatoryKeywordsRequired
IResolvable | MandatoryKeywordsProperty

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 End User Messaging User Guide.

numberCapabilitiesRequired
string[]

Indicates if the phone number will be used for text messages, voice messages, or both.

numberTypeRequired
string

The type of phone number to request. > The `ShortCode` number type is not supported in AWS CloudFormation .

deletionProtectionEnabledOptional
boolean | IResolvable

By default this is set to false. When set to true the phone number can't be deleted.

optionalKeywordsOptional
IResolvable | IResolvable | OptionalKeywordProperty[]

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, End User Messaging 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 End User Messaging User Guide.

optOutListNameOptional
string

The name of the OptOutList associated with the phone number.

selfManagedOptOutsEnabledOptional
boolean | IResolvable

When set to false and an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, End User Messaging 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)

tagsOptional
CfnTag[]

An array of tags (key and value pairs) to associate with the requested phone number.

twoWayOptional
IResolvable | TwoWayProperty

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 End User Messaging User Guide.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

LevelL1 (CloudFormation)
Moduleaws-smsvoice
CFN TypeAWS::SMSVOICE::PhoneNumber
Properties10

External Links