Skip to main content

connectors

Creates, updates, deletes or gets a connector resource or lists connectors in a region

Overview

Nameconnectors
TypeResource
DescriptionResource Type definition for AWS::KafkaConnect::Connector
Idawscc.kafkaconnect.connectors

Fields

NameDatatypeDescription
capacityobjectInformation about the capacity allocated to the connector.
connector_arnstringAmazon Resource Name for the created Connector.
connector_configurationobjectThe configuration for the connector.
connector_descriptionstringA summary description of the connector.
connector_namestringThe name of the connector.
kafka_clusterobjectDetails of how to connect to the Kafka cluster.
kafka_cluster_client_authenticationobjectDetails of the client authentication used by the Kafka cluster.
kafka_cluster_encryption_in_transitobjectDetails of encryption in transit to the Kafka cluster.
kafka_connect_versionstringThe version of Kafka Connect. It has to be compatible with both the Kafka cluster's version and the plugins.
log_deliveryobjectDetails of what logs are delivered and where they are delivered.
pluginsarrayList of plugins to use with the connector.
service_execution_role_arnstringThe Amazon Resource Name (ARN) of the IAM role used by the connector to access Amazon S3 objects and other external resources.
tagsarrayA collection of tags associated with a resource
worker_configurationobjectThe configuration of the workers, which are the processes that run the connector logic.
regionstringAWS region.

For more information, see AWS::KafkaConnect::Connector.

Methods

NameResourceAccessible byRequired Params
create_resourceconnectorsINSERTCapacity, ConnectorConfiguration, ConnectorName, KafkaConnectVersion, KafkaCluster, KafkaClusterClientAuthentication, KafkaClusterEncryptionInTransit, Plugins, ServiceExecutionRoleArn, region
delete_resourceconnectorsDELETEIdentifier, region
update_resourceconnectorsUPDATEIdentifier, PatchDocument, region
list_resourcesconnectors_list_onlySELECTregion
get_resourceconnectorsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual connector.

SELECT
region,
capacity,
connector_arn,
connector_configuration,
connector_description,
connector_name,
kafka_cluster,
kafka_cluster_client_authentication,
kafka_cluster_encryption_in_transit,
kafka_connect_version,
log_delivery,
plugins,
service_execution_role_arn,
tags,
worker_configuration
FROM awscc.kafkaconnect.connectors
WHERE
region = '{{ region }}' AND
Identifier = '{{ connector_arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new connector resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.kafkaconnect.connectors (
Capacity,
ConnectorConfiguration,
ConnectorName,
KafkaCluster,
KafkaClusterClientAuthentication,
KafkaClusterEncryptionInTransit,
KafkaConnectVersion,
Plugins,
ServiceExecutionRoleArn,
region
)
SELECT
'{{ capacity }}',
'{{ connector_configuration }}',
'{{ connector_name }}',
'{{ kafka_cluster }}',
'{{ kafka_cluster_client_authentication }}',
'{{ kafka_cluster_encryption_in_transit }}',
'{{ kafka_connect_version }}',
'{{ plugins }}',
'{{ service_execution_role_arn }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a connector resource, using stack-deploy.

/*+ update */
UPDATE awscc.kafkaconnect.connectors
SET PatchDocument = string('{{ {
"Capacity": capacity,
"ConnectorConfiguration": connector_configuration,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ connector_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.kafkaconnect.connectors
WHERE
Identifier = '{{ connector_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the connectors resource, the following permissions are required:

kafkaconnect:CreateConnector,
kafkaconnect:DescribeConnector,
kafkaconnect:TagResource,
kafkaconnect:ListTagsForResource,
iam:CreateServiceLinkedRole,
iam:PassRole,
ec2:CreateNetworkInterface,
ec2:DescribeSecurityGroups,
ec2:DescribeSubnets,
ec2:DescribeVpcs,
logs:CreateLogDelivery,
logs:GetLogDelivery,
logs:ListLogDeliveries,
logs:PutResourcePolicy,
logs:DescribeResourcePolicies,
logs:DescribeLogGroups,
s3:GetBucketPolicy,
s3:PutBucketPolicy,
firehose:TagDeliveryStream