github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/lambda/layerVersion.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 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Provides a Lambda Layer Version resource. Lambda Layers allow you to reuse shared bits of code across multiple lambda functions. 16 // 17 // For information about Lambda Layers and how to use them, see [AWS Lambda Layers](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). 18 // 19 // > **NOTE:** Setting `skipDestroy` to `true` means that the AWS Provider will _not_ destroy any layer version, even when running destroy. Layer versions are thus intentional dangling resources that are _not_ managed by the provider and may incur extra expense in your AWS account. 20 // 21 // ## Example Usage 22 // 23 // <!--Start PulumiCodeChooser --> 24 // ```go 25 // package main 26 // 27 // import ( 28 // 29 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda" 30 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 31 // 32 // ) 33 // 34 // func main() { 35 // pulumi.Run(func(ctx *pulumi.Context) error { 36 // _, err := lambda.NewLayerVersion(ctx, "lambda_layer", &lambda.LayerVersionArgs{ 37 // Code: pulumi.NewFileArchive("lambda_layer_payload.zip"), 38 // LayerName: pulumi.String("lambda_layer_name"), 39 // CompatibleRuntimes: pulumi.StringArray{ 40 // pulumi.String("nodejs16.x"), 41 // }, 42 // }) 43 // if err != nil { 44 // return err 45 // } 46 // return nil 47 // }) 48 // } 49 // 50 // ``` 51 // <!--End PulumiCodeChooser --> 52 // 53 // ## Specifying the Deployment Package 54 // 55 // AWS Lambda Layers expect source code to be provided as a deployment package whose structure varies depending on which `compatibleRuntimes` this layer specifies. 56 // See [Runtimes](https://docs.aws.amazon.com/lambda/latest/dg/API_PublishLayerVersion.html#SSS-PublishLayerVersion-request-CompatibleRuntimes) for the valid values of `compatibleRuntimes`. 57 // 58 // Once you have created your deployment package you can specify it either directly as a local file (using the `filename` argument) or 59 // indirectly via Amazon S3 (using the `s3Bucket`, `s3Key` and `s3ObjectVersion` arguments). When providing the deployment 60 // package via S3 it may be useful to use the `s3.BucketObjectv2` resource to upload it. 61 // 62 // For larger deployment packages it is recommended by Amazon to upload via S3, since the S3 API has better support for uploading large files efficiently. 63 // 64 // ## Import 65 // 66 // Using `pulumi import`, import Lambda Layers using `arn`. For example: 67 // 68 // ```sh 69 // $ pulumi import aws:lambda/layerVersion:LayerVersion test_layer arn:aws:lambda:_REGION_:_ACCOUNT_ID_:layer:_LAYER_NAME_:_LAYER_VERSION_ 70 // ``` 71 type LayerVersion struct { 72 pulumi.CustomResourceState 73 74 // ARN of the Lambda Layer with version. 75 Arn pulumi.StringOutput `pulumi:"arn"` 76 // Path to the function's deployment package within the local filesystem. If defined, The `s3_`-prefixed options cannot be used. 77 Code pulumi.ArchiveOutput `pulumi:"code"` 78 // List of [Architectures](https://docs.aws.amazon.com/lambda/latest/dg/API_PublishLayerVersion.html#SSS-PublishLayerVersion-request-CompatibleArchitectures) this layer is compatible with. Currently `x8664` and `arm64` can be specified. 79 CompatibleArchitectures pulumi.StringArrayOutput `pulumi:"compatibleArchitectures"` 80 // List of [Runtimes](https://docs.aws.amazon.com/lambda/latest/dg/API_PublishLayerVersion.html#SSS-PublishLayerVersion-request-CompatibleRuntimes) this layer is compatible with. Up to 15 runtimes can be specified. 81 CompatibleRuntimes pulumi.StringArrayOutput `pulumi:"compatibleRuntimes"` 82 // Date this resource was created. 83 CreatedDate pulumi.StringOutput `pulumi:"createdDate"` 84 // Description of what your Lambda Layer does. 85 Description pulumi.StringPtrOutput `pulumi:"description"` 86 // ARN of the Lambda Layer without version. 87 LayerArn pulumi.StringOutput `pulumi:"layerArn"` 88 // Unique name for your Lambda Layer 89 // 90 // The following arguments are optional: 91 LayerName pulumi.StringOutput `pulumi:"layerName"` 92 // License info for your Lambda Layer. See [License Info](https://docs.aws.amazon.com/lambda/latest/dg/API_PublishLayerVersion.html#SSS-PublishLayerVersion-request-LicenseInfo). 93 LicenseInfo pulumi.StringPtrOutput `pulumi:"licenseInfo"` 94 // S3 bucket location containing the function's deployment package. Conflicts with `filename`. This bucket must reside in the same AWS region where you are creating the Lambda function. 95 S3Bucket pulumi.StringPtrOutput `pulumi:"s3Bucket"` 96 // S3 key of an object containing the function's deployment package. Conflicts with `filename`. 97 S3Key pulumi.StringPtrOutput `pulumi:"s3Key"` 98 // Object version containing the function's deployment package. Conflicts with `filename`. 99 S3ObjectVersion pulumi.StringPtrOutput `pulumi:"s3ObjectVersion"` 100 // ARN of a signing job. 101 SigningJobArn pulumi.StringOutput `pulumi:"signingJobArn"` 102 // ARN for a signing profile version. 103 SigningProfileVersionArn pulumi.StringOutput `pulumi:"signingProfileVersionArn"` 104 // Whether to retain the old version of a previously deployed Lambda Layer. Default is `false`. When this is not set to `true`, changing any of `compatibleArchitectures`, `compatibleRuntimes`, `description`, `filename`, `layerName`, `licenseInfo`, `s3Bucket`, `s3Key`, `s3ObjectVersion`, or `sourceCodeHash` forces deletion of the existing layer version and creation of a new layer version. 105 SkipDestroy pulumi.BoolPtrOutput `pulumi:"skipDestroy"` 106 // Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either `filename` or `s3Key`. 107 SourceCodeHash pulumi.StringOutput `pulumi:"sourceCodeHash"` 108 // Size in bytes of the function .zip file. 109 SourceCodeSize pulumi.IntOutput `pulumi:"sourceCodeSize"` 110 // Lambda Layer version. 111 Version pulumi.StringOutput `pulumi:"version"` 112 } 113 114 // NewLayerVersion registers a new resource with the given unique name, arguments, and options. 115 func NewLayerVersion(ctx *pulumi.Context, 116 name string, args *LayerVersionArgs, opts ...pulumi.ResourceOption) (*LayerVersion, error) { 117 if args == nil { 118 return nil, errors.New("missing one or more required arguments") 119 } 120 121 if args.LayerName == nil { 122 return nil, errors.New("invalid value for required argument 'LayerName'") 123 } 124 opts = internal.PkgResourceDefaultOpts(opts) 125 var resource LayerVersion 126 err := ctx.RegisterResource("aws:lambda/layerVersion:LayerVersion", name, args, &resource, opts...) 127 if err != nil { 128 return nil, err 129 } 130 return &resource, nil 131 } 132 133 // GetLayerVersion gets an existing LayerVersion resource's state with the given name, ID, and optional 134 // state properties that are used to uniquely qualify the lookup (nil if not required). 135 func GetLayerVersion(ctx *pulumi.Context, 136 name string, id pulumi.IDInput, state *LayerVersionState, opts ...pulumi.ResourceOption) (*LayerVersion, error) { 137 var resource LayerVersion 138 err := ctx.ReadResource("aws:lambda/layerVersion:LayerVersion", name, id, state, &resource, opts...) 139 if err != nil { 140 return nil, err 141 } 142 return &resource, nil 143 } 144 145 // Input properties used for looking up and filtering LayerVersion resources. 146 type layerVersionState struct { 147 // ARN of the Lambda Layer with version. 148 Arn *string `pulumi:"arn"` 149 // Path to the function's deployment package within the local filesystem. If defined, The `s3_`-prefixed options cannot be used. 150 Code pulumi.Archive `pulumi:"code"` 151 // List of [Architectures](https://docs.aws.amazon.com/lambda/latest/dg/API_PublishLayerVersion.html#SSS-PublishLayerVersion-request-CompatibleArchitectures) this layer is compatible with. Currently `x8664` and `arm64` can be specified. 152 CompatibleArchitectures []string `pulumi:"compatibleArchitectures"` 153 // List of [Runtimes](https://docs.aws.amazon.com/lambda/latest/dg/API_PublishLayerVersion.html#SSS-PublishLayerVersion-request-CompatibleRuntimes) this layer is compatible with. Up to 15 runtimes can be specified. 154 CompatibleRuntimes []string `pulumi:"compatibleRuntimes"` 155 // Date this resource was created. 156 CreatedDate *string `pulumi:"createdDate"` 157 // Description of what your Lambda Layer does. 158 Description *string `pulumi:"description"` 159 // ARN of the Lambda Layer without version. 160 LayerArn *string `pulumi:"layerArn"` 161 // Unique name for your Lambda Layer 162 // 163 // The following arguments are optional: 164 LayerName *string `pulumi:"layerName"` 165 // License info for your Lambda Layer. See [License Info](https://docs.aws.amazon.com/lambda/latest/dg/API_PublishLayerVersion.html#SSS-PublishLayerVersion-request-LicenseInfo). 166 LicenseInfo *string `pulumi:"licenseInfo"` 167 // S3 bucket location containing the function's deployment package. Conflicts with `filename`. This bucket must reside in the same AWS region where you are creating the Lambda function. 168 S3Bucket *string `pulumi:"s3Bucket"` 169 // S3 key of an object containing the function's deployment package. Conflicts with `filename`. 170 S3Key *string `pulumi:"s3Key"` 171 // Object version containing the function's deployment package. Conflicts with `filename`. 172 S3ObjectVersion *string `pulumi:"s3ObjectVersion"` 173 // ARN of a signing job. 174 SigningJobArn *string `pulumi:"signingJobArn"` 175 // ARN for a signing profile version. 176 SigningProfileVersionArn *string `pulumi:"signingProfileVersionArn"` 177 // Whether to retain the old version of a previously deployed Lambda Layer. Default is `false`. When this is not set to `true`, changing any of `compatibleArchitectures`, `compatibleRuntimes`, `description`, `filename`, `layerName`, `licenseInfo`, `s3Bucket`, `s3Key`, `s3ObjectVersion`, or `sourceCodeHash` forces deletion of the existing layer version and creation of a new layer version. 178 SkipDestroy *bool `pulumi:"skipDestroy"` 179 // Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either `filename` or `s3Key`. 180 SourceCodeHash *string `pulumi:"sourceCodeHash"` 181 // Size in bytes of the function .zip file. 182 SourceCodeSize *int `pulumi:"sourceCodeSize"` 183 // Lambda Layer version. 184 Version *string `pulumi:"version"` 185 } 186 187 type LayerVersionState struct { 188 // ARN of the Lambda Layer with version. 189 Arn pulumi.StringPtrInput 190 // Path to the function's deployment package within the local filesystem. If defined, The `s3_`-prefixed options cannot be used. 191 Code pulumi.ArchiveInput 192 // List of [Architectures](https://docs.aws.amazon.com/lambda/latest/dg/API_PublishLayerVersion.html#SSS-PublishLayerVersion-request-CompatibleArchitectures) this layer is compatible with. Currently `x8664` and `arm64` can be specified. 193 CompatibleArchitectures pulumi.StringArrayInput 194 // List of [Runtimes](https://docs.aws.amazon.com/lambda/latest/dg/API_PublishLayerVersion.html#SSS-PublishLayerVersion-request-CompatibleRuntimes) this layer is compatible with. Up to 15 runtimes can be specified. 195 CompatibleRuntimes pulumi.StringArrayInput 196 // Date this resource was created. 197 CreatedDate pulumi.StringPtrInput 198 // Description of what your Lambda Layer does. 199 Description pulumi.StringPtrInput 200 // ARN of the Lambda Layer without version. 201 LayerArn pulumi.StringPtrInput 202 // Unique name for your Lambda Layer 203 // 204 // The following arguments are optional: 205 LayerName pulumi.StringPtrInput 206 // License info for your Lambda Layer. See [License Info](https://docs.aws.amazon.com/lambda/latest/dg/API_PublishLayerVersion.html#SSS-PublishLayerVersion-request-LicenseInfo). 207 LicenseInfo pulumi.StringPtrInput 208 // S3 bucket location containing the function's deployment package. Conflicts with `filename`. This bucket must reside in the same AWS region where you are creating the Lambda function. 209 S3Bucket pulumi.StringPtrInput 210 // S3 key of an object containing the function's deployment package. Conflicts with `filename`. 211 S3Key pulumi.StringPtrInput 212 // Object version containing the function's deployment package. Conflicts with `filename`. 213 S3ObjectVersion pulumi.StringPtrInput 214 // ARN of a signing job. 215 SigningJobArn pulumi.StringPtrInput 216 // ARN for a signing profile version. 217 SigningProfileVersionArn pulumi.StringPtrInput 218 // Whether to retain the old version of a previously deployed Lambda Layer. Default is `false`. When this is not set to `true`, changing any of `compatibleArchitectures`, `compatibleRuntimes`, `description`, `filename`, `layerName`, `licenseInfo`, `s3Bucket`, `s3Key`, `s3ObjectVersion`, or `sourceCodeHash` forces deletion of the existing layer version and creation of a new layer version. 219 SkipDestroy pulumi.BoolPtrInput 220 // Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either `filename` or `s3Key`. 221 SourceCodeHash pulumi.StringPtrInput 222 // Size in bytes of the function .zip file. 223 SourceCodeSize pulumi.IntPtrInput 224 // Lambda Layer version. 225 Version pulumi.StringPtrInput 226 } 227 228 func (LayerVersionState) ElementType() reflect.Type { 229 return reflect.TypeOf((*layerVersionState)(nil)).Elem() 230 } 231 232 type layerVersionArgs struct { 233 // Path to the function's deployment package within the local filesystem. If defined, The `s3_`-prefixed options cannot be used. 234 Code pulumi.Archive `pulumi:"code"` 235 // List of [Architectures](https://docs.aws.amazon.com/lambda/latest/dg/API_PublishLayerVersion.html#SSS-PublishLayerVersion-request-CompatibleArchitectures) this layer is compatible with. Currently `x8664` and `arm64` can be specified. 236 CompatibleArchitectures []string `pulumi:"compatibleArchitectures"` 237 // List of [Runtimes](https://docs.aws.amazon.com/lambda/latest/dg/API_PublishLayerVersion.html#SSS-PublishLayerVersion-request-CompatibleRuntimes) this layer is compatible with. Up to 15 runtimes can be specified. 238 CompatibleRuntimes []string `pulumi:"compatibleRuntimes"` 239 // Description of what your Lambda Layer does. 240 Description *string `pulumi:"description"` 241 // Unique name for your Lambda Layer 242 // 243 // The following arguments are optional: 244 LayerName string `pulumi:"layerName"` 245 // License info for your Lambda Layer. See [License Info](https://docs.aws.amazon.com/lambda/latest/dg/API_PublishLayerVersion.html#SSS-PublishLayerVersion-request-LicenseInfo). 246 LicenseInfo *string `pulumi:"licenseInfo"` 247 // S3 bucket location containing the function's deployment package. Conflicts with `filename`. This bucket must reside in the same AWS region where you are creating the Lambda function. 248 S3Bucket *string `pulumi:"s3Bucket"` 249 // S3 key of an object containing the function's deployment package. Conflicts with `filename`. 250 S3Key *string `pulumi:"s3Key"` 251 // Object version containing the function's deployment package. Conflicts with `filename`. 252 S3ObjectVersion *string `pulumi:"s3ObjectVersion"` 253 // Whether to retain the old version of a previously deployed Lambda Layer. Default is `false`. When this is not set to `true`, changing any of `compatibleArchitectures`, `compatibleRuntimes`, `description`, `filename`, `layerName`, `licenseInfo`, `s3Bucket`, `s3Key`, `s3ObjectVersion`, or `sourceCodeHash` forces deletion of the existing layer version and creation of a new layer version. 254 SkipDestroy *bool `pulumi:"skipDestroy"` 255 // Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either `filename` or `s3Key`. 256 SourceCodeHash *string `pulumi:"sourceCodeHash"` 257 } 258 259 // The set of arguments for constructing a LayerVersion resource. 260 type LayerVersionArgs struct { 261 // Path to the function's deployment package within the local filesystem. If defined, The `s3_`-prefixed options cannot be used. 262 Code pulumi.ArchiveInput 263 // List of [Architectures](https://docs.aws.amazon.com/lambda/latest/dg/API_PublishLayerVersion.html#SSS-PublishLayerVersion-request-CompatibleArchitectures) this layer is compatible with. Currently `x8664` and `arm64` can be specified. 264 CompatibleArchitectures pulumi.StringArrayInput 265 // List of [Runtimes](https://docs.aws.amazon.com/lambda/latest/dg/API_PublishLayerVersion.html#SSS-PublishLayerVersion-request-CompatibleRuntimes) this layer is compatible with. Up to 15 runtimes can be specified. 266 CompatibleRuntimes pulumi.StringArrayInput 267 // Description of what your Lambda Layer does. 268 Description pulumi.StringPtrInput 269 // Unique name for your Lambda Layer 270 // 271 // The following arguments are optional: 272 LayerName pulumi.StringInput 273 // License info for your Lambda Layer. See [License Info](https://docs.aws.amazon.com/lambda/latest/dg/API_PublishLayerVersion.html#SSS-PublishLayerVersion-request-LicenseInfo). 274 LicenseInfo pulumi.StringPtrInput 275 // S3 bucket location containing the function's deployment package. Conflicts with `filename`. This bucket must reside in the same AWS region where you are creating the Lambda function. 276 S3Bucket pulumi.StringPtrInput 277 // S3 key of an object containing the function's deployment package. Conflicts with `filename`. 278 S3Key pulumi.StringPtrInput 279 // Object version containing the function's deployment package. Conflicts with `filename`. 280 S3ObjectVersion pulumi.StringPtrInput 281 // Whether to retain the old version of a previously deployed Lambda Layer. Default is `false`. When this is not set to `true`, changing any of `compatibleArchitectures`, `compatibleRuntimes`, `description`, `filename`, `layerName`, `licenseInfo`, `s3Bucket`, `s3Key`, `s3ObjectVersion`, or `sourceCodeHash` forces deletion of the existing layer version and creation of a new layer version. 282 SkipDestroy pulumi.BoolPtrInput 283 // Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either `filename` or `s3Key`. 284 SourceCodeHash pulumi.StringPtrInput 285 } 286 287 func (LayerVersionArgs) ElementType() reflect.Type { 288 return reflect.TypeOf((*layerVersionArgs)(nil)).Elem() 289 } 290 291 type LayerVersionInput interface { 292 pulumi.Input 293 294 ToLayerVersionOutput() LayerVersionOutput 295 ToLayerVersionOutputWithContext(ctx context.Context) LayerVersionOutput 296 } 297 298 func (*LayerVersion) ElementType() reflect.Type { 299 return reflect.TypeOf((**LayerVersion)(nil)).Elem() 300 } 301 302 func (i *LayerVersion) ToLayerVersionOutput() LayerVersionOutput { 303 return i.ToLayerVersionOutputWithContext(context.Background()) 304 } 305 306 func (i *LayerVersion) ToLayerVersionOutputWithContext(ctx context.Context) LayerVersionOutput { 307 return pulumi.ToOutputWithContext(ctx, i).(LayerVersionOutput) 308 } 309 310 // LayerVersionArrayInput is an input type that accepts LayerVersionArray and LayerVersionArrayOutput values. 311 // You can construct a concrete instance of `LayerVersionArrayInput` via: 312 // 313 // LayerVersionArray{ LayerVersionArgs{...} } 314 type LayerVersionArrayInput interface { 315 pulumi.Input 316 317 ToLayerVersionArrayOutput() LayerVersionArrayOutput 318 ToLayerVersionArrayOutputWithContext(context.Context) LayerVersionArrayOutput 319 } 320 321 type LayerVersionArray []LayerVersionInput 322 323 func (LayerVersionArray) ElementType() reflect.Type { 324 return reflect.TypeOf((*[]*LayerVersion)(nil)).Elem() 325 } 326 327 func (i LayerVersionArray) ToLayerVersionArrayOutput() LayerVersionArrayOutput { 328 return i.ToLayerVersionArrayOutputWithContext(context.Background()) 329 } 330 331 func (i LayerVersionArray) ToLayerVersionArrayOutputWithContext(ctx context.Context) LayerVersionArrayOutput { 332 return pulumi.ToOutputWithContext(ctx, i).(LayerVersionArrayOutput) 333 } 334 335 // LayerVersionMapInput is an input type that accepts LayerVersionMap and LayerVersionMapOutput values. 336 // You can construct a concrete instance of `LayerVersionMapInput` via: 337 // 338 // LayerVersionMap{ "key": LayerVersionArgs{...} } 339 type LayerVersionMapInput interface { 340 pulumi.Input 341 342 ToLayerVersionMapOutput() LayerVersionMapOutput 343 ToLayerVersionMapOutputWithContext(context.Context) LayerVersionMapOutput 344 } 345 346 type LayerVersionMap map[string]LayerVersionInput 347 348 func (LayerVersionMap) ElementType() reflect.Type { 349 return reflect.TypeOf((*map[string]*LayerVersion)(nil)).Elem() 350 } 351 352 func (i LayerVersionMap) ToLayerVersionMapOutput() LayerVersionMapOutput { 353 return i.ToLayerVersionMapOutputWithContext(context.Background()) 354 } 355 356 func (i LayerVersionMap) ToLayerVersionMapOutputWithContext(ctx context.Context) LayerVersionMapOutput { 357 return pulumi.ToOutputWithContext(ctx, i).(LayerVersionMapOutput) 358 } 359 360 type LayerVersionOutput struct{ *pulumi.OutputState } 361 362 func (LayerVersionOutput) ElementType() reflect.Type { 363 return reflect.TypeOf((**LayerVersion)(nil)).Elem() 364 } 365 366 func (o LayerVersionOutput) ToLayerVersionOutput() LayerVersionOutput { 367 return o 368 } 369 370 func (o LayerVersionOutput) ToLayerVersionOutputWithContext(ctx context.Context) LayerVersionOutput { 371 return o 372 } 373 374 // ARN of the Lambda Layer with version. 375 func (o LayerVersionOutput) Arn() pulumi.StringOutput { 376 return o.ApplyT(func(v *LayerVersion) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 377 } 378 379 // Path to the function's deployment package within the local filesystem. If defined, The `s3_`-prefixed options cannot be used. 380 func (o LayerVersionOutput) Code() pulumi.ArchiveOutput { 381 return o.ApplyT(func(v *LayerVersion) pulumi.ArchiveOutput { return v.Code }).(pulumi.ArchiveOutput) 382 } 383 384 // List of [Architectures](https://docs.aws.amazon.com/lambda/latest/dg/API_PublishLayerVersion.html#SSS-PublishLayerVersion-request-CompatibleArchitectures) this layer is compatible with. Currently `x8664` and `arm64` can be specified. 385 func (o LayerVersionOutput) CompatibleArchitectures() pulumi.StringArrayOutput { 386 return o.ApplyT(func(v *LayerVersion) pulumi.StringArrayOutput { return v.CompatibleArchitectures }).(pulumi.StringArrayOutput) 387 } 388 389 // List of [Runtimes](https://docs.aws.amazon.com/lambda/latest/dg/API_PublishLayerVersion.html#SSS-PublishLayerVersion-request-CompatibleRuntimes) this layer is compatible with. Up to 15 runtimes can be specified. 390 func (o LayerVersionOutput) CompatibleRuntimes() pulumi.StringArrayOutput { 391 return o.ApplyT(func(v *LayerVersion) pulumi.StringArrayOutput { return v.CompatibleRuntimes }).(pulumi.StringArrayOutput) 392 } 393 394 // Date this resource was created. 395 func (o LayerVersionOutput) CreatedDate() pulumi.StringOutput { 396 return o.ApplyT(func(v *LayerVersion) pulumi.StringOutput { return v.CreatedDate }).(pulumi.StringOutput) 397 } 398 399 // Description of what your Lambda Layer does. 400 func (o LayerVersionOutput) Description() pulumi.StringPtrOutput { 401 return o.ApplyT(func(v *LayerVersion) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 402 } 403 404 // ARN of the Lambda Layer without version. 405 func (o LayerVersionOutput) LayerArn() pulumi.StringOutput { 406 return o.ApplyT(func(v *LayerVersion) pulumi.StringOutput { return v.LayerArn }).(pulumi.StringOutput) 407 } 408 409 // Unique name for your Lambda Layer 410 // 411 // The following arguments are optional: 412 func (o LayerVersionOutput) LayerName() pulumi.StringOutput { 413 return o.ApplyT(func(v *LayerVersion) pulumi.StringOutput { return v.LayerName }).(pulumi.StringOutput) 414 } 415 416 // License info for your Lambda Layer. See [License Info](https://docs.aws.amazon.com/lambda/latest/dg/API_PublishLayerVersion.html#SSS-PublishLayerVersion-request-LicenseInfo). 417 func (o LayerVersionOutput) LicenseInfo() pulumi.StringPtrOutput { 418 return o.ApplyT(func(v *LayerVersion) pulumi.StringPtrOutput { return v.LicenseInfo }).(pulumi.StringPtrOutput) 419 } 420 421 // S3 bucket location containing the function's deployment package. Conflicts with `filename`. This bucket must reside in the same AWS region where you are creating the Lambda function. 422 func (o LayerVersionOutput) S3Bucket() pulumi.StringPtrOutput { 423 return o.ApplyT(func(v *LayerVersion) pulumi.StringPtrOutput { return v.S3Bucket }).(pulumi.StringPtrOutput) 424 } 425 426 // S3 key of an object containing the function's deployment package. Conflicts with `filename`. 427 func (o LayerVersionOutput) S3Key() pulumi.StringPtrOutput { 428 return o.ApplyT(func(v *LayerVersion) pulumi.StringPtrOutput { return v.S3Key }).(pulumi.StringPtrOutput) 429 } 430 431 // Object version containing the function's deployment package. Conflicts with `filename`. 432 func (o LayerVersionOutput) S3ObjectVersion() pulumi.StringPtrOutput { 433 return o.ApplyT(func(v *LayerVersion) pulumi.StringPtrOutput { return v.S3ObjectVersion }).(pulumi.StringPtrOutput) 434 } 435 436 // ARN of a signing job. 437 func (o LayerVersionOutput) SigningJobArn() pulumi.StringOutput { 438 return o.ApplyT(func(v *LayerVersion) pulumi.StringOutput { return v.SigningJobArn }).(pulumi.StringOutput) 439 } 440 441 // ARN for a signing profile version. 442 func (o LayerVersionOutput) SigningProfileVersionArn() pulumi.StringOutput { 443 return o.ApplyT(func(v *LayerVersion) pulumi.StringOutput { return v.SigningProfileVersionArn }).(pulumi.StringOutput) 444 } 445 446 // Whether to retain the old version of a previously deployed Lambda Layer. Default is `false`. When this is not set to `true`, changing any of `compatibleArchitectures`, `compatibleRuntimes`, `description`, `filename`, `layerName`, `licenseInfo`, `s3Bucket`, `s3Key`, `s3ObjectVersion`, or `sourceCodeHash` forces deletion of the existing layer version and creation of a new layer version. 447 func (o LayerVersionOutput) SkipDestroy() pulumi.BoolPtrOutput { 448 return o.ApplyT(func(v *LayerVersion) pulumi.BoolPtrOutput { return v.SkipDestroy }).(pulumi.BoolPtrOutput) 449 } 450 451 // Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either `filename` or `s3Key`. 452 func (o LayerVersionOutput) SourceCodeHash() pulumi.StringOutput { 453 return o.ApplyT(func(v *LayerVersion) pulumi.StringOutput { return v.SourceCodeHash }).(pulumi.StringOutput) 454 } 455 456 // Size in bytes of the function .zip file. 457 func (o LayerVersionOutput) SourceCodeSize() pulumi.IntOutput { 458 return o.ApplyT(func(v *LayerVersion) pulumi.IntOutput { return v.SourceCodeSize }).(pulumi.IntOutput) 459 } 460 461 // Lambda Layer version. 462 func (o LayerVersionOutput) Version() pulumi.StringOutput { 463 return o.ApplyT(func(v *LayerVersion) pulumi.StringOutput { return v.Version }).(pulumi.StringOutput) 464 } 465 466 type LayerVersionArrayOutput struct{ *pulumi.OutputState } 467 468 func (LayerVersionArrayOutput) ElementType() reflect.Type { 469 return reflect.TypeOf((*[]*LayerVersion)(nil)).Elem() 470 } 471 472 func (o LayerVersionArrayOutput) ToLayerVersionArrayOutput() LayerVersionArrayOutput { 473 return o 474 } 475 476 func (o LayerVersionArrayOutput) ToLayerVersionArrayOutputWithContext(ctx context.Context) LayerVersionArrayOutput { 477 return o 478 } 479 480 func (o LayerVersionArrayOutput) Index(i pulumi.IntInput) LayerVersionOutput { 481 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LayerVersion { 482 return vs[0].([]*LayerVersion)[vs[1].(int)] 483 }).(LayerVersionOutput) 484 } 485 486 type LayerVersionMapOutput struct{ *pulumi.OutputState } 487 488 func (LayerVersionMapOutput) ElementType() reflect.Type { 489 return reflect.TypeOf((*map[string]*LayerVersion)(nil)).Elem() 490 } 491 492 func (o LayerVersionMapOutput) ToLayerVersionMapOutput() LayerVersionMapOutput { 493 return o 494 } 495 496 func (o LayerVersionMapOutput) ToLayerVersionMapOutputWithContext(ctx context.Context) LayerVersionMapOutput { 497 return o 498 } 499 500 func (o LayerVersionMapOutput) MapIndex(k pulumi.StringInput) LayerVersionOutput { 501 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LayerVersion { 502 return vs[0].(map[string]*LayerVersion)[vs[1].(string)] 503 }).(LayerVersionOutput) 504 } 505 506 func init() { 507 pulumi.RegisterInputType(reflect.TypeOf((*LayerVersionInput)(nil)).Elem(), &LayerVersion{}) 508 pulumi.RegisterInputType(reflect.TypeOf((*LayerVersionArrayInput)(nil)).Elem(), LayerVersionArray{}) 509 pulumi.RegisterInputType(reflect.TypeOf((*LayerVersionMapInput)(nil)).Elem(), LayerVersionMap{}) 510 pulumi.RegisterOutputType(LayerVersionOutput{}) 511 pulumi.RegisterOutputType(LayerVersionArrayOutput{}) 512 pulumi.RegisterOutputType(LayerVersionMapOutput{}) 513 }