connectors
Creates, updates, deletes, gets or lists a connectors
resource.
Overview
Name | connectors |
Type | Resource |
Id | google.managedkafka.connectors |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The name of the connector. Structured like: projects/{project}/locations/{location}/connectClusters/{connect_cluster}/connectors/{connector} |
configs | object | Optional. Connector config as keys/values. The keys of the map are connector property names, for example: connector.class , tasks.max , key.converter . |
state | string | Output only. The current state of the connector. |
taskRestartPolicy | object | Optional. Restarts the individual tasks of a Connector. (id: TaskRetryPolicy) |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The name of the connector. Structured like: projects/{project}/locations/{location}/connectClusters/{connect_cluster}/connectors/{connector} |
configs | object | Optional. Connector config as keys/values. The keys of the map are connector property names, for example: connector.class , tasks.max , key.converter . |
state | string | Output only. The current state of the connector. |
taskRestartPolicy | object | Optional. Restarts the individual tasks of a Connector. (id: TaskRetryPolicy) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , connectClustersId , connectorsId | Returns the properties of a single connector. | |
list | select | projectsId , locationsId , connectClustersId | pageSize , pageToken | Lists the connectors in a given Connect cluster. |
create | insert | projectsId , locationsId , connectClustersId | connectorId | Creates a new connector in a given Connect cluster. |
patch | update | projectsId , locationsId , connectClustersId , connectorsId | updateMask | Updates the properties of a connector. |
delete | delete | projectsId , locationsId , connectClustersId , connectorsId | Deletes a connector. | |
pause | exec | projectsId , locationsId , connectClustersId , connectorsId | Pauses the connector and its tasks. | |
resume | exec | projectsId , locationsId , connectClustersId , connectorsId | Resumes the connector and its tasks. | |
restart | exec | projectsId , locationsId , connectClustersId , connectorsId | Restarts the connector. | |
stop | exec | projectsId , locationsId , connectClustersId , connectorsId | Stops the connector. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
connectClustersId | string | |
connectorsId | string | |
locationsId | string | |
projectsId | string | |
connectorId | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Returns the properties of a single connector.
SELECT
name,
configs,
state,
taskRestartPolicy
FROM google.managedkafka.connectors
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND connectClustersId = '{{ connectClustersId }}' -- required
AND connectorsId = '{{ connectorsId }}' -- required;
Lists the connectors in a given Connect cluster.
SELECT
name,
configs,
state,
taskRestartPolicy
FROM google.managedkafka.connectors
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND connectClustersId = '{{ connectClustersId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- create
- Manifest
Creates a new connector in a given Connect cluster.
INSERT INTO google.managedkafka.connectors (
data__taskRestartPolicy,
data__name,
data__configs,
projectsId,
locationsId,
connectClustersId,
connectorId
)
SELECT
'{{ taskRestartPolicy }}',
'{{ name }}',
'{{ configs }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ connectClustersId }}',
'{{ connectorId }}'
RETURNING
name,
configs,
state,
taskRestartPolicy
;
# Description fields are for documentation purposes
- name: connectors
props:
- name: projectsId
value: string
description: Required parameter for the connectors resource.
- name: locationsId
value: string
description: Required parameter for the connectors resource.
- name: connectClustersId
value: string
description: Required parameter for the connectors resource.
- name: taskRestartPolicy
value: object
description: >
Optional. Restarts the individual tasks of a Connector.
- name: name
value: string
description: >
Identifier. The name of the connector. Structured like: projects/{project}/locations/{location}/connectClusters/{connect_cluster}/connectors/{connector}
- name: configs
value: object
description: >
Optional. Connector config as keys/values. The keys of the map are connector property names, for example: `connector.class`, `tasks.max`, `key.converter`.
- name: connectorId
value: string
UPDATE
examples
- patch
Updates the properties of a connector.
UPDATE google.managedkafka.connectors
SET
data__taskRestartPolicy = '{{ taskRestartPolicy }}',
data__name = '{{ name }}',
data__configs = '{{ configs }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectClustersId = '{{ connectClustersId }}' --required
AND connectorsId = '{{ connectorsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
configs,
state,
taskRestartPolicy;
DELETE
examples
- delete
Deletes a connector.
DELETE FROM google.managedkafka.connectors
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectClustersId = '{{ connectClustersId }}' --required
AND connectorsId = '{{ connectorsId }}' --required;
Lifecycle Methods
- pause
- resume
- restart
- stop
Pauses the connector and its tasks.
EXEC google.managedkafka.connectors.pause
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@connectClustersId='{{ connectClustersId }}' --required,
@connectorsId='{{ connectorsId }}' --required;
Resumes the connector and its tasks.
EXEC google.managedkafka.connectors.resume
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@connectClustersId='{{ connectClustersId }}' --required,
@connectorsId='{{ connectorsId }}' --required;
Restarts the connector.
EXEC google.managedkafka.connectors.restart
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@connectClustersId='{{ connectClustersId }}' --required,
@connectorsId='{{ connectorsId }}' --required;
Stops the connector.
EXEC google.managedkafka.connectors.stop
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@connectClustersId='{{ connectClustersId }}' --required,
@connectorsId='{{ connectorsId }}' --required;