Returns a list of all the operations that have been performed on the specified MSK cluster.
Parameters:
-
cluster_arn
(__string)
–
The arn of the cluster whose operations are being requested.
-
max_results
(Optional[MaxResults], default:
None
)
–
The maxResults of the query.
-
next_token
(Optional[__string], default:
None
)
–
The nextToken of the query.
Raises:
Source code in docs_src/capo_kafka/_services/kafka.py
| def list_cluster_operations_v2(
self,
cluster_arn: "capo_kafka.types.__string.__string",
*,
config_overrides: Optional[KafkaClientConfig] = None,
max_results: Optional["capo_kafka.types.max_results.MaxResults"] = None,
next_token: Optional["capo_kafka.types.__string.__string"] = None,
) -> "capo_kafka.types.list_cluster_operations_v2_response.ListClusterOperationsV2Response":
"""<p>Returns a list of all the operations that have been performed on the specified MSK cluster.</p>
Args:
cluster_arn: The arn of the cluster whose operations are being requested.
max_results: The maxResults of the query.
next_token: The nextToken of the query.
Raises:
capo_kafka.errors.bad_request_exception.BadRequestException: <p>Returns information about an error.</p>
capo_kafka.errors.forbidden_exception.ForbiddenException: <p>Returns information about an error.</p>
capo_kafka.errors.internal_server_error_exception.InternalServerErrorException: <p>Returns information about an error.</p>
capo_kafka.errors.not_found_exception.NotFoundException: <p>Returns information about an error.</p>
capo_kafka.errors.service_unavailable_exception.ServiceUnavailableException: <p>Returns information about an error.</p>
capo_kafka.errors.too_many_requests_exception.TooManyRequestsException: <p>Returns information about an error.</p>
capo_kafka.errors.unauthorized_exception.UnauthorizedException: <p>Returns information about an error.</p>
capo_kafka.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_kafka.types.list_cluster_operations_v2_request.ListClusterOperationsV2Request]",
) -> OperationResponse[
"capo_kafka.types.list_cluster_operations_v2_response.ListClusterOperationsV2Response"
]:
import capo_kafka._operations.kafka.list_cluster_operations_v2
output, http_response = (
capo_kafka._operations.kafka.list_cluster_operations_v2.list_cluster_operations_v2(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListClusterOperationsV2")
)
input_: capo_kafka.types.list_cluster_operations_v2_request.ListClusterOperationsV2Request = {
"cluster_arn": cluster_arn
}
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
|