Retrieves a released extension by its id. By default returns the latest version; use the version parameter to retrieve a specific release.
Parameters:
-
identifier
(ExtensionId)
–
The id of the extension, such as aws:secretsmanager.
-
extension_version
(Optional[SemanticVersion], default:
None
)
–
The version to retrieve. Omit it to retrieve the latest release.
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 get_extension(
self,
identifier: "capo_cloudextensions.types.extension_id.ExtensionId",
*,
config_overrides: Optional[CloudExtensionsClientConfig] = None,
extension_version: Optional[
"capo_cloudextensions.types.semantic_version.SemanticVersion"
] = None,
) -> "capo_cloudextensions.types.get_extension_output.GetExtensionOutput":
"""Retrieves a released extension by its id. By default returns the latest version; use the version parameter to retrieve a specific release.
Args:
identifier: The id of the extension, such as aws:secretsmanager.
extension_version: The version to retrieve. Omit it to retrieve the latest release.
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.get_extension_input.GetExtensionInput]",
) -> OperationResponse[
"capo_cloudextensions.types.get_extension_output.GetExtensionOutput"
]:
import capo_cloudextensions._operations.control_plane.get_extension
output, http_response = (
capo_cloudextensions._operations.control_plane.get_extension.get_extension(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetExtension")
)
input_: capo_cloudextensions.types.get_extension_input.GetExtensionInput = {
"identifier": identifier
}
if extension_version is not None:
input_["extension_version"] = extension_version
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|