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:
IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.109.0 (build c221850)",
date="2025-03-14T03:25:01.514Z")
@Stability(Stable)
public class CfnConfiguration
extends CfnResource
implements IInspectable
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 class
A fluent builder forCfnConfiguration
.static interface
Describes a configuration revision.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
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CfnConfiguration
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnConfiguration
(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.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.properties
file.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setDescription
(String value) The description of the configuration.void
setKafkaVersionsList
(List<String> value) The versions of Apache Kafka with which you can use this MSK configuration.void
setLatestRevision
(IResolvable value) Latest revision of the MSK configuration.void
Latest revision of the MSK configuration.void
The name of the configuration.void
setServerProperties
(String value) Contents of theserver.properties
file.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.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:
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
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:
getCfnProperties
in classCfnResource
-
getName
The name of the configuration. -
setName
The name of the configuration. -
getServerProperties
Contents of theserver.properties
file. When using this property, you must ensure that the contents of the file are base64 encoded. When using the console, the SDK, or the AWS CLI , the contents ofserver.properties
can be in plaintext. -
setServerProperties
Contents of theserver.properties
file. When using this property, you must ensure that the contents of the file are base64 encoded. When using the console, the SDK, or the AWS CLI , the contents ofserver.properties
can 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. -
setLatestRevision
Latest revision of the MSK configuration. -
setLatestRevision
@Stability(Stable) public void setLatestRevision(@Nullable CfnConfiguration.LatestRevisionProperty value) Latest revision of the MSK configuration.
-