-
Notifications
You must be signed in to change notification settings - Fork 117
/
zz_table_types.go
executable file
·309 lines (236 loc) · 12.3 KB
/
zz_table_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
/*
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 AttributeObservation struct {
}
type AttributeParameters struct {
// The name of the table, this needs to be unique
// within a region.
// +kubebuilder:validation:Required
Name *string `json:"name" tf:"name,omitempty"`
// Attribute type, which must be a scalar type: S, N, or B for (S)tring, (N)umber or (B)inary data
// +kubebuilder:validation:Required
Type *string `json:"type" tf:"type,omitempty"`
}
type GlobalSecondaryIndexObservation struct {
}
type GlobalSecondaryIndexParameters struct {
// The name of the hash key in the index; must be
// defined as an attribute in the resource.
// +kubebuilder:validation:Required
HashKey *string `json:"hashKey" tf:"hash_key,omitempty"`
// The name of the index
// +kubebuilder:validation:Required
Name *string `json:"name" tf:"name,omitempty"`
// Only required with INCLUDE as a
// projection type; a list of attributes to project into the index. These
// do not need to be defined as attributes on the table.
// +kubebuilder:validation:Optional
NonKeyAttributes []*string `json:"nonKeyAttributes,omitempty" tf:"non_key_attributes,omitempty"`
// One of ALL, INCLUDE or KEYS_ONLY
// where ALL projects every attribute into the index, KEYS_ONLY
// projects just the hash and range key into the index, and INCLUDE
// projects only the keys specified in the non_key_attributes
// parameter.
// +kubebuilder:validation:Required
ProjectionType *string `json:"projectionType" tf:"projection_type,omitempty"`
// The name of the range key; must be defined
// +kubebuilder:validation:Optional
RangeKey *string `json:"rangeKey,omitempty" tf:"range_key,omitempty"`
// The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.
// +kubebuilder:validation:Optional
ReadCapacity *float64 `json:"readCapacity,omitempty" tf:"read_capacity,omitempty"`
// The number of write units for this index. Must be set if billing_mode is set to PROVISIONED.
// +kubebuilder:validation:Optional
WriteCapacity *float64 `json:"writeCapacity,omitempty" tf:"write_capacity,omitempty"`
}
type LocalSecondaryIndexObservation struct {
}
type LocalSecondaryIndexParameters struct {
// The name of the index
// +kubebuilder:validation:Required
Name *string `json:"name" tf:"name,omitempty"`
// Only required with INCLUDE as a
// projection type; a list of attributes to project into the index. These
// do not need to be defined as attributes on the table.
// +kubebuilder:validation:Optional
NonKeyAttributes []*string `json:"nonKeyAttributes,omitempty" tf:"non_key_attributes,omitempty"`
// One of ALL, INCLUDE or KEYS_ONLY
// where ALL projects every attribute into the index, KEYS_ONLY
// projects just the hash and range key into the index, and INCLUDE
// projects only the keys specified in the non_key_attributes
// parameter.
// +kubebuilder:validation:Required
ProjectionType *string `json:"projectionType" tf:"projection_type,omitempty"`
// The name of the range key; must be defined
// +kubebuilder:validation:Required
RangeKey *string `json:"rangeKey" tf:"range_key,omitempty"`
}
type PointInTimeRecoveryObservation struct {
}
type PointInTimeRecoveryParameters struct {
// Whether to enable point-in-time recovery - note that it can take up to 10 minutes to enable for new tables. If the point_in_time_recovery block is not provided then this defaults to false.
// +kubebuilder:validation:Required
Enabled *bool `json:"enabled" tf:"enabled,omitempty"`
}
type ServerSideEncryptionObservation struct {
}
type ServerSideEncryptionParameters struct {
// Whether or not to enable encryption at rest using an AWS managed KMS customer master key (CMK).
// +kubebuilder:validation:Required
Enabled *bool `json:"enabled" tf:"enabled,omitempty"`
// The ARN of the CMK that should be used for the AWS KMS encryption.
// This attribute should only be specified if the key is different from the default DynamoDB CMK, alias/aws/dynamodb.
// +kubebuilder:validation:Optional
KMSKeyArn *string `json:"kmsKeyArn,omitempty" tf:"kms_key_arn,omitempty"`
}
type TTLObservation struct {
}
type TTLParameters struct {
// The name of the table attribute to store the TTL timestamp in.
// +kubebuilder:validation:Required
AttributeName *string `json:"attributeName" tf:"attribute_name,omitempty"`
// Whether or not to enable encryption at rest using an AWS managed KMS customer master key (CMK).
// +kubebuilder:validation:Optional
Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"`
}
type TableObservation struct {
// The arn of the table
Arn *string `json:"arn,omitempty" tf:"arn,omitempty"`
// The name of the table
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// The ARN of the Table Stream. Only available when stream_enabled = true
StreamArn *string `json:"streamArn,omitempty" tf:"stream_arn,omitempty"`
// A timestamp, in ISO 8601 format, for this stream. Note that this timestamp is not
// a unique identifier for the stream on its own. However, the combination of AWS customer ID,
// table name and this field is guaranteed to be unique.
// It can be used for creating CloudWatch Alarms. Only available when stream_enabled = true
StreamLabel *string `json:"streamLabel,omitempty" tf:"stream_label,omitempty"`
// A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"`
}
type TableParameters struct {
// List of nested attribute definitions. Only required for hash_key and range_key attributes. Each attribute has two properties:
// +kubebuilder:validation:Optional
Attribute []AttributeParameters `json:"attribute,omitempty" tf:"attribute,omitempty"`
// Controls how you are charged for read and write throughput and how you manage capacity. The valid values are PROVISIONED and PAY_PER_REQUEST. Defaults to PROVISIONED.
// +kubebuilder:validation:Optional
BillingMode *string `json:"billingMode,omitempty" tf:"billing_mode,omitempty"`
// Describe a GSI for the table;
// subject to the normal limits on the number of GSIs, projected
// attributes, etc.
// +kubebuilder:validation:Optional
GlobalSecondaryIndex []GlobalSecondaryIndexParameters `json:"globalSecondaryIndex,omitempty" tf:"global_secondary_index,omitempty"`
// The attribute to use as the hash (partition) key. Must also be defined as an attribute, see below.
// +kubebuilder:validation:Optional
HashKey *string `json:"hashKey,omitempty" tf:"hash_key,omitempty"`
// Describe an LSI on the table;
// these can only be allocated at creation so you cannot change this
// definition after you have created the resource.
// +kubebuilder:validation:Optional
LocalSecondaryIndex []LocalSecondaryIndexParameters `json:"localSecondaryIndex,omitempty" tf:"local_secondary_index,omitempty"`
// Enable point-in-time recovery options.
// +kubebuilder:validation:Optional
PointInTimeRecovery []PointInTimeRecoveryParameters `json:"pointInTimeRecovery,omitempty" tf:"point_in_time_recovery,omitempty"`
// The attribute to use as the range (sort) key. Must also be defined as an attribute, see below.
// +kubebuilder:validation:Optional
RangeKey *string `json:"rangeKey,omitempty" tf:"range_key,omitempty"`
// The number of read units for this table. If the billing_mode is PROVISIONED, this field is required.
// +kubebuilder:validation:Optional
ReadCapacity *float64 `json:"readCapacity,omitempty" tf:"read_capacity,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:"-"`
// Configuration block(s) with DynamoDB Global Tables V2 (version 2019.11.21) replication configurations. Detailed below.
// +kubebuilder:validation:Optional
Replica []TableReplicaParameters `json:"replica,omitempty" tf:"replica,omitempty"`
// The time of the point-in-time recovery point to restore.
// +kubebuilder:validation:Optional
RestoreDateTime *string `json:"restoreDateTime,omitempty" tf:"restore_date_time,omitempty"`
// The name of the table to restore. Must match the name of an existing table.
// +kubebuilder:validation:Optional
RestoreSourceName *string `json:"restoreSourceName,omitempty" tf:"restore_source_name,omitempty"`
// If set, restores table to the most recent point-in-time recovery point.
// +kubebuilder:validation:Optional
RestoreToLatestTime *bool `json:"restoreToLatestTime,omitempty" tf:"restore_to_latest_time,omitempty"`
// Encryption at rest options. AWS DynamoDB tables are automatically encrypted at rest with an AWS owned Customer Master Key if this argument isn't specified.
// +kubebuilder:validation:Optional
ServerSideEncryption []ServerSideEncryptionParameters `json:"serverSideEncryption,omitempty" tf:"server_side_encryption,omitempty"`
// Indicates whether Streams are to be enabled (true) or disabled (false).
// +kubebuilder:validation:Optional
StreamEnabled *bool `json:"streamEnabled,omitempty" tf:"stream_enabled,omitempty"`
// When an item in the table is modified, StreamViewType determines what information is written to the table's stream. Valid values are KEYS_ONLY, NEW_IMAGE, OLD_IMAGE, NEW_AND_OLD_IMAGES.
// +kubebuilder:validation:Optional
StreamViewType *string `json:"streamViewType,omitempty" tf:"stream_view_type,omitempty"`
// Defines ttl, has two properties, and can only be specified once:
// +kubebuilder:validation:Optional
TTL []TTLParameters `json:"ttl,omitempty" tf:"ttl,omitempty"`
// The storage class of the table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS.
// +kubebuilder:validation:Optional
TableClass *string `json:"tableClass,omitempty" tf:"table_class,omitempty"`
// Key-value map of resource tags.
// +kubebuilder:validation:Optional
Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"`
// The number of write units for this table. If the billing_mode is PROVISIONED, this field is required.
// +kubebuilder:validation:Optional
WriteCapacity *float64 `json:"writeCapacity,omitempty" tf:"write_capacity,omitempty"`
}
type TableReplicaObservation struct {
}
type TableReplicaParameters struct {
// The ARN of the CMK that should be used for the AWS KMS encryption.
// +kubebuilder:validation:Optional
KMSKeyArn *string `json:"kmsKeyArn,omitempty" tf:"kms_key_arn,omitempty"`
// Region name of the replica.
// +kubebuilder:validation:Required
RegionName *string `json:"regionName" tf:"region_name,omitempty"`
}
// TableSpec defines the desired state of Table
type TableSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider TableParameters `json:"forProvider"`
}
// TableStatus defines the observed state of Table.
type TableStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider TableObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// Table is the Schema for the Tables API. Provides a DynamoDB table resource
// +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,aws}
type Table struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec TableSpec `json:"spec"`
Status TableStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// TableList contains a list of Tables
type TableList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Table `json:"items"`
}
// Repository type metadata.
var (
Table_Kind = "Table"
Table_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Table_Kind}.String()
Table_KindAPIVersion = Table_Kind + "." + CRDGroupVersion.String()
Table_GroupVersionKind = CRDGroupVersion.WithKind(Table_Kind)
)
func init() {
SchemeBuilder.Register(&Table{}, &TableList{})
}