{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-msk/json-schema/amazon-msk-update-connector-request-schema.json",
  "title": "UpdateConnectorRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-msk-connectors-api-openapi.yml#/components/schemas/UpdateConnectorRequest",
  "type": "object",
  "properties": {
    "capacity": {
      "$ref": "#/$defs/CapacityUpdate"
    },
    "connectorConfiguration": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A map of keys to values that represent the configuration for the connector."
    },
    "skipHealthValidation": {
      "type": "boolean",
      "description": "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": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the connector that you want to update."
    },
    "currentVersion": {
      "type": "string",
      "description": "The current version of the connector that you want to update."
    },
    "plugins": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PluginUpdate"
      },
      "description": "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."
    },
    "workerConfiguration": {
      "$ref": "#/$defs/WorkerConfigurationUpdate"
    },
    "useDefaultWorkerConfiguration": {
      "type": "boolean",
      "description": "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."
    }
  },
  "required": [
    "connectorArn",
    "currentVersion"
  ],
  "$defs": {
    "AutoScalingUpdate": {
      "type": "object",
      "properties": {
        "maxWorkerCount": {
          "type": "integer",
          "description": "The target maximum number of workers allocated to the connector."
        },
        "mcuCount": {
          "type": "integer",
          "description": "The target number of microcontroller units (MCUs) allocated to each connector worker. The valid values are 1,2,4,8."
        },
        "minWorkerCount": {
          "type": "integer",
          "description": "The target minimum number of workers allocated to the connector."
        },
        "scaleInPolicy": {
          "$ref": "#/$defs/ScaleInPolicyUpdate"
        },
        "scaleOutPolicy": {
          "$ref": "#/$defs/ScaleOutPolicyUpdate"
        },
        "maxAutoscalingTaskCount": {
          "type": "integer",
          "description": "The maximum number of tasks allocated to the connector during autoscaling operations. Must be at least equal to maxWorkerCount."
        }
      },
      "required": [
        "maxWorkerCount",
        "mcuCount",
        "minWorkerCount",
        "scaleInPolicy",
        "scaleOutPolicy"
      ]
    },
    "CapacityUpdate": {
      "type": "object",
      "properties": {
        "autoScaling": {
          "$ref": "#/$defs/AutoScalingUpdate"
        },
        "provisionedCapacity": {
          "$ref": "#/$defs/ProvisionedCapacityUpdate"
        }
      }
    },
    "CustomPluginUpdate": {
      "type": "object",
      "properties": {
        "customPluginArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the custom plugin."
        },
        "revision": {
          "type": "integer",
          "description": "The revision of the custom plugin."
        }
      },
      "required": [
        "customPluginArn",
        "revision"
      ]
    },
    "PluginUpdate": {
      "type": "object",
      "properties": {
        "customPlugin": {
          "$ref": "#/$defs/CustomPluginUpdate"
        }
      },
      "required": [
        "customPlugin"
      ]
    },
    "ProvisionedCapacityUpdate": {
      "type": "object",
      "properties": {
        "mcuCount": {
          "type": "integer",
          "description": "The number of microcontroller units (MCUs) allocated to each connector worker. The valid values are 1,2,4,8."
        },
        "workerCount": {
          "type": "integer",
          "description": "The number of workers that are allocated to the connector."
        }
      },
      "required": [
        "mcuCount",
        "workerCount"
      ]
    },
    "ScaleInPolicyUpdate": {
      "type": "object",
      "properties": {
        "cpuUtilizationPercentage": {
          "type": "integer",
          "description": "The target CPU utilization percentage threshold at which you want connector scale in to be triggered."
        }
      },
      "required": [
        "cpuUtilizationPercentage"
      ]
    },
    "ScaleOutPolicyUpdate": {
      "type": "object",
      "properties": {
        "cpuUtilizationPercentage": {
          "type": "integer",
          "description": "The target CPU utilization percentage threshold at which you want connector scale out to be triggered."
        }
      },
      "required": [
        "cpuUtilizationPercentage"
      ]
    },
    "WorkerConfigurationUpdate": {
      "type": "object",
      "properties": {
        "revision": {
          "type": "integer",
          "description": "The revision of the worker configuration."
        },
        "workerConfigurationArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the worker configuration."
        }
      },
      "required": [
        "revision",
        "workerConfigurationArn"
      ]
    }
  }
}