Skip to content

Commit df77d8b

Browse files
author
awstools
committed
feat(client-marketplace-catalog): The SDK for the StartChangeSet API will now automatically set and use an idempotency token in the ClientRequestToken request parameter if the customer does not provide it.
1 parent d07e946 commit df77d8b

File tree

4 files changed

+26
-22
lines changed

4 files changed

+26
-22
lines changed

clients/client-marketplace-catalog/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,14 @@
4949
"@aws-sdk/util-user-agent-node": "*",
5050
"@aws-sdk/util-utf8-browser": "*",
5151
"@aws-sdk/util-utf8-node": "*",
52-
"tslib": "^2.3.1"
52+
"tslib": "^2.3.1",
53+
"uuid": "^8.3.2"
5354
},
5455
"devDependencies": {
5556
"@aws-sdk/service-client-documentation-generator": "*",
5657
"@tsconfig/recommended": "1.0.1",
5758
"@types/node": "^12.7.5",
59+
"@types/uuid": "^8.3.0",
5860
"concurrently": "7.0.0",
5961
"downlevel-dts": "0.7.0",
6062
"rimraf": "3.0.2",

clients/client-marketplace-catalog/src/models/models_0.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ export interface DescribeEntityResponse {
329329
EntityIdentifier?: string;
330330

331331
/**
332-
* <p>The ARN associated to the unique identifier for the change set referenced in this
332+
* <p>The ARN associated to the unique identifier for the entity referenced in this
333333
* request.</p>
334334
*/
335335
EntityArn?: string;

clients/client-marketplace-catalog/src/protocols/Aws_restJson1.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
ResponseMetadata as __ResponseMetadata,
1313
SerdeContext as __SerdeContext,
1414
} from "@aws-sdk/types";
15+
import { v4 as generateIdempotencyToken } from "uuid";
1516

1617
import { CancelChangeSetCommandInput, CancelChangeSetCommandOutput } from "../commands/CancelChangeSetCommand";
1718
import { DescribeChangeSetCommandInput, DescribeChangeSetCommandOutput } from "../commands/DescribeChangeSetCommand";
@@ -182,7 +183,7 @@ export const serializeAws_restJson1StartChangeSetCommand = async (
182183
...(input.Catalog != null && { Catalog: input.Catalog }),
183184
...(input.ChangeSet != null && { ChangeSet: serializeAws_restJson1RequestedChangeList(input.ChangeSet, context) }),
184185
...(input.ChangeSetName != null && { ChangeSetName: input.ChangeSetName }),
185-
...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
186+
ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
186187
});
187188
return new __HttpRequest({
188189
protocol,

codegen/sdk-codegen/aws-models/marketplace-catalog.json

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,21 @@
4141
},
4242
"com.amazonaws.marketplacecatalog#AWSMPSeymour": {
4343
"type": "service",
44+
"traits": {
45+
"aws.api#service": {
46+
"sdkId": "Marketplace Catalog",
47+
"arnNamespace": "aws-marketplace",
48+
"cloudFormationName": "MarketplaceCatalog",
49+
"cloudTrailEventSource": "marketplacecatalog.amazonaws.com",
50+
"endpointPrefix": "catalog.marketplace"
51+
},
52+
"aws.auth#sigv4": {
53+
"name": "aws-marketplace"
54+
},
55+
"aws.protocols#restJson1": {},
56+
"smithy.api#documentation": "<p>Catalog API actions allow you to manage your entities through list, describe, and update\n capabilities. An entity can be a product or an offer on AWS Marketplace. </p>\n\n <p>You can automate your entity update process by integrating the AWS Marketplace Catalog\n API with your AWS Marketplace product build or deployment pipelines. You can also create\n your own applications on top of the Catalog API to manage your products on AWS\n Marketplace.</p>",
57+
"smithy.api#title": "AWS Marketplace Catalog Service"
58+
},
4459
"version": "2018-09-17",
4560
"operations": [
4661
{
@@ -61,22 +76,7 @@
6176
{
6277
"target": "com.amazonaws.marketplacecatalog#StartChangeSet"
6378
}
64-
],
65-
"traits": {
66-
"aws.api#service": {
67-
"sdkId": "Marketplace Catalog",
68-
"arnNamespace": "aws-marketplace",
69-
"cloudFormationName": "MarketplaceCatalog",
70-
"cloudTrailEventSource": "marketplacecatalog.amazonaws.com",
71-
"endpointPrefix": "catalog.marketplace"
72-
},
73-
"aws.auth#sigv4": {
74-
"name": "aws-marketplace"
75-
},
76-
"aws.protocols#restJson1": {},
77-
"smithy.api#documentation": "<p>Catalog API actions allow you to manage your entities through list, describe, and update\n capabilities. An entity can be a product or an offer on AWS Marketplace. </p>\n\n <p>You can automate your entity update process by integrating the AWS Marketplace Catalog\n API with your AWS Marketplace product build or deployment pipelines. You can also create\n your own applications on top of the Catalog API to manage your products on AWS\n Marketplace.</p>",
78-
"smithy.api#title": "AWS Marketplace Catalog Service"
79-
}
79+
]
8080
},
8181
"com.amazonaws.marketplacecatalog#AccessDeniedException": {
8282
"type": "structure",
@@ -584,7 +584,7 @@
584584
"EntityArn": {
585585
"target": "com.amazonaws.marketplacecatalog#ARN",
586586
"traits": {
587-
"smithy.api#documentation": "<p>The ARN associated to the unique identifier for the change set referenced in this\n request.</p>"
587+
"smithy.api#documentation": "<p>The ARN associated to the unique identifier for the entity referenced in this\n request.</p>"
588588
}
589589
},
590590
"LastModifiedDate": {
@@ -629,7 +629,7 @@
629629
"min": 1,
630630
"max": 255
631631
},
632-
"smithy.api#pattern": "^\\\\S+[\\\\S\\\\s]*"
632+
"smithy.api#pattern": "^\\\\S+[\\\\S\\\\s]*$"
633633
}
634634
},
635635
"com.amazonaws.marketplacecatalog#EntitySummary": {
@@ -1237,7 +1237,8 @@
12371237
"ClientRequestToken": {
12381238
"target": "com.amazonaws.marketplacecatalog#ClientRequestToken",
12391239
"traits": {
1240-
"smithy.api#documentation": "<p>A unique token to identify the request to ensure idempotency.</p>"
1240+
"smithy.api#documentation": "<p>A unique token to identify the request to ensure idempotency.</p>",
1241+
"smithy.api#idempotencyToken": {}
12411242
}
12421243
}
12431244
}

0 commit comments

Comments
 (0)