/
bucket.go
131 lines (122 loc) · 6.13 KB
/
bucket.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
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may
// not use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license" file accompanying this file. This file 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.
// Code generated by ack-generate. DO NOT EDIT.
package v1alpha1
import (
ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// BucketSpec defines the desired state of Bucket.
//
// In terms of implementation, a Bucket is a resource. An Amazon S3 bucket name
// is globally unique, and the namespace is shared by all Amazon Web Services
// accounts.
type BucketSpec struct {
// The canned ACL to apply to the bucket.
ACL *string `json:"acl,omitempty"`
// Container for setting the transfer acceleration state.
Accelerate *AccelerateConfiguration `json:"accelerate,omitempty"`
Analytics []*AnalyticsConfiguration `json:"analytics,omitempty"`
// Describes the cross-origin access configuration for objects in an Amazon
// S3 bucket. For more information, see Enabling Cross-Origin Resource Sharing
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon
// S3 User Guide.
CORS *CORSConfiguration `json:"cors,omitempty"`
// The configuration information for the bucket.
CreateBucketConfiguration *CreateBucketConfiguration `json:"createBucketConfiguration,omitempty"`
Encryption *ServerSideEncryptionConfiguration `json:"encryption,omitempty"`
// Allows grantee the read, write, read ACP, and write ACP permissions on the
// bucket.
GrantFullControl *string `json:"grantFullControl,omitempty"`
// Allows grantee to list the objects in the bucket.
GrantRead *string `json:"grantRead,omitempty"`
// Allows grantee to read the bucket ACL.
GrantReadACP *string `json:"grantReadACP,omitempty"`
// Allows grantee to create new objects in the bucket.
//
// For the bucket and object owners of existing objects, also allows deletions
// and overwrites of those objects.
GrantWrite *string `json:"grantWrite,omitempty"`
// Allows grantee to write the ACL for the applicable bucket.
GrantWriteACP *string `json:"grantWriteACP,omitempty"`
IntelligentTiering []*IntelligentTieringConfiguration `json:"intelligentTiering,omitempty"`
Inventory []*InventoryConfiguration `json:"inventory,omitempty"`
// Container for lifecycle rules. You can add as many as 1,000 rules.
Lifecycle *BucketLifecycleConfiguration `json:"lifecycle,omitempty"`
// Container for logging status information.
Logging *BucketLoggingStatus `json:"logging,omitempty"`
Metrics []*MetricsConfiguration `json:"metrics,omitempty"`
// The name of the bucket to create.
// +kubebuilder:validation:Required
Name *string `json:"name"`
Notification *NotificationConfiguration `json:"notification,omitempty"`
// Specifies whether you want S3 Object Lock to be enabled for the new bucket.
ObjectLockEnabledForBucket *bool `json:"objectLockEnabledForBucket,omitempty"`
ObjectOwnership *string `json:"objectOwnership,omitempty"`
// The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or ObjectWriter)
// that you want to apply to this Amazon S3 bucket.
OwnershipControls *OwnershipControls `json:"ownershipControls,omitempty"`
// The bucket policy as a JSON document.
Policy *string `json:"policy,omitempty"`
// The PublicAccessBlock configuration that you want to apply to this Amazon
// S3 bucket. You can enable the configuration options in any combination. For
// more information about when Amazon S3 considers a bucket or object public,
// see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status)
// in the Amazon S3 User Guide.
PublicAccessBlock *PublicAccessBlockConfiguration `json:"publicAccessBlock,omitempty"`
Replication *ReplicationConfiguration `json:"replication,omitempty"`
// Container for Payer.
RequestPayment *RequestPaymentConfiguration `json:"requestPayment,omitempty"`
// Container for the TagSet and Tag elements.
Tagging *Tagging `json:"tagging,omitempty"`
// Container for setting the versioning state.
Versioning *VersioningConfiguration `json:"versioning,omitempty"`
// Container for the request.
Website *WebsiteConfiguration `json:"website,omitempty"`
}
// BucketStatus defines the observed state of Bucket
type BucketStatus struct {
// 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
// +kubebuilder:validation:Optional
ACKResourceMetadata *ackv1alpha1.ResourceMetadata `json:"ackResourceMetadata"`
// 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
// +kubebuilder:validation:Optional
Conditions []*ackv1alpha1.Condition `json:"conditions"`
// A forward slash followed by the name of the bucket.
// +kubebuilder:validation:Optional
Location *string `json:"location,omitempty"`
}
// Bucket is the Schema for the Buckets API
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
type Bucket struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec BucketSpec `json:"spec,omitempty"`
Status BucketStatus `json:"status,omitempty"`
}
// BucketList contains a list of Bucket
// +kubebuilder:object:root=true
type BucketList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Bucket `json:"items"`
}
func init() {
SchemeBuilder.Register(&Bucket{}, &BucketList{})
}