Skip to content

get_container_api_metadata

get_container_api_metadata(
    *, config_overrides: Optional[LightsailClientConfig] = None
) -> GetContainerAPIMetadataResult

Returns information about Amazon Lightsail containers, such as the current version of the Lightsail Control (lightsailctl) plugin.

Raises:

  • AccessDeniedException –

    Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to access a resource.

  • RegionSetupInProgressException –

    Lightsail throws this exception when an operation is performed on resources in an opt-in Region that is currently being set up.

  • ServiceException –

    A general service exception.

  • UnauthenticatedException –

    Lightsail throws this exception when the user has not been authenticated.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_lightsail/_services/lightsail.py
def get_container_api_metadata(
    self, *, config_overrides: Optional[LightsailClientConfig] = None
) -> "capo_lightsail.types.get_container_api_metadata_result.GetContainerAPIMetadataResult":
    """<p>Returns information about Amazon Lightsail containers, such as the current version of the Lightsail Control (lightsailctl) plugin.</p>

    Raises:
        capo_lightsail.errors.access_denied_exception.AccessDeniedException: <p>Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to access a resource.</p>
        capo_lightsail.errors.region_setup_in_progress_exception.RegionSetupInProgressException: <p>Lightsail throws this exception when an operation is performed on resources in an opt-in Region that is currently being set up.</p>
        capo_lightsail.errors.service_exception.ServiceException: <p>A general service exception.</p>
        capo_lightsail.errors.unauthenticated_exception.UnauthenticatedException: <p>Lightsail throws this exception when the user has not been authenticated.</p>
        capo_lightsail.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_lightsail.types.get_container_api_metadata_request.GetContainerAPIMetadataRequest]",
    ) -> OperationResponse[
        "capo_lightsail.types.get_container_api_metadata_result.GetContainerAPIMetadataResult"
    ]:
        import capo_lightsail._operations.lightsail_20161128.get_container_api_metadata

        output, http_response = (
            capo_lightsail._operations.lightsail_20161128.get_container_api_metadata.get_container_api_metadata(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetContainerAPIMetadata")
    )
    input_: capo_lightsail.types.get_container_api_metadata_request.GetContainerAPIMetadataRequest = {}

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output