CfnConfigurationPropsMixin

class aws_cdk.mixins_preview.aws_msk.mixins.CfnConfigurationPropsMixin(props, *, strategy=None)

Bases: Mixin

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)
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:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

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 x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

LatestRevisionProperty

class CfnConfigurationPropsMixin.LatestRevisionProperty(*, creation_time=None, description=None, revision=None)

Bases: object

Describes 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:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-msk-configuration-latestrevision.html

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-msk-configuration-latestrevision.html#cfn-msk-configuration-latestrevision-creationtime

description

The description of the configuration revision.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-msk-configuration-latestrevision.html#cfn-msk-configuration-latestrevision-description

revision

The revision number.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-msk-configuration-latestrevision.html#cfn-msk-configuration-latestrevision-revision