generated from crossplane/upjet-provider-template
/
zz_configuration_types.go
executable file
·242 lines (187 loc) · 8.92 KB
/
zz_configuration_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
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
/*
Copyright 2022 Upbound Inc.
*/
// Code generated by upjet. DO NOT EDIT.
package v1beta1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
v1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
)
type BandwidthObservation struct {
}
type BandwidthParameters struct {
// The bandwidth charging mode. The system only supports traffic.
// +kubebuilder:validation:Required
ChargingMode *string `json:"chargingMode" tf:"charging_mode,omitempty"`
// The bandwidth sharing type. The system only supports PER (indicates exclusive bandwidth).
// +kubebuilder:validation:Required
ShareType *string `json:"shareType" tf:"share_type,omitempty"`
// The disk size. The unit is GB. The system disk size ranges from 1 to 32768,
// and the data disk size ranges from 10 to 32768.
// +kubebuilder:validation:Required
Size *float64 `json:"size" tf:"size,omitempty"`
}
type ConfigurationObservation struct {
ID *string `json:"id,omitempty" tf:"id,omitempty"`
}
type ConfigurationParameters struct {
// The information about instance configurations. The instance_config
// dictionary data structure is documented below.
// +kubebuilder:validation:Required
InstanceConfig []InstanceConfigParameters `json:"instanceConfig" tf:"instance_config,omitempty"`
// The region in which to create the AS configuration. If
// omitted, the region argument of the provider is used. Changing this
// creates a new AS configuration.
// +kubebuilder:validation:Optional
Region *string `json:"region,omitempty" tf:"region,omitempty"`
// The name of the AS configuration. The name can contain letters,
// digits, underscores(_), and hyphens(-), and cannot exceed 64 characters.
// +kubebuilder:validation:Required
ScalingConfigurationName *string `json:"scalingConfigurationName" tf:"scaling_configuration_name,omitempty"`
}
type DiskObservation struct {
}
type DiskParameters struct {
// Whether the disk is a system disk or a data disk. Option DATA indicates
// a data disk. option SYS indicates a system disk.
// +kubebuilder:validation:Required
DiskType *string `json:"diskType" tf:"disk_type,omitempty"`
// The disk size. The unit is GB. The system disk size ranges from 1 to 32768,
// and the data disk size ranges from 10 to 32768.
// +kubebuilder:validation:Required
Size *float64 `json:"size" tf:"size,omitempty"`
// The disk type, which must be the same as the disk type available in the system.
// The options include SATA (common I/O disk type) and SSD (ultra-high I/O disk type).
// +kubebuilder:validation:Required
VolumeType *string `json:"volumeType" tf:"volume_type,omitempty"`
}
type EIPObservation struct {
}
type EIPParameters struct {
// The bandwidth information. The structure is described below.
// +kubebuilder:validation:Required
Bandwidth []BandwidthParameters `json:"bandwidth" tf:"bandwidth,omitempty"`
// The IP address type. The system only supports 5_bgp (indicates dynamic BGP).
// +kubebuilder:validation:Required
IPType *string `json:"ipType" tf:"ip_type,omitempty"`
}
type InstanceConfigObservation struct {
}
type InstanceConfigParameters struct {
// The disk group information. System disks are mandatory and data disks are optional.
// The dick structure is described below.
// +kubebuilder:validation:Optional
Disk []DiskParameters `json:"disk,omitempty" tf:"disk,omitempty"`
// The flavor ID.
// +kubebuilder:validation:Optional
Flavor *string `json:"flavor,omitempty" tf:"flavor,omitempty"`
// The image ID.
// +crossplane:generate:reference:type=github.com/FlexibleEngineCloud/provider-flexibleengine/apis/ims/v1beta1.Image
// +kubebuilder:validation:Optional
Image *string `json:"image,omitempty" tf:"image,omitempty"`
// Reference to a Image in ims to populate image.
// +kubebuilder:validation:Optional
ImageRef *v1.Reference `json:"imageRef,omitempty" tf:"-"`
// Selector for a Image in ims to populate image.
// +kubebuilder:validation:Optional
ImageSelector *v1.Selector `json:"imageSelector,omitempty" tf:"-"`
// When using the existing instance specifications as the template to
// create AS configurations, specify this argument. In this case, flavor, image,
// and disk arguments do not take effect. If the instance_id argument is not specified,
// flavor, image, and disk arguments are mandatory.
// +crossplane:generate:reference:type=github.com/FlexibleEngineCloud/provider-flexibleengine/apis/ecs/v1beta1.Instance
// +kubebuilder:validation:Optional
InstanceID *string `json:"instanceId,omitempty" tf:"instance_id,omitempty"`
// Reference to a Instance in ecs to populate instanceId.
// +kubebuilder:validation:Optional
InstanceIDRef *v1.Reference `json:"instanceIdRef,omitempty" tf:"-"`
// Selector for a Instance in ecs to populate instanceId.
// +kubebuilder:validation:Optional
InstanceIDSelector *v1.Selector `json:"instanceIdSelector,omitempty" tf:"-"`
// The name of the SSH key pair used to log in to the instance.
// +crossplane:generate:reference:type=github.com/FlexibleEngineCloud/provider-flexibleengine/apis/ecs/v1beta1.KeyPair
// +kubebuilder:validation:Optional
KeyName *string `json:"keyName,omitempty" tf:"key_name,omitempty"`
// Reference to a KeyPair in ecs to populate keyName.
// +kubebuilder:validation:Optional
KeyNameRef *v1.Reference `json:"keyNameRef,omitempty" tf:"-"`
// Selector for a KeyPair in ecs to populate keyName.
// +kubebuilder:validation:Optional
KeyNameSelector *v1.Selector `json:"keyNameSelector,omitempty" tf:"-"`
// Metadata key/value pairs to make available from
// within the instance.
// +kubebuilder:validation:Optional
Metadata map[string]*string `json:"metadata,omitempty" tf:"metadata,omitempty"`
// Customize the personality of an instance by
// defining one or more files and their contents. The personality structure
// is described below.
// +kubebuilder:validation:Optional
Personality []PersonalityParameters `json:"personality,omitempty" tf:"personality,omitempty"`
// The elastic IP address of the instance. The public_ip structure
// is described below.
// +kubebuilder:validation:Optional
PublicIP []PublicIPParameters `json:"publicIp,omitempty" tf:"public_ip,omitempty"`
// The user data to provide when launching the instance.
// The file content must be encoded with Base64.
// +kubebuilder:validation:Optional
UserData *string `json:"userData,omitempty" tf:"user_data,omitempty"`
}
type PersonalityObservation struct {
}
type PersonalityParameters struct {
// +kubebuilder:validation:Required
Content *string `json:"content" tf:"content,omitempty"`
// The absolute path of the destination file.
// +kubebuilder:validation:Required
Path *string `json:"path" tf:"path,omitempty"`
}
type PublicIPObservation struct {
}
type PublicIPParameters struct {
// The configuration parameter for creating an elastic IP address
// that will be automatically assigned to the instance. The eip structure is described below.
// +kubebuilder:validation:Required
EIP []EIPParameters `json:"eip" tf:"eip,omitempty"`
}
// ConfigurationSpec defines the desired state of Configuration
type ConfigurationSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider ConfigurationParameters `json:"forProvider"`
}
// ConfigurationStatus defines the observed state of Configuration.
type ConfigurationStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider ConfigurationObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// Configuration is the Schema for the Configurations API. ""page_title: "flexibleengine_as_configuration_v1"
// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status"
// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,flexibleengine}
type Configuration struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ConfigurationSpec `json:"spec"`
Status ConfigurationStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// ConfigurationList contains a list of Configurations
type ConfigurationList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Configuration `json:"items"`
}
// Repository type metadata.
var (
Configuration_Kind = "Configuration"
Configuration_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Configuration_Kind}.String()
Configuration_KindAPIVersion = Configuration_Kind + "." + CRDGroupVersion.String()
Configuration_GroupVersionKind = CRDGroupVersion.WithKind(Configuration_Kind)
)
func init() {
SchemeBuilder.Register(&Configuration{}, &ConfigurationList{})
}