|
| 1 | +# GetLayerVersionByArn<a name="API_GetLayerVersionByArn"></a> |
| 2 | + |
| 3 | +Returns information about a version of an [AWS Lambda layer](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html), with a link to download the layer archive that's valid for 10 minutes\. |
| 4 | + |
| 5 | +## Request Syntax<a name="API_GetLayerVersionByArn_RequestSyntax"></a> |
| 6 | + |
| 7 | +``` |
| 8 | +GET /2018-10-31/layers?find=LayerVersion&Arn=Arn HTTP/1.1 |
| 9 | +``` |
| 10 | + |
| 11 | +## URI Request Parameters<a name="API_GetLayerVersionByArn_RequestParameters"></a> |
| 12 | + |
| 13 | +The request requires the following URI parameters\. |
| 14 | + |
| 15 | + ** [Arn](#API_GetLayerVersionByArn_RequestSyntax) ** <a name="SSS-GetLayerVersionByArn-request-Arn"></a> |
| 16 | +The ARN of the layer version\. |
| 17 | +Length Constraints: Minimum length of 1\. Maximum length of 140\. |
| 18 | +Pattern: `arn:[a-zA-Z0-9-]+:lambda:[a-zA-Z0-9-]+:\d{12}:layer:[a-zA-Z0-9-_]+:[0-9]+` |
| 19 | + |
| 20 | +## Request Body<a name="API_GetLayerVersionByArn_RequestBody"></a> |
| 21 | + |
| 22 | +The request does not have a request body\. |
| 23 | + |
| 24 | +## Response Syntax<a name="API_GetLayerVersionByArn_ResponseSyntax"></a> |
| 25 | + |
| 26 | +``` |
| 27 | +HTTP/1.1 200 |
| 28 | +Content-type: application/json |
| 29 | +
|
| 30 | +{ |
| 31 | + "[CompatibleRuntimes](#SSS-GetLayerVersionByArn-response-CompatibleRuntimes)": [ "string" ], |
| 32 | + "[Content](#SSS-GetLayerVersionByArn-response-Content)": { |
| 33 | + "[CodeSha256](API_LayerVersionContentOutput.md#SSS-Type-LayerVersionContentOutput-CodeSha256)": "string", |
| 34 | + "[CodeSize](API_LayerVersionContentOutput.md#SSS-Type-LayerVersionContentOutput-CodeSize)": number, |
| 35 | + "[Location](API_LayerVersionContentOutput.md#SSS-Type-LayerVersionContentOutput-Location)": "string" |
| 36 | + }, |
| 37 | + "[CreatedDate](#SSS-GetLayerVersionByArn-response-CreatedDate)": "string", |
| 38 | + "[Description](#SSS-GetLayerVersionByArn-response-Description)": "string", |
| 39 | + "[LayerArn](#SSS-GetLayerVersionByArn-response-LayerArn)": "string", |
| 40 | + "[LayerVersionArn](#SSS-GetLayerVersionByArn-response-LayerVersionArn)": "string", |
| 41 | + "[LicenseInfo](#SSS-GetLayerVersionByArn-response-LicenseInfo)": "string", |
| 42 | + "[Version](#SSS-GetLayerVersionByArn-response-Version)": number |
| 43 | +} |
| 44 | +``` |
| 45 | + |
| 46 | +## Response Elements<a name="API_GetLayerVersionByArn_ResponseElements"></a> |
| 47 | + |
| 48 | +If the action is successful, the service sends back an HTTP 200 response\. |
| 49 | + |
| 50 | +The following data is returned in JSON format by the service\. |
| 51 | + |
| 52 | + ** [CompatibleRuntimes](#API_GetLayerVersionByArn_ResponseSyntax) ** <a name="SSS-GetLayerVersionByArn-response-CompatibleRuntimes"></a> |
| 53 | +The layer's compatible runtimes\. |
| 54 | +Type: Array of strings |
| 55 | +Array Members: Maximum number of 5 items\. |
| 56 | +Valid Values:` nodejs8.10 | nodejs10.x | java8 | python2.7 | python3.6 | python3.7 | dotnetcore1.0 | dotnetcore2.1 | go1.x | ruby2.5 | provided` |
| 57 | + |
| 58 | + ** [Content](#API_GetLayerVersionByArn_ResponseSyntax) ** <a name="SSS-GetLayerVersionByArn-response-Content"></a> |
| 59 | +Details about the layer version\. |
| 60 | +Type: [LayerVersionContentOutput](API_LayerVersionContentOutput.md) object |
| 61 | + |
| 62 | + ** [CreatedDate](#API_GetLayerVersionByArn_ResponseSyntax) ** <a name="SSS-GetLayerVersionByArn-response-CreatedDate"></a> |
| 63 | +The date that the layer version was created, in [ISO\-8601 format](https://www.w3.org/TR/NOTE-datetime) \(YYYY\-MM\-DDThh:mm:ss\.sTZD\)\. |
| 64 | +Type: String |
| 65 | + |
| 66 | + ** [Description](#API_GetLayerVersionByArn_ResponseSyntax) ** <a name="SSS-GetLayerVersionByArn-response-Description"></a> |
| 67 | +The description of the version\. |
| 68 | +Type: String |
| 69 | +Length Constraints: Minimum length of 0\. Maximum length of 256\. |
| 70 | + |
| 71 | + ** [LayerArn](#API_GetLayerVersionByArn_ResponseSyntax) ** <a name="SSS-GetLayerVersionByArn-response-LayerArn"></a> |
| 72 | +The ARN of the layer\. |
| 73 | +Type: String |
| 74 | +Length Constraints: Minimum length of 1\. Maximum length of 140\. |
| 75 | +Pattern: `arn:[a-zA-Z0-9-]+:lambda:[a-zA-Z0-9-]+:\d{12}:layer:[a-zA-Z0-9-_]+` |
| 76 | + |
| 77 | + ** [LayerVersionArn](#API_GetLayerVersionByArn_ResponseSyntax) ** <a name="SSS-GetLayerVersionByArn-response-LayerVersionArn"></a> |
| 78 | +The ARN of the layer version\. |
| 79 | +Type: String |
| 80 | +Length Constraints: Minimum length of 1\. Maximum length of 140\. |
| 81 | +Pattern: `arn:[a-zA-Z0-9-]+:lambda:[a-zA-Z0-9-]+:\d{12}:layer:[a-zA-Z0-9-_]+:[0-9]+` |
| 82 | + |
| 83 | + ** [LicenseInfo](#API_GetLayerVersionByArn_ResponseSyntax) ** <a name="SSS-GetLayerVersionByArn-response-LicenseInfo"></a> |
| 84 | +The layer's software license\. |
| 85 | +Type: String |
| 86 | +Length Constraints: Maximum length of 512\. |
| 87 | + |
| 88 | + ** [Version](#API_GetLayerVersionByArn_ResponseSyntax) ** <a name="SSS-GetLayerVersionByArn-response-Version"></a> |
| 89 | +The version number\. |
| 90 | +Type: Long |
| 91 | + |
| 92 | +## Errors<a name="API_GetLayerVersionByArn_Errors"></a> |
| 93 | + |
| 94 | + **InvalidParameterValueException** |
| 95 | +One of the parameters in the request is invalid\. For example, if you provided an IAM role for AWS Lambda to assume in the `CreateFunction` or the `UpdateFunctionConfiguration` API, that AWS Lambda is unable to assume you will get this exception\. |
| 96 | +HTTP Status Code: 400 |
| 97 | + |
| 98 | + **ResourceNotFoundException** |
| 99 | +The resource \(for example, a Lambda function or access policy statement\) specified in the request does not exist\. |
| 100 | +HTTP Status Code: 404 |
| 101 | + |
| 102 | + **ServiceException** |
| 103 | +The AWS Lambda service encountered an internal error\. |
| 104 | +HTTP Status Code: 500 |
| 105 | + |
| 106 | + **TooManyRequestsException** |
| 107 | +Request throughput limit exceeded\. |
| 108 | +HTTP Status Code: 429 |
| 109 | + |
| 110 | +## See Also<a name="API_GetLayerVersionByArn_SeeAlso"></a> |
| 111 | + |
| 112 | +For more information about using this API in one of the language\-specific AWS SDKs, see the following: |
| 113 | ++ [AWS Command Line Interface](https://docs.aws.amazon.com/goto/aws-cli/lambda-2015-03-31/GetLayerVersionByArn) |
| 114 | ++ [AWS SDK for \.NET](https://docs.aws.amazon.com/goto/DotNetSDKV3/lambda-2015-03-31/GetLayerVersionByArn) |
| 115 | ++ [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/lambda-2015-03-31/GetLayerVersionByArn) |
| 116 | ++ [AWS SDK for Go](https://docs.aws.amazon.com/goto/SdkForGoV1/lambda-2015-03-31/GetLayerVersionByArn) |
| 117 | ++ [AWS SDK for Go \- Pilot](https://docs.aws.amazon.com/goto/SdkForGoPilot/lambda-2015-03-31/GetLayerVersionByArn) |
| 118 | ++ [AWS SDK for Java](https://docs.aws.amazon.com/goto/SdkForJava/lambda-2015-03-31/GetLayerVersionByArn) |
| 119 | ++ [AWS SDK for JavaScript](https://docs.aws.amazon.com/goto/AWSJavaScriptSDK/lambda-2015-03-31/GetLayerVersionByArn) |
| 120 | ++ [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/lambda-2015-03-31/GetLayerVersionByArn) |
| 121 | ++ [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/lambda-2015-03-31/GetLayerVersionByArn) |
| 122 | ++ [AWS SDK for Ruby V2](https://docs.aws.amazon.com/goto/SdkForRubyV2/lambda-2015-03-31/GetLayerVersionByArn) |
0 commit comments