Class CfnConfiguration
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.msk.CfnConfiguration
- All Implemented Interfaces:
IEnvironmentAware,IInspectable,IConfigurationRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-04T09:27:45.622Z")
@Stability(Stable)
public class CfnConfiguration
extends CfnResource
implements IInspectable, IConfigurationRef
Creates a new MSK configuration.
To see an example of how to use this operation, first save the following text to a file and name the file config-file.txt .
auto.create.topics.enable = true zookeeper.connection.timeout.ms = 1000 log.roll.ms = 604800000
Now run the following Python 3.6 script in the folder where you saved config-file.txt . This script uses the properties specified in config-file.txt to create a configuration named SalesClusterConfiguration . This configuration can work with Apache Kafka versions 1.1.1 and 2.1.0.
import boto3 client = boto3.client('kafka') config_file = open('config-file.txt', 'r') server_properties = config_file.read() response = client.create_configuration( Name='SalesClusterConfiguration', Description='The configuration to use on all sales clusters.', KafkaVersions=['1.1.1', '2.1.0'], ServerProperties=server_properties
) print(response)
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.*;
CfnConfiguration cfnConfiguration = CfnConfiguration.Builder.create(this, "MyCfnConfiguration")
.name("name")
.serverProperties("serverProperties")
// the properties below are optional
.description("description")
.kafkaVersionsList(List.of("kafkaVersionsList"))
.latestRevision(LatestRevisionProperty.builder()
.creationTime("creationTime")
.description("description")
.revision(123)
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnConfiguration.static interfaceDescribes a configuration revision.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.msk.IConfigurationRef
IConfigurationRef.Jsii$Default, IConfigurationRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnConfiguration(software.amazon.jsii.JsiiObjectRef objRef) CfnConfiguration(software.constructs.Construct scope, String id, CfnConfigurationProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe Amazon Resource Name (ARN) of the configuration.The time when the configuration revision was created.The description of the configuration revision.The revision number.A reference to a Configuration resource.The description of the configuration.The versions of Apache Kafka with which you can use this MSK configuration.Latest revision of the MSK configuration.getName()The name of the configuration.Contents of theserver.propertiesfile.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetDescription(String value) The description of the configuration.voidsetKafkaVersionsList(List<String> value) The versions of Apache Kafka with which you can use this MSK configuration.voidsetLatestRevision(IResolvable value) Latest revision of the MSK configuration.voidLatest revision of the MSK configuration.voidThe name of the configuration.voidsetServerProperties(String value) Contents of theserver.propertiesfile.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IEnvironmentAware
getEnvMethods 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
-
CfnConfiguration
protected CfnConfiguration(software.amazon.jsii.JsiiObjectRef objRef) -
CfnConfiguration
protected CfnConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnConfiguration
@Stability(Stable) public CfnConfiguration(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnConfigurationProps 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:
inspectin 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The Amazon Resource Name (ARN) of the configuration. -
getAttrLatestRevisionCreationTime
The time when the configuration revision was created. -
getAttrLatestRevisionDescription
The description of the configuration revision. -
getAttrLatestRevisionRevision
The revision number. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getConfigurationRef
A reference to a Configuration resource.- Specified by:
getConfigurationRefin interfaceIConfigurationRef
-
getName
The name of the configuration. -
setName
The name of the configuration. -
getServerProperties
Contents of theserver.propertiesfile. When using the console, the SDK, or the AWS CLI , the contents ofserver.propertiescan be in plaintext. -
setServerProperties
Contents of theserver.propertiesfile. When using the console, the SDK, or the AWS CLI , the contents ofserver.propertiescan be in plaintext. -
getDescription
The description of the configuration. -
setDescription
The description of the configuration. -
getKafkaVersionsList
The versions of Apache Kafka with which you can use this MSK configuration. -
setKafkaVersionsList
The versions of Apache Kafka with which you can use this MSK configuration. -
getLatestRevision
Latest revision of the MSK configuration.Returns union: either
IResolvableorCfnConfiguration.LatestRevisionProperty -
setLatestRevision
Latest revision of the MSK configuration. -
setLatestRevision
@Stability(Stable) public void setLatestRevision(@Nullable CfnConfiguration.LatestRevisionProperty value) Latest revision of the MSK configuration.
-