/
getLayerVersion.go
213 lines (183 loc) · 9.84 KB
/
getLayerVersion.go
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
// *** 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! ***
package lambda
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides information about a Lambda Layer Version.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/lambda"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// cfg := config.New(ctx, "")
// layerName := cfg.Require("layerName")
// _, err := lambda.LookupLayerVersion(ctx, &lambda.LookupLayerVersionArgs{
// LayerName: layerName,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
func LookupLayerVersion(ctx *pulumi.Context, args *LookupLayerVersionArgs, opts ...pulumi.InvokeOption) (*LookupLayerVersionResult, error) {
var rv LookupLayerVersionResult
err := ctx.Invoke("aws:lambda/getLayerVersion:getLayerVersion", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getLayerVersion.
type LookupLayerVersionArgs struct {
// Specific architecture the layer version could support. Conflicts with `version`. If specified, the latest available layer version supporting the provided architecture will be used.
CompatibleArchitecture *string `pulumi:"compatibleArchitecture"`
// Specific runtime the layer version must support. Conflicts with `version`. If specified, the latest available layer version supporting the provided runtime will be used.
CompatibleRuntime *string `pulumi:"compatibleRuntime"`
// Name of the lambda layer.
LayerName string `pulumi:"layerName"`
// Specific layer version. Conflicts with `compatibleRuntime` and `compatibleArchitecture`. If omitted, the latest available layer version will be used.
Version *int `pulumi:"version"`
}
// A collection of values returned by getLayerVersion.
type LookupLayerVersionResult struct {
// The Amazon Resource Name (ARN) of the Lambda Layer with version.
Arn string `pulumi:"arn"`
CompatibleArchitecture *string `pulumi:"compatibleArchitecture"`
// A list of [Architectures](https://docs.aws.amazon.com/lambda/latest/dg/API_GetLayerVersion.html#SSS-GetLayerVersion-response-CompatibleArchitectures) the specific Lambda Layer version is compatible with.
CompatibleArchitectures []string `pulumi:"compatibleArchitectures"`
CompatibleRuntime *string `pulumi:"compatibleRuntime"`
// 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.
CompatibleRuntimes []string `pulumi:"compatibleRuntimes"`
// The date this resource was created.
CreatedDate string `pulumi:"createdDate"`
// Description of the specific Lambda Layer version.
Description string `pulumi:"description"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The Amazon Resource Name (ARN) of the Lambda Layer without version.
LayerArn string `pulumi:"layerArn"`
LayerName string `pulumi:"layerName"`
// License info associated with the specific Lambda Layer version.
LicenseInfo string `pulumi:"licenseInfo"`
// The Amazon Resource Name (ARN) of a signing job.
SigningJobArn string `pulumi:"signingJobArn"`
// The Amazon Resource Name (ARN) for a signing profile version.
SigningProfileVersionArn string `pulumi:"signingProfileVersionArn"`
// Base64-encoded representation of raw SHA-256 sum of the zip file.
SourceCodeHash string `pulumi:"sourceCodeHash"`
// The size in bytes of the function .zip file.
SourceCodeSize int `pulumi:"sourceCodeSize"`
// This Lamba Layer version.
Version int `pulumi:"version"`
}
func LookupLayerVersionOutput(ctx *pulumi.Context, args LookupLayerVersionOutputArgs, opts ...pulumi.InvokeOption) LookupLayerVersionResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupLayerVersionResult, error) {
args := v.(LookupLayerVersionArgs)
r, err := LookupLayerVersion(ctx, &args, opts...)
return *r, err
}).(LookupLayerVersionResultOutput)
}
// A collection of arguments for invoking getLayerVersion.
type LookupLayerVersionOutputArgs struct {
// Specific architecture the layer version could support. Conflicts with `version`. If specified, the latest available layer version supporting the provided architecture will be used.
CompatibleArchitecture pulumi.StringPtrInput `pulumi:"compatibleArchitecture"`
// Specific runtime the layer version must support. Conflicts with `version`. If specified, the latest available layer version supporting the provided runtime will be used.
CompatibleRuntime pulumi.StringPtrInput `pulumi:"compatibleRuntime"`
// Name of the lambda layer.
LayerName pulumi.StringInput `pulumi:"layerName"`
// Specific layer version. Conflicts with `compatibleRuntime` and `compatibleArchitecture`. If omitted, the latest available layer version will be used.
Version pulumi.IntPtrInput `pulumi:"version"`
}
func (LookupLayerVersionOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupLayerVersionArgs)(nil)).Elem()
}
// A collection of values returned by getLayerVersion.
type LookupLayerVersionResultOutput struct{ *pulumi.OutputState }
func (LookupLayerVersionResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupLayerVersionResult)(nil)).Elem()
}
func (o LookupLayerVersionResultOutput) ToLookupLayerVersionResultOutput() LookupLayerVersionResultOutput {
return o
}
func (o LookupLayerVersionResultOutput) ToLookupLayerVersionResultOutputWithContext(ctx context.Context) LookupLayerVersionResultOutput {
return o
}
// The Amazon Resource Name (ARN) of the Lambda Layer with version.
func (o LookupLayerVersionResultOutput) Arn() pulumi.StringOutput {
return o.ApplyT(func(v LookupLayerVersionResult) string { return v.Arn }).(pulumi.StringOutput)
}
func (o LookupLayerVersionResultOutput) CompatibleArchitecture() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupLayerVersionResult) *string { return v.CompatibleArchitecture }).(pulumi.StringPtrOutput)
}
// A list of [Architectures](https://docs.aws.amazon.com/lambda/latest/dg/API_GetLayerVersion.html#SSS-GetLayerVersion-response-CompatibleArchitectures) the specific Lambda Layer version is compatible with.
func (o LookupLayerVersionResultOutput) CompatibleArchitectures() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupLayerVersionResult) []string { return v.CompatibleArchitectures }).(pulumi.StringArrayOutput)
}
func (o LookupLayerVersionResultOutput) CompatibleRuntime() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupLayerVersionResult) *string { return v.CompatibleRuntime }).(pulumi.StringPtrOutput)
}
// 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.
func (o LookupLayerVersionResultOutput) CompatibleRuntimes() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupLayerVersionResult) []string { return v.CompatibleRuntimes }).(pulumi.StringArrayOutput)
}
// The date this resource was created.
func (o LookupLayerVersionResultOutput) CreatedDate() pulumi.StringOutput {
return o.ApplyT(func(v LookupLayerVersionResult) string { return v.CreatedDate }).(pulumi.StringOutput)
}
// Description of the specific Lambda Layer version.
func (o LookupLayerVersionResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupLayerVersionResult) string { return v.Description }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupLayerVersionResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupLayerVersionResult) string { return v.Id }).(pulumi.StringOutput)
}
// The Amazon Resource Name (ARN) of the Lambda Layer without version.
func (o LookupLayerVersionResultOutput) LayerArn() pulumi.StringOutput {
return o.ApplyT(func(v LookupLayerVersionResult) string { return v.LayerArn }).(pulumi.StringOutput)
}
func (o LookupLayerVersionResultOutput) LayerName() pulumi.StringOutput {
return o.ApplyT(func(v LookupLayerVersionResult) string { return v.LayerName }).(pulumi.StringOutput)
}
// License info associated with the specific Lambda Layer version.
func (o LookupLayerVersionResultOutput) LicenseInfo() pulumi.StringOutput {
return o.ApplyT(func(v LookupLayerVersionResult) string { return v.LicenseInfo }).(pulumi.StringOutput)
}
// The Amazon Resource Name (ARN) of a signing job.
func (o LookupLayerVersionResultOutput) SigningJobArn() pulumi.StringOutput {
return o.ApplyT(func(v LookupLayerVersionResult) string { return v.SigningJobArn }).(pulumi.StringOutput)
}
// The Amazon Resource Name (ARN) for a signing profile version.
func (o LookupLayerVersionResultOutput) SigningProfileVersionArn() pulumi.StringOutput {
return o.ApplyT(func(v LookupLayerVersionResult) string { return v.SigningProfileVersionArn }).(pulumi.StringOutput)
}
// Base64-encoded representation of raw SHA-256 sum of the zip file.
func (o LookupLayerVersionResultOutput) SourceCodeHash() pulumi.StringOutput {
return o.ApplyT(func(v LookupLayerVersionResult) string { return v.SourceCodeHash }).(pulumi.StringOutput)
}
// The size in bytes of the function .zip file.
func (o LookupLayerVersionResultOutput) SourceCodeSize() pulumi.IntOutput {
return o.ApplyT(func(v LookupLayerVersionResult) int { return v.SourceCodeSize }).(pulumi.IntOutput)
}
// This Lamba Layer version.
func (o LookupLayerVersionResultOutput) Version() pulumi.IntOutput {
return o.ApplyT(func(v LookupLayerVersionResult) int { return v.Version }).(pulumi.IntOutput)
}
func init() {
pulumi.RegisterOutputType(LookupLayerVersionResultOutput{})
}