Skip to content

Commit 61626a5

Browse files
author
awstools
committed
feat(client-keyspaces): Adding support for client-side timestamps
1 parent e92a768 commit 61626a5

File tree

9 files changed

+818
-429
lines changed

9 files changed

+818
-429
lines changed

clients/client-keyspaces/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ highly available, and managed Apache Cassandra-compatible database service. Amaz
1414
run, and scale Cassandra workloads in the Amazon Web Services Cloud. With just a few clicks on the Amazon Web Services Management Console or a few lines of code,
1515
you can create keyspaces and tables in Amazon Keyspaces, without deploying any infrastructure or installing software. </p>
1616
<p>In addition to supporting Cassandra Query Language (CQL) requests via open-source Cassandra drivers,
17-
Amazon Keyspaces supports data definition language (DDL) operations to manage keyspaces and tables using the Amazon Web Services SDK and CLI. This API reference describes
17+
Amazon Keyspaces supports data definition language (DDL) operations to manage keyspaces and tables using the Amazon Web Services SDK and CLI, as well as
18+
infrastructure as code (IaC) services and tools such as CloudFormation and Terraform. This API reference describes
1819
the supported DDL operations in detail.</p>
1920
<p>For the list of all supported CQL APIs, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/cassandra-apis.html">Supported Cassandra APIs, operations, and data types
2021
in Amazon Keyspaces</a> in the <i>Amazon Keyspaces Developer

clients/client-keyspaces/src/Keyspaces.ts

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ import { KeyspacesClient } from "./KeyspacesClient";
4646
* run, and scale Cassandra workloads in the Amazon Web Services Cloud. With just a few clicks on the Amazon Web Services Management Console or a few lines of code,
4747
* you can create keyspaces and tables in Amazon Keyspaces, without deploying any infrastructure or installing software. </p>
4848
* <p>In addition to supporting Cassandra Query Language (CQL) requests via open-source Cassandra drivers,
49-
* Amazon Keyspaces supports data definition language (DDL) operations to manage keyspaces and tables using the Amazon Web Services SDK and CLI. This API reference describes
49+
* Amazon Keyspaces supports data definition language (DDL) operations to manage keyspaces and tables using the Amazon Web Services SDK and CLI, as well as
50+
* infrastructure as code (IaC) services and tools such as CloudFormation and Terraform. This API reference describes
5051
* the supported DDL operations in detail.</p>
5152
* <p>For the list of all supported CQL APIs, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/cassandra-apis.html">Supported Cassandra APIs, operations, and data types
5253
* in Amazon Keyspaces</a> in the <i>Amazon Keyspaces Developer
@@ -338,8 +339,7 @@ export class Keyspaces extends KeyspacesClient {
338339
* <p>Restores the specified table to the specified point in time within the
339340
* <code>earliest_restorable_timestamp</code> and the current time. For more information about restore points, see
340341
* <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery_HowItWorks.html#howitworks_backup_window">
341-
* Time window for PITR continuous backups</a> in the <i>Amazon Keyspaces Developer Guide</i>.
342-
* </p>
342+
* Time window for PITR continuous backups</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
343343
* <p>Any number of users can execute up to 4 concurrent restores (any type of restore) in a given account.</p>
344344
* <p>When you restore using point in time recovery,
345345
* Amazon Keyspaces restores your source table's schema and data to the state
@@ -352,19 +352,37 @@ export class Keyspaces extends KeyspacesClient {
352352
* these settings are always restored based on the table's settings as of the current time or when the table was deleted.</p>
353353
* <p>You can also overwrite
354354
* these settings during restore:</p>
355-
* <p>• Read/write capacity mode</p>
356-
* <p>• Provisioned throughput capacity settings</p>
357-
* <p>• Point-in-time (PITR) settings</p>
358-
* <p>• Tags</p>
355+
* <ul>
356+
* <li>
357+
* <p>Read/write capacity mode</p>
358+
* </li>
359+
* <li>
360+
* <p>Provisioned throughput capacity settings</p>
361+
* </li>
362+
* <li>
363+
* <p>Point-in-time (PITR) settings</p>
364+
* </li>
365+
* <li>
366+
* <p>Tags</p>
367+
* </li>
368+
* </ul>
359369
* <p>For more
360370
* information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery_HowItWorks.html#howitworks_backup_settings">PITR restore settings</a> in the <i>Amazon Keyspaces Developer
361371
* Guide</i>.</p>
362372
* <p>Note that the following settings are not restored, and you must configure them manually for
363373
* the new table:</p>
364-
* <p>• Automatic scaling policies (for tables that use provisioned capacity
365-
* mode)</p>
366-
* <p>• Identity and Access Management (IAM) policies</p>
367-
* <p>• Amazon CloudWatch metrics and alarms</p>
374+
* <ul>
375+
* <li>
376+
* <p>Automatic scaling policies (for tables that use provisioned capacity
377+
* mode)</p>
378+
* </li>
379+
* <li>
380+
* <p>Identity and Access Management (IAM) policies</p>
381+
* </li>
382+
* <li>
383+
* <p>Amazon CloudWatch metrics and alarms</p>
384+
* </li>
385+
* </ul>
368386
*/
369387
public restoreTable(
370388
args: RestoreTableCommandInput,

clients/client-keyspaces/src/KeyspacesClient.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ export interface KeyspacesClientResolvedConfig extends KeyspacesClientResolvedCo
258258
* run, and scale Cassandra workloads in the Amazon Web Services Cloud. With just a few clicks on the Amazon Web Services Management Console or a few lines of code,
259259
* you can create keyspaces and tables in Amazon Keyspaces, without deploying any infrastructure or installing software. </p>
260260
* <p>In addition to supporting Cassandra Query Language (CQL) requests via open-source Cassandra drivers,
261-
* Amazon Keyspaces supports data definition language (DDL) operations to manage keyspaces and tables using the Amazon Web Services SDK and CLI. This API reference describes
261+
* Amazon Keyspaces supports data definition language (DDL) operations to manage keyspaces and tables using the Amazon Web Services SDK and CLI, as well as
262+
* infrastructure as code (IaC) services and tools such as CloudFormation and Terraform. This API reference describes
262263
* the supported DDL operations in detail.</p>
263264
* <p>For the list of all supported CQL APIs, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/cassandra-apis.html">Supported Cassandra APIs, operations, and data types
264265
* in Amazon Keyspaces</a> in the <i>Amazon Keyspaces Developer

clients/client-keyspaces/src/commands/RestoreTableCommand.ts

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ export interface RestoreTableCommandOutput extends RestoreTableResponse, __Metad
3838
* <p>Restores the specified table to the specified point in time within the
3939
* <code>earliest_restorable_timestamp</code> and the current time. For more information about restore points, see
4040
* <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery_HowItWorks.html#howitworks_backup_window">
41-
* Time window for PITR continuous backups</a> in the <i>Amazon Keyspaces Developer Guide</i>.
42-
* </p>
41+
* Time window for PITR continuous backups</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
4342
* <p>Any number of users can execute up to 4 concurrent restores (any type of restore) in a given account.</p>
4443
* <p>When you restore using point in time recovery,
4544
* Amazon Keyspaces restores your source table's schema and data to the state
@@ -52,19 +51,37 @@ export interface RestoreTableCommandOutput extends RestoreTableResponse, __Metad
5251
* these settings are always restored based on the table's settings as of the current time or when the table was deleted.</p>
5352
* <p>You can also overwrite
5453
* these settings during restore:</p>
55-
* <p>• Read/write capacity mode</p>
56-
* <p>• Provisioned throughput capacity settings</p>
57-
* <p>• Point-in-time (PITR) settings</p>
58-
* <p>• Tags</p>
54+
* <ul>
55+
* <li>
56+
* <p>Read/write capacity mode</p>
57+
* </li>
58+
* <li>
59+
* <p>Provisioned throughput capacity settings</p>
60+
* </li>
61+
* <li>
62+
* <p>Point-in-time (PITR) settings</p>
63+
* </li>
64+
* <li>
65+
* <p>Tags</p>
66+
* </li>
67+
* </ul>
5968
* <p>For more
6069
* information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery_HowItWorks.html#howitworks_backup_settings">PITR restore settings</a> in the <i>Amazon Keyspaces Developer
6170
* Guide</i>.</p>
6271
* <p>Note that the following settings are not restored, and you must configure them manually for
6372
* the new table:</p>
64-
* <p>• Automatic scaling policies (for tables that use provisioned capacity
65-
* mode)</p>
66-
* <p>• Identity and Access Management (IAM) policies</p>
67-
* <p>• Amazon CloudWatch metrics and alarms</p>
73+
* <ul>
74+
* <li>
75+
* <p>Automatic scaling policies (for tables that use provisioned capacity
76+
* mode)</p>
77+
* </li>
78+
* <li>
79+
* <p>Identity and Access Management (IAM) policies</p>
80+
* </li>
81+
* <li>
82+
* <p>Amazon CloudWatch metrics and alarms</p>
83+
* </li>
84+
* </ul>
6885
* @example
6986
* Use a bare-bones client and the command you need to make an API call.
7087
* ```javascript

clients/client-keyspaces/src/endpoint/EndpointParameters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const resolveClientEndpointParameters = <T>(
2424
};
2525

2626
export interface EndpointParameters extends __EndpointParameters {
27-
Region: string;
27+
Region?: string;
2828
UseDualStack?: boolean;
2929
UseFIPS?: boolean;
3030
Endpoint?: string;

clients/client-keyspaces/src/endpoint/ruleset.ts

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,27 @@ import { RuleSetObject } from "@aws-sdk/util-endpoints";
66
or see "smithy.rules#endpointRuleSet"
77
in codegen/sdk-codegen/aws-models/keyspaces.json */
88

9-
const s="fn",
10-
t="argv",
11-
u="ref";
12-
const a=true,
13-
b=false,
14-
c="String",
15-
d="PartitionResult",
16-
e="tree",
17-
f="error",
18-
g="endpoint",
19-
h="getAttr",
20-
i={"required":true,"default":false,"type":"Boolean"},
21-
j={[u]:"Endpoint"},
22-
k={[s]:"booleanEquals",[t]:[{[u]:"UseFIPS"},true]},
23-
l={[s]:"booleanEquals",[t]:[{[u]:"UseDualStack"},true]},
24-
m={},
25-
n={[s]:"booleanEquals",[t]:[true,{[s]:h,[t]:[{[u]:d},"supportsFIPS"]}]},
26-
o={[u]:d},
27-
p={[s]:"booleanEquals",[t]:[true,{[s]:h,[t]:[o,"supportsDualStack"]}]},
9+
const s="required",
10+
t="fn",
11+
u="argv",
12+
v="ref";
13+
const a="isSet",
14+
b="tree",
15+
c="error",
16+
d="endpoint",
17+
e="PartitionResult",
18+
f="getAttr",
19+
g={[s]:false,"type":"String"},
20+
h={[s]:true,"default":false,"type":"Boolean"},
21+
i={[v]:"Endpoint"},
22+
j={[t]:"booleanEquals",[u]:[{[v]:"UseFIPS"},true]},
23+
k={[t]:"booleanEquals",[u]:[{[v]:"UseDualStack"},true]},
24+
l={},
25+
m={[t]:"booleanEquals",[u]:[true,{[t]:f,[u]:[{[v]:e},"supportsFIPS"]}]},
26+
n={[v]:e},
27+
o={[t]:"booleanEquals",[u]:[true,{[t]:f,[u]:[n,"supportsDualStack"]}]},
28+
p=[j],
2829
q=[k],
29-
r=[l];
30-
const _data={version:"1.0",parameters:{Region:{required:a,type:c},UseDualStack:i,UseFIPS:i,Endpoint:{required:b,type:c}},rules:[{conditions:[{[s]:"aws.partition",[t]:[{[u]:"Region"}],assign:d}],type:e,rules:[{conditions:[{[s]:"isSet",[t]:[j]}],type:e,rules:[{conditions:q,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:f},{type:e,rules:[{conditions:r,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:f},{endpoint:{url:j,properties:m,headers:m},type:g}]}]},{conditions:[k,l],type:e,rules:[{conditions:[n,p],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://cassandra-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:g}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:f}]},{conditions:q,type:e,rules:[{conditions:[n],type:e,rules:[{type:e,rules:[{conditions:[{[s]:"stringEquals",[t]:["aws-us-gov",{[s]:h,[t]:[o,"name"]}]}],endpoint:{url:"https://cassandra.{Region}.amazonaws.com",properties:m,headers:m},type:g},{endpoint:{url:"https://cassandra-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:g}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:f}]},{conditions:r,type:e,rules:[{conditions:[p],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://cassandra.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:g}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:f}]},{type:e,rules:[{endpoint:{url:"https://cassandra.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:g}]}]}]};
30+
r=[{[v]:"Region"}];
31+
const _data={version:"1.0",parameters:{Region:g,UseDualStack:h,UseFIPS:h,Endpoint:g},rules:[{conditions:[{[t]:a,[u]:[i]}],type:b,rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:i,properties:l,headers:l},type:d}]}]},{type:b,rules:[{conditions:[{[t]:a,[u]:r}],type:b,rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:e}],type:b,rules:[{conditions:[j,k],type:b,rules:[{conditions:[m,o],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://cassandra-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:p,type:b,rules:[{conditions:[m],type:b,rules:[{type:b,rules:[{conditions:[{[t]:"stringEquals",[u]:["aws-us-gov",{[t]:f,[u]:[n,"name"]}]}],endpoint:{url:"https://cassandra.{Region}.amazonaws.com",properties:l,headers:l},type:d},{endpoint:{url:"https://cassandra-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:q,type:b,rules:[{conditions:[o],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://cassandra.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{endpoint:{url:"https://cassandra.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]};
3132
export const ruleSet: RuleSetObject = _data;

0 commit comments

Comments
 (0)