-
Notifications
You must be signed in to change notification settings - Fork 362
/
custom_types.go
105 lines (79 loc) · 3.74 KB
/
custom_types.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
/*
Copyright 2020 The Crossplane Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1beta1
import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
// CustomCodeSigningConfigParameters includes custom fields for CodeSigningConfigParameters.
type CustomCodeSigningConfigParameters struct{}
// CustomFunctionParameters includes custom fields for FunctionParameters.
type CustomFunctionParameters struct {
// KMSKeyARNRef is a reference to a kms key used to set
// the KMSKeyARN.
// +optional
KMSKeyARNRef *xpv1.Reference `json:"kmsKeyARNRef,omitempty"`
// KMSKeyARNSelector selects references to kms key arn used
// to set the KMSKeyARN.
// +optional
KMSKeyARNSelector *xpv1.Selector `json:"kmsKeyARNSelector,omitempty"`
// The Amazon Resource Name (ARN) of the function's execution role.
// One of role, roleRef or roleSelector is required.
Role *string `json:"role,omitempty"`
// RoleRef is a reference to an iam role
// +optional
RoleRef *xpv1.Reference `json:"roleRef,omitempty"`
// RoleSelector selects references to iam role arn used
// to set the lambda Role.
// +optional
RoleSelector *xpv1.Selector `json:"roleSelector,omitempty"`
// For network connectivity to AWS 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
// only access resources and the internet through that VPC. For more information,
// see VPC Settings (https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html).
CustomFunctionVPCConfigParameters *CustomFunctionVPCConfigParameters `json:"vpcConfig,omitempty"`
// The code for the function.
// +kubebuilder:validation:Required
CustomFunctionCodeParameters CustomFunctionCodeParameters `json:"code"`
}
// CustomFunctionCodeParameters includes custom fields for FunctionCode struct.
type CustomFunctionCodeParameters struct {
ImageURI *string `json:"imageURI,omitempty"`
S3Key *string `json:"s3Key,omitempty"`
S3ObjectVersion *string `json:"s3ObjectVersion,omitempty"`
S3Bucket *string `json:"s3Bucket,omitempty"`
// S3BucketRef is a reference to an S3 Bucket.
// +optional
S3BucketRef *xpv1.Reference `json:"s3BucketRef,omitempty"`
// S3BucketSelector selects references to an S3 Bucket.
// +optional
S3BucketSelector *xpv1.Selector `json:"s3BucketSelector,omitempty"`
}
// CustomFunctionVPCConfigParameters includes custom fields for FunctionVPCConfigParameters.
type CustomFunctionVPCConfigParameters struct {
SecurityGroupIDs []*string `json:"securityGroupIDs,omitempty"`
// SecurityGroupIDRefs is a list of references to SecurityGroups used to set
// the SecurityGroupIDs.
// +optional
SecurityGroupIDRefs []xpv1.Reference `json:"securityGroupIDRefs,omitempty"`
// SecurityGroupIDsSelector selects references to SecurityGroupID used
// to set the SecurityGroupIDs.
// +optional
SecurityGroupIDSelector *xpv1.Selector `json:"securityGroupIDSelector,omitempty"`
SubnetIDs []*string `json:"subnetIDs,omitempty"`
// SubnetIDRefs is a list of references to Subnets used to set
// the SubnetIDs.
// +optional
SubnetIDRefs []xpv1.Reference `json:"subnetIDRefs,omitempty"`
// SubnetIDsSelector selects references to Subnets used
// to set the SubnetIDs.
// +optional
SubnetIDSelector *xpv1.Selector `json:"subnetIDSelector,omitempty"`
}