-
Notifications
You must be signed in to change notification settings - Fork 117
/
zz_bucketobject_types.go
executable file
·386 lines (286 loc) · 21.8 KB
/
zz_bucketobject_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
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
// SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
//
// SPDX-License-Identifier: Apache-2.0
// 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 BucketObjectInitParameters struct {
// Canned ACL to apply. Valid values are private, public-read, public-read-write, aws-exec-read, authenticated-read, bucket-owner-read, and bucket-owner-full-control. Defaults to private.
ACL *string `json:"acl,omitempty" tf:"acl,omitempty"`
// Name of the bucket to put the file in. Alternatively, an S3 access point ARN can be specified.
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/s3/v1beta2.Bucket
// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID()
Bucket *string `json:"bucket,omitempty" tf:"bucket,omitempty"`
// Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
BucketKeyEnabled *bool `json:"bucketKeyEnabled,omitempty" tf:"bucket_key_enabled,omitempty"`
// Reference to a Bucket in s3 to populate bucket.
// +kubebuilder:validation:Optional
BucketRef *v1.Reference `json:"bucketRef,omitempty" tf:"-"`
// Selector for a Bucket in s3 to populate bucket.
// +kubebuilder:validation:Optional
BucketSelector *v1.Selector `json:"bucketSelector,omitempty" tf:"-"`
// Caching behavior along the request/reply chain Read w3c cache_control for further details.
CacheControl *string `json:"cacheControl,omitempty" tf:"cache_control,omitempty"`
// Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
Content *string `json:"content,omitempty" tf:"content,omitempty"`
// Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the gzipbase64 function with small text strings. For larger objects, use source to stream the content from a disk file.
ContentBase64 *string `json:"contentBase64,omitempty" tf:"content_base64,omitempty"`
// Presentational information for the object. Read w3c content_disposition for further information.
ContentDisposition *string `json:"contentDisposition,omitempty" tf:"content_disposition,omitempty"`
// Content encodings that have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.
ContentEncoding *string `json:"contentEncoding,omitempty" tf:"content_encoding,omitempty"`
// Language the content is in e.g., en-US or en-GB.
ContentLanguage *string `json:"contentLanguage,omitempty" tf:"content_language,omitempty"`
// Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
ContentType *string `json:"contentType,omitempty" tf:"content_type,omitempty"`
// Triggers updates when the value changes.11.11.11 or earlier). This attribute is not compatible with KMS encryption, kms_key_id or server_side_encryption = "aws:kms" (see source_hash instead).
Etag *string `json:"etag,omitempty" tf:"etag,omitempty"`
// Whether to allow the object to be deleted by removing any legal hold on any object version. Default is false. This value should be set to true only if the bucket has S3 object lock enabled.
ForceDestroy *bool `json:"forceDestroy,omitempty" tf:"force_destroy,omitempty"`
// ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the aws_kms_key resource, use the arn attribute. If referencing the aws_kms_alias data source or resource, use the target_key_arn attribute.
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/kms/v1beta1.Key
KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"`
// Reference to a Key in kms to populate kmsKeyId.
// +kubebuilder:validation:Optional
KMSKeyIDRef *v1.Reference `json:"kmsKeyIdRef,omitempty" tf:"-"`
// Selector for a Key in kms to populate kmsKeyId.
// +kubebuilder:validation:Optional
KMSKeyIDSelector *v1.Selector `json:"kmsKeyIdSelector,omitempty" tf:"-"`
// Name of the object once it is in the bucket.
Key *string `json:"key,omitempty" tf:"key,omitempty"`
// Map of keys/values to provision metadata (will be automatically prefixed by x-amz-meta-, note that only lowercase label are currently supported by the AWS Go API).
// +mapType=granular
Metadata map[string]*string `json:"metadata,omitempty" tf:"metadata,omitempty"`
// Legal hold status that you want to apply to the specified object. Valid values are ON and OFF.
ObjectLockLegalHoldStatus *string `json:"objectLockLegalHoldStatus,omitempty" tf:"object_lock_legal_hold_status,omitempty"`
// Object lock retention mode that you want to apply to this object. Valid values are GOVERNANCE and COMPLIANCE.
ObjectLockMode *string `json:"objectLockMode,omitempty" tf:"object_lock_mode,omitempty"`
// Date and time, in RFC3339 format, when this object's object lock will expire.
ObjectLockRetainUntilDate *string `json:"objectLockRetainUntilDate,omitempty" tf:"object_lock_retain_until_date,omitempty"`
// Server-side encryption of the object in S3. Valid values are "AES256" and "aws:kms".
ServerSideEncryption *string `json:"serverSideEncryption,omitempty" tf:"server_side_encryption,omitempty"`
// Path to a file that will be read and uploaded as raw bytes for the object content.
Source *string `json:"source,omitempty" tf:"source,omitempty"`
// Triggers updates like etag but useful to address etag encryption limitations.11.12 or later). (The value is only stored in state and not saved by AWS.)
SourceHash *string `json:"sourceHash,omitempty" tf:"source_hash,omitempty"`
// Storage Class for the object. Defaults to "STANDARD".
StorageClass *string `json:"storageClass,omitempty" tf:"storage_class,omitempty"`
// Key-value map of resource tags.
// +mapType=granular
Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"`
// Target URL for website redirect.
WebsiteRedirect *string `json:"websiteRedirect,omitempty" tf:"website_redirect,omitempty"`
}
type BucketObjectObservation struct {
// Canned ACL to apply. Valid values are private, public-read, public-read-write, aws-exec-read, authenticated-read, bucket-owner-read, and bucket-owner-full-control. Defaults to private.
ACL *string `json:"acl,omitempty" tf:"acl,omitempty"`
// ARN of the object.
Arn *string `json:"arn,omitempty" tf:"arn,omitempty"`
// Name of the bucket to put the file in. Alternatively, an S3 access point ARN can be specified.
Bucket *string `json:"bucket,omitempty" tf:"bucket,omitempty"`
// Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
BucketKeyEnabled *bool `json:"bucketKeyEnabled,omitempty" tf:"bucket_key_enabled,omitempty"`
// Caching behavior along the request/reply chain Read w3c cache_control for further details.
CacheControl *string `json:"cacheControl,omitempty" tf:"cache_control,omitempty"`
// Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
Content *string `json:"content,omitempty" tf:"content,omitempty"`
// Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the gzipbase64 function with small text strings. For larger objects, use source to stream the content from a disk file.
ContentBase64 *string `json:"contentBase64,omitempty" tf:"content_base64,omitempty"`
// Presentational information for the object. Read w3c content_disposition for further information.
ContentDisposition *string `json:"contentDisposition,omitempty" tf:"content_disposition,omitempty"`
// Content encodings that have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.
ContentEncoding *string `json:"contentEncoding,omitempty" tf:"content_encoding,omitempty"`
// Language the content is in e.g., en-US or en-GB.
ContentLanguage *string `json:"contentLanguage,omitempty" tf:"content_language,omitempty"`
// Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
ContentType *string `json:"contentType,omitempty" tf:"content_type,omitempty"`
// Triggers updates when the value changes.11.11.11 or earlier). This attribute is not compatible with KMS encryption, kms_key_id or server_side_encryption = "aws:kms" (see source_hash instead).
Etag *string `json:"etag,omitempty" tf:"etag,omitempty"`
// Whether to allow the object to be deleted by removing any legal hold on any object version. Default is false. This value should be set to true only if the bucket has S3 object lock enabled.
ForceDestroy *bool `json:"forceDestroy,omitempty" tf:"force_destroy,omitempty"`
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the aws_kms_key resource, use the arn attribute. If referencing the aws_kms_alias data source or resource, use the target_key_arn attribute.
KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"`
// Name of the object once it is in the bucket.
Key *string `json:"key,omitempty" tf:"key,omitempty"`
// Map of keys/values to provision metadata (will be automatically prefixed by x-amz-meta-, note that only lowercase label are currently supported by the AWS Go API).
// +mapType=granular
Metadata map[string]*string `json:"metadata,omitempty" tf:"metadata,omitempty"`
// Legal hold status that you want to apply to the specified object. Valid values are ON and OFF.
ObjectLockLegalHoldStatus *string `json:"objectLockLegalHoldStatus,omitempty" tf:"object_lock_legal_hold_status,omitempty"`
// Object lock retention mode that you want to apply to this object. Valid values are GOVERNANCE and COMPLIANCE.
ObjectLockMode *string `json:"objectLockMode,omitempty" tf:"object_lock_mode,omitempty"`
// Date and time, in RFC3339 format, when this object's object lock will expire.
ObjectLockRetainUntilDate *string `json:"objectLockRetainUntilDate,omitempty" tf:"object_lock_retain_until_date,omitempty"`
// Server-side encryption of the object in S3. Valid values are "AES256" and "aws:kms".
ServerSideEncryption *string `json:"serverSideEncryption,omitempty" tf:"server_side_encryption,omitempty"`
// Path to a file that will be read and uploaded as raw bytes for the object content.
Source *string `json:"source,omitempty" tf:"source,omitempty"`
// Triggers updates like etag but useful to address etag encryption limitations.11.12 or later). (The value is only stored in state and not saved by AWS.)
SourceHash *string `json:"sourceHash,omitempty" tf:"source_hash,omitempty"`
// Storage Class for the object. Defaults to "STANDARD".
StorageClass *string `json:"storageClass,omitempty" tf:"storage_class,omitempty"`
// Key-value map of resource tags.
// +mapType=granular
Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"`
// Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
// +mapType=granular
TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"`
// Unique version ID value for the object, if bucket versioning is enabled.
VersionID *string `json:"versionId,omitempty" tf:"version_id,omitempty"`
// Target URL for website redirect.
WebsiteRedirect *string `json:"websiteRedirect,omitempty" tf:"website_redirect,omitempty"`
}
type BucketObjectParameters struct {
// Canned ACL to apply. Valid values are private, public-read, public-read-write, aws-exec-read, authenticated-read, bucket-owner-read, and bucket-owner-full-control. Defaults to private.
// +kubebuilder:validation:Optional
ACL *string `json:"acl,omitempty" tf:"acl,omitempty"`
// Name of the bucket to put the file in. Alternatively, an S3 access point ARN can be specified.
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/s3/v1beta2.Bucket
// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID()
// +kubebuilder:validation:Optional
Bucket *string `json:"bucket,omitempty" tf:"bucket,omitempty"`
// Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
// +kubebuilder:validation:Optional
BucketKeyEnabled *bool `json:"bucketKeyEnabled,omitempty" tf:"bucket_key_enabled,omitempty"`
// Reference to a Bucket in s3 to populate bucket.
// +kubebuilder:validation:Optional
BucketRef *v1.Reference `json:"bucketRef,omitempty" tf:"-"`
// Selector for a Bucket in s3 to populate bucket.
// +kubebuilder:validation:Optional
BucketSelector *v1.Selector `json:"bucketSelector,omitempty" tf:"-"`
// Caching behavior along the request/reply chain Read w3c cache_control for further details.
// +kubebuilder:validation:Optional
CacheControl *string `json:"cacheControl,omitempty" tf:"cache_control,omitempty"`
// Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
// +kubebuilder:validation:Optional
Content *string `json:"content,omitempty" tf:"content,omitempty"`
// Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the gzipbase64 function with small text strings. For larger objects, use source to stream the content from a disk file.
// +kubebuilder:validation:Optional
ContentBase64 *string `json:"contentBase64,omitempty" tf:"content_base64,omitempty"`
// Presentational information for the object. Read w3c content_disposition for further information.
// +kubebuilder:validation:Optional
ContentDisposition *string `json:"contentDisposition,omitempty" tf:"content_disposition,omitempty"`
// Content encodings that have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.
// +kubebuilder:validation:Optional
ContentEncoding *string `json:"contentEncoding,omitempty" tf:"content_encoding,omitempty"`
// Language the content is in e.g., en-US or en-GB.
// +kubebuilder:validation:Optional
ContentLanguage *string `json:"contentLanguage,omitempty" tf:"content_language,omitempty"`
// Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
// +kubebuilder:validation:Optional
ContentType *string `json:"contentType,omitempty" tf:"content_type,omitempty"`
// Triggers updates when the value changes.11.11.11 or earlier). This attribute is not compatible with KMS encryption, kms_key_id or server_side_encryption = "aws:kms" (see source_hash instead).
// +kubebuilder:validation:Optional
Etag *string `json:"etag,omitempty" tf:"etag,omitempty"`
// Whether to allow the object to be deleted by removing any legal hold on any object version. Default is false. This value should be set to true only if the bucket has S3 object lock enabled.
// +kubebuilder:validation:Optional
ForceDestroy *bool `json:"forceDestroy,omitempty" tf:"force_destroy,omitempty"`
// ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the aws_kms_key resource, use the arn attribute. If referencing the aws_kms_alias data source or resource, use the target_key_arn attribute.
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/kms/v1beta1.Key
// +kubebuilder:validation:Optional
KMSKeyID *string `json:"kmsKeyId,omitempty" tf:"kms_key_id,omitempty"`
// Reference to a Key in kms to populate kmsKeyId.
// +kubebuilder:validation:Optional
KMSKeyIDRef *v1.Reference `json:"kmsKeyIdRef,omitempty" tf:"-"`
// Selector for a Key in kms to populate kmsKeyId.
// +kubebuilder:validation:Optional
KMSKeyIDSelector *v1.Selector `json:"kmsKeyIdSelector,omitempty" tf:"-"`
// Name of the object once it is in the bucket.
// +kubebuilder:validation:Optional
Key *string `json:"key,omitempty" tf:"key,omitempty"`
// Map of keys/values to provision metadata (will be automatically prefixed by x-amz-meta-, note that only lowercase label are currently supported by the AWS Go API).
// +kubebuilder:validation:Optional
// +mapType=granular
Metadata map[string]*string `json:"metadata,omitempty" tf:"metadata,omitempty"`
// Legal hold status that you want to apply to the specified object. Valid values are ON and OFF.
// +kubebuilder:validation:Optional
ObjectLockLegalHoldStatus *string `json:"objectLockLegalHoldStatus,omitempty" tf:"object_lock_legal_hold_status,omitempty"`
// Object lock retention mode that you want to apply to this object. Valid values are GOVERNANCE and COMPLIANCE.
// +kubebuilder:validation:Optional
ObjectLockMode *string `json:"objectLockMode,omitempty" tf:"object_lock_mode,omitempty"`
// Date and time, in RFC3339 format, when this object's object lock will expire.
// +kubebuilder:validation:Optional
ObjectLockRetainUntilDate *string `json:"objectLockRetainUntilDate,omitempty" tf:"object_lock_retain_until_date,omitempty"`
// Region is the region you'd like your resource to be created in.
// +upjet:crd:field:TFTag=-
// +kubebuilder:validation:Required
Region *string `json:"region" tf:"-"`
// Server-side encryption of the object in S3. Valid values are "AES256" and "aws:kms".
// +kubebuilder:validation:Optional
ServerSideEncryption *string `json:"serverSideEncryption,omitempty" tf:"server_side_encryption,omitempty"`
// Path to a file that will be read and uploaded as raw bytes for the object content.
// +kubebuilder:validation:Optional
Source *string `json:"source,omitempty" tf:"source,omitempty"`
// Triggers updates like etag but useful to address etag encryption limitations.11.12 or later). (The value is only stored in state and not saved by AWS.)
// +kubebuilder:validation:Optional
SourceHash *string `json:"sourceHash,omitempty" tf:"source_hash,omitempty"`
// Storage Class for the object. Defaults to "STANDARD".
// +kubebuilder:validation:Optional
StorageClass *string `json:"storageClass,omitempty" tf:"storage_class,omitempty"`
// Key-value map of resource tags.
// +kubebuilder:validation:Optional
// +mapType=granular
Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"`
// Target URL for website redirect.
// +kubebuilder:validation:Optional
WebsiteRedirect *string `json:"websiteRedirect,omitempty" tf:"website_redirect,omitempty"`
}
// BucketObjectSpec defines the desired state of BucketObject
type BucketObjectSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider BucketObjectParameters `json:"forProvider"`
// THIS IS A BETA FIELD. It will be honored
// unless the Management Policies feature flag is disabled.
// InitProvider holds the same fields as ForProvider, with the exception
// of Identifier and other resource reference fields. The fields that are
// in InitProvider are merged into ForProvider when the resource is created.
// The same fields are also added to the terraform ignore_changes hook, to
// avoid updating them after creation. This is useful for fields that are
// required on creation, but we do not desire to update them after creation,
// for example because of an external controller is managing them, like an
// autoscaler.
InitProvider BucketObjectInitParameters `json:"initProvider,omitempty"`
}
// BucketObjectStatus defines the observed state of BucketObject.
type BucketObjectStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider BucketObjectObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// BucketObject is the Schema for the BucketObjects API. Provides an S3 object resource.
// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status"
// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].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:resource:scope=Cluster,categories={crossplane,managed,aws}
type BucketObject struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.key) || (has(self.initProvider) && has(self.initProvider.key))",message="spec.forProvider.key is a required parameter"
Spec BucketObjectSpec `json:"spec"`
Status BucketObjectStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// BucketObjectList contains a list of BucketObjects
type BucketObjectList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []BucketObject `json:"items"`
}
// Repository type metadata.
var (
BucketObject_Kind = "BucketObject"
BucketObject_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: BucketObject_Kind}.String()
BucketObject_KindAPIVersion = BucketObject_Kind + "." + CRDGroupVersion.String()
BucketObject_GroupVersionKind = CRDGroupVersion.WithKind(BucketObject_Kind)
)
func init() {
SchemeBuilder.Register(&BucketObject{}, &BucketObjectList{})
}