Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

GetLayerVersionByArn

聚焦模式
GetLayerVersionByArn - Amazon Lambda

返回有关某个 Amazon Lambda 层的某个版本的信息,其中包含层归档的下载链接,有效时间 10 分钟。

请求语法

GET /2018-10-31/layers?find=LayerVersion&Arn=Arn HTTP/1.1

URI 请求参数

请求使用以下 URI 参数。

Arn

层版本的 ARN。

长度限制:最小长度为 1。长度上限为 140。

模式:arn:[a-zA-Z0-9-]+:lambda:[a-zA-Z0-9-]+:\d{12}:layer:[a-zA-Z0-9-_]+:[0-9]+

必需:是

请求体

该请求没有请求正文。

响应语法

HTTP/1.1 200 Content-type: application/json { "CompatibleArchitectures": [ "string" ], "CompatibleRuntimes": [ "string" ], "Content": { "CodeSha256": "string", "CodeSize": number, "Location": "string", "SigningJobArn": "string", "SigningProfileVersionArn": "string" }, "CreatedDate": "string", "Description": "string", "LayerArn": "string", "LayerVersionArn": "string", "LicenseInfo": "string", "Version": number }

响应元素

如果此操作成功,则该服务将会发送回 HTTP 200 响应。

服务以 JSON 格式返回以下数据。

CompatibleArchitectures

兼容指令集架构列表。

类型:字符串数组

数组成员:最多 15 项。

有效值:x86_64 | arm64

CompatibleRuntimes

层的兼容运行时。

以下列表包括已弃用的运行时。有关更多信息,请参阅运行时弃用策略

类型:字符串数组

数组成员:最多 15 项。

有效值:nodejs | nodejs4.3 | nodejs6.10 | nodejs8.10 | nodejs10.x | nodejs12.x | nodejs14.x | nodejs16.x | java8 | java8.al2 | java11 | python2.7 | python3.6 | python3.7 | python3.8 | python3.9 | dotnetcore1.0 | dotnetcore2.0 | dotnetcore2.1 | dotnetcore3.1 | dotnet6 | nodejs4.3-edge | go1.x | ruby2.5 | ruby2.7 | provided | provided.al2 | nodejs18.x | python3.10 | java17 | ruby3.2 | python3.11 | nodejs20.x | provided.al2023 | python3.12 | java21

Content

有关层版本的详细信息。

类型:LayerVersionContentOutput 对象

CreatedDate

层版本的创建日期,为 ISO-8601 格式 (YYYYY-MM-DDThh:mm:ss.sTZD)。

类型:字符串

Description

关于版本的描述。

类型:字符串

长度约束:最小长度为 0。长度上限为 256。

LayerArn

层的 ARN。

类型:字符串

长度限制:最小长度为 1。长度上限为 140。

模式:arn:[a-zA-Z0-9-]+:lambda:[a-zA-Z0-9-]+:\d{12}:layer:[a-zA-Z0-9-_]+

LayerVersionArn

层版本的 ARN。

类型:字符串

长度限制:最小长度为 1。长度上限为 140。

模式:arn:[a-zA-Z0-9-]+:lambda:[a-zA-Z0-9-]+:\d{12}:layer:[a-zA-Z0-9-_]+:[0-9]+

LicenseInfo

层的软件许可证。

类型:字符串

长度约束:最大长度为 512。

Version

版本号。

类型:长整型

错误

有关所有操作返回的常见错误的信息,请参阅 常见错误

InvalidParameterValueException

请求中的参数之一无效。

HTTP 状态代码:400

ResourceNotFoundException

请求中指定的资源不存在。

HTTP 状态代码:404

ServiceException

Amazon Lambda 服务遇到了内部错误。

HTTP 状态代码:500

TooManyRequestsException

超出了请求吞吐量限制。有关更多信息,请参阅 Lambda 限额

HTTP 状态代码:429

另请参阅

有关在特定语言的 Amazon SDK 中使用此 API 的更多信息,请参阅以下内容:

上一主题:

GetLayerVersion