Class CfnTopic

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IEnvironmentAware, ITopicRef, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.126.0 (build 206d44b)", date="2026-02-23T18:58:22.760Z") @Stability(Stable) public class CfnTopic extends CfnResource implements IInspectable, ITopicRef
Resource Type definition for AWS::MSK::Topic.

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.msk.*;
 CfnTopic cfnTopic = CfnTopic.Builder.create(this, "MyCfnTopic")
         .clusterArn("clusterArn")
         .partitionCount(123)
         .replicationFactor(123)
         .topicName("topicName")
         // the properties below are optional
         .configs("configs")
         .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

    • CfnTopic

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

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

      @Stability(Stable) public CfnTopic(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnTopicProps props)
      Create a new AWS::MSK::Topic.

      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

    • arnForTopic

      @Stability(Stable) @NotNull public static String arnForTopic(@NotNull ITopicRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnTopic

      @Stability(Stable) @NotNull public static Boolean isCfnTopic(@NotNull Object x)
      Checks whether the given object is a CfnTopic.

      Parameters:
      x - This parameter is required.
    • 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.
    • getAttrTopicArn

      @Stability(Stable) @NotNull public String getAttrTopicArn()
      The Amazon Resource Name (ARN) of the topic.
    • getCfnProperties

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

      @Stability(Stable) @NotNull public TopicReference getTopicRef()
      A reference to a Topic resource.
      Specified by:
      getTopicRef in interface ITopicRef
    • getClusterArn

      @Stability(Stable) @NotNull public String getClusterArn()
      The Amazon Resource Name (ARN) of the MSK cluster.
    • setClusterArn

      @Stability(Stable) public void setClusterArn(@NotNull String value)
      The Amazon Resource Name (ARN) of the MSK cluster.
    • getPartitionCount

      @Stability(Stable) @NotNull public Number getPartitionCount()
      The number of partitions for the topic.
    • setPartitionCount

      @Stability(Stable) public void setPartitionCount(@NotNull Number value)
      The number of partitions for the topic.
    • getReplicationFactor

      @Stability(Stable) @NotNull public Number getReplicationFactor()
      The replication factor for the topic.
    • setReplicationFactor

      @Stability(Stable) public void setReplicationFactor(@NotNull Number value)
      The replication factor for the topic.
    • getTopicName

      @Stability(Stable) @NotNull public String getTopicName()
      The name of the topic.
    • setTopicName

      @Stability(Stable) public void setTopicName(@NotNull String value)
      The name of the topic.
    • getConfigs

      @Stability(Stable) @Nullable public String getConfigs()
      Base64 encoded configuration properties of the topic.
    • setConfigs

      @Stability(Stable) public void setConfigs(@Nullable String value)
      Base64 encoded configuration properties of the topic.