Skip to content

get_layer_version_by_arn async

get_layer_version_by_arn(
    arn: LayerVersionArn, *, config_overrides: Optional[AsyncLambdaClientConfig] = None
) -> GetLayerVersionResponse

Returns information about a version of an Lambda layer, with a link to download the layer archive that's valid for 10 minutes.

Parameters:

Raises:

Examples:

To get information about a Lambda layer version The following example returns information about the layer version with the specified Amazon Resource Name (ARN).

>>> await client.get_layer_version_by_arn(arn='arn:aws:lambda:ca-central-1:123456789012:layer:blank-python-lib:3')
Source code in docs_src/capo_lambda/_services/async__lambda.py
async def get_layer_version_by_arn(
    self,
    arn: "capo_lambda.types.layer_version_arn.LayerVersionArn",
    *,
    config_overrides: Optional[AsyncLambdaClientConfig] = None,
) -> "capo_lambda.types.get_layer_version_response.GetLayerVersionResponse":
    """<p>Returns information about a version of an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">Lambda layer</a>, with a link to download the layer archive that's valid for 10 minutes.</p>

    Args:
        arn: <p>The ARN of the layer version.</p>

    Raises:
        capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
        capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
        capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
        capo_lambda.errors.too_many_requests_exception.TooManyRequestsException: <p>The request throughput limit was exceeded. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests">Lambda quotas</a>.</p>
        capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To get information about a Lambda layer version
        The following example returns information about the layer version with the specified Amazon Resource Name (ARN).

        >>> await client.get_layer_version_by_arn(arn='arn:aws:lambda:ca-central-1:123456789012:layer:blank-python-lib:3')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_lambda.types.get_layer_version_by_arn_request.GetLayerVersionByArnRequest]",
    ) -> AsyncOperationResponse[
        "capo_lambda.types.get_layer_version_response.GetLayerVersionResponse"
    ]:
        import capo_lambda._operations.aws_gir_api_service.get_layer_version_by_arn

        (
            output,
            http_response,
        ) = await capo_lambda._operations.aws_gir_api_service.get_layer_version_by_arn.async_get_layer_version_by_arn(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetLayerVersionByArn")
    )
    input_: capo_lambda.types.get_layer_version_by_arn_request.GetLayerVersionByArnRequest = {
        "arn": arn
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output