Lists the released versions of an extension, newest first, optionally filtered by a version selector.
Parameters:
-
identifier
(ExtensionId)
–
The id of the extension whose versions to list.
-
version_selector
(Optional[SemanticVersionSelector], default:
None
)
–
Optional selector that limits the results to matching versions, such as 1.x.x.
-
max_results
(Optional[MaxResults], default:
None
)
–
The maximum number of versions to return in one page.
-
next_token
(Optional[NextToken], default:
None
)
–
The token returned by a previous call, to retrieve the next page of results.
Raises:
-
AccessDeniedException
–
The caller does not have permission to perform the operation.
-
InternalServerException
–
The service couldn't process the request because of an internal error. Retry with capped exponential backoff and jitter.
-
ThrottlingException
–
The request rate exceeded a limit. Retry with capped exponential backoff and jitter.
-
ResourceNotFoundException
–
The specified resource does not exist or the caller does not have permission to access it.
-
ValidationException
–
The request was malformed or contained invalid parameter values.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_cloudextensions/_services/cloud_extensions.py
| def list_extension_versions(
self,
identifier: "capo_cloudextensions.types.extension_id.ExtensionId",
*,
config_overrides: Optional[CloudExtensionsClientConfig] = None,
version_selector: Optional[
"capo_cloudextensions.types.semantic_version_selector.SemanticVersionSelector"
] = None,
max_results: Optional[
"capo_cloudextensions.types.max_results.MaxResults"
] = None,
next_token: Optional["capo_cloudextensions.types.next_token.NextToken"] = None,
) -> "capo_cloudextensions.types.list_extension_versions_output.ListExtensionVersionsOutput":
"""Lists the released versions of an extension, newest first, optionally filtered by a version selector.
Args:
identifier: The id of the extension whose versions to list.
version_selector: Optional selector that limits the results to matching versions, such as `1.x.x`.
max_results: The maximum number of versions to return in one page.
next_token: The token returned by a previous call, to retrieve the next page of results.
Raises:
capo_cloudextensions.errors.access_denied_exception.AccessDeniedException: The caller does not have permission to perform the operation.
capo_cloudextensions.errors.internal_server_exception.InternalServerException: The service couldn't process the request because of an internal error. Retry with capped exponential backoff and jitter.
capo_cloudextensions.errors.throttling_exception.ThrottlingException: The request rate exceeded a limit. Retry with capped exponential backoff and jitter.
capo_cloudextensions.errors.resource_not_found_exception.ResourceNotFoundException: The specified resource does not exist or the caller does not have permission to access it.
capo_cloudextensions.errors.validation_exception.ValidationException: The request was malformed or contained invalid parameter values.
capo_cloudextensions.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_cloudextensions.types.list_extension_versions_input.ListExtensionVersionsInput]",
) -> OperationResponse[
"capo_cloudextensions.types.list_extension_versions_output.ListExtensionVersionsOutput"
]:
import capo_cloudextensions._operations.control_plane.list_extension_versions
output, http_response = (
capo_cloudextensions._operations.control_plane.list_extension_versions.list_extension_versions(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListExtensionVersions")
)
input_: capo_cloudextensions.types.list_extension_versions_input.ListExtensionVersionsInput = {
"identifier": identifier
}
if version_selector is not None:
input_["version_selector"] = version_selector
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
|