kcr_lambda_services_k8s_aws 3.20260602.223721

Kubernetes Custom Resource Bindings
Documentation
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
// WARNING: generated by kopium - manual changes will be overwritten
// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/aws-controllers-k8s/lambda-controller/lambda.services.k8s.aws/v1alpha1/functions.yaml
// kopium version: 0.23.0

#[allow(unused_imports)]
mod prelude {
    pub use kube::CustomResource;
    pub use serde::{Serialize, Deserialize};
    pub use std::collections::BTreeMap;
    pub use k8s_openapi::apimachinery::pkg::apis::meta::v1::Condition;
}

use self::prelude::*;

/// FunctionSpec defines the desired state of Function.
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[kube(group = "lambda.services.k8s.aws", version = "v1alpha1", kind = "Function", plural = "functions")]
#[kube(namespaced)]
#[kube(status = "FunctionStatus")]
#[kube(schema = "disabled")]
#[kube(derive="Default")]
#[kube(derive="PartialEq")]
pub struct FunctionSpec {
    /// The instruction set architecture that the function supports. Enter a string
    /// array with one of the valid values (arm64 or x86_64). The default value is
    /// x86_64.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub architectures: Option<Vec<String>>,
    /// The code for the function.
    pub code: FunctionCode,
    /// To enable code signing for this function, specify the ARN of a code-signing
    /// configuration. A code-signing configuration includes a set of signing profiles,
    /// which define the trusted publishers for this function.
    /// 
    /// Regex Pattern: `^arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\d{1}:\d{12}:code-signing-config:csc-[a-z0-9]{17}$`
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "codeSigningConfigARN")]
    pub code_signing_config_arn: Option<String>,
    /// A dead-letter queue configuration that specifies the queue or topic where
    /// Lambda sends asynchronous events when they fail processing. For more information,
    /// see Dead-letter queues (<https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq).>
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "deadLetterConfig")]
    pub dead_letter_config: Option<FunctionDeadLetterConfig>,
    /// A description of the function.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// Configuration settings for durable functions. Enables creating functions
    /// with durability that can remember their state and continue execution even
    /// after interruptions.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "durableConfig")]
    pub durable_config: Option<FunctionDurableConfig>,
    /// Environment variables that are accessible from function code during execution.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub environment: Option<FunctionEnvironment>,
    /// The size of the function's /tmp directory in MB. The default value is 512,
    /// but can be any whole number between 512 and 10,240 MB. For more information,
    /// see Configuring ephemeral storage (console) (<https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage).>
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "ephemeralStorage")]
    pub ephemeral_storage: Option<FunctionEphemeralStorage>,
    /// Connection settings for an Amazon EFS file system.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fileSystemConfigs")]
    pub file_system_configs: Option<Vec<FunctionFileSystemConfigs>>,
    /// Configures options for asynchronous invocation on a function.
    /// 
    /// - DestinationConfig
    /// A destination for events after they have been sent to a function for processing.
    /// 
    /// Types of Destinations:
    /// Function - The Amazon Resource Name (ARN) of a Lambda function.
    /// Queue - The ARN of a standard SQS queue.
    /// Topic - The ARN of a standard SNS topic.
    /// Event Bus - The ARN of an Amazon EventBridge event bus.
    /// 
    /// - MaximumEventAgeInSeconds
    /// The maximum age of a request that Lambda sends to a function for processing.
    /// 
    /// - MaximumRetryAttempts
    /// The maximum number of times to retry when the function returns an error.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "functionEventInvokeConfig")]
    pub function_event_invoke_config: Option<FunctionFunctionEventInvokeConfig>,
    /// The name of the method within your code that Lambda calls to run your function.
    /// Handler is required if the deployment package is a .zip file archive. The
    /// format includes the file name. It can also include namespaces and other qualifiers,
    /// depending on the runtime. For more information, see Lambda programming model
    /// (<https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html).>
    /// 
    /// Regex Pattern: `^[^\s]+$`
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub handler: Option<String>,
    /// Container image configuration values (<https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms)>
    /// that override the values in the container image Dockerfile.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "imageConfig")]
    pub image_config: Option<FunctionImageConfig>,
    /// The ARN of the Key Management Service (KMS) customer managed key that's used
    /// to encrypt the following resources:
    /// 
    ///    * The function's environment variables (<https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption).>
    /// 
    ///    * The function's Lambda SnapStart (<https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html)>
    ///    snapshots.
    /// 
    ///    * When used with SourceKMSKeyArn, the unzipped version of the .zip deployment
    ///    package that's used for function invocations. For more information, see
    ///    Specifying a customer managed key for Lambda (<https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption).>
    /// 
    ///    * The optimized version of the container image that's used for function
    ///    invocations. Note that this is not the same key that's used to protect
    ///    your container image in the Amazon Elastic Container Registry (Amazon
    ///    ECR). For more information, see Function lifecycle (<https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle).>
    /// 
    /// If you don't provide a customer managed key, Lambda uses an Amazon Web Services
    /// owned key (<https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk)>
    /// or an Amazon Web Services managed key (<https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk).>
    /// 
    /// Regex Pattern: `^(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()$`
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "kmsKeyARN")]
    pub kms_key_arn: Option<String>,
    /// AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference
    /// type to provide more user friendly syntax for references using 'from' field
    /// Ex:
    /// APIIDRef:
    /// 
    /// 	from:
    /// 	  name: my-api
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "kmsKeyRef")]
    pub kms_key_ref: Option<FunctionKmsKeyRef>,
    /// A list of function layers (<https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)>
    /// to add to the function's execution environment. Specify each layer by its
    /// ARN, including the version.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub layers: Option<Vec<String>>,
    /// The function's Amazon CloudWatch Logs configuration settings.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "loggingConfig")]
    pub logging_config: Option<FunctionLoggingConfig>,
    /// The amount of memory available to the function (<https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console)>
    /// at runtime. Increasing the function memory also increases its CPU allocation.
    /// The default value is 128 MB. The value can be any multiple of 1 MB.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "memorySize")]
    pub memory_size: Option<i64>,
    /// The name or ARN of the Lambda function.
    /// 
    /// Name formats
    /// 
    ///    * Function name – my-function.
    /// 
    ///    * Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function.
    /// 
    ///    * Partial ARN – 123456789012:function:my-function.
    /// 
    /// The length constraint applies only to the full ARN. If you specify only the
    /// function name, it is limited to 64 characters in length.
    /// 
    /// Regex Pattern: `^(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?$`
    pub name: String,
    /// The type of deployment package. Set to Image for container image and set
    /// to Zip for .zip file archive.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "packageType")]
    pub package_type: Option<String>,
    /// Set to true to publish the first version of the function during creation.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub publish: Option<bool>,
    /// The number of simultaneous executions to reserve for the function.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "reservedConcurrentExecutions")]
    pub reserved_concurrent_executions: Option<i64>,
    /// The Amazon Resource Name (ARN) of the function's execution role.
    /// 
    /// Regex Pattern: `^arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+$`
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub role: Option<String>,
    /// AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference
    /// type to provide more user friendly syntax for references using 'from' field
    /// Ex:
    /// APIIDRef:
    /// 
    /// 	from:
    /// 	  name: my-api
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "roleRef")]
    pub role_ref: Option<FunctionRoleRef>,
    /// The identifier of the function's runtime (<https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html).>
    /// Runtime is required if the deployment package is a .zip file archive. Specifying
    /// a runtime results in an error if you're deploying a function using a container
    /// image.
    /// 
    /// The following list includes deprecated runtimes. Lambda blocks creating new
    /// functions and updating existing functions shortly after each runtime is deprecated.
    /// For more information, see Runtime use after deprecation (<https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels).>
    /// 
    /// For a list of all currently supported runtimes, see Supported runtimes (<https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported).>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub runtime: Option<String>,
    /// The function's SnapStart (<https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html)>
    /// setting.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "snapStart")]
    pub snap_start: Option<FunctionSnapStart>,
    /// A list of tags (<https://docs.aws.amazon.com/lambda/latest/dg/tagging.html)>
    /// to apply to the function.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub tags: Option<BTreeMap<String, String>>,
    /// Configuration for multi-tenant applications that use Lambda functions. Defines
    /// tenant isolation settings and resource allocations. Required for functions
    /// supporting multiple tenants.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "tenancyConfig")]
    pub tenancy_config: Option<FunctionTenancyConfig>,
    /// The amount of time (in seconds) that Lambda allows a function to run before
    /// stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds.
    /// For more information, see Lambda execution environment (<https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html).>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub timeout: Option<i64>,
    /// Set Mode to Active to sample and trace a subset of incoming requests with
    /// X-Ray (<https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html).>
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "tracingConfig")]
    pub tracing_config: Option<FunctionTracingConfig>,
    /// For network connectivity to Amazon Web Services resources in a VPC, specify
    /// a list of security groups and subnets in the VPC. When you connect a function
    /// to a VPC, it can access resources and the internet only through that VPC.
    /// For more information, see Configuring a Lambda function to access resources
    /// in a VPC (<https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html).>
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "vpcConfig")]
    pub vpc_config: Option<FunctionVpcConfig>,
}

/// The code for the function.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionCode {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "imageURI")]
    pub image_uri: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "s3Bucket")]
    pub s3_bucket: Option<String>,
    /// Reference field for S3Bucket
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "s3BucketRef")]
    pub s3_bucket_ref: Option<FunctionCodeS3BucketRef>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "s3Key")]
    pub s3_key: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "s3ObjectVersion")]
    pub s3_object_version: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub sha256: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "zipFile")]
    pub zip_file: Option<String>,
}

/// Reference field for S3Bucket
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionCodeS3BucketRef {
    /// AWSResourceReference provides all the values necessary to reference another
    /// k8s resource for finding the identifier(Id/ARN/Name)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub from: Option<FunctionCodeS3BucketRefFrom>,
}

/// AWSResourceReference provides all the values necessary to reference another
/// k8s resource for finding the identifier(Id/ARN/Name)
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionCodeS3BucketRefFrom {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub namespace: Option<String>,
}

/// A dead-letter queue configuration that specifies the queue or topic where
/// Lambda sends asynchronous events when they fail processing. For more information,
/// see Dead-letter queues (<https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionDeadLetterConfig {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "targetARN")]
    pub target_arn: Option<String>,
}

/// Configuration settings for durable functions. Enables creating functions
/// with durability that can remember their state and continue execution even
/// after interruptions.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionDurableConfig {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "executionTimeout")]
    pub execution_timeout: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "retentionPeriodInDays")]
    pub retention_period_in_days: Option<i64>,
}

/// Environment variables that are accessible from function code during execution.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionEnvironment {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub variables: Option<BTreeMap<String, String>>,
}

/// The size of the function's /tmp directory in MB. The default value is 512,
/// but can be any whole number between 512 and 10,240 MB. For more information,
/// see Configuring ephemeral storage (console) (<https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionEphemeralStorage {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub size: Option<i64>,
}

/// Details about the connection between a Lambda function and an Amazon EFS
/// file system (<https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionFileSystemConfigs {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub arn: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "localMountPath")]
    pub local_mount_path: Option<String>,
}

/// Configures options for asynchronous invocation on a function.
/// 
/// - DestinationConfig
/// A destination for events after they have been sent to a function for processing.
/// 
/// Types of Destinations:
/// Function - The Amazon Resource Name (ARN) of a Lambda function.
/// Queue - The ARN of a standard SQS queue.
/// Topic - The ARN of a standard SNS topic.
/// Event Bus - The ARN of an Amazon EventBridge event bus.
/// 
/// - MaximumEventAgeInSeconds
/// The maximum age of a request that Lambda sends to a function for processing.
/// 
/// - MaximumRetryAttempts
/// The maximum number of times to retry when the function returns an error.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionFunctionEventInvokeConfig {
    /// A configuration object that specifies the destination of an event after Lambda
    /// processes it. For more information, see Adding a destination (<https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations).>
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "destinationConfig")]
    pub destination_config: Option<FunctionFunctionEventInvokeConfigDestinationConfig>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "functionName")]
    pub function_name: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "maximumEventAgeInSeconds")]
    pub maximum_event_age_in_seconds: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "maximumRetryAttempts")]
    pub maximum_retry_attempts: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub qualifier: Option<String>,
}

/// A configuration object that specifies the destination of an event after Lambda
/// processes it. For more information, see Adding a destination (<https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionFunctionEventInvokeConfigDestinationConfig {
    /// A destination for events that failed processing. For more information, see
    /// Adding a destination (<https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations).>
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "onFailure")]
    pub on_failure: Option<FunctionFunctionEventInvokeConfigDestinationConfigOnFailure>,
    /// A destination for events that were processed successfully.
    /// 
    /// To retain records of successful asynchronous invocations (<https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations),>
    /// you can configure an Amazon SNS topic, Amazon SQS queue, Lambda function,
    /// or Amazon EventBridge event bus as the destination.
    /// 
    /// OnSuccess is not supported in CreateEventSourceMapping or UpdateEventSourceMapping
    /// requests.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "onSuccess")]
    pub on_success: Option<FunctionFunctionEventInvokeConfigDestinationConfigOnSuccess>,
}

/// A destination for events that failed processing. For more information, see
/// Adding a destination (<https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionFunctionEventInvokeConfigDestinationConfigOnFailure {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub destination: Option<String>,
}

/// A destination for events that were processed successfully.
/// 
/// To retain records of successful asynchronous invocations (<https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations),>
/// you can configure an Amazon SNS topic, Amazon SQS queue, Lambda function,
/// or Amazon EventBridge event bus as the destination.
/// 
/// OnSuccess is not supported in CreateEventSourceMapping or UpdateEventSourceMapping
/// requests.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionFunctionEventInvokeConfigDestinationConfigOnSuccess {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub destination: Option<String>,
}

/// Container image configuration values (<https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms)>
/// that override the values in the container image Dockerfile.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionImageConfig {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub command: Option<Vec<String>>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "entryPoint")]
    pub entry_point: Option<Vec<String>>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "workingDirectory")]
    pub working_directory: Option<String>,
}

/// AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference
/// type to provide more user friendly syntax for references using 'from' field
/// Ex:
/// APIIDRef:
/// 
/// 	from:
/// 	  name: my-api
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionKmsKeyRef {
    /// AWSResourceReference provides all the values necessary to reference another
    /// k8s resource for finding the identifier(Id/ARN/Name)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub from: Option<FunctionKmsKeyRefFrom>,
}

/// AWSResourceReference provides all the values necessary to reference another
/// k8s resource for finding the identifier(Id/ARN/Name)
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionKmsKeyRefFrom {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub namespace: Option<String>,
}

/// The function's Amazon CloudWatch Logs configuration settings.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionLoggingConfig {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "applicationLogLevel")]
    pub application_log_level: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "logFormat")]
    pub log_format: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "logGroup")]
    pub log_group: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "systemLogLevel")]
    pub system_log_level: Option<String>,
}

/// AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference
/// type to provide more user friendly syntax for references using 'from' field
/// Ex:
/// APIIDRef:
/// 
/// 	from:
/// 	  name: my-api
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionRoleRef {
    /// AWSResourceReference provides all the values necessary to reference another
    /// k8s resource for finding the identifier(Id/ARN/Name)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub from: Option<FunctionRoleRefFrom>,
}

/// AWSResourceReference provides all the values necessary to reference another
/// k8s resource for finding the identifier(Id/ARN/Name)
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionRoleRefFrom {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub namespace: Option<String>,
}

/// The function's SnapStart (<https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html)>
/// setting.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionSnapStart {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "applyOn")]
    pub apply_on: Option<String>,
}

/// Configuration for multi-tenant applications that use Lambda functions. Defines
/// tenant isolation settings and resource allocations. Required for functions
/// supporting multiple tenants.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionTenancyConfig {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "tenantIsolationMode")]
    pub tenant_isolation_mode: Option<String>,
}

/// Set Mode to Active to sample and trace a subset of incoming requests with
/// X-Ray (<https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionTracingConfig {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub mode: Option<String>,
}

/// For network connectivity to Amazon Web Services resources in a VPC, specify
/// a list of security groups and subnets in the VPC. When you connect a function
/// to a VPC, it can access resources and the internet only through that VPC.
/// For more information, see Configuring a Lambda function to access resources
/// in a VPC (<https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionVpcConfig {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "securityGroupIDs")]
    pub security_group_i_ds: Option<Vec<String>>,
    /// Reference field for SecurityGroupIDs
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "securityGroupRefs")]
    pub security_group_refs: Option<Vec<FunctionVpcConfigSecurityGroupRefs>>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "subnetIDs")]
    pub subnet_i_ds: Option<Vec<String>>,
    /// Reference field for SubnetIDs
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "subnetRefs")]
    pub subnet_refs: Option<Vec<FunctionVpcConfigSubnetRefs>>,
}

/// AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference
/// type to provide more user friendly syntax for references using 'from' field
/// Ex:
/// APIIDRef:
/// 
/// 	from:
/// 	  name: my-api
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionVpcConfigSecurityGroupRefs {
    /// AWSResourceReference provides all the values necessary to reference another
    /// k8s resource for finding the identifier(Id/ARN/Name)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub from: Option<FunctionVpcConfigSecurityGroupRefsFrom>,
}

/// AWSResourceReference provides all the values necessary to reference another
/// k8s resource for finding the identifier(Id/ARN/Name)
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionVpcConfigSecurityGroupRefsFrom {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub namespace: Option<String>,
}

/// AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference
/// type to provide more user friendly syntax for references using 'from' field
/// Ex:
/// APIIDRef:
/// 
/// 	from:
/// 	  name: my-api
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionVpcConfigSubnetRefs {
    /// AWSResourceReference provides all the values necessary to reference another
    /// k8s resource for finding the identifier(Id/ARN/Name)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub from: Option<FunctionVpcConfigSubnetRefsFrom>,
}

/// AWSResourceReference provides all the values necessary to reference another
/// k8s resource for finding the identifier(Id/ARN/Name)
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionVpcConfigSubnetRefsFrom {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub namespace: Option<String>,
}

/// FunctionStatus defines the observed state of Function
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionStatus {
    /// All CRs managed by ACK have a common `Status.ACKResourceMetadata` member
    /// that is used to contain resource sync state, account ownership,
    /// constructed ARN for the resource
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "ackResourceMetadata")]
    pub ack_resource_metadata: Option<FunctionStatusAckResourceMetadata>,
    /// The SHA256 hash of the function's deployment package.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "codeSHA256")]
    pub code_sha256: Option<String>,
    /// The size of the function's deployment package, in bytes.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "codeSize")]
    pub code_size: Option<i64>,
    /// All CRs managed by ACK have a common `Status.Conditions` member that
    /// contains a collection of `ackv1alpha1.Condition` objects that describe
    /// the various terminal states of the CR and its backend AWS service API
    /// resource
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub conditions: Option<Vec<Condition>>,
    /// The function's image configuration values.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "imageConfigResponse")]
    pub image_config_response: Option<FunctionStatusImageConfigResponse>,
    /// The date and time that the function was last updated, in ISO-8601 format
    /// (<https://www.w3.org/TR/NOTE-datetime)> (YYYY-MM-DDThh:mm:ss.sTZD).
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "lastModified")]
    pub last_modified: Option<String>,
    /// The status of the last update that was performed on the function. This is
    /// first set to Successful after function creation completes.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "lastUpdateStatus")]
    pub last_update_status: Option<String>,
    /// The reason for the last update that was performed on the function.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "lastUpdateStatusReason")]
    pub last_update_status_reason: Option<String>,
    /// The reason code for the last update that was performed on the function.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "lastUpdateStatusReasonCode")]
    pub last_update_status_reason_code: Option<String>,
    /// The function's layers (<https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).>
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "layerStatuses")]
    pub layer_statuses: Option<Vec<FunctionStatusLayerStatuses>>,
    /// For Lambda@Edge functions, the ARN of the main function.
    /// 
    /// Regex Pattern: `^arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:\d{12}:function:[a-zA-Z0-9-_]+(:(\$LATEST|[a-zA-Z0-9-_]+))?$`
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "masterARN")]
    pub master_arn: Option<String>,
    /// The latest updated revision of the function or alias.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "revisionID")]
    pub revision_id: Option<String>,
    /// The ARN of the signing job.
    /// 
    /// Regex Pattern: `^arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\-])+:([a-z]{2}(-gov)?-[a-z]+-\d{1})?:(\d{12})?:(.*)$`
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "signingJobARN")]
    pub signing_job_arn: Option<String>,
    /// The ARN of the signing profile version.
    /// 
    /// Regex Pattern: `^arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\-])+:([a-z]{2}(-gov)?-[a-z]+-\d{1})?:(\d{12})?:(.*)$`
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "signingProfileVersionARN")]
    pub signing_profile_version_arn: Option<String>,
    /// The current state of the function. When the state is Inactive, you can reactivate
    /// the function by invoking it.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub state: Option<String>,
    /// The reason for the function's current state.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "stateReason")]
    pub state_reason: Option<String>,
    /// The reason code for the function's current state. When the code is Creating,
    /// you can't invoke or modify the function.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "stateReasonCode")]
    pub state_reason_code: Option<String>,
    /// The version of the Lambda function.
    /// 
    /// Regex Pattern: `^(\$LATEST|[0-9]+)$`
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub version: Option<String>,
}

/// All CRs managed by ACK have a common `Status.ACKResourceMetadata` member
/// that is used to contain resource sync state, account ownership,
/// constructed ARN for the resource
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionStatusAckResourceMetadata {
    /// ARN is the Amazon Resource Name for the resource. This is a
    /// globally-unique identifier and is set only by the ACK service controller
    /// once the controller has orchestrated the creation of the resource OR
    /// when it has verified that an "adopted" resource (a resource where the
    /// ARN annotation was set by the Kubernetes user on the CR) exists and
    /// matches the supplied CR's Spec field values.
    /// <https://github.com/aws/aws-controllers-k8s/issues/270>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub arn: Option<String>,
    /// OwnerAccountID is the AWS Account ID of the account that owns the
    /// backend AWS service API resource.
    #[serde(rename = "ownerAccountID")]
    pub owner_account_id: String,
    /// Partition is the AWS partition in which the resource exists or will exist
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub partition: Option<String>,
    /// Region is the AWS region in which the resource exists or will exist.
    pub region: String,
}

/// The function's image configuration values.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionStatusImageConfigResponse {
    /// Error response to GetFunctionConfiguration.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub error: Option<FunctionStatusImageConfigResponseError>,
    /// Configuration values that override the container image Dockerfile settings.
    /// For more information, see Container image settings (<https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms).>
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "imageConfig")]
    pub image_config: Option<FunctionStatusImageConfigResponseImageConfig>,
}

/// Error response to GetFunctionConfiguration.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionStatusImageConfigResponseError {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "errorCode")]
    pub error_code: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
}

/// Configuration values that override the container image Dockerfile settings.
/// For more information, see Container image settings (<https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionStatusImageConfigResponseImageConfig {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub command: Option<Vec<String>>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "entryPoint")]
    pub entry_point: Option<Vec<String>>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "workingDirectory")]
    pub working_directory: Option<String>,
}

/// An Lambda layer (<https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FunctionStatusLayerStatuses {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub arn: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "codeSize")]
    pub code_size: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "signingJobARN")]
    pub signing_job_arn: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "signingProfileVersionARN")]
    pub signing_profile_version_arn: Option<String>,
}