/
getLayerVersion.ts
104 lines (99 loc) · 3.12 KB
/
getLayerVersion.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as utilities from "../utilities";
/**
* Provides information about a Lambda Layer Version.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const config = new pulumi.Config();
* const layerName = config.require("layerName");
* const existing = aws.lambda.getLayerVersion({
* layerName: layerName,
* });
* ```
*/
export function getLayerVersion(args: GetLayerVersionArgs, opts?: pulumi.InvokeOptions): Promise<GetLayerVersionResult> {
if (!opts) {
opts = {}
}
if (!opts.version) {
opts.version = utilities.getVersion();
}
return pulumi.runtime.invoke("aws:lambda/getLayerVersion:getLayerVersion", {
"compatibleRuntime": args.compatibleRuntime,
"layerName": args.layerName,
"version": args.version,
}, opts);
}
/**
* A collection of arguments for invoking getLayerVersion.
*/
export interface GetLayerVersionArgs {
/**
* Specific runtime the layer version must support. Conflicts with `version`. If specified, the latest available layer version supporting the provided runtime will be used.
*/
readonly compatibleRuntime?: string;
/**
* Name of the lambda layer.
*/
readonly layerName: string;
/**
* Specific layer version. Conflicts with `compatibleRuntime`. If omitted, the latest available layer version will be used.
*/
readonly version?: number;
}
/**
* A collection of values returned by getLayerVersion.
*/
export interface GetLayerVersionResult {
/**
* The Amazon Resource Name (ARN) of the Lambda Layer with version.
*/
readonly arn: string;
readonly compatibleRuntime?: string;
/**
* A list of [Runtimes](https://docs.aws.amazon.com/lambda/latest/dg/API_GetLayerVersion.html#SSS-GetLayerVersion-response-CompatibleRuntimes) the specific Lambda Layer version is compatible with.
*/
readonly compatibleRuntimes: string[];
/**
* The date this resource was created.
*/
readonly createdDate: string;
/**
* Description of the specific Lambda Layer version.
*/
readonly description: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* The Amazon Resource Name (ARN) of the Lambda Layer without version.
*/
readonly layerArn: string;
readonly layerName: string;
/**
* License info associated with the specific Lambda Layer version.
*/
readonly licenseInfo: string;
/**
* Base64-encoded representation of raw SHA-256 sum of the zip file.
*/
readonly sourceCodeHash: string;
/**
* The size in bytes of the function .zip file.
*/
readonly sourceCodeSize: number;
/**
* This Lamba Layer version.
*/
readonly version: number;
}