Returns information about provisioned Amazon DocumentDB elastic clusters.
Parameters:
-
next_token
(Optional[PaginationToken], default:
None
)
–
A pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond this token, up to the value specified by max-results.
If there is no more data in the responce, the nextToken will not be returned.
-
max_results
(Optional[int], default:
None
)
–
The maximum number of elastic cluster snapshot results to receive in the response.
Raises:
Source code in docs_src/capo_docdb_elastic/_services/doc_db_elastic.py
| def list_clusters(
self,
*,
config_overrides: Optional[DocDBElasticClientConfig] = None,
next_token: Optional[
"capo_docdb_elastic.types.pagination_token.PaginationToken"
] = None,
max_results: Optional[int] = None,
) -> "capo_docdb_elastic.types.list_clusters_output.ListClustersOutput":
"""<p>Returns information about provisioned Amazon DocumentDB elastic clusters.</p>
Args:
next_token: <p>A pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond this token, up to the value specified by <code>max-results</code>.</p> <p>If there is no more data in the responce, the <code>nextToken</code> will not be returned.</p>
max_results: <p>The maximum number of elastic cluster snapshot results to receive in the response.</p>
Raises:
capo_docdb_elastic.errors.access_denied_exception.AccessDeniedException: <p>An exception that occurs when there are not sufficient permissions to perform an action.</p>
capo_docdb_elastic.errors.internal_server_exception.InternalServerException: <p>There was an internal server error.</p>
capo_docdb_elastic.errors.throttling_exception.ThrottlingException: <p>ThrottlingException will be thrown when request was denied due to request throttling.</p>
capo_docdb_elastic.errors.validation_exception.ValidationException: <p>A structure defining a validation exception.</p>
capo_docdb_elastic.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_docdb_elastic.types.list_clusters_input.ListClustersInput]",
) -> OperationResponse[
"capo_docdb_elastic.types.list_clusters_output.ListClustersOutput"
]:
import capo_docdb_elastic._operations.chimera_db_lionfish_service_lambda.list_clusters
output, http_response = (
capo_docdb_elastic._operations.chimera_db_lionfish_service_lambda.list_clusters.list_clusters(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListClusters")
)
input_: capo_docdb_elastic.types.list_clusters_input.ListClustersInput = {}
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|