github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/lambda/getLayerVersion.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package lambda 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Provides information about a Lambda Layer Version. 15 // 16 // ## Example Usage 17 // 18 // <!--Start PulumiCodeChooser --> 19 // ```go 20 // package main 21 // 22 // import ( 23 // 24 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda" 25 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 26 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" 27 // 28 // ) 29 // 30 // func main() { 31 // pulumi.Run(func(ctx *pulumi.Context) error { 32 // cfg := config.New(ctx, "") 33 // layerName := cfg.Require("layerName") 34 // _, err := lambda.LookupLayerVersion(ctx, &lambda.LookupLayerVersionArgs{ 35 // LayerName: layerName, 36 // }, nil) 37 // if err != nil { 38 // return err 39 // } 40 // return nil 41 // }) 42 // } 43 // 44 // ``` 45 // <!--End PulumiCodeChooser --> 46 func LookupLayerVersion(ctx *pulumi.Context, args *LookupLayerVersionArgs, opts ...pulumi.InvokeOption) (*LookupLayerVersionResult, error) { 47 opts = internal.PkgInvokeDefaultOpts(opts) 48 var rv LookupLayerVersionResult 49 err := ctx.Invoke("aws:lambda/getLayerVersion:getLayerVersion", args, &rv, opts...) 50 if err != nil { 51 return nil, err 52 } 53 return &rv, nil 54 } 55 56 // A collection of arguments for invoking getLayerVersion. 57 type LookupLayerVersionArgs struct { 58 // Specific architecture the layer version could support. Conflicts with `version`. If specified, the latest available layer version supporting the provided architecture will be used. 59 CompatibleArchitecture *string `pulumi:"compatibleArchitecture"` 60 // Specific runtime the layer version must support. Conflicts with `version`. If specified, the latest available layer version supporting the provided runtime will be used. 61 CompatibleRuntime *string `pulumi:"compatibleRuntime"` 62 // Name of the lambda layer. 63 LayerName string `pulumi:"layerName"` 64 // Specific layer version. Conflicts with `compatibleRuntime` and `compatibleArchitecture`. If omitted, the latest available layer version will be used. 65 Version *int `pulumi:"version"` 66 } 67 68 // A collection of values returned by getLayerVersion. 69 type LookupLayerVersionResult struct { 70 // ARN of the Lambda Layer with version. 71 Arn string `pulumi:"arn"` 72 CompatibleArchitecture *string `pulumi:"compatibleArchitecture"` 73 // 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. 74 CompatibleArchitectures []string `pulumi:"compatibleArchitectures"` 75 CompatibleRuntime *string `pulumi:"compatibleRuntime"` 76 // 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. 77 CompatibleRuntimes []string `pulumi:"compatibleRuntimes"` 78 // Date this resource was created. 79 CreatedDate string `pulumi:"createdDate"` 80 // Description of the specific Lambda Layer version. 81 Description string `pulumi:"description"` 82 // The provider-assigned unique ID for this managed resource. 83 Id string `pulumi:"id"` 84 // ARN of the Lambda Layer without version. 85 LayerArn string `pulumi:"layerArn"` 86 LayerName string `pulumi:"layerName"` 87 // License info associated with the specific Lambda Layer version. 88 LicenseInfo string `pulumi:"licenseInfo"` 89 // ARN of a signing job. 90 SigningJobArn string `pulumi:"signingJobArn"` 91 // The ARN for a signing profile version. 92 SigningProfileVersionArn string `pulumi:"signingProfileVersionArn"` 93 // Base64-encoded representation of raw SHA-256 sum of the zip file. 94 SourceCodeHash string `pulumi:"sourceCodeHash"` 95 // Size in bytes of the function .zip file. 96 SourceCodeSize int `pulumi:"sourceCodeSize"` 97 // This Lamba Layer version. 98 Version int `pulumi:"version"` 99 } 100 101 func LookupLayerVersionOutput(ctx *pulumi.Context, args LookupLayerVersionOutputArgs, opts ...pulumi.InvokeOption) LookupLayerVersionResultOutput { 102 return pulumi.ToOutputWithContext(context.Background(), args). 103 ApplyT(func(v interface{}) (LookupLayerVersionResult, error) { 104 args := v.(LookupLayerVersionArgs) 105 r, err := LookupLayerVersion(ctx, &args, opts...) 106 var s LookupLayerVersionResult 107 if r != nil { 108 s = *r 109 } 110 return s, err 111 }).(LookupLayerVersionResultOutput) 112 } 113 114 // A collection of arguments for invoking getLayerVersion. 115 type LookupLayerVersionOutputArgs struct { 116 // Specific architecture the layer version could support. Conflicts with `version`. If specified, the latest available layer version supporting the provided architecture will be used. 117 CompatibleArchitecture pulumi.StringPtrInput `pulumi:"compatibleArchitecture"` 118 // Specific runtime the layer version must support. Conflicts with `version`. If specified, the latest available layer version supporting the provided runtime will be used. 119 CompatibleRuntime pulumi.StringPtrInput `pulumi:"compatibleRuntime"` 120 // Name of the lambda layer. 121 LayerName pulumi.StringInput `pulumi:"layerName"` 122 // Specific layer version. Conflicts with `compatibleRuntime` and `compatibleArchitecture`. If omitted, the latest available layer version will be used. 123 Version pulumi.IntPtrInput `pulumi:"version"` 124 } 125 126 func (LookupLayerVersionOutputArgs) ElementType() reflect.Type { 127 return reflect.TypeOf((*LookupLayerVersionArgs)(nil)).Elem() 128 } 129 130 // A collection of values returned by getLayerVersion. 131 type LookupLayerVersionResultOutput struct{ *pulumi.OutputState } 132 133 func (LookupLayerVersionResultOutput) ElementType() reflect.Type { 134 return reflect.TypeOf((*LookupLayerVersionResult)(nil)).Elem() 135 } 136 137 func (o LookupLayerVersionResultOutput) ToLookupLayerVersionResultOutput() LookupLayerVersionResultOutput { 138 return o 139 } 140 141 func (o LookupLayerVersionResultOutput) ToLookupLayerVersionResultOutputWithContext(ctx context.Context) LookupLayerVersionResultOutput { 142 return o 143 } 144 145 // ARN of the Lambda Layer with version. 146 func (o LookupLayerVersionResultOutput) Arn() pulumi.StringOutput { 147 return o.ApplyT(func(v LookupLayerVersionResult) string { return v.Arn }).(pulumi.StringOutput) 148 } 149 150 func (o LookupLayerVersionResultOutput) CompatibleArchitecture() pulumi.StringPtrOutput { 151 return o.ApplyT(func(v LookupLayerVersionResult) *string { return v.CompatibleArchitecture }).(pulumi.StringPtrOutput) 152 } 153 154 // 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. 155 func (o LookupLayerVersionResultOutput) CompatibleArchitectures() pulumi.StringArrayOutput { 156 return o.ApplyT(func(v LookupLayerVersionResult) []string { return v.CompatibleArchitectures }).(pulumi.StringArrayOutput) 157 } 158 159 func (o LookupLayerVersionResultOutput) CompatibleRuntime() pulumi.StringPtrOutput { 160 return o.ApplyT(func(v LookupLayerVersionResult) *string { return v.CompatibleRuntime }).(pulumi.StringPtrOutput) 161 } 162 163 // 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. 164 func (o LookupLayerVersionResultOutput) CompatibleRuntimes() pulumi.StringArrayOutput { 165 return o.ApplyT(func(v LookupLayerVersionResult) []string { return v.CompatibleRuntimes }).(pulumi.StringArrayOutput) 166 } 167 168 // Date this resource was created. 169 func (o LookupLayerVersionResultOutput) CreatedDate() pulumi.StringOutput { 170 return o.ApplyT(func(v LookupLayerVersionResult) string { return v.CreatedDate }).(pulumi.StringOutput) 171 } 172 173 // Description of the specific Lambda Layer version. 174 func (o LookupLayerVersionResultOutput) Description() pulumi.StringOutput { 175 return o.ApplyT(func(v LookupLayerVersionResult) string { return v.Description }).(pulumi.StringOutput) 176 } 177 178 // The provider-assigned unique ID for this managed resource. 179 func (o LookupLayerVersionResultOutput) Id() pulumi.StringOutput { 180 return o.ApplyT(func(v LookupLayerVersionResult) string { return v.Id }).(pulumi.StringOutput) 181 } 182 183 // ARN of the Lambda Layer without version. 184 func (o LookupLayerVersionResultOutput) LayerArn() pulumi.StringOutput { 185 return o.ApplyT(func(v LookupLayerVersionResult) string { return v.LayerArn }).(pulumi.StringOutput) 186 } 187 188 func (o LookupLayerVersionResultOutput) LayerName() pulumi.StringOutput { 189 return o.ApplyT(func(v LookupLayerVersionResult) string { return v.LayerName }).(pulumi.StringOutput) 190 } 191 192 // License info associated with the specific Lambda Layer version. 193 func (o LookupLayerVersionResultOutput) LicenseInfo() pulumi.StringOutput { 194 return o.ApplyT(func(v LookupLayerVersionResult) string { return v.LicenseInfo }).(pulumi.StringOutput) 195 } 196 197 // ARN of a signing job. 198 func (o LookupLayerVersionResultOutput) SigningJobArn() pulumi.StringOutput { 199 return o.ApplyT(func(v LookupLayerVersionResult) string { return v.SigningJobArn }).(pulumi.StringOutput) 200 } 201 202 // The ARN for a signing profile version. 203 func (o LookupLayerVersionResultOutput) SigningProfileVersionArn() pulumi.StringOutput { 204 return o.ApplyT(func(v LookupLayerVersionResult) string { return v.SigningProfileVersionArn }).(pulumi.StringOutput) 205 } 206 207 // Base64-encoded representation of raw SHA-256 sum of the zip file. 208 func (o LookupLayerVersionResultOutput) SourceCodeHash() pulumi.StringOutput { 209 return o.ApplyT(func(v LookupLayerVersionResult) string { return v.SourceCodeHash }).(pulumi.StringOutput) 210 } 211 212 // Size in bytes of the function .zip file. 213 func (o LookupLayerVersionResultOutput) SourceCodeSize() pulumi.IntOutput { 214 return o.ApplyT(func(v LookupLayerVersionResult) int { return v.SourceCodeSize }).(pulumi.IntOutput) 215 } 216 217 // This Lamba Layer version. 218 func (o LookupLayerVersionResultOutput) Version() pulumi.IntOutput { 219 return o.ApplyT(func(v LookupLayerVersionResult) int { return v.Version }).(pulumi.IntOutput) 220 } 221 222 func init() { 223 pulumi.RegisterOutputType(LookupLayerVersionResultOutput{}) 224 }