@aws-sdk/client-timestream-write 3.348.0 → 3.349.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CreateBatchLoadTaskRequestFilterSensitiveLog = exports.RejectedRecordsException = exports.DimensionValueType = exports.TableStatus = exports.ValidationException = exports.ThrottlingException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.InvalidEndpointException = exports.InternalServerException = exports.ConflictException = exports.S3EncryptionOption = exports.TimeUnit = exports.ScalarMeasureValueType = exports.MeasureValueType = exports.BatchLoadStatus = exports.BatchLoadDataFormat = exports.AccessDeniedException = void 0;
3
+ exports.CreateBatchLoadTaskRequestFilterSensitiveLog = exports.RejectedRecordsException = exports.DimensionValueType = exports.TableStatus = exports.PartitionKeyType = exports.PartitionKeyEnforcementLevel = exports.ValidationException = exports.ThrottlingException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.InvalidEndpointException = exports.InternalServerException = exports.ConflictException = exports.S3EncryptionOption = exports.TimeUnit = exports.ScalarMeasureValueType = exports.MeasureValueType = exports.BatchLoadStatus = exports.BatchLoadDataFormat = exports.AccessDeniedException = void 0;
4
4
  const smithy_client_1 = require("@aws-sdk/smithy-client");
5
5
  const TimestreamWriteServiceException_1 = require("./TimestreamWriteServiceException");
6
6
  class AccessDeniedException extends TimestreamWriteServiceException_1.TimestreamWriteServiceException {
@@ -151,6 +151,14 @@ class ValidationException extends TimestreamWriteServiceException_1.TimestreamWr
151
151
  }
152
152
  }
153
153
  exports.ValidationException = ValidationException;
154
+ exports.PartitionKeyEnforcementLevel = {
155
+ OPTIONAL: "OPTIONAL",
156
+ REQUIRED: "REQUIRED",
157
+ };
158
+ exports.PartitionKeyType = {
159
+ DIMENSION: "DIMENSION",
160
+ MEASURE: "MEASURE",
161
+ };
154
162
  exports.TableStatus = {
155
163
  ACTIVE: "ACTIVE",
156
164
  DELETING: "DELETING",
@@ -1233,6 +1233,7 @@ const de_Table = (output, context) => {
1233
1233
  LastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1234
1234
  MagneticStoreWriteProperties: smithy_client_1._json,
1235
1235
  RetentionProperties: smithy_client_1._json,
1236
+ Schema: smithy_client_1._json,
1236
1237
  TableName: smithy_client_1.expectString,
1237
1238
  TableStatus: smithy_client_1.expectString,
1238
1239
  });
@@ -140,6 +140,14 @@ export class ValidationException extends __BaseException {
140
140
  this.Message = opts.Message;
141
141
  }
142
142
  }
143
+ export const PartitionKeyEnforcementLevel = {
144
+ OPTIONAL: "OPTIONAL",
145
+ REQUIRED: "REQUIRED",
146
+ };
147
+ export const PartitionKeyType = {
148
+ DIMENSION: "DIMENSION",
149
+ MEASURE: "MEASURE",
150
+ };
143
151
  export const TableStatus = {
144
152
  ACTIVE: "ACTIVE",
145
153
  DELETING: "DELETING",
@@ -1192,6 +1192,7 @@ const de_Table = (output, context) => {
1192
1192
  LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1193
1193
  MagneticStoreWriteProperties: _json,
1194
1194
  RetentionProperties: _json,
1195
+ Schema: _json,
1195
1196
  TableName: __expectString,
1196
1197
  TableStatus: __expectString,
1197
1198
  });
@@ -27,8 +27,8 @@ export interface CreateBatchLoadTaskCommandOutput extends CreateBatchLoadTaskRes
27
27
  * a CSV source in an S3 location and writes to a Timestream table. A mapping from
28
28
  * source to target is defined in a batch load task. Errors and events are written to a report
29
29
  * at an S3 location. For the report, if the KMS key is not specified, the
30
- * batch load task will be encrypted with a Timestream managed KMS key
31
- * located in your account. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed
30
+ * report will be encrypted with an S3 managed key when <code>SSE_S3</code> is the option.
31
+ * Otherwise an error is thrown. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed
32
32
  * keys</a>. <a href="https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html">Service quotas apply</a>. For
33
33
  * details, see <a href="https://docs.aws.amazon.com/timestream/latest/developerguide/code-samples.create-batch-load.html">code
34
34
  * sample</a>.</p>
@@ -59,6 +59,15 @@ export interface CreateTableCommandOutput extends CreateTableResponse, __Metadat
59
59
  * },
60
60
  * },
61
61
  * },
62
+ * Schema: { // Schema
63
+ * CompositePartitionKey: [ // PartitionKeyList
64
+ * { // PartitionKey
65
+ * Type: "DIMENSION" || "MEASURE", // required
66
+ * Name: "STRING_VALUE",
67
+ * EnforcementInRecord: "REQUIRED" || "OPTIONAL",
68
+ * },
69
+ * ],
70
+ * },
62
71
  * };
63
72
  * const command = new CreateTableCommand(input);
64
73
  * const response = await client.send(command);
@@ -85,6 +94,15 @@ export interface CreateTableCommandOutput extends CreateTableResponse, __Metadat
85
94
  * // },
86
95
  * // },
87
96
  * // },
97
+ * // Schema: { // Schema
98
+ * // CompositePartitionKey: [ // PartitionKeyList
99
+ * // { // PartitionKey
100
+ * // Type: "DIMENSION" || "MEASURE", // required
101
+ * // Name: "STRING_VALUE",
102
+ * // EnforcementInRecord: "REQUIRED" || "OPTIONAL",
103
+ * // },
104
+ * // ],
105
+ * // },
88
106
  * // },
89
107
  * // };
90
108
  *
@@ -62,6 +62,15 @@ export interface DescribeTableCommandOutput extends DescribeTableResponse, __Met
62
62
  * // },
63
63
  * // },
64
64
  * // },
65
+ * // Schema: { // Schema
66
+ * // CompositePartitionKey: [ // PartitionKeyList
67
+ * // { // PartitionKey
68
+ * // Type: "DIMENSION" || "MEASURE", // required
69
+ * // Name: "STRING_VALUE",
70
+ * // EnforcementInRecord: "REQUIRED" || "OPTIONAL",
71
+ * // },
72
+ * // ],
73
+ * // },
65
74
  * // },
66
75
  * // };
67
76
  *
@@ -63,6 +63,15 @@ export interface ListTablesCommandOutput extends ListTablesResponse, __MetadataB
63
63
  * // },
64
64
  * // },
65
65
  * // },
66
+ * // Schema: { // Schema
67
+ * // CompositePartitionKey: [ // PartitionKeyList
68
+ * // { // PartitionKey
69
+ * // Type: "DIMENSION" || "MEASURE", // required
70
+ * // Name: "STRING_VALUE",
71
+ * // EnforcementInRecord: "REQUIRED" || "OPTIONAL",
72
+ * // },
73
+ * // ],
74
+ * // },
66
75
  * // },
67
76
  * // ],
68
77
  * // NextToken: "STRING_VALUE",
@@ -53,6 +53,15 @@ export interface UpdateTableCommandOutput extends UpdateTableResponse, __Metadat
53
53
  * },
54
54
  * },
55
55
  * },
56
+ * Schema: { // Schema
57
+ * CompositePartitionKey: [ // PartitionKeyList
58
+ * { // PartitionKey
59
+ * Type: "DIMENSION" || "MEASURE", // required
60
+ * Name: "STRING_VALUE",
61
+ * EnforcementInRecord: "REQUIRED" || "OPTIONAL",
62
+ * },
63
+ * ],
64
+ * },
56
65
  * };
57
66
  * const command = new UpdateTableCommand(input);
58
67
  * const response = await client.send(command);
@@ -79,6 +88,15 @@ export interface UpdateTableCommandOutput extends UpdateTableResponse, __Metadat
79
88
  * // },
80
89
  * // },
81
90
  * // },
91
+ * // Schema: { // Schema
92
+ * // CompositePartitionKey: [ // PartitionKeyList
93
+ * // { // PartitionKey
94
+ * // Type: "DIMENSION" || "MEASURE", // required
95
+ * // Name: "STRING_VALUE",
96
+ * // EnforcementInRecord: "REQUIRED" || "OPTIONAL",
97
+ * // },
98
+ * // ],
99
+ * // },
82
100
  * // },
83
101
  * // };
84
102
  *
@@ -382,7 +382,8 @@ export interface ReportS3Configuration {
382
382
  }
383
383
  /**
384
384
  * @public
385
- * <p>Report configuration for a batch load task. This contains details about where error reports are stored.</p>
385
+ * <p>Report configuration for a batch load task. This contains details about where error
386
+ * reports are stored.</p>
386
387
  */
387
388
  export interface ReportConfiguration {
388
389
  /**
@@ -413,11 +414,13 @@ export interface BatchLoadTaskDescription {
413
414
  */
414
415
  ProgressReport?: BatchLoadProgressReport;
415
416
  /**
416
- * <p>Report configuration for a batch load task. This contains details about where error reports are stored.</p>
417
+ * <p>Report configuration for a batch load task. This contains details about where error
418
+ * reports are stored.</p>
417
419
  */
418
420
  ReportConfiguration?: ReportConfiguration;
419
421
  /**
420
- * <p>Data model configuration for a batch load task. This contains details about where a data model for a batch load task is stored.</p>
422
+ * <p>Data model configuration for a batch load task. This contains details about where a data
423
+ * model for a batch load task is stored.</p>
421
424
  */
422
425
  DataModelConfiguration?: DataModelConfiguration;
423
426
  /**
@@ -481,7 +484,8 @@ export interface CreateBatchLoadTaskRequest {
481
484
  */
482
485
  DataSourceConfiguration: DataSourceConfiguration | undefined;
483
486
  /**
484
- * <p>Report configuration for a batch load task. This contains details about where error reports are stored.</p>
487
+ * <p>Report configuration for a batch load task. This contains details about where error
488
+ * reports are stored.</p>
485
489
  */
486
490
  ReportConfiguration: ReportConfiguration | undefined;
487
491
  /**
@@ -730,6 +734,67 @@ export interface RetentionProperties {
730
734
  */
731
735
  MagneticStoreRetentionPeriodInDays: number | undefined;
732
736
  }
737
+ /**
738
+ * @public
739
+ * @enum
740
+ */
741
+ export declare const PartitionKeyEnforcementLevel: {
742
+ readonly OPTIONAL: "OPTIONAL";
743
+ readonly REQUIRED: "REQUIRED";
744
+ };
745
+ /**
746
+ * @public
747
+ */
748
+ export type PartitionKeyEnforcementLevel = (typeof PartitionKeyEnforcementLevel)[keyof typeof PartitionKeyEnforcementLevel];
749
+ /**
750
+ * @public
751
+ * @enum
752
+ */
753
+ export declare const PartitionKeyType: {
754
+ readonly DIMENSION: "DIMENSION";
755
+ readonly MEASURE: "MEASURE";
756
+ };
757
+ /**
758
+ * @public
759
+ */
760
+ export type PartitionKeyType = (typeof PartitionKeyType)[keyof typeof PartitionKeyType];
761
+ /**
762
+ * @public
763
+ * <p> An attribute used in partitioning data in a table. A dimension key partitions data
764
+ * using the values of the dimension specified by the dimension-name as partition key, while a
765
+ * measure key partitions data using measure names (values of the 'measure_name' column).
766
+ * </p>
767
+ */
768
+ export interface PartitionKey {
769
+ /**
770
+ * <p> The type of the partition key. Options are DIMENSION (dimension key) and MEASURE
771
+ * (measure key). </p>
772
+ */
773
+ Type: PartitionKeyType | string | undefined;
774
+ /**
775
+ * <p> The name of the attribute used for a dimension key. </p>
776
+ */
777
+ Name?: string;
778
+ /**
779
+ * <p> The level of enforcement for the specification of a dimension key in ingested records.
780
+ * Options are REQUIRED (dimension key must be specified) and OPTIONAL (dimension key does not
781
+ * have to be specified). </p>
782
+ */
783
+ EnforcementInRecord?: PartitionKeyEnforcementLevel | string;
784
+ }
785
+ /**
786
+ * @public
787
+ * <p> A Schema specifies the expected data model of the table. </p>
788
+ */
789
+ export interface Schema {
790
+ /**
791
+ * <p>A non-empty list of partition keys defining the attributes used to partition the table
792
+ * data. The order of the list determines the partition hierarchy. The name and type of each
793
+ * partition key as well as the partition key order cannot be changed after the table is
794
+ * created. However, the enforcement level of each partition key can be changed. </p>
795
+ */
796
+ CompositePartitionKey?: PartitionKey[];
797
+ }
733
798
  /**
734
799
  * @public
735
800
  */
@@ -755,6 +820,10 @@ export interface CreateTableRequest {
755
820
  * <p>Contains properties to set on the table when enabling magnetic store writes.</p>
756
821
  */
757
822
  MagneticStoreWriteProperties?: MagneticStoreWriteProperties;
823
+ /**
824
+ * <p> The schema of the table. </p>
825
+ */
826
+ Schema?: Schema;
758
827
  }
759
828
  /**
760
829
  * @public
@@ -818,6 +887,10 @@ export interface Table {
818
887
  * <p>Contains properties to set on the table when enabling magnetic store writes.</p>
819
888
  */
820
889
  MagneticStoreWriteProperties?: MagneticStoreWriteProperties;
890
+ /**
891
+ * <p> The schema of the table. </p>
892
+ */
893
+ Schema?: Schema;
821
894
  }
822
895
  /**
823
896
  * @public
@@ -1108,7 +1181,8 @@ export interface MeasureValue {
1108
1181
  */
1109
1182
  Name: string | undefined;
1110
1183
  /**
1111
- * <p> The value for the MeasureValue. </p>
1184
+ * <p> The value for the MeasureValue. For information, see <a href="https://docs.aws.amazon.com/timestream/latest/developerguide/writes.html#writes.data-types">Data
1185
+ * types</a>.</p>
1112
1186
  */
1113
1187
  Value: string | undefined;
1114
1188
  /**
@@ -1149,7 +1223,8 @@ export interface _Record {
1149
1223
  MeasureValue?: string;
1150
1224
  /**
1151
1225
  * <p> Contains the data type of the measure value for the time-series data point. Default
1152
- * type is <code>DOUBLE</code>. </p>
1226
+ * type is <code>DOUBLE</code>. For more information, see <a href="https://docs.aws.amazon.com/timestream/latest/developerguide/writes.html#writes.data-types">Data
1227
+ * types</a>.</p>
1153
1228
  */
1154
1229
  MeasureValueType?: MeasureValueType | string;
1155
1230
  /**
@@ -1432,6 +1507,10 @@ export interface UpdateTableRequest {
1432
1507
  * <p>Contains properties to set on the table when enabling magnetic store writes.</p>
1433
1508
  */
1434
1509
  MagneticStoreWriteProperties?: MagneticStoreWriteProperties;
1510
+ /**
1511
+ * <p> The schema of the table. </p>
1512
+ */
1513
+ Schema?: Schema;
1435
1514
  }
1436
1515
  /**
1437
1516
  * @public
@@ -251,12 +251,33 @@ export interface RetentionProperties {
251
251
  MemoryStoreRetentionPeriodInHours: number | undefined;
252
252
  MagneticStoreRetentionPeriodInDays: number | undefined;
253
253
  }
254
+ export declare const PartitionKeyEnforcementLevel: {
255
+ readonly OPTIONAL: "OPTIONAL";
256
+ readonly REQUIRED: "REQUIRED";
257
+ };
258
+ export type PartitionKeyEnforcementLevel =
259
+ (typeof PartitionKeyEnforcementLevel)[keyof typeof PartitionKeyEnforcementLevel];
260
+ export declare const PartitionKeyType: {
261
+ readonly DIMENSION: "DIMENSION";
262
+ readonly MEASURE: "MEASURE";
263
+ };
264
+ export type PartitionKeyType =
265
+ (typeof PartitionKeyType)[keyof typeof PartitionKeyType];
266
+ export interface PartitionKey {
267
+ Type: PartitionKeyType | string | undefined;
268
+ Name?: string;
269
+ EnforcementInRecord?: PartitionKeyEnforcementLevel | string;
270
+ }
271
+ export interface Schema {
272
+ CompositePartitionKey?: PartitionKey[];
273
+ }
254
274
  export interface CreateTableRequest {
255
275
  DatabaseName: string | undefined;
256
276
  TableName: string | undefined;
257
277
  RetentionProperties?: RetentionProperties;
258
278
  Tags?: Tag[];
259
279
  MagneticStoreWriteProperties?: MagneticStoreWriteProperties;
280
+ Schema?: Schema;
260
281
  }
261
282
  export declare const TableStatus: {
262
283
  readonly ACTIVE: "ACTIVE";
@@ -273,6 +294,7 @@ export interface Table {
273
294
  CreationTime?: Date;
274
295
  LastUpdatedTime?: Date;
275
296
  MagneticStoreWriteProperties?: MagneticStoreWriteProperties;
297
+ Schema?: Schema;
276
298
  }
277
299
  export interface CreateTableResponse {
278
300
  Table?: Table;
@@ -413,6 +435,7 @@ export interface UpdateTableRequest {
413
435
  TableName: string | undefined;
414
436
  RetentionProperties?: RetentionProperties;
415
437
  MagneticStoreWriteProperties?: MagneticStoreWriteProperties;
438
+ Schema?: Schema;
416
439
  }
417
440
  export interface UpdateTableResponse {
418
441
  Table?: Table;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-timestream-write",
3
3
  "description": "AWS SDK for JavaScript Timestream Write Client for Node.js, Browser and React Native",
4
- "version": "3.348.0",
4
+ "version": "3.349.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",