Skip to content

Commit

Permalink
feat(client-marketplace-catalog): The SDK for the StartChangeSet API …
Browse files Browse the repository at this point in the history
…will now automatically set and use an idempotency token in the ClientRequestToken request parameter if the customer does not provide it.
  • Loading branch information
awstools committed Jul 27, 2022
1 parent d07e946 commit df77d8b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 22 deletions.
4 changes: 3 additions & 1 deletion clients/client-marketplace-catalog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@
"@aws-sdk/util-user-agent-node": "*",
"@aws-sdk/util-utf8-browser": "*",
"@aws-sdk/util-utf8-node": "*",
"tslib": "^2.3.1"
"tslib": "^2.3.1",
"uuid": "^8.3.2"
},
"devDependencies": {
"@aws-sdk/service-client-documentation-generator": "*",
"@tsconfig/recommended": "1.0.1",
"@types/node": "^12.7.5",
"@types/uuid": "^8.3.0",
"concurrently": "7.0.0",
"downlevel-dts": "0.7.0",
"rimraf": "3.0.2",
Expand Down
2 changes: 1 addition & 1 deletion clients/client-marketplace-catalog/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ export interface DescribeEntityResponse {
EntityIdentifier?: string;

/**
* <p>The ARN associated to the unique identifier for the change set referenced in this
* <p>The ARN associated to the unique identifier for the entity referenced in this
* request.</p>
*/
EntityArn?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
ResponseMetadata as __ResponseMetadata,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";
import { v4 as generateIdempotencyToken } from "uuid";

import { CancelChangeSetCommandInput, CancelChangeSetCommandOutput } from "../commands/CancelChangeSetCommand";
import { DescribeChangeSetCommandInput, DescribeChangeSetCommandOutput } from "../commands/DescribeChangeSetCommand";
Expand Down Expand Up @@ -182,7 +183,7 @@ export const serializeAws_restJson1StartChangeSetCommand = async (
...(input.Catalog != null && { Catalog: input.Catalog }),
...(input.ChangeSet != null && { ChangeSet: serializeAws_restJson1RequestedChangeList(input.ChangeSet, context) }),
...(input.ChangeSetName != null && { ChangeSetName: input.ChangeSetName }),
...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
});
return new __HttpRequest({
protocol,
Expand Down
39 changes: 20 additions & 19 deletions codegen/sdk-codegen/aws-models/marketplace-catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,21 @@
},
"com.amazonaws.marketplacecatalog#AWSMPSeymour": {
"type": "service",
"traits": {
"aws.api#service": {
"sdkId": "Marketplace Catalog",
"arnNamespace": "aws-marketplace",
"cloudFormationName": "MarketplaceCatalog",
"cloudTrailEventSource": "marketplacecatalog.amazonaws.com",
"endpointPrefix": "catalog.marketplace"
},
"aws.auth#sigv4": {
"name": "aws-marketplace"
},
"aws.protocols#restJson1": {},
"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>",
"smithy.api#title": "AWS Marketplace Catalog Service"
},
"version": "2018-09-17",
"operations": [
{
Expand All @@ -61,22 +76,7 @@
{
"target": "com.amazonaws.marketplacecatalog#StartChangeSet"
}
],
"traits": {
"aws.api#service": {
"sdkId": "Marketplace Catalog",
"arnNamespace": "aws-marketplace",
"cloudFormationName": "MarketplaceCatalog",
"cloudTrailEventSource": "marketplacecatalog.amazonaws.com",
"endpointPrefix": "catalog.marketplace"
},
"aws.auth#sigv4": {
"name": "aws-marketplace"
},
"aws.protocols#restJson1": {},
"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>",
"smithy.api#title": "AWS Marketplace Catalog Service"
}
]
},
"com.amazonaws.marketplacecatalog#AccessDeniedException": {
"type": "structure",
Expand Down Expand Up @@ -584,7 +584,7 @@
"EntityArn": {
"target": "com.amazonaws.marketplacecatalog#ARN",
"traits": {
"smithy.api#documentation": "<p>The ARN associated to the unique identifier for the change set referenced in this\n request.</p>"
"smithy.api#documentation": "<p>The ARN associated to the unique identifier for the entity referenced in this\n request.</p>"
}
},
"LastModifiedDate": {
Expand Down Expand Up @@ -629,7 +629,7 @@
"min": 1,
"max": 255
},
"smithy.api#pattern": "^\\\\S+[\\\\S\\\\s]*"
"smithy.api#pattern": "^\\\\S+[\\\\S\\\\s]*$"
}
},
"com.amazonaws.marketplacecatalog#EntitySummary": {
Expand Down Expand Up @@ -1237,7 +1237,8 @@
"ClientRequestToken": {
"target": "com.amazonaws.marketplacecatalog#ClientRequestToken",
"traits": {
"smithy.api#documentation": "<p>A unique token to identify the request to ensure idempotency.</p>"
"smithy.api#documentation": "<p>A unique token to identify the request to ensure idempotency.</p>",
"smithy.api#idempotencyToken": {}
}
}
}
Expand Down

0 comments on commit df77d8b

Please sign in to comment.