Managed Streaming for Kafka

2021/01/21 - Managed Streaming for Kafka - 1 new 2 updated api methods

Changes  Update kafka client to latest version

UpdateBrokerType (new) Link ¶

Updates EC2 instance type.

See also: AWS API Documentation

Request Syntax

client.update_broker_type(
    ClusterArn='string',
    CurrentVersion='string',
    TargetInstanceType='string'
)
type ClusterArn

string

param ClusterArn

[REQUIRED]

The Amazon Resource Name (ARN) that uniquely identifies the cluster.

type CurrentVersion

string

param CurrentVersion

[REQUIRED]

The cluster version that you want to change. After this operation completes successfully, the cluster will have a new version.

type TargetInstanceType

string

param TargetInstanceType

[REQUIRED]

The Amazon MSK broker type that you want all of the brokers in this cluster to be.

rtype

dict

returns

Response Syntax

{
    'ClusterArn': 'string',
    'ClusterOperationArn': 'string'
}

Response Structure

  • (dict) --

    Successful response.

    • ClusterArn (string) --

      The Amazon Resource Name (ARN) of the cluster.

    • ClusterOperationArn (string) --

      The Amazon Resource Name (ARN) of the cluster operation.

DescribeClusterOperation (updated) Link ¶
Changes (response)
{'ClusterOperationInfo': {'SourceClusterInfo': {'InstanceType': 'string'},
                          'TargetClusterInfo': {'InstanceType': 'string'}}}

Returns a description of the cluster operation specified by the ARN.

See also: AWS API Documentation

Request Syntax

client.describe_cluster_operation(
    ClusterOperationArn='string'
)
type ClusterOperationArn

string

param ClusterOperationArn

[REQUIRED]

The Amazon Resource Name (ARN) that uniquely identifies the MSK cluster operation.

rtype

dict

returns

Response Syntax

{
    'ClusterOperationInfo': {
        'ClientRequestId': 'string',
        'ClusterArn': 'string',
        'CreationTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1),
        'ErrorInfo': {
            'ErrorCode': 'string',
            'ErrorString': 'string'
        },
        'OperationArn': 'string',
        'OperationState': 'string',
        'OperationSteps': [
            {
                'StepInfo': {
                    'StepStatus': 'string'
                },
                'StepName': 'string'
            },
        ],
        'OperationType': 'string',
        'SourceClusterInfo': {
            'BrokerEBSVolumeInfo': [
                {
                    'KafkaBrokerNodeId': 'string',
                    'VolumeSizeGB': 123
                },
            ],
            'ConfigurationInfo': {
                'Arn': 'string',
                'Revision': 123
            },
            'NumberOfBrokerNodes': 123,
            'EnhancedMonitoring': 'DEFAULT'|'PER_BROKER'|'PER_TOPIC_PER_BROKER'|'PER_TOPIC_PER_PARTITION',
            'OpenMonitoring': {
                'Prometheus': {
                    'JmxExporter': {
                        'EnabledInBroker': True|False
                    },
                    'NodeExporter': {
                        'EnabledInBroker': True|False
                    }
                }
            },
            'KafkaVersion': 'string',
            'LoggingInfo': {
                'BrokerLogs': {
                    'CloudWatchLogs': {
                        'Enabled': True|False,
                        'LogGroup': 'string'
                    },
                    'Firehose': {
                        'DeliveryStream': 'string',
                        'Enabled': True|False
                    },
                    'S3': {
                        'Bucket': 'string',
                        'Enabled': True|False,
                        'Prefix': 'string'
                    }
                }
            },
            'InstanceType': 'string'
        },
        'TargetClusterInfo': {
            'BrokerEBSVolumeInfo': [
                {
                    'KafkaBrokerNodeId': 'string',
                    'VolumeSizeGB': 123
                },
            ],
            'ConfigurationInfo': {
                'Arn': 'string',
                'Revision': 123
            },
            'NumberOfBrokerNodes': 123,
            'EnhancedMonitoring': 'DEFAULT'|'PER_BROKER'|'PER_TOPIC_PER_BROKER'|'PER_TOPIC_PER_PARTITION',
            'OpenMonitoring': {
                'Prometheus': {
                    'JmxExporter': {
                        'EnabledInBroker': True|False
                    },
                    'NodeExporter': {
                        'EnabledInBroker': True|False
                    }
                }
            },
            'KafkaVersion': 'string',
            'LoggingInfo': {
                'BrokerLogs': {
                    'CloudWatchLogs': {
                        'Enabled': True|False,
                        'LogGroup': 'string'
                    },
                    'Firehose': {
                        'DeliveryStream': 'string',
                        'Enabled': True|False
                    },
                    'S3': {
                        'Bucket': 'string',
                        'Enabled': True|False,
                        'Prefix': 'string'
                    }
                }
            },
            'InstanceType': 'string'
        }
    }
}

Response Structure

  • (dict) --

    200 response

    • ClusterOperationInfo (dict) --

      Cluster operation information

      • ClientRequestId (string) --

        The ID of the API request that triggered this operation.

      • ClusterArn (string) --

        ARN of the cluster.

      • CreationTime (datetime) --

        The time that the operation was created.

      • EndTime (datetime) --

        The time at which the operation finished.

      • ErrorInfo (dict) --

        Describes the error if the operation fails.

        • ErrorCode (string) --

          A number describing the error programmatically.

        • ErrorString (string) --

          An optional field to provide more details about the error.

      • OperationArn (string) --

        ARN of the cluster operation.

      • OperationState (string) --

        State of the cluster operation.

      • OperationSteps (list) --

        Steps completed during the operation.

        • (dict) --

          Step taken during a cluster operation.

          • StepInfo (dict) --

            Information about the step and its status.

            • StepStatus (string) --

              The steps current status.

          • StepName (string) --

            The name of the step.

      • OperationType (string) --

        Type of the cluster operation.

      • SourceClusterInfo (dict) --

        Information about cluster attributes before a cluster is updated.

        • BrokerEBSVolumeInfo (list) --

          Specifies the size of the EBS volume and the ID of the associated broker.

          • (dict) --

            Specifies the EBS volume upgrade information. The broker identifier must be set to the keyword ALL. This means the changes apply to all the brokers in the cluster.

            • KafkaBrokerNodeId (string) --

              The ID of the broker to update.

            • VolumeSizeGB (integer) --

              Size of the EBS volume to update.

        • ConfigurationInfo (dict) --

          Information about the changes in the configuration of the brokers.

          • Arn (string) --

            ARN of the configuration to use.

          • Revision (integer) --

            The revision of the configuration to use.

        • NumberOfBrokerNodes (integer) --

          The number of broker nodes in the cluster.

        • EnhancedMonitoring (string) --

          Specifies which Apache Kafka metrics Amazon MSK gathers and sends to Amazon CloudWatch for this cluster.

        • OpenMonitoring (dict) --

          The settings for open monitoring.

          • Prometheus (dict) --

            Prometheus settings.

            • JmxExporter (dict) --

              Indicates whether you want to enable or disable the JMX Exporter.

              • EnabledInBroker (boolean) --

                Indicates whether you want to enable or disable the JMX Exporter.

            • NodeExporter (dict) --

              Indicates whether you want to enable or disable the Node Exporter.

              • EnabledInBroker (boolean) --

                Indicates whether you want to enable or disable the Node Exporter.

        • KafkaVersion (string) --

          The Kafka version.

        • LoggingInfo (dict) --

          • BrokerLogs (dict) --

            • CloudWatchLogs (dict) --

              • Enabled (boolean) --

              • LogGroup (string) --

            • Firehose (dict) --

              • DeliveryStream (string) --

              • Enabled (boolean) --

            • S3 (dict) --

              • Bucket (string) --

              • Enabled (boolean) --

              • Prefix (string) --

        • InstanceType (string) --

          Information about the Amazon MSK broker type.

      • TargetClusterInfo (dict) --

        Information about cluster attributes after a cluster is updated.

        • BrokerEBSVolumeInfo (list) --

          Specifies the size of the EBS volume and the ID of the associated broker.

          • (dict) --

            Specifies the EBS volume upgrade information. The broker identifier must be set to the keyword ALL. This means the changes apply to all the brokers in the cluster.

            • KafkaBrokerNodeId (string) --

              The ID of the broker to update.

            • VolumeSizeGB (integer) --

              Size of the EBS volume to update.

        • ConfigurationInfo (dict) --

          Information about the changes in the configuration of the brokers.

          • Arn (string) --

            ARN of the configuration to use.

          • Revision (integer) --

            The revision of the configuration to use.

        • NumberOfBrokerNodes (integer) --

          The number of broker nodes in the cluster.

        • EnhancedMonitoring (string) --

          Specifies which Apache Kafka metrics Amazon MSK gathers and sends to Amazon CloudWatch for this cluster.

        • OpenMonitoring (dict) --

          The settings for open monitoring.

          • Prometheus (dict) --

            Prometheus settings.

            • JmxExporter (dict) --

              Indicates whether you want to enable or disable the JMX Exporter.

              • EnabledInBroker (boolean) --

                Indicates whether you want to enable or disable the JMX Exporter.

            • NodeExporter (dict) --

              Indicates whether you want to enable or disable the Node Exporter.

              • EnabledInBroker (boolean) --

                Indicates whether you want to enable or disable the Node Exporter.

        • KafkaVersion (string) --

          The Kafka version.

        • LoggingInfo (dict) --

          • BrokerLogs (dict) --

            • CloudWatchLogs (dict) --

              • Enabled (boolean) --

              • LogGroup (string) --

            • Firehose (dict) --

              • DeliveryStream (string) --

              • Enabled (boolean) --

            • S3 (dict) --

              • Bucket (string) --

              • Enabled (boolean) --

              • Prefix (string) --

        • InstanceType (string) --

          Information about the Amazon MSK broker type.

ListClusterOperations (updated) Link ¶
Changes (response)
{'ClusterOperationInfoList': {'SourceClusterInfo': {'InstanceType': 'string'},
                              'TargetClusterInfo': {'InstanceType': 'string'}}}

Returns a list of all the operations that have been performed on the specified MSK cluster.

See also: AWS API Documentation

Request Syntax

client.list_cluster_operations(
    ClusterArn='string',
    MaxResults=123,
    NextToken='string'
)
type ClusterArn

string

param ClusterArn

[REQUIRED]

The Amazon Resource Name (ARN) that uniquely identifies the cluster.

type MaxResults

integer

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

{
    'ClusterOperationInfoList': [
        {
            'ClientRequestId': 'string',
            'ClusterArn': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1),
            'ErrorInfo': {
                'ErrorCode': 'string',
                'ErrorString': 'string'
            },
            'OperationArn': 'string',
            'OperationState': 'string',
            'OperationSteps': [
                {
                    'StepInfo': {
                        'StepStatus': 'string'
                    },
                    'StepName': 'string'
                },
            ],
            'OperationType': 'string',
            'SourceClusterInfo': {
                'BrokerEBSVolumeInfo': [
                    {
                        'KafkaBrokerNodeId': 'string',
                        'VolumeSizeGB': 123
                    },
                ],
                'ConfigurationInfo': {
                    'Arn': 'string',
                    'Revision': 123
                },
                'NumberOfBrokerNodes': 123,
                'EnhancedMonitoring': 'DEFAULT'|'PER_BROKER'|'PER_TOPIC_PER_BROKER'|'PER_TOPIC_PER_PARTITION',
                'OpenMonitoring': {
                    'Prometheus': {
                        'JmxExporter': {
                            'EnabledInBroker': True|False
                        },
                        'NodeExporter': {
                            'EnabledInBroker': True|False
                        }
                    }
                },
                'KafkaVersion': 'string',
                'LoggingInfo': {
                    'BrokerLogs': {
                        'CloudWatchLogs': {
                            'Enabled': True|False,
                            'LogGroup': 'string'
                        },
                        'Firehose': {
                            'DeliveryStream': 'string',
                            'Enabled': True|False
                        },
                        'S3': {
                            'Bucket': 'string',
                            'Enabled': True|False,
                            'Prefix': 'string'
                        }
                    }
                },
                'InstanceType': 'string'
            },
            'TargetClusterInfo': {
                'BrokerEBSVolumeInfo': [
                    {
                        'KafkaBrokerNodeId': 'string',
                        'VolumeSizeGB': 123
                    },
                ],
                'ConfigurationInfo': {
                    'Arn': 'string',
                    'Revision': 123
                },
                'NumberOfBrokerNodes': 123,
                'EnhancedMonitoring': 'DEFAULT'|'PER_BROKER'|'PER_TOPIC_PER_BROKER'|'PER_TOPIC_PER_PARTITION',
                'OpenMonitoring': {
                    'Prometheus': {
                        'JmxExporter': {
                            'EnabledInBroker': True|False
                        },
                        'NodeExporter': {
                            'EnabledInBroker': True|False
                        }
                    }
                },
                'KafkaVersion': 'string',
                'LoggingInfo': {
                    'BrokerLogs': {
                        'CloudWatchLogs': {
                            'Enabled': True|False,
                            'LogGroup': 'string'
                        },
                        'Firehose': {
                            'DeliveryStream': 'string',
                            'Enabled': True|False
                        },
                        'S3': {
                            'Bucket': 'string',
                            'Enabled': True|False,
                            'Prefix': 'string'
                        }
                    }
                },
                'InstanceType': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Successful response.

    • ClusterOperationInfoList (list) --

      An array of cluster operation information objects.

      • (dict) --

        Returns information about a cluster operation.

        • ClientRequestId (string) --

          The ID of the API request that triggered this operation.

        • ClusterArn (string) --

          ARN of the cluster.

        • CreationTime (datetime) --

          The time that the operation was created.

        • EndTime (datetime) --

          The time at which the operation finished.

        • ErrorInfo (dict) --

          Describes the error if the operation fails.

          • ErrorCode (string) --

            A number describing the error programmatically.

          • ErrorString (string) --

            An optional field to provide more details about the error.

        • OperationArn (string) --

          ARN of the cluster operation.

        • OperationState (string) --

          State of the cluster operation.

        • OperationSteps (list) --

          Steps completed during the operation.

          • (dict) --

            Step taken during a cluster operation.

            • StepInfo (dict) --

              Information about the step and its status.

              • StepStatus (string) --

                The steps current status.

            • StepName (string) --

              The name of the step.

        • OperationType (string) --

          Type of the cluster operation.

        • SourceClusterInfo (dict) --

          Information about cluster attributes before a cluster is updated.

          • BrokerEBSVolumeInfo (list) --

            Specifies the size of the EBS volume and the ID of the associated broker.

            • (dict) --

              Specifies the EBS volume upgrade information. The broker identifier must be set to the keyword ALL. This means the changes apply to all the brokers in the cluster.

              • KafkaBrokerNodeId (string) --

                The ID of the broker to update.

              • VolumeSizeGB (integer) --

                Size of the EBS volume to update.

          • ConfigurationInfo (dict) --

            Information about the changes in the configuration of the brokers.

            • Arn (string) --

              ARN of the configuration to use.

            • Revision (integer) --

              The revision of the configuration to use.

          • NumberOfBrokerNodes (integer) --

            The number of broker nodes in the cluster.

          • EnhancedMonitoring (string) --

            Specifies which Apache Kafka metrics Amazon MSK gathers and sends to Amazon CloudWatch for this cluster.

          • OpenMonitoring (dict) --

            The settings for open monitoring.

            • Prometheus (dict) --

              Prometheus settings.

              • JmxExporter (dict) --

                Indicates whether you want to enable or disable the JMX Exporter.

                • EnabledInBroker (boolean) --

                  Indicates whether you want to enable or disable the JMX Exporter.

              • NodeExporter (dict) --

                Indicates whether you want to enable or disable the Node Exporter.

                • EnabledInBroker (boolean) --

                  Indicates whether you want to enable or disable the Node Exporter.

          • KafkaVersion (string) --

            The Kafka version.

          • LoggingInfo (dict) --

            • BrokerLogs (dict) --

              • CloudWatchLogs (dict) --

                • Enabled (boolean) --

                • LogGroup (string) --

              • Firehose (dict) --

                • DeliveryStream (string) --

                • Enabled (boolean) --

              • S3 (dict) --

                • Bucket (string) --

                • Enabled (boolean) --

                • Prefix (string) --

          • InstanceType (string) --

            Information about the Amazon MSK broker type.

        • TargetClusterInfo (dict) --

          Information about cluster attributes after a cluster is updated.

          • BrokerEBSVolumeInfo (list) --

            Specifies the size of the EBS volume and the ID of the associated broker.

            • (dict) --

              Specifies the EBS volume upgrade information. The broker identifier must be set to the keyword ALL. This means the changes apply to all the brokers in the cluster.

              • KafkaBrokerNodeId (string) --

                The ID of the broker to update.

              • VolumeSizeGB (integer) --

                Size of the EBS volume to update.

          • ConfigurationInfo (dict) --

            Information about the changes in the configuration of the brokers.

            • Arn (string) --

              ARN of the configuration to use.

            • Revision (integer) --

              The revision of the configuration to use.

          • NumberOfBrokerNodes (integer) --

            The number of broker nodes in the cluster.

          • EnhancedMonitoring (string) --

            Specifies which Apache Kafka metrics Amazon MSK gathers and sends to Amazon CloudWatch for this cluster.

          • OpenMonitoring (dict) --

            The settings for open monitoring.

            • Prometheus (dict) --

              Prometheus settings.

              • JmxExporter (dict) --

                Indicates whether you want to enable or disable the JMX Exporter.

                • EnabledInBroker (boolean) --

                  Indicates whether you want to enable or disable the JMX Exporter.

              • NodeExporter (dict) --

                Indicates whether you want to enable or disable the Node Exporter.

                • EnabledInBroker (boolean) --

                  Indicates whether you want to enable or disable the Node Exporter.

          • KafkaVersion (string) --

            The Kafka version.

          • LoggingInfo (dict) --

            • BrokerLogs (dict) --

              • CloudWatchLogs (dict) --

                • Enabled (boolean) --

                • LogGroup (string) --

              • Firehose (dict) --

                • DeliveryStream (string) --

                • Enabled (boolean) --

              • S3 (dict) --

                • Bucket (string) --

                • Enabled (boolean) --

                • Prefix (string) --

          • InstanceType (string) --

            Information about the Amazon MSK broker type.

    • NextToken (string) --

      If the response of ListClusterOperations is truncated, it returns a NextToken in the response. This Nexttoken should be sent in the subsequent request to ListClusterOperations.