Skip to content

Commit 970007d

Browse files
author
awstools
committed
feat(client-service-catalog): Added Idempotency token support to Service Catalog AssociateServiceActionWithProvisioningArtifact, DisassociateServiceActionFromProvisioningArtifact, DeleteServiceAction API
1 parent 645d19a commit 970007d

File tree

6 files changed

+90
-9
lines changed

6 files changed

+90
-9
lines changed

clients/client-service-catalog/src/commands/AssociateServiceActionWithProvisioningArtifactCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export interface AssociateServiceActionWithProvisioningArtifactCommandOutput
4949
* ProvisioningArtifactId: "STRING_VALUE", // required
5050
* ServiceActionId: "STRING_VALUE", // required
5151
* AcceptLanguage: "STRING_VALUE",
52+
* IdempotencyToken: "STRING_VALUE",
5253
* };
5354
* const command = new AssociateServiceActionWithProvisioningArtifactCommand(input);
5455
* const response = await client.send(command);

clients/client-service-catalog/src/commands/DeleteServiceActionCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export interface DeleteServiceActionCommandOutput extends DeleteServiceActionOut
3838
* const input = { // DeleteServiceActionInput
3939
* Id: "STRING_VALUE", // required
4040
* AcceptLanguage: "STRING_VALUE",
41+
* IdempotencyToken: "STRING_VALUE",
4142
* };
4243
* const command = new DeleteServiceActionCommand(input);
4344
* const response = await client.send(command);

clients/client-service-catalog/src/commands/DisassociateServiceActionFromProvisioningArtifactCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export interface DisassociateServiceActionFromProvisioningArtifactCommandOutput
4949
* ProvisioningArtifactId: "STRING_VALUE", // required
5050
* ServiceActionId: "STRING_VALUE", // required
5151
* AcceptLanguage: "STRING_VALUE",
52+
* IdempotencyToken: "STRING_VALUE",
5253
* };
5354
* const command = new DisassociateServiceActionFromProvisioningArtifactCommand(input);
5455
* const response = await client.send(command);

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

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,12 @@ export interface AssociateServiceActionWithProvisioningArtifactInput {
459459
* </ul>
460460
*/
461461
AcceptLanguage?: string;
462+
463+
/**
464+
* @public
465+
* <p>A unique identifier that you provide to ensure idempotency. If multiple requests from the same Amazon Web Services account use the same idempotency token, the same response is returned for each repeated request. </p>
466+
*/
467+
IdempotencyToken?: string;
462468
}
463469

464470
/**
@@ -1216,8 +1222,10 @@ export interface CreatePortfolioShareInput {
12161222

12171223
/**
12181224
* @public
1219-
* <p>Enables or disables <code>Principal</code> sharing when creating the portfolio share. If this flag is not provided,
1220-
* principal sharing is disabled. </p>
1225+
* <p>This parameter is only supported for portfolios with an <b>OrganizationalNode</b>
1226+
* Type of <code>ORGANIZATION</code> or <code>ORGANIZATIONAL_UNIT</code>. </p>
1227+
* <p>Enables or disables <code>Principal</code> sharing when creating the portfolio share. If you do
1228+
* <b>not</b> provide this flag, principal sharing is disabled. </p>
12211229
* <p>When you enable Principal Name Sharing for a portfolio share, the share recipient
12221230
* account end users with a principal that matches any of the associated IAM
12231231
* patterns can provision products from the portfolio. Once
@@ -2658,6 +2666,12 @@ export interface DeleteServiceActionInput {
26582666
* </ul>
26592667
*/
26602668
AcceptLanguage?: string;
2669+
2670+
/**
2671+
* @public
2672+
* <p>A unique identifier that you provide to ensure idempotency. If multiple requests from the same Amazon Web Services account use the same idempotency token, the same response is returned for each repeated request. </p>
2673+
*/
2674+
IdempotencyToken?: string;
26612675
}
26622676

26632677
/**
@@ -4926,6 +4940,12 @@ export interface DisassociateServiceActionFromProvisioningArtifactInput {
49264940
* </ul>
49274941
*/
49284942
AcceptLanguage?: string;
4943+
4944+
/**
4945+
* @public
4946+
* <p>A unique identifier that you provide to ensure idempotency. If multiple requests from the same Amazon Web Services account use the same idempotency token, the same response is returned for each repeated request. </p>
4947+
*/
4948+
IdempotencyToken?: string;
49294949
}
49304950

49314951
/**

clients/client-service-catalog/src/protocols/Aws_json1_1.ts

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ export const se_AssociateServiceActionWithProvisioningArtifactCommand = async (
535535
): Promise<__HttpRequest> => {
536536
const headers: __HeaderBag = sharedHeaders("AssociateServiceActionWithProvisioningArtifact");
537537
let body: any;
538-
body = JSON.stringify(_json(input));
538+
body = JSON.stringify(se_AssociateServiceActionWithProvisioningArtifactInput(input, context));
539539
return buildHttpRpcRequest(context, headers, "/", undefined, body);
540540
};
541541

@@ -782,7 +782,7 @@ export const se_DeleteServiceActionCommand = async (
782782
): Promise<__HttpRequest> => {
783783
const headers: __HeaderBag = sharedHeaders("DeleteServiceAction");
784784
let body: any;
785-
body = JSON.stringify(_json(input));
785+
body = JSON.stringify(se_DeleteServiceActionInput(input, context));
786786
return buildHttpRpcRequest(context, headers, "/", undefined, body);
787787
};
788788

@@ -1068,7 +1068,7 @@ export const se_DisassociateServiceActionFromProvisioningArtifactCommand = async
10681068
): Promise<__HttpRequest> => {
10691069
const headers: __HeaderBag = sharedHeaders("DisassociateServiceActionFromProvisioningArtifact");
10701070
let body: any;
1071-
body = JSON.stringify(_json(input));
1071+
body = JSON.stringify(se_DisassociateServiceActionFromProvisioningArtifactInput(input, context));
10721072
return buildHttpRpcRequest(context, headers, "/", undefined, body);
10731073
};
10741074

@@ -6287,7 +6287,21 @@ const de_TagOptionNotMigratedExceptionRes = async (
62876287

62886288
// se_AssociateProductWithPortfolioInput omitted.
62896289

6290-
// se_AssociateServiceActionWithProvisioningArtifactInput omitted.
6290+
/**
6291+
* serializeAws_json1_1AssociateServiceActionWithProvisioningArtifactInput
6292+
*/
6293+
const se_AssociateServiceActionWithProvisioningArtifactInput = (
6294+
input: AssociateServiceActionWithProvisioningArtifactInput,
6295+
context: __SerdeContext
6296+
): any => {
6297+
return take(input, {
6298+
AcceptLanguage: [],
6299+
IdempotencyToken: [true, (_) => _ ?? generateIdempotencyToken()],
6300+
ProductId: [],
6301+
ProvisioningArtifactId: [],
6302+
ServiceActionId: [],
6303+
});
6304+
};
62916305

62926306
// se_AssociateTagOptionWithResourceInput omitted.
62936307

@@ -6428,7 +6442,16 @@ const se_CreateServiceActionInput = (input: CreateServiceActionInput, context: _
64286442

64296443
// se_DeleteProvisioningArtifactInput omitted.
64306444

6431-
// se_DeleteServiceActionInput omitted.
6445+
/**
6446+
* serializeAws_json1_1DeleteServiceActionInput
6447+
*/
6448+
const se_DeleteServiceActionInput = (input: DeleteServiceActionInput, context: __SerdeContext): any => {
6449+
return take(input, {
6450+
AcceptLanguage: [],
6451+
Id: [],
6452+
IdempotencyToken: [true, (_) => _ ?? generateIdempotencyToken()],
6453+
});
6454+
};
64326455

64336456
// se_DeleteTagOptionInput omitted.
64346457

@@ -6472,7 +6495,21 @@ const se_CreateServiceActionInput = (input: CreateServiceActionInput, context: _
64726495

64736496
// se_DisassociateProductFromPortfolioInput omitted.
64746497

6475-
// se_DisassociateServiceActionFromProvisioningArtifactInput omitted.
6498+
/**
6499+
* serializeAws_json1_1DisassociateServiceActionFromProvisioningArtifactInput
6500+
*/
6501+
const se_DisassociateServiceActionFromProvisioningArtifactInput = (
6502+
input: DisassociateServiceActionFromProvisioningArtifactInput,
6503+
context: __SerdeContext
6504+
): any => {
6505+
return take(input, {
6506+
AcceptLanguage: [],
6507+
IdempotencyToken: [true, (_) => _ ?? generateIdempotencyToken()],
6508+
ProductId: [],
6509+
ProvisioningArtifactId: [],
6510+
ServiceActionId: [],
6511+
});
6512+
};
64766513

64776514
// se_DisassociateTagOptionFromResourceInput omitted.
64786515

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

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1710,6 +1710,13 @@
17101710
"traits": {
17111711
"smithy.api#documentation": "<p>The language code.</p>\n <ul>\n <li>\n <p>\n <code>jp</code> - Japanese</p>\n </li>\n <li>\n <p>\n <code>zh</code> - Chinese</p>\n </li>\n </ul>"
17121712
}
1713+
},
1714+
"IdempotencyToken": {
1715+
"target": "com.amazonaws.servicecatalog#IdempotencyToken",
1716+
"traits": {
1717+
"smithy.api#documentation": "<p>A unique identifier that you provide to ensure idempotency. If multiple requests from the same Amazon Web Services account use the same idempotency token, the same response is returned for each repeated request. </p>",
1718+
"smithy.api#idempotencyToken": {}
1719+
}
17131720
}
17141721
},
17151722
"traits": {
@@ -2512,7 +2519,7 @@
25122519
"target": "com.amazonaws.servicecatalog#Boolean",
25132520
"traits": {
25142521
"smithy.api#default": false,
2515-
"smithy.api#documentation": "<p>Enables or disables <code>Principal</code> sharing when creating the portfolio share. If this flag is not provided,\n principal sharing is disabled. </p>\n <p>When you enable Principal Name Sharing for a portfolio share, the share recipient\n account end users with a principal that matches any of the associated IAM\n patterns can provision products from the portfolio. Once\n shared, the share recipient can view associations of <code>PrincipalType</code>: \n <code>IAM_PATTERN</code> on their portfolio. You can create the principals in the recipient account before or \n after creating the share. </p>"
2522+
"smithy.api#documentation": "<p>This parameter is only supported for portfolios with an <b>OrganizationalNode</b> \n Type of <code>ORGANIZATION</code> or <code>ORGANIZATIONAL_UNIT</code>. </p>\n <p>Enables or disables <code>Principal</code> sharing when creating the portfolio share. If you do \n <b>not</b> provide this flag, principal sharing is disabled. </p>\n <p>When you enable Principal Name Sharing for a portfolio share, the share recipient\n account end users with a principal that matches any of the associated IAM\n patterns can provision products from the portfolio. Once\n shared, the share recipient can view associations of <code>PrincipalType</code>: \n <code>IAM_PATTERN</code> on their portfolio. You can create the principals in the recipient account before or \n after creating the share. </p>"
25162523
}
25172524
}
25182525
},
@@ -3429,6 +3436,13 @@
34293436
"traits": {
34303437
"smithy.api#documentation": "<p>The language code.</p>\n <ul>\n <li>\n <p>\n <code>jp</code> - Japanese</p>\n </li>\n <li>\n <p>\n <code>zh</code> - Chinese</p>\n </li>\n </ul>"
34313438
}
3439+
},
3440+
"IdempotencyToken": {
3441+
"target": "com.amazonaws.servicecatalog#IdempotencyToken",
3442+
"traits": {
3443+
"smithy.api#documentation": "<p>A unique identifier that you provide to ensure idempotency. If multiple requests from the same Amazon Web Services account use the same idempotency token, the same response is returned for each repeated request. </p>",
3444+
"smithy.api#idempotencyToken": {}
3445+
}
34323446
}
34333447
},
34343448
"traits": {
@@ -4972,6 +4986,13 @@
49724986
"traits": {
49734987
"smithy.api#documentation": "<p>The language code.</p>\n <ul>\n <li>\n <p>\n <code>jp</code> - Japanese</p>\n </li>\n <li>\n <p>\n <code>zh</code> - Chinese</p>\n </li>\n </ul>"
49744988
}
4989+
},
4990+
"IdempotencyToken": {
4991+
"target": "com.amazonaws.servicecatalog#IdempotencyToken",
4992+
"traits": {
4993+
"smithy.api#documentation": "<p>A unique identifier that you provide to ensure idempotency. If multiple requests from the same Amazon Web Services account use the same idempotency token, the same response is returned for each repeated request. </p>",
4994+
"smithy.api#idempotencyToken": {}
4995+
}
49754996
}
49764997
},
49774998
"traits": {

0 commit comments

Comments
 (0)