KafkaConnect / Client / update_connector

update_connector

KafkaConnect.Client.update_connector(**kwargs)

Updates the specified connector. In the request body, you can update either the connector’s worker setting or its connector configuration, but not both in the same request. To update the worker setting, specify one or more of capacity, plugins, workerConfiguration, or useDefaultWorkerConfiguration. To update the connector configuration, specify only connectorConfiguration.

See also: AWS API Documentation

Request Syntax

response = client.update_connector(
    capacity={
        'autoScaling': {
            'maxWorkerCount': 123,
            'mcuCount': 123,
            'minWorkerCount': 123,
            'scaleInPolicy': {
                'cpuUtilizationPercentage': 123
            },
            'scaleOutPolicy': {
                'cpuUtilizationPercentage': 123
            },
            'maxAutoscalingTaskCount': 123
        },
        'provisionedCapacity': {
            'mcuCount': 123,
            'workerCount': 123
        }
    },
    connectorConfiguration={
        'string': 'string'
    },
    skipHealthValidation=True|False,
    connectorArn='string',
    currentVersion='string',
    plugins=[
        {
            'customPlugin': {
                'customPluginArn': 'string',
                'revision': 123
            }
        },
    ],
    workerConfiguration={
        'revision': 123,
        'workerConfigurationArn': 'string'
    },
    useDefaultWorkerConfiguration=True|False
)
Parameters:
  • capacity (dict) –

    The target capacity.

    • autoScaling (dict) –

      The target auto scaling setting.

      • maxWorkerCount (integer) – [REQUIRED]

        The target maximum number of workers allocated to the connector.

      • mcuCount (integer) – [REQUIRED]

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

      • minWorkerCount (integer) – [REQUIRED]

        The target minimum number of workers allocated to the connector.

      • scaleInPolicy (dict) – [REQUIRED]

        The target scale-in policy for the connector.

        • cpuUtilizationPercentage (integer) – [REQUIRED]

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

      • scaleOutPolicy (dict) – [REQUIRED]

        The target scale-out policy for the connector.

        • cpuUtilizationPercentage (integer) – [REQUIRED]

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

      • maxAutoscalingTaskCount (integer) –

        The maximum number of tasks allocated to the connector during autoscaling operations. Must be at least equal to maxWorkerCount.

    • provisionedCapacity (dict) –

      The target settings for provisioned capacity.

      • 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) –

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

    • (string) –

      • (string) –

  • skipHealthValidation (boolean) – Specifies whether the update bypasses connector-level and task-level health checks. If true, the update skips the health checks. The update stays in effect even if the connector or its tasks are unhealthy, and Amazon MSK Connect doesn’t roll it back. If false or not specified, the health checks run. If they fail, MSK Connect automatically rolls the connector back to its previous configuration, and the update doesn’t take effect. To update a connector that is in the PAUSED state, you must set this parameter to true.

  • connectorArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the connector that you want to update.

  • currentVersion (string) –

    [REQUIRED]

    The current version of the connector that you want to update.

  • plugins (list) –

    Warning

    Amazon MSK Connect does not currently support specifying multiple plugins as a list. To use more than one plugin for your connector, you can create a single custom plugin using a ZIP file that bundles multiple plugins together.

    Specifies which plugin to use for the connector. You must specify a single-element list containing one customPlugin object. If you don’t specify this parameter, the connector keeps its current plugin.

    • (dict) –

      A custom plugin to use when you update a connector via UpdateConnector.

      • customPlugin (dict) – [REQUIRED]

        The custom plugin to use for the connector.

        • customPluginArn (string) – [REQUIRED]

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

        • revision (integer) – [REQUIRED]

          The revision of the custom plugin.

  • workerConfiguration (dict) –

    The worker configuration to use with the connector. Specify the Amazon Resource Name (ARN) and the revision of the worker configuration. You can’t specify both workerConfiguration and useDefaultWorkerConfiguration in the same request. If you specify neither parameter, the connector keeps its current worker configuration.

    • revision (integer) – [REQUIRED]

      The revision of the worker configuration.

    • workerConfigurationArn (string) – [REQUIRED]

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

  • useDefaultWorkerConfiguration (boolean) – Specifies whether to switch the connector to the default worker configuration that Amazon MSK Connect provides. If true, the connector stops using its custom worker configuration and uses the default worker configuration instead. If false or not specified, the connector keeps its current worker configuration. You can’t specify both useDefaultWorkerConfiguration and workerConfiguration in the same request.

Return type:

dict

Returns:

Response Syntax

{
    'connectorArn': 'string',
    'connectorState': 'RUNNING'|'CREATING'|'UPDATING'|'DELETING'|'FAILED'|'PAUSED'|'RESTARTING'|'PAUSING'|'RESUMING',
    'connectorOperationArn': 'string'
}

Response Structure

  • (dict) –

    • connectorArn (string) –

      The Amazon Resource Name (ARN) of the connector.

    • connectorState (string) –

      The state of the connector.

    • connectorOperationArn (string) –

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

Exceptions