Class CfnOptOutList

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggableV2, IOptOutListRef, 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.630Z") @Stability(Stable) public class CfnOptOutList extends CfnResource implements IInspectable, IOptOutListRef, ITaggableV2
Creates a new opt-out list.

If the opt-out list name already exists, an error is returned.

An opt-out list is a list of phone numbers that are opted out, meaning you can't send SMS or voice messages to them. If end user replies with the keyword "STOP," an entry for the phone number is added to the opt-out list. In addition to STOP, your recipients can use any supported opt-out keyword, such as CANCEL or OPTOUT. For a list of supported opt-out keywords, see SMS opt out in the End User Messaging User Guide.

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.*;
 CfnOptOutList cfnOptOutList = CfnOptOutList.Builder.create(this, "MyCfnOptOutList")
         .optOutListName("optOutListName")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .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

    • CfnOptOutList

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

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

      @Stability(Stable) public CfnOptOutList(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnOptOutListProps 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.
    • CfnOptOutList

      @Stability(Stable) public CfnOptOutList(@NotNull software.constructs.Construct scope, @NotNull String id)
      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.
  • 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 (ARN) for the OptOutList .
    • 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
    • getOptOutListRef

      @Stability(Stable) @NotNull public OptOutListReference getOptOutListRef()
      A reference to a OptOutList resource.
      Specified by:
      getOptOutListRef in interface IOptOutListRef
    • getOptOutListName

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

      @Stability(Stable) public void setOptOutListName(@Nullable String value)
      The name of the OptOutList.
    • getTags

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

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      An array of tags (key and value pairs) to associate with the new OptOutList.