-
Notifications
You must be signed in to change notification settings - Fork 117
/
zz_table_types.go
executable file
·308 lines (229 loc) · 14.4 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
/*
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 {
// Name of the attribute
// +kubebuilder:validation:Required
Name *string `json:"name" tf:"name,omitempty"`
// Attribute type. Valid values are S (string), N (number), B (binary).
// +kubebuilder:validation:Required
Type *string `json:"type" tf:"type,omitempty"`
}
type GlobalSecondaryIndexObservation struct {
}
type GlobalSecondaryIndexParameters struct {
// 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"`
// 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 into the index only the table and index hash_key and sort_key attributes , INCLUDE projects into the index all of the attributes that are defined in non_key_attributes in addition to the attributes that thatKEYS_ONLY project.
// +kubebuilder:validation:Required
ProjectionType *string `json:"projectionType" tf:"projection_type,omitempty"`
// Name of the range key; must be defined
// +kubebuilder:validation:Optional
RangeKey *string `json:"rangeKey,omitempty" tf:"range_key,omitempty"`
// 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"`
// 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 {
// 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 into the index only the table and index hash_key and sort_key attributes , INCLUDE projects into the index all of the attributes that are defined in non_key_attributes in addition to the attributes that thatKEYS_ONLY project.
// +kubebuilder:validation:Required
ProjectionType *string `json:"projectionType" tf:"projection_type,omitempty"`
// Name of the range key.
// +kubebuilder:validation:Required
RangeKey *string `json:"rangeKey" tf:"range_key,omitempty"`
}
type PointInTimeRecoveryObservation struct {
}
type PointInTimeRecoveryParameters struct {
// Whether to enable point-in-time recovery. It can take 10 minutes to enable for new tables. If the point_in_time_recovery block is not provided, 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). If enabled is false then server-side encryption is set to AWS-owned key (shown as DEFAULT in the AWS console). Potentially confusingly, if enabled is true and no kms_key_arn is specified then server-side encryption is set to the default KMS-managed key (shown as KMS in the AWS console). The AWS KMS documentation explains the difference between AWS-owned and KMS-managed keys.
// +kubebuilder:validation:Required
Enabled *bool `json:"enabled" tf:"enabled,omitempty"`
// ARN of the CMK that should be used for the AWS KMS encryption. This argument should only be used if the key is different from the default KMS-managed DynamoDB key, alias/aws/dynamodb. Note: This attribute will not be populated with the ARN of default keys.
// +kubebuilder:validation:Optional
KMSKeyArn *string `json:"kmsKeyArn,omitempty" tf:"kms_key_arn,omitempty"`
}
type TTLObservation struct {
}
type TTLParameters struct {
// Name of the table attribute to store the TTL timestamp in.
// +kubebuilder:validation:Required
AttributeName *string `json:"attributeName" tf:"attribute_name,omitempty"`
// Whether TTL is enabled.
// +kubebuilder:validation:Optional
Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"`
}
type TableObservation struct {
// ARN of the table
Arn *string `json:"arn,omitempty" tf:"arn,omitempty"`
// Name of the table
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// Configuration block(s) with DynamoDB Global Tables V2 (version 2019.11.21) replication configurations. See below.
// +kubebuilder:validation:Optional
Replica []TableReplicaObservation `json:"replica,omitempty" tf:"replica,omitempty"`
// ARN of the Table Stream. Only available when stream_enabled = true
StreamArn *string `json:"streamArn,omitempty" tf:"stream_arn,omitempty"`
// 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"`
// 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 {
// Set of nested attribute definitions. Only required for hash_key and range_key attributes. See below.
// +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. See below.
// +kubebuilder:validation:Optional
GlobalSecondaryIndex []GlobalSecondaryIndexParameters `json:"globalSecondaryIndex,omitempty" tf:"global_secondary_index,omitempty"`
// 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. See below.
// +kubebuilder:validation:Optional
LocalSecondaryIndex []LocalSecondaryIndexParameters `json:"localSecondaryIndex,omitempty" tf:"local_secondary_index,omitempty"`
// Enable point-in-time recovery options. See below.
// +kubebuilder:validation:Optional
PointInTimeRecovery []PointInTimeRecoveryParameters `json:"pointInTimeRecovery,omitempty" tf:"point_in_time_recovery,omitempty"`
// 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"`
// 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. See below.
// +kubebuilder:validation:Optional
Replica []TableReplicaParameters `json:"replica,omitempty" tf:"replica,omitempty"`
// Time of the point-in-time recovery point to restore.
// +kubebuilder:validation:Optional
RestoreDateTime *string `json:"restoreDateTime,omitempty" tf:"restore_date_time,omitempty"`
// 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. See below.
// +kubebuilder:validation:Optional
ServerSideEncryption []ServerSideEncryptionParameters `json:"serverSideEncryption,omitempty" tf:"server_side_encryption,omitempty"`
// Whether Streams are enabled.
// +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"`
// Configuration block for TTL. See below.
// +kubebuilder:validation:Optional
TTL []TTLParameters `json:"ttl,omitempty" tf:"ttl,omitempty"`
// 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"`
// 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 {
// ARN of the replica
Arn *string `json:"arn,omitempty" tf:"arn,omitempty"`
// ARN of the Table Stream. Only available when stream_enabled = true
StreamArn *string `json:"streamArn,omitempty" tf:"stream_arn,omitempty"`
// 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"`
}
type TableReplicaParameters struct {
// ARN of the CMK that should be used for the AWS KMS encryption. This argument should only be used if the key is different from the default KMS-managed DynamoDB key, alias/aws/dynamodb. Note: This attribute will not be populated with the ARN of default keys.
// +kubebuilder:validation:Optional
KMSKeyArn *string `json:"kmsKeyArn,omitempty" tf:"kms_key_arn,omitempty"`
// Whether to enable Point In Time Recovery for the replica. Default is false.
// +kubebuilder:validation:Optional
PointInTimeRecovery *bool `json:"pointInTimeRecovery,omitempty" tf:"point_in_time_recovery,omitempty"`
// Whether to propagate the global table's tags to a replica. Default is false. Changes to tags only move in one direction: from global (source) to replica. In other words, tag drift on a replica will not trigger an update. Tag or replica changes on the global table, whether from drift or configuration changes, are propagated to replicas. Changing from true to false on a subsequent apply means replica tags are left as they were, unmanaged, not deleted.
// +kubebuilder:validation:Optional
PropagateTags *bool `json:"propagateTags,omitempty" tf:"propagate_tags,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{})
}