CreateConnector
Creates a connector using the specified properties.
Request Syntax
POST /v1/connectors HTTP/1.1
Content-type: application/json
{
"capacity": {
"autoScaling": {
"maxWorkerCount": number
,
"mcuCount": number
,
"minWorkerCount": number
,
"scaleInPolicy": {
"cpuUtilizationPercentage": number
},
"scaleOutPolicy": {
"cpuUtilizationPercentage": number
}
},
"provisionedCapacity": {
"mcuCount": number
,
"workerCount": number
}
},
"connectorConfiguration": {
"string
" : "string
"
},
"connectorDescription": "string
",
"connectorName": "string
",
"kafkaCluster": {
"apacheKafkaCluster": {
"bootstrapServers": "string
",
"vpc": {
"securityGroups": [ "string
" ],
"subnets": [ "string
" ]
}
}
},
"kafkaClusterClientAuthentication": {
"authenticationType": "string
"
},
"kafkaClusterEncryptionInTransit": {
"encryptionType": "string
"
},
"kafkaConnectVersion": "string
",
"logDelivery": {
"workerLogDelivery": {
"cloudWatchLogs": {
"enabled": boolean
,
"logGroup": "string
"
},
"firehose": {
"deliveryStream": "string
",
"enabled": boolean
},
"s3": {
"bucket": "string
",
"enabled": boolean
,
"prefix": "string
"
}
}
},
"plugins": [
{
"customPlugin": {
"customPluginArn": "string
",
"revision": number
}
}
],
"serviceExecutionRoleArn": "string
",
"tags": {
"string
" : "string
"
},
"workerConfiguration": {
"revision": number
,
"workerConfigurationArn": "string
"
}
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- capacity
-
Information about the capacity allocated to the connector. Exactly one of the two properties must be specified.
Type: Capacity object
Required: Yes
- connectorConfiguration
-
A map of keys to values that represent the configuration for the connector.
Type: String to string map
Required: Yes
- connectorDescription
-
A summary description of the connector.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 1024.
Required: No
- connectorName
-
The name of the connector.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Required: Yes
- kafkaCluster
-
Specifies which Apache Kafka cluster to connect to.
Type: KafkaCluster object
Required: Yes
- kafkaClusterClientAuthentication
-
Details of the client authentication used by the Apache Kafka cluster.
Type: KafkaClusterClientAuthentication object
Required: Yes
- kafkaClusterEncryptionInTransit
-
Details of encryption in transit to the Apache Kafka cluster.
Type: KafkaClusterEncryptionInTransit object
Required: Yes
- kafkaConnectVersion
-
The version of Kafka Connect. It has to be compatible with both the Apache Kafka cluster's version and the plugins.
Type: String
Required: Yes
- logDelivery
-
Details about log delivery.
Type: LogDelivery object
Required: No
- plugins
-
Important
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.Type: Array of Plugin objects
Required: Yes
- serviceExecutionRoleArn
-
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.
Type: String
Required: Yes
-
The tags you want to attach to the connector.
Type: String to string map
Map Entries: Minimum number of 0 items. Maximum number of 200 items.
Key Length Constraints: Minimum length of 1. Maximum length of 128.
Value Length Constraints: Minimum length of 0. Maximum length of 256.
Required: No
- workerConfiguration
-
Specifies which worker configuration to use with the connector.
Type: WorkerConfiguration object
Required: No
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"connectorArn": "string",
"connectorName": "string",
"connectorState": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- connectorArn
-
The Amazon Resource Name (ARN) that Amazon assigned to the connector.
Type: String
- connectorName
-
The name of the connector.
Type: String
- connectorState
-
The state of the connector.
Type: String
Valid Values:
RUNNING | CREATING | UPDATING | DELETING | FAILED
Errors
For information about the errors that are common to all actions, see Common Errors.
- BadRequestException
-
HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it.
HTTP Status Code: 400
- ConflictException
-
HTTP Status Code 409: Conflict. A resource with this name already exists. Retry your request with another name.
HTTP Status Code: 409
- ForbiddenException
-
HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request.
HTTP Status Code: 403
- InternalServerErrorException
-
HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue.
HTTP Status Code: 500
- NotFoundException
-
HTTP Status Code 404: Resource not found due to incorrect input. Correct your request and then retry it.
HTTP Status Code: 404
- ServiceUnavailableException
-
HTTP Status Code 503: Service Unavailable. Retrying your request in some time might resolve the issue.
HTTP Status Code: 503
- TooManyRequestsException
-
HTTP Status Code 429: Limit exceeded. Resource limit reached.
HTTP Status Code: 429
- UnauthorizedException
-
HTTP Status Code 401: Unauthorized request. The provided credentials couldn't be validated.
HTTP Status Code: 401
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: