Returns a list of all the connectors in this account and Region. The list is limited to connectors whose name starts with the specified prefix. The response also includes a description of each of the listed connectors.
Parameters:
-
connector_name_prefix
(Optional[__string], default:
None
)
–
The name prefix that you want to use to search for and list connectors.
-
max_results
(Optional[MaxResults], default:
None
)
–
The maximum number of connectors to list in one response.
-
next_token
(Optional[__string], default:
None
)
–
If the response of a ListConnectors operation is truncated, it will include a NextToken. Send this NextToken in a subsequent request to continue listing from where the previous operation left off.
Raises:
-
BadRequestException
–
HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it.
-
ForbiddenException
–
HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request.
-
InternalServerErrorException
–
HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue.
-
NotFoundException
–
HTTP Status Code 404: Resource not found due to incorrect input. Correct your request and then retry it.
-
ServiceUnavailableException
–
HTTP Status Code 503: Service Unavailable. Retrying your request in some time might resolve the issue.
-
TooManyRequestsException
–
HTTP Status Code 429: Limit exceeded. Resource limit reached.
-
UnauthorizedException
–
HTTP Status Code 401: Unauthorized request. The provided credentials couldn't be validated.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_kafkaconnect/_services/kafka_connect.py
| def list_connectors(
self,
*,
config_overrides: Optional[KafkaConnectClientConfig] = None,
connector_name_prefix: Optional[
"capo_kafkaconnect.types.__string.__string"
] = None,
max_results: Optional["capo_kafkaconnect.types.max_results.MaxResults"] = None,
next_token: Optional["capo_kafkaconnect.types.__string.__string"] = None,
) -> "capo_kafkaconnect.types.list_connectors_response.ListConnectorsResponse":
"""<p>Returns a list of all the connectors in this account and Region. The list is limited to connectors whose name starts with the specified prefix. The response also includes a description of each of the listed connectors.</p>
Args:
connector_name_prefix: <p>The name prefix that you want to use to search for and list connectors.</p>
max_results: <p>The maximum number of connectors to list in one response.</p>
next_token: <p>If the response of a ListConnectors operation is truncated, it will include a NextToken. Send this NextToken in a subsequent request to continue listing from where the previous operation left off.</p>
Raises:
capo_kafkaconnect.errors.bad_request_exception.BadRequestException: <p>HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it.</p>
capo_kafkaconnect.errors.forbidden_exception.ForbiddenException: <p>HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request.</p>
capo_kafkaconnect.errors.internal_server_error_exception.InternalServerErrorException: <p>HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue.</p>
capo_kafkaconnect.errors.not_found_exception.NotFoundException: <p>HTTP Status Code 404: Resource not found due to incorrect input. Correct your request and then retry it.</p>
capo_kafkaconnect.errors.service_unavailable_exception.ServiceUnavailableException: <p>HTTP Status Code 503: Service Unavailable. Retrying your request in some time might resolve the issue.</p>
capo_kafkaconnect.errors.too_many_requests_exception.TooManyRequestsException: <p>HTTP Status Code 429: Limit exceeded. Resource limit reached.</p>
capo_kafkaconnect.errors.unauthorized_exception.UnauthorizedException: <p>HTTP Status Code 401: Unauthorized request. The provided credentials couldn't be validated.</p>
capo_kafkaconnect.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_kafkaconnect.types.list_connectors_request.ListConnectorsRequest]",
) -> OperationResponse[
"capo_kafkaconnect.types.list_connectors_response.ListConnectorsResponse"
]:
import capo_kafkaconnect._operations.kafka_connect.list_connectors
output, http_response = (
capo_kafkaconnect._operations.kafka_connect.list_connectors.list_connectors(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListConnectors")
)
input_: capo_kafkaconnect.types.list_connectors_request.ListConnectorsRequest = {}
if connector_name_prefix is not None:
input_["connector_name_prefix"] = connector_name_prefix
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|