java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggableV2, IPoolRef, 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.636Z") @Stability(Stable) public class CfnPool extends CfnResource implements IInspectable, IPoolRef, ITaggableV2
Creates a new pool and associates the specified origination identity to the pool.

A pool can include one or more phone numbers and SenderIds that are associated with your AWS account.

The new pool inherits its configuration from the specified origination identity. This includes keywords, message type, opt-out list, two-way configuration, and self-managed opt-out configuration. Deletion protection isn't inherited from the origination identity and defaults to false.

If the origination identity is a phone number and is already associated with another pool, an error is returned. A sender ID can be associated with multiple pools.

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.*;
 CfnPool cfnPool = CfnPool.Builder.create(this, "MyCfnPool")
         .mandatoryKeywords(MandatoryKeywordsProperty.builder()
                 .help(MandatoryKeywordProperty.builder()
                         .message("message")
                         .build())
                 .stop(MandatoryKeywordProperty.builder()
                         .message("message")
                         .build())
                 .build())
         .originationIdentities(List.of("originationIdentities"))
         // the properties below are optional
         .deletionProtectionEnabled(false)
         .optionalKeywords(List.of(OptionalKeywordProperty.builder()
                 .action("action")
                 .keyword("keyword")
                 .message("message")
                 .build()))
         .optOutListName("optOutListName")
         .selfManagedOptOutsEnabled(false)
         .sharedRoutesEnabled(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:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnPool

      protected CfnPool(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnPool

      protected CfnPool(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnPool

      @Stability(Stable) public CfnPool(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnPoolProps 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

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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 class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name of the Pool .
    • getAttrPoolId

      @Stability(Stable) @NotNull public String getAttrPoolId()
      The unique identifier for the pool.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getPoolRef

      @Stability(Stable) @NotNull public PoolReference getPoolRef()
      A reference to a Pool resource.
      Specified by:
      getPoolRef in interface IPoolRef
    • getMandatoryKeywords

      @Stability(Stable) @NotNull public Object getMandatoryKeywords()
      Creates or updates the pool's MandatoryKeyword configuration.
    • setMandatoryKeywords

      @Stability(Stable) public void setMandatoryKeywords(@NotNull IResolvable value)
      Creates or updates the pool's MandatoryKeyword configuration.
    • setMandatoryKeywords

      @Stability(Stable) public void setMandatoryKeywords(@NotNull CfnPool.MandatoryKeywordsProperty value)
      Creates or updates the pool's MandatoryKeyword configuration.
    • getOriginationIdentities

      @Stability(Stable) @NotNull public List<String> getOriginationIdentities()
      The list of origination identities to apply to the pool, either PhoneNumberArn or SenderIdArn .
    • setOriginationIdentities

      @Stability(Stable) public void setOriginationIdentities(@NotNull List<String> value)
      The list of origination identities to apply to the pool, either PhoneNumberArn or SenderIdArn .
    • getDeletionProtectionEnabled

      @Stability(Stable) @Nullable public Object getDeletionProtectionEnabled()
      When set to true the pool can't be deleted.
    • setDeletionProtectionEnabled

      @Stability(Stable) public void setDeletionProtectionEnabled(@Nullable Boolean value)
      When set to true the pool can't be deleted.
    • setDeletionProtectionEnabled

      @Stability(Stable) public void setDeletionProtectionEnabled(@Nullable IResolvable value)
      When set to true the pool can't be deleted.
    • getOptionalKeywords

      @Stability(Stable) @Nullable public Object getOptionalKeywords()
      Specifies any optional keywords to associate with the pool.
    • setOptionalKeywords

      @Stability(Stable) public void setOptionalKeywords(@Nullable IResolvable value)
      Specifies any optional keywords to associate with the pool.
    • setOptionalKeywords

      @Stability(Stable) public void setOptionalKeywords(@Nullable List<Object> value)
      Specifies any optional keywords to associate with the pool.
    • getOptOutListName

      @Stability(Stable) @Nullable public String getOptOutListName()
      The name of the OptOutList associated with the pool.
    • setOptOutListName

      @Stability(Stable) public void setOptOutListName(@Nullable String value)
      The name of the OptOutList associated with the pool.
    • getSelfManagedOptOutsEnabled

      @Stability(Stable) @Nullable public Object getSelfManagedOptOutsEnabled()
      When set to false, 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

      @Stability(Stable) public void setSelfManagedOptOutsEnabled(@Nullable Boolean value)
      When set to false, 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

      @Stability(Stable) public void setSelfManagedOptOutsEnabled(@Nullable IResolvable value)
      When set to false, 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.
    • getSharedRoutesEnabled

      @Stability(Stable) @Nullable public Object getSharedRoutesEnabled()
      Allows you to enable shared routes on your pool.
    • setSharedRoutesEnabled

      @Stability(Stable) public void setSharedRoutesEnabled(@Nullable Boolean value)
      Allows you to enable shared routes on your pool.
    • setSharedRoutesEnabled

      @Stability(Stable) public void setSharedRoutesEnabled(@Nullable IResolvable value)
      Allows you to enable shared routes on your pool.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      An array of tags (key and value pairs) associated with the pool.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      An array of tags (key and value pairs) associated with the pool.
    • getTwoWay

      @Stability(Stable) @Nullable public Object getTwoWay()
      Describes the two-way SMS configuration for a phone number.
    • setTwoWay

      @Stability(Stable) public void setTwoWay(@Nullable IResolvable value)
      Describes the two-way SMS configuration for a phone number.
    • setTwoWay

      @Stability(Stable) public void setTwoWay(@Nullable CfnPool.TwoWayProperty value)
      Describes the two-way SMS configuration for a phone number.