List the Amazon Redshift Serverless versions.
Parameters:
-
next_token
(Optional[PaginationToken], default:
None
)
–
If your initial ListTracksRequest operation returns a nextToken, you can include the returned nextToken in following ListTracksRequest operations, which returns results in the next page.
-
max_results
(Optional[int], default:
None
)
–
The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified MaxRecords value, a value is returned in a marker field of the response. You can retrieve the next set of records by retrying the command with the returned marker value.
Raises:
Source code in docs_src/capo_redshift_serverless/_services/redshift_serverless.py
| def list_tracks(
self,
*,
config_overrides: Optional[RedshiftServerlessClientConfig] = None,
next_token: Optional[
"capo_redshift_serverless.types.pagination_token.PaginationToken"
] = None,
max_results: Optional[int] = None,
) -> "capo_redshift_serverless.types.list_tracks_response.ListTracksResponse":
"""<p>List the Amazon Redshift Serverless versions.</p>
Args:
next_token: <p>If your initial <code>ListTracksRequest</code> operation returns a <code>nextToken</code>, you can include the returned <code>nextToken</code> in following <code>ListTracksRequest</code> operations, which returns results in the next page.</p>
max_results: <p>The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified MaxRecords value, a value is returned in a marker field of the response. You can retrieve the next set of records by retrying the command with the returned marker value.</p>
Raises:
capo_redshift_serverless.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_redshift_serverless.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
capo_redshift_serverless.errors.invalid_pagination_exception.InvalidPaginationException: <p>The provided pagination token is invalid.</p>
capo_redshift_serverless.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_redshift_serverless.errors.validation_exception.ValidationException: <p>The input failed to satisfy the constraints specified by an Amazon Web Services service.</p>
capo_redshift_serverless.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_redshift_serverless.types.list_tracks_request.ListTracksRequest]",
) -> OperationResponse[
"capo_redshift_serverless.types.list_tracks_response.ListTracksResponse"
]:
import capo_redshift_serverless._operations.redshift_serverless.list_tracks
output, http_response = (
capo_redshift_serverless._operations.redshift_serverless.list_tracks.list_tracks(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListTracks")
)
input_: capo_redshift_serverless.types.list_tracks_request.ListTracksRequest = {}
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
|