Skip to content

Commit 43407f7

Browse files
author
awstools
committed
feat(client-cloudfront-keyvaluestore): This release improves upon the DescribeKeyValueStore API by returning two additional fields, Status of the KeyValueStore and the FailureReason in case of failures during creation of KeyValueStore.
1 parent 59c5b59 commit 43407f7

File tree

4 files changed

+65
-20
lines changed

4 files changed

+65
-20
lines changed

clients/client-cloudfront-keyvaluestore/src/commands/DescribeKeyValueStoreCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ export interface DescribeKeyValueStoreCommandOutput extends DescribeKeyValueStor
5151
* // Created: new Date("TIMESTAMP"), // required
5252
* // ETag: "STRING_VALUE", // required
5353
* // LastModified: new Date("TIMESTAMP"),
54+
* // Status: "STRING_VALUE",
55+
* // FailureReason: "STRING_VALUE",
5456
* // };
5557
*
5658
* ```

clients/client-cloudfront-keyvaluestore/src/models/models_0.ts

+12
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,18 @@ export interface DescribeKeyValueStoreResponse {
233233
* <p>Date and time when the key value pairs in the Key Value Store was last modified.</p>
234234
*/
235235
LastModified?: Date;
236+
237+
/**
238+
* @public
239+
* <p>The current status of the Key Value Store.</p>
240+
*/
241+
Status?: string;
242+
243+
/**
244+
* @public
245+
* <p>The reason for Key Value Store creation failure.</p>
246+
*/
247+
FailureReason?: string;
236248
}
237249

238250
/**

clients/client-cloudfront-keyvaluestore/src/protocols/Aws_restJson1.ts

+2
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,11 @@ export const de_DescribeKeyValueStoreCommand = async (
242242
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
243243
const doc = take(data, {
244244
Created: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
245+
FailureReason: __expectString,
245246
ItemCount: __expectInt32,
246247
KvsARN: __expectString,
247248
LastModified: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
249+
Status: __expectString,
248250
TotalSizeInBytes: __expectLong,
249251
});
250252
Object.assign(contents, doc);

codegen/sdk-codegen/aws-models/cloudfront-keyvaluestore.json

+49-20
Original file line numberDiff line numberDiff line change
@@ -727,10 +727,10 @@
727727
"smithy.api#documentation": "<p>Deletes the key value pair specified by the key.</p>",
728728
"smithy.api#examples": [
729729
{
730-
"title": "Delete 'key1' from the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/my-key-value-store-327284aa-bcd5-499f-a3ff-26b9a9d31b58'",
730+
"title": "Delete 'key1' from the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58'",
731731
"input": {
732732
"Key": "key1",
733-
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/my-key-value-store-327284aa-bcd5-499f-a3ff-26b9a9d31b58",
733+
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58",
734734
"IfMatch": "KV0AB12C3DEF456"
735735
},
736736
"output": {
@@ -864,17 +864,34 @@
864864
"smithy.api#documentation": "<p>Returns metadata information about Key Value Store.</p>",
865865
"smithy.api#examples": [
866866
{
867-
"title": "Describe the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/my-key-value-store-327284aa-bcd5-499f-a3ff-26b9a9d31b58'",
867+
"title": "Describe the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58'",
868868
"input": {
869-
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/my-key-value-store-327284aa-bcd5-499f-a3ff-26b9a9d31b58"
869+
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58"
870+
},
871+
"output": {
872+
"ETag": "KV7XY89Z0ABC012",
873+
"ItemCount": 0,
874+
"TotalSizeInBytes": 0,
875+
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58",
876+
"Created": "2023-11-01T22:18:46Z",
877+
"LastModified": "2023-11-01T14:28:17Z",
878+
"Status": "IMPORT_FAILURE",
879+
"FailureReason": "Datasource size exceeds the allowed limit"
880+
}
881+
},
882+
{
883+
"title": "Describe the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-1234a9d35678'",
884+
"input": {
885+
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-1234a9d35678"
870886
},
871887
"output": {
872888
"ETag": "KV7XY89Z0ABC012",
873889
"ItemCount": 4,
874890
"TotalSizeInBytes": 15,
875-
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/my-key-value-store-327284aa-bcd5-499f-a3ff-26b9a9d31b58",
891+
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-1234a9d35678",
876892
"Created": "2023-11-01T22:18:46Z",
877-
"LastModified": "2023-11-01T14:28:17Z"
893+
"LastModified": "2023-11-01T14:28:17Z",
894+
"Status": "READY"
878895
}
879896
}
880897
],
@@ -949,6 +966,18 @@
949966
"traits": {
950967
"smithy.api#documentation": "<p>Date and time when the key value pairs in the Key Value Store was last modified.</p>"
951968
}
969+
},
970+
"Status": {
971+
"target": "smithy.api#String",
972+
"traits": {
973+
"smithy.api#documentation": "<p>The current status of the Key Value Store.</p>"
974+
}
975+
},
976+
"FailureReason": {
977+
"target": "smithy.api#String",
978+
"traits": {
979+
"smithy.api#documentation": "<p>The reason for Key Value Store creation failure.</p>"
980+
}
952981
}
953982
},
954983
"traits": {
@@ -985,10 +1014,10 @@
9851014
"smithy.api#documentation": "<p>Returns a key value pair.</p>",
9861015
"smithy.api#examples": [
9871016
{
988-
"title": "Get 'key1' from the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/my-key-value-store-327284aa-bcd5-499f-a3ff-26b9a9d31b58'",
1017+
"title": "Get 'key1' from the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58'",
9891018
"input": {
9901019
"Key": "key1",
991-
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/my-key-value-store-327284aa-bcd5-499f-a3ff-26b9a9d31b58"
1020+
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58"
9921021
},
9931022
"output": {
9941023
"Key": "key1",
@@ -1130,9 +1159,9 @@
11301159
"smithy.api#documentation": "<p>Returns a list of key value pairs.</p>",
11311160
"smithy.api#examples": [
11321161
{
1133-
"title": "List keys in the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/my-key-value-store-327284aa-bcd5-499f-a3ff-26b9a9d31b58'",
1162+
"title": "List keys in the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58'",
11341163
"input": {
1135-
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/my-key-value-store-327284aa-bcd5-499f-a3ff-26b9a9d31b58",
1164+
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58",
11361165
"MaxResults": 3
11371166
},
11381167
"output": {
@@ -1154,9 +1183,9 @@
11541183
}
11551184
},
11561185
{
1157-
"title": "List the next page in the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/my-key-value-store-327284aa-bcd5-499f-a3ff-26b9a9d31b58'",
1186+
"title": "List the next page in the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58'",
11581187
"input": {
1159-
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/my-key-value-store-327284aa-bcd5-499f-a3ff-26b9a9d31b58",
1188+
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58",
11601189
"MaxResults": 3,
11611190
"NextToken": "hVTTZndkpBZ0VRZ0R1RF"
11621191
},
@@ -1311,11 +1340,11 @@
13111340
"smithy.api#documentation": "<p>Creates a new key value pair or replaces the value of an existing key.</p>",
13121341
"smithy.api#examples": [
13131342
{
1314-
"title": "Put 'key1' with 'value1' into the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/my-key-value-store-327284aa-bcd5-499f-a3ff-26b9a9d31b58'",
1343+
"title": "Put 'key1' with 'value1' into the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58'",
13151344
"input": {
13161345
"Key": "key1",
13171346
"Value": "value1",
1318-
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/my-key-value-store-327284aa-bcd5-499f-a3ff-26b9a9d31b58",
1347+
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58",
13191348
"IfMatch": "KV0AB12C3DEF456"
13201349
},
13211350
"output": {
@@ -1496,9 +1525,9 @@
14961525
"smithy.api#documentation": "<p>Puts or Deletes multiple key value pairs in a single, all-or-nothing operation.</p>",
14971526
"smithy.api#examples": [
14981527
{
1499-
"title": "Put 2 keys into the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/my-key-value-store-327284aa-bcd5-499f-a3ff-26b9a9d31b58'",
1528+
"title": "Put 2 keys into the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58'",
15001529
"input": {
1501-
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/my-key-value-store-327284aa-bcd5-499f-a3ff-26b9a9d31b58",
1530+
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58",
15021531
"IfMatch": "KV0AB12C3DEF456",
15031532
"Puts": [
15041533
{
@@ -1518,9 +1547,9 @@
15181547
}
15191548
},
15201549
{
1521-
"title": "Delete 2 keys from the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/my-key-value-store-327284aa-bcd5-499f-a3ff-26b9a9d31b58'",
1550+
"title": "Delete 2 keys from the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58'",
15221551
"input": {
1523-
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/my-key-value-store-327284aa-bcd5-499f-a3ff-26b9a9d31b58",
1552+
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58",
15241553
"IfMatch": "KV0AB12C3DEF456",
15251554
"Deletes": [
15261555
{
@@ -1538,9 +1567,9 @@
15381567
}
15391568
},
15401569
{
1541-
"title": "Put 2 keys into and delete 1 key from the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/my-key-value-store-327284aa-bcd5-499f-a3ff-26b9a9d31b58'",
1570+
"title": "Put 2 keys into and delete 1 key from the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58'",
15421571
"input": {
1543-
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/my-key-value-store-327284aa-bcd5-499f-a3ff-26b9a9d31b58",
1572+
"KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58",
15441573
"IfMatch": "KV0AB12C3DEF456",
15451574
"Puts": [
15461575
{

0 commit comments

Comments
 (0)