Managed Streaming for Kafka

2019/05/20 - Managed Streaming for Kafka - 4 new 1 updated api methods

Changes  Updated APIs for the Managed Streaming for Kafka service that let customers create clusters with custom Kafka configuration.

CreateConfiguration (new) Link ¶

Creates a new MSK configuration.

See also: AWS API Documentation

Request Syntax

client.create_configuration(
    Description='string',
    KafkaVersions=[
        'string',
    ],
    Name='string',
    ServerProperties=b'bytes'
)
type Description

string

param Description

The description of the configuration.

type KafkaVersions

list

param KafkaVersions

[REQUIRED]

The versions of Apache Kafka with which you can use this MSK configuration.

  • (string) --

type Name

string

param Name

[REQUIRED]

The name of the configuration.

type ServerProperties

bytes

param ServerProperties

[REQUIRED]

Contents of the server.properties file. When using the API, you must ensure that the contents of the file are base64 encoded. When using the AWS Management Console, the SDK, or the AWS CLI, the contents of server.properties can be in plaintext.

rtype

dict

returns

Response Syntax

{
    'Arn': 'string',
    'CreationTime': datetime(2015, 1, 1),
    'LatestRevision': {
        'CreationTime': datetime(2015, 1, 1),
        'Description': 'string',
        'Revision': 123
    },
    'Name': 'string'
}

Response Structure

  • (dict) --

    200 response

    • Arn (string) --

      The Amazon Resource Name (ARN) of the configuration.

    • CreationTime (datetime) --

      The time when the configuration was created.

    • LatestRevision (dict) --

      Latest revision of the configuration.

      • CreationTime (datetime) --

        The time when the configuration revision was created.

      • Description (string) --

        The description of the configuration revision.

      • Revision (integer) --

        The revision number.

    • Name (string) --

      The name of the configuration.

DescribeConfiguration (new) Link ¶

Returns a description of this MSK configuration.

See also: AWS API Documentation

Request Syntax

client.describe_configuration(
    Arn='string'
)
type Arn

string

param Arn

[REQUIRED]

The Amazon Resource Name (ARN) that uniquely identifies an MSK configuration and all of its revisions.

rtype

dict

returns

Response Syntax

{
    'Arn': 'string',
    'CreationTime': datetime(2015, 1, 1),
    'Description': 'string',
    'KafkaVersions': [
        'string',
    ],
    'LatestRevision': {
        'CreationTime': datetime(2015, 1, 1),
        'Description': 'string',
        'Revision': 123
    },
    'Name': 'string'
}

Response Structure

  • (dict) --

    200 response

    • Arn (string) --

      The Amazon Resource Name (ARN) of the configuration.

    • CreationTime (datetime) --

      The time when the configuration was created.

    • Description (string) --

      The description of the configuration.

    • KafkaVersions (list) --

      The versions of Apache Kafka with which you can use this MSK configuration.

      • (string) --

    • LatestRevision (dict) --

      Latest revision of the configuration.

      • CreationTime (datetime) --

        The time when the configuration revision was created.

      • Description (string) --

        The description of the configuration revision.

      • Revision (integer) --

        The revision number.

    • Name (string) --

      The name of the configuration.

DescribeConfigurationRevision (new) Link ¶

Returns a description of this revision of the configuration.

See also: AWS API Documentation

Request Syntax

client.describe_configuration_revision(
    Arn='string',
    Revision=123
)
type Arn

string

param Arn

[REQUIRED]

The Amazon Resource Name (ARN) that uniquely identifies an MSK configuration and all of its revisions.

type Revision

integer

param Revision

[REQUIRED]

A string that uniquely identifies a revision of an MSK configuration.

rtype

dict

returns

Response Syntax

{
    'Arn': 'string',
    'CreationTime': datetime(2015, 1, 1),
    'Description': 'string',
    'Revision': 123,
    'ServerProperties': b'bytes'
}

Response Structure

  • (dict) --

    200 response

    • Arn (string) --

      The Amazon Resource Name (ARN) of the configuration.

    • CreationTime (datetime) --

      The time when the configuration was created.

    • Description (string) --

      The description of the configuration.

    • Revision (integer) --

      The revision number.

    • ServerProperties (bytes) --

      Contents of the server.properties file. When using the API, you must ensure that the contents of the file are base64 encoded. When using the AWS Management Console, the SDK, or the AWS CLI, the contents of server.properties can be in plaintext.

ListConfigurations (new) Link ¶

Returns a list of all the MSK configurations in this Region for this account.

See also: AWS API Documentation

Request Syntax

client.list_configurations(
    MaxResults='string',
    NextToken='string'
)
type MaxResults

string

param MaxResults

The maximum number of results to return in the response. If there are more results, the response includes a NextToken parameter.

type NextToken

string

param NextToken

The paginated results marker. When the result of the operation is truncated, the call returns NextToken in the response. To get the next batch, provide this token in your next request.

rtype

dict

returns

Response Syntax

{
    'Configurations': [
        {
            'Arn': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'Description': 'string',
            'KafkaVersions': [
                'string',
            ],
            'LatestRevision': {
                'CreationTime': datetime(2015, 1, 1),
                'Description': 'string',
                'Revision': 123
            },
            'Name': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    200 response

    • Configurations (list) --

      An array of MSK configurations.

      • (dict) --

        Represents an MSK Configuration.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the configuration.

        • CreationTime (datetime) --

          The time when the configuration was created.

        • Description (string) --

          The description of the configuration.

        • KafkaVersions (list) --

          An array of the versions of Apache Kafka with which you can use this MSK configuration. You can use this configuration for an MSK cluster only if the Apache Kafka version specified for the cluster appears in this array.

          • (string) --

        • LatestRevision (dict) --

          Latest revision of the configuration.

          • CreationTime (datetime) --

            The time when the configuration revision was created.

          • Description (string) --

            The description of the configuration revision.

          • Revision (integer) --

            The revision number.

        • Name (string) --

          The name of the configuration.

    • NextToken (string) --

      The paginated results marker. When the result of a ListConfigurations operation is truncated, the call returns NextToken in the response. To get another batch of configurations, provide this token in your next request.

CreateCluster (updated) Link ¶
Changes (request)
{'ConfigurationInfo': {'Arn': 'string', 'Revision': 'long'}}

Creates a new MSK cluster.

See also: AWS API Documentation

Request Syntax

client.create_cluster(
    BrokerNodeGroupInfo={
        'BrokerAZDistribution': 'DEFAULT',
        'ClientSubnets': [
            'string',
        ],
        'InstanceType': 'string',
        'SecurityGroups': [
            'string',
        ],
        'StorageInfo': {
            'EbsStorageInfo': {
                'VolumeSize': 123
            }
        }
    },
    ClusterName='string',
    ConfigurationInfo={
        'Arn': 'string',
        'Revision': 123
    },
    EncryptionInfo={
        'EncryptionAtRest': {
            'DataVolumeKMSKeyId': 'string'
        }
    },
    EnhancedMonitoring='DEFAULT'|'PER_BROKER'|'PER_TOPIC_PER_BROKER',
    KafkaVersion='string',
    NumberOfBrokerNodes=123
)
type BrokerNodeGroupInfo

dict

param BrokerNodeGroupInfo

[REQUIRED]

Information about the broker nodes in the cluster.

  • BrokerAZDistribution (string) --

    The distribution of broker nodes across Availability Zones.

  • ClientSubnets (list) -- [REQUIRED]

    The list of subnets to connect to in the client virtual private cloud (VPC). AWS creates elastic network interfaces inside these subnets. Client applications use elastic network interfaces to produce and consume data. Client subnets can't be in Availability Zone us-east-1e.

    • (string) --

  • InstanceType (string) -- [REQUIRED]

    The type of Amazon EC2 instances to use for Kafka brokers. The following instance types are allowed: kafka.m5.large, kafka.m5.xlarge, kafka.m5.2xlarge, kafka.m5.4xlarge, kafka.m5.12xlarge, and kafka.m5.24xlarge.

  • SecurityGroups (list) --

    The AWS security groups to associate with the elastic network interfaces in order to specify who can connect to and communicate with the Amazon MSK cluster.

    • (string) --

  • StorageInfo (dict) --

    Contains information about storage volumes attached to MSK broker nodes.

    • EbsStorageInfo (dict) --

      EBS volume information.

      • VolumeSize (integer) --

        The size in GiB of the EBS volume for the data drive on each broker node.

type ClusterName

string

param ClusterName

[REQUIRED]

The name of the cluster.

type ConfigurationInfo

dict

param ConfigurationInfo

Comprises of the Configuration to be used on Kafka brokers in a cluster.

  • Arn (string) -- [REQUIRED]

    ARN of the configuration to use.

  • Revision (integer) -- [REQUIRED]

    The revision of the configuration to use.

type EncryptionInfo

dict

param EncryptionInfo

Includes all encryption-related information.

  • EncryptionAtRest (dict) --

    The data volume encryption details.

    • DataVolumeKMSKeyId (string) -- [REQUIRED]

      The AWS KMS key used for data encryption.

type EnhancedMonitoring

string

param EnhancedMonitoring

Specifies the level of monitoring for the MSK cluster. The possible values are DEFAULT, PER_BROKER, and PER_TOPIC_PER_BROKER.

type KafkaVersion

string

param KafkaVersion

[REQUIRED]

The version of Apache Kafka.

type NumberOfBrokerNodes

integer

param NumberOfBrokerNodes

[REQUIRED]

The number of Kafka broker nodes in the Amazon MSK cluster.

rtype

dict

returns

Response Syntax

{
    'ClusterArn': 'string',
    'ClusterName': 'string',
    'State': 'ACTIVE'|'CREATING'|'DELETING'|'FAILED'
}

Response Structure

  • (dict) --

    • ClusterArn (string) --

      The Amazon Resource Name (ARN) of the cluster.

    • ClusterName (string) --

      The name of the MSK cluster.

    • State (string) --

      The state of the cluster. The possible states are CREATING, ACTIVE, and FAILED.