/
types.go
3588 lines (2917 loc) · 128 KB
/
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
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by smithy-go-codegen DO NOT EDIT.
package types
import (
smithydocument "github.com/aws/smithy-go/document"
"time"
)
// Contains details of a table archival operation.
type ArchivalSummary struct {
// The Amazon Resource Name (ARN) of the backup the table was archived to, when
// applicable in the archival reason. If you wish to restore this backup to the
// same table name, you will need to delete the original table.
ArchivalBackupArn *string
// The date and time when table archival was initiated by DynamoDB, in UNIX epoch
// time format.
ArchivalDateTime *time.Time
// The reason DynamoDB archived the table. Currently, the only possible value is:
//
// - INACCESSIBLE_ENCRYPTION_CREDENTIALS - The table was archived due to the
// table's KMS key being inaccessible for more than seven days. An On-Demand backup
// was created at the archival time.
ArchivalReason *string
noSmithyDocumentSerde
}
// Represents an attribute for describing the schema for the table and indexes.
type AttributeDefinition struct {
// A name for the attribute.
//
// This member is required.
AttributeName *string
// The data type for the attribute, where:
//
// - S - the attribute is of type String
//
// - N - the attribute is of type Number
//
// - B - the attribute is of type Binary
//
// This member is required.
AttributeType ScalarAttributeType
noSmithyDocumentSerde
}
// Represents the data for an attribute.
//
// Each attribute value is described as a name-value pair. The name is the data
// type, and the value is the data itself.
//
// For more information, see [Data Types] in the Amazon DynamoDB Developer Guide.
//
// The following types satisfy this interface:
//
// AttributeValueMemberB
// AttributeValueMemberBOOL
// AttributeValueMemberBS
// AttributeValueMemberL
// AttributeValueMemberM
// AttributeValueMemberN
// AttributeValueMemberNS
// AttributeValueMemberNULL
// AttributeValueMemberS
// AttributeValueMemberSS
//
// [Data Types]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes
type AttributeValue interface {
isAttributeValue()
}
// An attribute of type Binary. For example:
//
// "B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
type AttributeValueMemberB struct {
Value []byte
noSmithyDocumentSerde
}
func (*AttributeValueMemberB) isAttributeValue() {}
// An attribute of type Boolean. For example:
//
// "BOOL": true
type AttributeValueMemberBOOL struct {
Value bool
noSmithyDocumentSerde
}
func (*AttributeValueMemberBOOL) isAttributeValue() {}
// An attribute of type Binary Set. For example:
//
// "BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
type AttributeValueMemberBS struct {
Value [][]byte
noSmithyDocumentSerde
}
func (*AttributeValueMemberBS) isAttributeValue() {}
// An attribute of type List. For example:
//
// "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N": "3.14159"}]
type AttributeValueMemberL struct {
Value []AttributeValue
noSmithyDocumentSerde
}
func (*AttributeValueMemberL) isAttributeValue() {}
// An attribute of type Map. For example:
//
// "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
type AttributeValueMemberM struct {
Value map[string]AttributeValue
noSmithyDocumentSerde
}
func (*AttributeValueMemberM) isAttributeValue() {}
// An attribute of type Number. For example:
//
// "N": "123.45"
//
// Numbers are sent across the network to DynamoDB as strings, to maximize
// compatibility across languages and libraries. However, DynamoDB treats them as
// number type attributes for mathematical operations.
type AttributeValueMemberN struct {
Value string
noSmithyDocumentSerde
}
func (*AttributeValueMemberN) isAttributeValue() {}
// An attribute of type Number Set. For example:
//
// "NS": ["42.2", "-19", "7.5", "3.14"]
//
// Numbers are sent across the network to DynamoDB as strings, to maximize
// compatibility across languages and libraries. However, DynamoDB treats them as
// number type attributes for mathematical operations.
type AttributeValueMemberNS struct {
Value []string
noSmithyDocumentSerde
}
func (*AttributeValueMemberNS) isAttributeValue() {}
// An attribute of type Null. For example:
//
// "NULL": true
type AttributeValueMemberNULL struct {
Value bool
noSmithyDocumentSerde
}
func (*AttributeValueMemberNULL) isAttributeValue() {}
// An attribute of type String. For example:
//
// "S": "Hello"
type AttributeValueMemberS struct {
Value string
noSmithyDocumentSerde
}
func (*AttributeValueMemberS) isAttributeValue() {}
// An attribute of type String Set. For example:
//
// "SS": ["Giraffe", "Hippo" ,"Zebra"]
type AttributeValueMemberSS struct {
Value []string
noSmithyDocumentSerde
}
func (*AttributeValueMemberSS) isAttributeValue() {}
// For the UpdateItem operation, represents the attributes to be modified, the
// action to perform on each, and the new value for each.
//
// You cannot use UpdateItem to update any primary key attributes. Instead, you
// will need to delete the item, and then use PutItem to create a new item with
// new attributes.
//
// Attribute values cannot be null; string and binary type attributes must have
// lengths greater than zero; and set type attributes must not be empty. Requests
// with empty values will be rejected with a ValidationException exception.
type AttributeValueUpdate struct {
// Specifies how to perform the update. Valid values are PUT (default), DELETE ,
// and ADD . The behavior depends on whether the specified primary key already
// exists in the table.
//
// If an item with the specified Key is found in the table:
//
// - PUT - Adds the specified attribute to the item. If the attribute already
// exists, it is replaced by the new value.
//
// - DELETE - If no value is specified, the attribute and its value are removed
// from the item. The data type of the specified value must match the existing
// value's data type.
//
// If a set of values is specified, then those values are subtracted from the old
// set. For example, if the attribute value was the set [a,b,c] and the DELETE
// action specified [a,c] , then the final attribute value would be [b] .
// Specifying an empty set is an error.
//
// - ADD - If the attribute does not already exist, then the attribute and its
// values are added to the item. If the attribute does exist, then the behavior of
// ADD depends on the data type of the attribute:
//
// - If the existing attribute is a number, and if Value is also a number, then
// the Value is mathematically added to the existing attribute. If Value is a
// negative number, then it is subtracted from the existing attribute.
//
// If you use ADD to increment or decrement a number value for an item that doesn't
// exist before the update, DynamoDB uses 0 as the initial value.
//
// In addition, if you use ADD to update an existing item, and intend to increment
// or decrement an attribute value which does not yet exist, DynamoDB uses 0 as
// the initial value. For example, suppose that the item you want to update does
// not yet have an attribute named itemcount, but you decide to ADD the number 3
// to this attribute anyway, even though it currently does not exist. DynamoDB will
// create the itemcount attribute, set its initial value to 0 , and finally add 3
// to it. The result will be a new itemcount attribute in the item, with a value of
// 3 .
//
// - If the existing data type is a set, and if the Value is also a set, then the
// Value is added to the existing set. (This is a set operation, not mathematical
// addition.) For example, if the attribute value was the set [1,2] , and the ADD
// action specified [3] , then the final attribute value would be [1,2,3] . An
// error occurs if an Add action is specified for a set attribute and the attribute
// type specified does not match the existing set type.
//
// Both sets must have the same primitive data type. For example, if the existing
// data type is a set of strings, the Value must also be a set of strings. The
// same holds true for number sets and binary sets.
//
// This action is only valid for an existing attribute whose data type is number
// or is a set. Do not use ADD for any other data types.
//
// If no item with the specified Key is found:
//
// - PUT - DynamoDB creates a new item with the specified primary key, and then
// adds the attribute.
//
// - DELETE - Nothing happens; there is no attribute to delete.
//
// - ADD - DynamoDB creates a new item with the supplied primary key and number
// (or set) for the attribute value. The only data types allowed are number, number
// set, string set or binary set.
Action AttributeAction
// Represents the data for an attribute.
//
// Each attribute value is described as a name-value pair. The name is the data
// type, and the value is the data itself.
//
// For more information, see [Data Types] in the Amazon DynamoDB Developer Guide.
//
// [Data Types]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes
Value AttributeValue
noSmithyDocumentSerde
}
// Represents the properties of the scaling policy.
type AutoScalingPolicyDescription struct {
// The name of the scaling policy.
PolicyName *string
// Represents a target tracking scaling policy configuration.
TargetTrackingScalingPolicyConfiguration *AutoScalingTargetTrackingScalingPolicyConfigurationDescription
noSmithyDocumentSerde
}
// Represents the auto scaling policy to be modified.
type AutoScalingPolicyUpdate struct {
// Represents a target tracking scaling policy configuration.
//
// This member is required.
TargetTrackingScalingPolicyConfiguration *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
// The name of the scaling policy.
PolicyName *string
noSmithyDocumentSerde
}
// Represents the auto scaling settings for a global table or global secondary
// index.
type AutoScalingSettingsDescription struct {
// Disabled auto scaling for this global table or global secondary index.
AutoScalingDisabled *bool
// Role ARN used for configuring the auto scaling policy.
AutoScalingRoleArn *string
// The maximum capacity units that a global table or global secondary index should
// be scaled up to.
MaximumUnits *int64
// The minimum capacity units that a global table or global secondary index should
// be scaled down to.
MinimumUnits *int64
// Information about the scaling policies.
ScalingPolicies []AutoScalingPolicyDescription
noSmithyDocumentSerde
}
// Represents the auto scaling settings to be modified for a global table or
// global secondary index.
type AutoScalingSettingsUpdate struct {
// Disabled auto scaling for this global table or global secondary index.
AutoScalingDisabled *bool
// Role ARN used for configuring auto scaling policy.
AutoScalingRoleArn *string
// The maximum capacity units that a global table or global secondary index should
// be scaled up to.
MaximumUnits *int64
// The minimum capacity units that a global table or global secondary index should
// be scaled down to.
MinimumUnits *int64
// The scaling policy to apply for scaling target global table or global secondary
// index capacity units.
ScalingPolicyUpdate *AutoScalingPolicyUpdate
noSmithyDocumentSerde
}
// Represents the properties of a target tracking scaling policy.
type AutoScalingTargetTrackingScalingPolicyConfigurationDescription struct {
// The target value for the metric. The range is 8.515920e-109 to 1.174271e+108
// (Base 10) or 2e-360 to 2e360 (Base 2).
//
// This member is required.
TargetValue *float64
// Indicates whether scale in by the target tracking policy is disabled. If the
// value is true, scale in is disabled and the target tracking policy won't remove
// capacity from the scalable resource. Otherwise, scale in is enabled and the
// target tracking policy can remove capacity from the scalable resource. The
// default value is false.
DisableScaleIn *bool
// The amount of time, in seconds, after a scale in activity completes before
// another scale in activity can start. The cooldown period is used to block
// subsequent scale in requests until it has expired. You should scale in
// conservatively to protect your application's availability. However, if another
// alarm triggers a scale out policy during the cooldown period after a scale-in,
// application auto scaling scales out your scalable target immediately.
ScaleInCooldown *int32
// The amount of time, in seconds, after a scale out activity completes before
// another scale out activity can start. While the cooldown period is in effect,
// the capacity that has been added by the previous scale out event that initiated
// the cooldown is calculated as part of the desired capacity for the next scale
// out. You should continuously (but not excessively) scale out.
ScaleOutCooldown *int32
noSmithyDocumentSerde
}
// Represents the settings of a target tracking scaling policy that will be
// modified.
type AutoScalingTargetTrackingScalingPolicyConfigurationUpdate struct {
// The target value for the metric. The range is 8.515920e-109 to 1.174271e+108
// (Base 10) or 2e-360 to 2e360 (Base 2).
//
// This member is required.
TargetValue *float64
// Indicates whether scale in by the target tracking policy is disabled. If the
// value is true, scale in is disabled and the target tracking policy won't remove
// capacity from the scalable resource. Otherwise, scale in is enabled and the
// target tracking policy can remove capacity from the scalable resource. The
// default value is false.
DisableScaleIn *bool
// The amount of time, in seconds, after a scale in activity completes before
// another scale in activity can start. The cooldown period is used to block
// subsequent scale in requests until it has expired. You should scale in
// conservatively to protect your application's availability. However, if another
// alarm triggers a scale out policy during the cooldown period after a scale-in,
// application auto scaling scales out your scalable target immediately.
ScaleInCooldown *int32
// The amount of time, in seconds, after a scale out activity completes before
// another scale out activity can start. While the cooldown period is in effect,
// the capacity that has been added by the previous scale out event that initiated
// the cooldown is calculated as part of the desired capacity for the next scale
// out. You should continuously (but not excessively) scale out.
ScaleOutCooldown *int32
noSmithyDocumentSerde
}
// Contains the description of the backup created for the table.
type BackupDescription struct {
// Contains the details of the backup created for the table.
BackupDetails *BackupDetails
// Contains the details of the table when the backup was created.
SourceTableDetails *SourceTableDetails
// Contains the details of the features enabled on the table when the backup was
// created. For example, LSIs, GSIs, streams, TTL.
SourceTableFeatureDetails *SourceTableFeatureDetails
noSmithyDocumentSerde
}
// Contains the details of the backup created for the table.
type BackupDetails struct {
// ARN associated with the backup.
//
// This member is required.
BackupArn *string
// Time at which the backup was created. This is the request time of the backup.
//
// This member is required.
BackupCreationDateTime *time.Time
// Name of the requested backup.
//
// This member is required.
BackupName *string
// Backup can be in one of the following states: CREATING, ACTIVE, DELETED.
//
// This member is required.
BackupStatus BackupStatus
// BackupType:
//
// - USER - You create and manage these using the on-demand backup feature.
//
// - SYSTEM - If you delete a table with point-in-time recovery enabled, a SYSTEM
// backup is automatically created and is retained for 35 days (at no additional
// cost). System backups allow you to restore the deleted table to the state it was
// in just before the point of deletion.
//
// - AWS_BACKUP - On-demand backup created by you from Backup service.
//
// This member is required.
BackupType BackupType
// Time at which the automatic on-demand backup created by DynamoDB will expire.
// This SYSTEM on-demand backup expires automatically 35 days after its creation.
BackupExpiryDateTime *time.Time
// Size of the backup in bytes. DynamoDB updates this value approximately every
// six hours. Recent changes might not be reflected in this value.
BackupSizeBytes *int64
noSmithyDocumentSerde
}
// Contains details for the backup.
type BackupSummary struct {
// ARN associated with the backup.
BackupArn *string
// Time at which the backup was created.
BackupCreationDateTime *time.Time
// Time at which the automatic on-demand backup created by DynamoDB will expire.
// This SYSTEM on-demand backup expires automatically 35 days after its creation.
BackupExpiryDateTime *time.Time
// Name of the specified backup.
BackupName *string
// Size of the backup in bytes.
BackupSizeBytes *int64
// Backup can be in one of the following states: CREATING, ACTIVE, DELETED.
BackupStatus BackupStatus
// BackupType:
//
// - USER - You create and manage these using the on-demand backup feature.
//
// - SYSTEM - If you delete a table with point-in-time recovery enabled, a SYSTEM
// backup is automatically created and is retained for 35 days (at no additional
// cost). System backups allow you to restore the deleted table to the state it was
// in just before the point of deletion.
//
// - AWS_BACKUP - On-demand backup created by you from Backup service.
BackupType BackupType
// ARN associated with the table.
TableArn *string
// Unique identifier for the table.
TableId *string
// Name of the table.
TableName *string
noSmithyDocumentSerde
}
// An error associated with a statement in a PartiQL batch that was run.
type BatchStatementError struct {
// The error code associated with the failed PartiQL batch statement.
Code BatchStatementErrorCodeEnum
// The item which caused the condition check to fail. This will be set if
// ReturnValuesOnConditionCheckFailure is specified as ALL_OLD .
Item map[string]AttributeValue
// The error message associated with the PartiQL batch response.
Message *string
noSmithyDocumentSerde
}
// A PartiQL batch statement request.
type BatchStatementRequest struct {
// A valid PartiQL statement.
//
// This member is required.
Statement *string
// The read consistency of the PartiQL batch request.
ConsistentRead *bool
// The parameters associated with a PartiQL statement in the batch request.
Parameters []AttributeValue
// An optional parameter that returns the item attributes for a PartiQL batch
// request operation that failed a condition check.
//
// There is no additional cost associated with requesting a return value aside
// from the small network and processing overhead of receiving a larger response.
// No read capacity units are consumed.
ReturnValuesOnConditionCheckFailure ReturnValuesOnConditionCheckFailure
noSmithyDocumentSerde
}
// A PartiQL batch statement response..
type BatchStatementResponse struct {
// The error associated with a failed PartiQL batch statement.
Error *BatchStatementError
// A DynamoDB item associated with a BatchStatementResponse
Item map[string]AttributeValue
// The table name associated with a failed PartiQL batch statement.
TableName *string
noSmithyDocumentSerde
}
// Contains the details for the read/write capacity mode. This page talks about
// PROVISIONED and PAY_PER_REQUEST billing modes. For more information about these
// modes, see [Read/write capacity mode].
//
// You may need to switch to on-demand mode at least once in order to return a
// BillingModeSummary response.
//
// [Read/write capacity mode]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html
type BillingModeSummary struct {
// Controls how you are charged for read and write throughput and how you manage
// capacity. This setting can be changed later.
//
// - PROVISIONED - Sets the read/write capacity mode to PROVISIONED . We
// recommend using PROVISIONED for predictable workloads.
//
// - PAY_PER_REQUEST - Sets the read/write capacity mode to PAY_PER_REQUEST . We
// recommend using PAY_PER_REQUEST for unpredictable workloads.
BillingMode BillingMode
// Represents the time when PAY_PER_REQUEST was last set as the read/write
// capacity mode.
LastUpdateToPayPerRequestDateTime *time.Time
noSmithyDocumentSerde
}
// An ordered list of errors for each item in the request which caused the
// transaction to get cancelled. The values of the list are ordered according to
// the ordering of the TransactWriteItems request parameter. If no error occurred
// for the associated item an error with a Null code and Null message will be
// present.
type CancellationReason struct {
// Status code for the result of the cancelled transaction.
Code *string
// Item in the request which caused the transaction to get cancelled.
Item map[string]AttributeValue
// Cancellation reason message description.
Message *string
noSmithyDocumentSerde
}
// Represents the amount of provisioned throughput capacity consumed on a table or
// an index.
type Capacity struct {
// The total number of capacity units consumed on a table or an index.
CapacityUnits *float64
// The total number of read capacity units consumed on a table or an index.
ReadCapacityUnits *float64
// The total number of write capacity units consumed on a table or an index.
WriteCapacityUnits *float64
noSmithyDocumentSerde
}
// Represents the selection criteria for a Query or Scan operation:
//
// - For a Query operation, Condition is used for specifying the KeyConditions to
// use when querying a table or an index. For KeyConditions , only the following
// comparison operators are supported:
//
// EQ | LE | LT | GE | GT | BEGINS_WITH | BETWEEN
//
// Condition is also used in a QueryFilter , which evaluates the query results and
//
// returns only the desired values.
//
// - For a Scan operation, Condition is used in a ScanFilter , which evaluates
// the scan results and returns only the desired values.
type Condition struct {
// A comparator for evaluating attributes. For example, equals, greater than, less
// than, etc.
//
// The following comparison operators are available:
//
// EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS |
// BEGINS_WITH | IN | BETWEEN
//
// The following are descriptions of each comparison operator.
//
// - EQ : Equal. EQ is supported for all data types, including lists and maps.
//
// AttributeValueList can contain only one AttributeValue element of type String,
// Number, Binary, String Set, Number Set, or Binary Set. If an item contains an
// AttributeValue element of a different type than the one provided in the
// request, the value does not match. For example, {"S":"6"} does not equal
// {"N":"6"} . Also, {"N":"6"} does not equal {"NS":["6", "2", "1"]} .
//
// - NE : Not equal. NE is supported for all data types, including lists and maps.
//
// AttributeValueList can contain only one AttributeValue of type String, Number,
// Binary, String Set, Number Set, or Binary Set. If an item contains an
// AttributeValue of a different type than the one provided in the request, the
// value does not match. For example, {"S":"6"} does not equal {"N":"6"} . Also,
// {"N":"6"} does not equal {"NS":["6", "2", "1"]} .
//
// - LE : Less than or equal.
//
// AttributeValueList can contain only one AttributeValue element of type String,
// Number, or Binary (not a set type). If an item contains an AttributeValue
// element of a different type than the one provided in the request, the value does
// not match. For example, {"S":"6"} does not equal {"N":"6"} . Also, {"N":"6"}
// does not compare to {"NS":["6", "2", "1"]} .
//
// - LT : Less than.
//
// AttributeValueList can contain only one AttributeValue of type String, Number,
// or Binary (not a set type). If an item contains an AttributeValue element of a
// different type than the one provided in the request, the value does not match.
// For example, {"S":"6"} does not equal {"N":"6"} . Also, {"N":"6"} does not
// compare to {"NS":["6", "2", "1"]} .
//
// - GE : Greater than or equal.
//
// AttributeValueList can contain only one AttributeValue element of type String,
// Number, or Binary (not a set type). If an item contains an AttributeValue
// element of a different type than the one provided in the request, the value does
// not match. For example, {"S":"6"} does not equal {"N":"6"} . Also, {"N":"6"}
// does not compare to {"NS":["6", "2", "1"]} .
//
// - GT : Greater than.
//
// AttributeValueList can contain only one AttributeValue element of type String,
// Number, or Binary (not a set type). If an item contains an AttributeValue
// element of a different type than the one provided in the request, the value does
// not match. For example, {"S":"6"} does not equal {"N":"6"} . Also, {"N":"6"}
// does not compare to {"NS":["6", "2", "1"]} .
//
// - NOT_NULL : The attribute exists. NOT_NULL is supported for all data types,
// including lists and maps.
//
// This operator tests for the existence of an attribute, not its data type. If
// the data type of attribute " a " is null, and you evaluate it using NOT_NULL ,
// the result is a Boolean true . This result is because the attribute " a "
// exists; its data type is not relevant to the NOT_NULL comparison operator.
//
// - NULL : The attribute does not exist. NULL is supported for all data types,
// including lists and maps.
//
// This operator tests for the nonexistence of an attribute, not its data type. If
// the data type of attribute " a " is null, and you evaluate it using NULL , the
// result is a Boolean false . This is because the attribute " a " exists; its
// data type is not relevant to the NULL comparison operator.
//
// - CONTAINS : Checks for a subsequence, or value in a set.
//
// AttributeValueList can contain only one AttributeValue element of type String,
// Number, or Binary (not a set type). If the target attribute of the comparison is
// of type String, then the operator checks for a substring match. If the target
// attribute of the comparison is of type Binary, then the operator looks for a
// subsequence of the target that matches the input. If the target attribute of the
// comparison is a set (" SS ", " NS ", or " BS "), then the operator evaluates
// to true if it finds an exact match with any member of the set.
//
// CONTAINS is supported for lists: When evaluating " a CONTAINS b ", " a " can be
// a list; however, " b " cannot be a set, a map, or a list.
//
// - NOT_CONTAINS : Checks for absence of a subsequence, or absence of a value in
// a set.
//
// AttributeValueList can contain only one AttributeValue element of type String,
// Number, or Binary (not a set type). If the target attribute of the comparison is
// a String, then the operator checks for the absence of a substring match. If the
// target attribute of the comparison is Binary, then the operator checks for the
// absence of a subsequence of the target that matches the input. If the target
// attribute of the comparison is a set (" SS ", " NS ", or " BS "), then the
// operator evaluates to true if it does not find an exact match with any member of
// the set.
//
// NOT_CONTAINS is supported for lists: When evaluating " a NOT CONTAINS b ", " a "
// can be a list; however, " b " cannot be a set, a map, or a list.
//
// - BEGINS_WITH : Checks for a prefix.
//
// AttributeValueList can contain only one AttributeValue of type String or Binary
// (not a Number or a set type). The target attribute of the comparison must be of
// type String or Binary (not a Number or a set type).
//
// - IN : Checks for matching elements in a list.
//
// AttributeValueList can contain one or more AttributeValue elements of type
// String, Number, or Binary. These attributes are compared against an existing
// attribute of an item. If any elements of the input are equal to the item
// attribute, the expression evaluates to true.
//
// - BETWEEN : Greater than or equal to the first value, and less than or equal
// to the second value.
//
// AttributeValueList must contain two AttributeValue elements of the same type,
// either String, Number, or Binary (not a set type). A target attribute matches if
// the target value is greater than, or equal to, the first element and less than,
// or equal to, the second element. If an item contains an AttributeValue element
// of a different type than the one provided in the request, the value does not
// match. For example, {"S":"6"} does not compare to {"N":"6"} . Also, {"N":"6"}
// does not compare to {"NS":["6", "2", "1"]}
//
// For usage examples of AttributeValueList and ComparisonOperator , see [Legacy Conditional Parameters] in the
// Amazon DynamoDB Developer Guide.
//
// [Legacy Conditional Parameters]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html
//
// This member is required.
ComparisonOperator ComparisonOperator
// One or more values to evaluate against the supplied attribute. The number of
// values in the list depends on the ComparisonOperator being used.
//
// For type Number, value comparisons are numeric.
//
// String value comparisons for greater than, equals, or less than are based on
// ASCII character code values. For example, a is greater than A , and a is
// greater than B . For a list of code values, see [http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters].
//
// For Binary, DynamoDB treats each byte of the binary data as unsigned when it
// compares binary values.
//
// [http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters]: http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters
AttributeValueList []AttributeValue
noSmithyDocumentSerde
}
// Represents a request to perform a check that an item exists or to check the
// condition of specific attributes of the item.
type ConditionCheck struct {
// A condition that must be satisfied in order for a conditional update to
// succeed. For more information, see [Condition expressions]in the Amazon DynamoDB Developer Guide.
//
// [Condition expressions]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.ConditionExpressions.html
//
// This member is required.
ConditionExpression *string
// The primary key of the item to be checked. Each element consists of an
// attribute name and a value for that attribute.
//
// This member is required.
Key map[string]AttributeValue
// Name of the table for the check item request. You can also provide the Amazon
// Resource Name (ARN) of the table in this parameter.
//
// This member is required.
TableName *string
// One or more substitution tokens for attribute names in an expression. For more
// information, see [Expression attribute names]in the Amazon DynamoDB Developer Guide.
//
// [Expression attribute names]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.ExpressionAttributeNames.html
ExpressionAttributeNames map[string]string
// One or more values that can be substituted in an expression. For more
// information, see [Condition expressions]in the Amazon DynamoDB Developer Guide.
//
// [Condition expressions]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.ConditionExpressions.html
ExpressionAttributeValues map[string]AttributeValue
// Use ReturnValuesOnConditionCheckFailure to get the item attributes if the
// ConditionCheck condition fails. For ReturnValuesOnConditionCheckFailure , the
// valid values are: NONE and ALL_OLD.
ReturnValuesOnConditionCheckFailure ReturnValuesOnConditionCheckFailure
noSmithyDocumentSerde
}
// The capacity units consumed by an operation. The data returned includes the
// total provisioned throughput consumed, along with statistics for the table and
// any indexes involved in the operation. ConsumedCapacity is only returned if the
// request asked for it. For more information, see [Provisioned Throughput]in the Amazon DynamoDB
// Developer Guide.
//
// [Provisioned Throughput]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html
type ConsumedCapacity struct {
// The total number of capacity units consumed by the operation.
CapacityUnits *float64
// The amount of throughput consumed on each global index affected by the
// operation.
GlobalSecondaryIndexes map[string]Capacity
// The amount of throughput consumed on each local index affected by the operation.
LocalSecondaryIndexes map[string]Capacity
// The total number of read capacity units consumed by the operation.
ReadCapacityUnits *float64
// The amount of throughput consumed on the table affected by the operation.
Table *Capacity
// The name of the table that was affected by the operation. If you had specified
// the Amazon Resource Name (ARN) of a table in the input, you'll see the table ARN
// in the response.
TableName *string
// The total number of write capacity units consumed by the operation.
WriteCapacityUnits *float64
noSmithyDocumentSerde
}
// Represents the continuous backups and point in time recovery settings on the
// table.
type ContinuousBackupsDescription struct {
// ContinuousBackupsStatus can be one of the following states: ENABLED, DISABLED
//
// This member is required.
ContinuousBackupsStatus ContinuousBackupsStatus
// The description of the point in time recovery settings applied to the table.
PointInTimeRecoveryDescription *PointInTimeRecoveryDescription
noSmithyDocumentSerde
}
// Represents a Contributor Insights summary entry.
type ContributorInsightsSummary struct {
// Describes the current status for contributor insights for the given table and
// index, if applicable.
ContributorInsightsStatus ContributorInsightsStatus
// Name of the index associated with the summary, if any.
IndexName *string
// Name of the table associated with the summary.
TableName *string
noSmithyDocumentSerde
}
// Represents a new global secondary index to be added to an existing table.
type CreateGlobalSecondaryIndexAction struct {
// The name of the global secondary index to be created.
//
// This member is required.
IndexName *string
// The key schema for the global secondary index.
//
// This member is required.
KeySchema []KeySchemaElement
// Represents attributes that are copied (projected) from the table into an index.
// These are in addition to the primary key attributes and index key attributes,
// which are automatically projected.
//
// This member is required.
Projection *Projection
// The maximum number of read and write units for the global secondary index being
// created. If you use this parameter, you must specify MaxReadRequestUnits ,
// MaxWriteRequestUnits , or both.
OnDemandThroughput *OnDemandThroughput
// Represents the provisioned throughput settings for the specified global
// secondary index.
//
// For current minimum and maximum provisioned throughput values, see [Service, Account, and Table Quotas] in the
// Amazon DynamoDB Developer Guide.
//
// [Service, Account, and Table Quotas]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html
ProvisionedThroughput *ProvisionedThroughput
noSmithyDocumentSerde
}
// Represents a replica to be added.
type CreateReplicaAction struct {
// The Region of the replica to be added.
//
// This member is required.
RegionName *string
noSmithyDocumentSerde
}
// Represents a replica to be created.
type CreateReplicationGroupMemberAction struct {
// The Region where the new replica will be created.
//
// This member is required.
RegionName *string
// Replica-specific global secondary index settings.
GlobalSecondaryIndexes []ReplicaGlobalSecondaryIndex
// The KMS key that should be used for KMS encryption in the new replica. To
// specify a key, use its key ID, Amazon Resource Name (ARN), alias name, or alias
// ARN. Note that you should only provide this parameter if the key is different
// from the default DynamoDB KMS key alias/aws/dynamodb .
KMSMasterKeyId *string