Class CfnPhoneNumber
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.smsvoice.CfnPhoneNumber
- All Implemented Interfaces:
IInspectable
,ITaggableV2
,IPhoneNumberRef
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)",
date="2025-09-25T11:29:17.631Z")
@Stability(Stable)
public class CfnPhoneNumber
extends CfnResource
implements IInspectable, IPhoneNumberRef, ITaggableV2
Request an origination phone number for use in your account.
For more information on phone number request see Request a phone number 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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.smsvoice.*; CfnPhoneNumber cfnPhoneNumber = CfnPhoneNumber.Builder.create(this, "MyCfnPhoneNumber") .isoCountryCode("isoCountryCode") .mandatoryKeywords(MandatoryKeywordsProperty.builder() .help(MandatoryKeywordProperty.builder() .message("message") .build()) .stop(MandatoryKeywordProperty.builder() .message("message") .build()) .build()) .numberCapabilities(List.of("numberCapabilities")) .numberType("numberType") // the properties below are optional .deletionProtectionEnabled(false) .optionalKeywords(List.of(OptionalKeywordProperty.builder() .action("action") .keyword("keyword") .message("message") .build())) .optOutListName("optOutListName") .selfManagedOptOutsEnabled(false) .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .twoWay(TwoWayProperty.builder() .enabled(false) // the properties below are optional .channelArn("channelArn") .channelRole("channelRole") .build()) .build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A fluent builder forCfnPhoneNumber
.static interface
The keywordsHELP
andSTOP
are mandatory keywords that each phone number must have.static interface
The keywordsHELP
andSTOP
are mandatory keywords that each phone number must have.static interface
TheOptionalKeyword
configuration.static interface
The phone number's two-way SMS configuration object.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.smsvoice.IPhoneNumberRef
IPhoneNumberRef.Jsii$Default, IPhoneNumberRef.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CfnPhoneNumber
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnPhoneNumber
(software.amazon.jsii.JsiiObjectRef objRef) CfnPhoneNumber
(software.constructs.Construct scope, String id, CfnPhoneNumberProps props) -
Method Summary
Modifier and TypeMethodDescriptionThePhoneNumber
's Amazon Resource Name (ARN).The phone number in E.164 format.The unique identifier for the phone number.Tag Manager which manages the tags for this resource.By default this is set to false.The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.Creates or updates aMandatoryKeyword
configuration on an origination phone number For more information, see Keywords in the End User Messaging User Guide.Indicates if the phone number will be used for text messages, voice messages, or both.The type of phone number to request.A keyword is a word that you can search for on a particular phone number or pool.The name of the OptOutList associated with the phone number.A reference to a PhoneNumber resource.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.getTags()
An array of tags (key and value pairs) to associate with the requested phone number.Describes the two-way SMS configuration for a phone number.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
By default this is set to false.void
By default this is set to false.void
setIsoCountryCode
(String value) The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.void
setMandatoryKeywords
(IResolvable value) Creates or updates aMandatoryKeyword
configuration on an origination phone number For more information, see Keywords in the End User Messaging User Guide.void
Creates or updates aMandatoryKeyword
configuration on an origination phone number For more information, see Keywords in the End User Messaging User Guide.void
setNumberCapabilities
(List<String> value) Indicates if the phone number will be used for text messages, voice messages, or both.void
setNumberType
(String value) The type of phone number to request.void
setOptionalKeywords
(List<Object> value) A keyword is a word that you can search for on a particular phone number or pool.void
setOptionalKeywords
(IResolvable value) A keyword is a word that you can search for on a particular phone number or pool.void
setOptOutListName
(String value) The name of the OptOutList associated with the phone number.void
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.void
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.void
An array of tags (key and value pairs) to associate with the requested phone number.void
setTwoWay
(IResolvable value) Describes the two-way SMS configuration for a phone number.void
Describes the two-way SMS configuration for a phone number.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnPhoneNumber
protected CfnPhoneNumber(software.amazon.jsii.JsiiObjectRef objRef) -
CfnPhoneNumber
protected CfnPhoneNumber(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnPhoneNumber
@Stability(Stable) public CfnPhoneNumber(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnPhoneNumberProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrArn
ThePhoneNumber
's Amazon Resource Name (ARN). -
getAttrPhoneNumber
The phone number in E.164 format. -
getAttrPhoneNumberId
The unique identifier for the phone number. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManager
in interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getPhoneNumberRef
A reference to a PhoneNumber resource.- Specified by:
getPhoneNumberRef
in interfaceIPhoneNumberRef
-
getIsoCountryCode
The two-character code, in ISO 3166-1 alpha-2 format, for the country or region. -
setIsoCountryCode
The two-character code, in ISO 3166-1 alpha-2 format, for the country or region. -
getMandatoryKeywords
Creates or updates aMandatoryKeyword
configuration on an origination phone number For more information, see Keywords in the End User Messaging User Guide. -
setMandatoryKeywords
Creates or updates aMandatoryKeyword
configuration on an origination phone number For more information, see Keywords in the End User Messaging User Guide. -
setMandatoryKeywords
@Stability(Stable) public void setMandatoryKeywords(@NotNull CfnPhoneNumber.MandatoryKeywordsProperty value) Creates or updates aMandatoryKeyword
configuration on an origination phone number For more information, see Keywords in the End User Messaging User Guide. -
getNumberCapabilities
Indicates if the phone number will be used for text messages, voice messages, or both. -
setNumberCapabilities
Indicates if the phone number will be used for text messages, voice messages, or both. -
getNumberType
The type of phone number to request. -
setNumberType
The type of phone number to request. -
getDeletionProtectionEnabled
By default this is set to false. -
setDeletionProtectionEnabled
By default this is set to false. -
setDeletionProtectionEnabled
By default this is set to false. -
getOptionalKeywords
A keyword is a word that you can search for on a particular phone number or pool. -
setOptionalKeywords
A keyword is a word that you can search for on a particular phone number or pool. -
setOptionalKeywords
A keyword is a word that you can search for on a particular phone number or pool. -
getOptOutListName
The name of the OptOutList associated with the phone number. -
setOptOutListName
The name of the OptOutList associated with the phone number. -
getSelfManagedOptOutsEnabled
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. -
setSelfManagedOptOutsEnabled
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. -
setSelfManagedOptOutsEnabled
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. -
getTags
An array of tags (key and value pairs) to associate with the requested phone number. -
setTags
An array of tags (key and value pairs) to associate with the requested phone number. -
getTwoWay
Describes the two-way SMS configuration for a phone number. -
setTwoWay
Describes the two-way SMS configuration for a phone number. -
setTwoWay
Describes the two-way SMS configuration for a phone number.
-