create_connector

create_connector(**kwargs)

Creates a connector using the specified properties.

See also: AWS API Documentation

Request Syntax

response = client.create_connector(
    capacity={
        'autoScaling': {
            'maxWorkerCount': 123,
            'mcuCount': 123,
            'minWorkerCount': 123,
            'scaleInPolicy': {
                'cpuUtilizationPercentage': 123
            },
            'scaleOutPolicy': {
                'cpuUtilizationPercentage': 123
            }
        },
        'provisionedCapacity': {
            'mcuCount': 123,
            'workerCount': 123
        }
    },
    connectorConfiguration={
        'string': 'string'
    },
    connectorDescription='string',
    connectorName='string',
    kafkaCluster={
        'apacheKafkaCluster': {
            'bootstrapServers': 'string',
            'vpc': {
                'securityGroups': [
                    'string',
                ],
                'subnets': [
                    'string',
                ]
            }
        }
    },
    kafkaClusterClientAuthentication={
        'authenticationType': 'NONE'|'IAM'
    },
    kafkaClusterEncryptionInTransit={
        'encryptionType': 'PLAINTEXT'|'TLS'
    },
    kafkaConnectVersion='string',
    logDelivery={
        'workerLogDelivery': {
            'cloudWatchLogs': {
                'enabled': True|False,
                'logGroup': 'string'
            },
            'firehose': {
                'deliveryStream': 'string',
                'enabled': True|False
            },
            's3': {
                'bucket': 'string',
                'enabled': True|False,
                'prefix': 'string'
            }
        }
    },
    plugins=[
        {
            'customPlugin': {
                'customPluginArn': 'string',
                'revision': 123
            }
        },
    ],
    serviceExecutionRoleArn='string',
    workerConfiguration={
        'revision': 123,
        'workerConfigurationArn': 'string'
    }
)
Parameters
  • capacity (dict) --

    [REQUIRED]

    Information about the capacity allocated to the connector. Exactly one of the two properties must be specified.

    • autoScaling (dict) --

      Information about the auto scaling parameters for the connector.

      • maxWorkerCount (integer) -- [REQUIRED]

        The maximum number of workers allocated to the connector.

      • mcuCount (integer) -- [REQUIRED]

        The number of microcontroller units (MCUs) allocated to each connector worker. The valid values are 1,2,4,8.

      • minWorkerCount (integer) -- [REQUIRED]

        The minimum number of workers allocated to the connector.

      • scaleInPolicy (dict) --

        The sacle-in policy for the connector.

        • cpuUtilizationPercentage (integer) -- [REQUIRED]

          Specifies the CPU utilization percentage threshold at which you want connector scale in to be triggered.

      • scaleOutPolicy (dict) --

        The sacle-out policy for the connector.

        • cpuUtilizationPercentage (integer) -- [REQUIRED]

          The CPU utilization percentage threshold at which you want connector scale out to be triggered.

    • provisionedCapacity (dict) --

      Details about a fixed capacity allocated to a connector.

      • mcuCount (integer) -- [REQUIRED]

        The number of microcontroller units (MCUs) allocated to each connector worker. The valid values are 1,2,4,8.

      • workerCount (integer) -- [REQUIRED]

        The number of workers that are allocated to the connector.

  • connectorConfiguration (dict) --

    [REQUIRED]

    A map of keys to values that represent the configuration for the connector.

    • (string) --
      • (string) --
  • connectorDescription (string) -- A summary description of the connector.
  • connectorName (string) --

    [REQUIRED]

    The name of the connector.

  • kafkaCluster (dict) --

    [REQUIRED]

    Specifies which Apache Kafka cluster to connect to.

    • apacheKafkaCluster (dict) -- [REQUIRED]

      The Apache Kafka cluster to which the connector is connected.

      • bootstrapServers (string) -- [REQUIRED]

        The bootstrap servers of the cluster.

      • vpc (dict) -- [REQUIRED]

        Details of an Amazon VPC which has network connectivity to the Apache Kafka cluster.

        • securityGroups (list) --

          The security groups for the connector.

          • (string) --
        • subnets (list) -- [REQUIRED]

          The subnets for the connector.

          • (string) --
  • kafkaClusterClientAuthentication (dict) --

    [REQUIRED]

    Details of the client authentication used by the Apache Kafka cluster.

    • authenticationType (string) -- [REQUIRED]

      The type of client authentication used to connect to the Apache Kafka cluster. Value NONE means that no client authentication is used.

  • kafkaClusterEncryptionInTransit (dict) --

    [REQUIRED]

    Details of encryption in transit to the Apache Kafka cluster.

    • encryptionType (string) -- [REQUIRED]

      The type of encryption in transit to the Apache Kafka cluster.

  • kafkaConnectVersion (string) --

    [REQUIRED]

    The version of Kafka Connect. It has to be compatible with both the Apache Kafka cluster's version and the plugins.

  • logDelivery (dict) --

    Details about log delivery.

    • workerLogDelivery (dict) -- [REQUIRED]

      The workers can send worker logs to different destination types. This configuration specifies the details of these destinations.

      • cloudWatchLogs (dict) --

        Details about delivering logs to Amazon CloudWatch Logs.

        • enabled (boolean) -- [REQUIRED]

          Whether log delivery to Amazon CloudWatch Logs is enabled.

        • logGroup (string) --

          The name of the CloudWatch log group that is the destination for log delivery.

      • firehose (dict) --

        Details about delivering logs to Amazon Kinesis Data Firehose.

        • deliveryStream (string) --

          The name of the Kinesis Data Firehose delivery stream that is the destination for log delivery.

        • enabled (boolean) -- [REQUIRED]

          Specifies whether connector logs get delivered to Amazon Kinesis Data Firehose.

      • s3 (dict) --

        Details about delivering logs to Amazon S3.

        • bucket (string) --

          The name of the S3 bucket that is the destination for log delivery.

        • enabled (boolean) -- [REQUIRED]

          Specifies whether connector logs get sent to the specified Amazon S3 destination.

        • prefix (string) --

          The S3 prefix that is the destination for log delivery.

  • plugins (list) --

    [REQUIRED]

    Specifies which plugins to use for the connector.

    • (dict) --

      A plugin is an AWS resource that contains the code that defines your connector logic.

      • customPlugin (dict) -- [REQUIRED]

        Details about a custom plugin.

        • customPluginArn (string) -- [REQUIRED]

          The Amazon Resource Name (ARN) of the custom plugin.

        • revision (integer) -- [REQUIRED]

          The revision of the custom plugin.

  • serviceExecutionRoleArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the IAM role used by the connector to access the Amazon Web Services resources that it needs. The types of resources depends on the logic of the connector. For example, a connector that has Amazon S3 as a destination must have permissions that allow it to write to the S3 destination bucket.

  • workerConfiguration (dict) --

    Specifies which worker configuration to use with the connector.

    • revision (integer) -- [REQUIRED]

      The revision of the worker configuration.

    • workerConfigurationArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the worker configuration.

Return type

dict

Returns

Response Syntax

{
    'connectorArn': 'string',
    'connectorName': 'string',
    'connectorState': 'RUNNING'|'CREATING'|'UPDATING'|'DELETING'|'FAILED'
}

Response Structure

  • (dict) --

    • connectorArn (string) --

      The Amazon Resource Name (ARN) that Amazon assigned to the connector.

    • connectorName (string) --

      The name of the connector.

    • connectorState (string) --

      The state of the connector.

Exceptions

  • KafkaConnect.Client.exceptions.NotFoundException
  • KafkaConnect.Client.exceptions.ConflictException
  • KafkaConnect.Client.exceptions.BadRequestException
  • KafkaConnect.Client.exceptions.ForbiddenException
  • KafkaConnect.Client.exceptions.ServiceUnavailableException
  • KafkaConnect.Client.exceptions.TooManyRequestsException
  • KafkaConnect.Client.exceptions.UnauthorizedException
  • KafkaConnect.Client.exceptions.InternalServerErrorException