CfnConfigurationPropsMixin
- class aws_cdk.mixins_preview.aws_msk.mixins.CfnConfigurationPropsMixin(props, *, strategy=None)
Bases:
MixinCreates 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 = 604800000Now run the following Python 3.6 script in the folder where you saved
config-file.txt. This script uses the properties specified inconfig-file.txtto create a configuration namedSalesClusterConfiguration. 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)
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-msk-configuration.html
- CloudformationResource:
AWS::MSK::Configuration
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_msk import mixins as msk_mixins cfn_configuration_props_mixin = msk_mixins.CfnConfigurationPropsMixin(msk_mixins.CfnConfigurationMixinProps( description="description", kafka_versions_list=["kafkaVersionsList"], latest_revision=msk_mixins.CfnConfigurationPropsMixin.LatestRevisionProperty( creation_time="creationTime", description="description", revision=123 ), name="name", server_properties="serverProperties" ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::MSK::Configuration.- Parameters:
props (
Union[CfnConfigurationMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['description', 'kafkaVersionsList', 'latestRevision', 'name', 'serverProperties']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
LatestRevisionProperty
- class CfnConfigurationPropsMixin.LatestRevisionProperty(*, creation_time=None, description=None, revision=None)
Bases:
objectDescribes a configuration revision.
- Parameters:
creation_time (
Optional[str]) – The time when the configuration revision was created.description (
Optional[str]) – The description of the configuration revision.revision (
Union[int,float,None]) – The revision number.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_msk import mixins as msk_mixins latest_revision_property = msk_mixins.CfnConfigurationPropsMixin.LatestRevisionProperty( creation_time="creationTime", description="description", revision=123 )
Attributes
- creation_time
The time when the configuration revision was created.
- description
The description of the configuration revision.