Skip to content

Commit 9bed782

Browse files
author
awstools
committed
feat(client-b2bi): Added exceptions to B2Bi List operations and ConflictException to B2Bi StartTransformerJob operation. Also made capabilities field explicitly required when creating a Partnership.
1 parent 11be2e0 commit 9bed782

File tree

7 files changed

+88
-3
lines changed

7 files changed

+88
-3
lines changed

clients/client-b2bi/src/commands/CreatePartnershipCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export interface CreatePartnershipCommandOutput extends CreatePartnershipRespons
4646
* name: "STRING_VALUE", // required
4747
* email: "STRING_VALUE", // required
4848
* phone: "STRING_VALUE",
49-
* capabilities: [ // PartnershipCapabilities
49+
* capabilities: [ // PartnershipCapabilities // required
5050
* "STRING_VALUE",
5151
* ],
5252
* clientToken: "STRING_VALUE",

clients/client-b2bi/src/commands/ListCapabilitiesCommand.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,18 @@ export interface ListCapabilitiesCommandOutput extends ListCapabilitiesResponse,
6262
* @see {@link ListCapabilitiesCommandOutput} for command's `response` shape.
6363
* @see {@link B2biClientResolvedConfig | config} for B2biClient's `config` shape.
6464
*
65+
* @throws {@link AccessDeniedException} (client fault)
66+
* <p>You do not have sufficient access to perform this action.</p>
67+
*
68+
* @throws {@link InternalServerException} (server fault)
69+
* <p>This exception is thrown when an error occurs in the Amazon Web Services B2B Data Interchange service.</p>
70+
*
71+
* @throws {@link ThrottlingException} (client fault)
72+
* <p>The request was denied due to throttling: the data speed and rendering may be limited depending on various parameters and conditions.</p>
73+
*
74+
* @throws {@link ValidationException} (client fault)
75+
* <p>Occurs when a B2BI object cannot be validated against a request from another object.</p>
76+
*
6577
* @throws {@link B2biServiceException}
6678
* <p>Base exception class for all service exceptions from B2bi service.</p>
6779
*

clients/client-b2bi/src/commands/ListProfilesCommand.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@ export interface ListProfilesCommandOutput extends ListProfilesResponse, __Metad
6565
* @see {@link ListProfilesCommandOutput} for command's `response` shape.
6666
* @see {@link B2biClientResolvedConfig | config} for B2biClient's `config` shape.
6767
*
68+
* @throws {@link AccessDeniedException} (client fault)
69+
* <p>You do not have sufficient access to perform this action.</p>
70+
*
71+
* @throws {@link InternalServerException} (server fault)
72+
* <p>This exception is thrown when an error occurs in the Amazon Web Services B2B Data Interchange service.</p>
73+
*
74+
* @throws {@link ThrottlingException} (client fault)
75+
* <p>The request was denied due to throttling: the data speed and rendering may be limited depending on various parameters and conditions.</p>
76+
*
77+
* @throws {@link ValidationException} (client fault)
78+
* <p>Occurs when a B2BI object cannot be validated against a request from another object.</p>
79+
*
6880
* @throws {@link B2biServiceException}
6981
* <p>Base exception class for all service exceptions from B2bi service.</p>
7082
*

clients/client-b2bi/src/commands/ListTransformersCommand.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,18 @@ export interface ListTransformersCommandOutput extends ListTransformersResponse,
7373
* @see {@link ListTransformersCommandOutput} for command's `response` shape.
7474
* @see {@link B2biClientResolvedConfig | config} for B2biClient's `config` shape.
7575
*
76+
* @throws {@link AccessDeniedException} (client fault)
77+
* <p>You do not have sufficient access to perform this action.</p>
78+
*
79+
* @throws {@link InternalServerException} (server fault)
80+
* <p>This exception is thrown when an error occurs in the Amazon Web Services B2B Data Interchange service.</p>
81+
*
82+
* @throws {@link ThrottlingException} (client fault)
83+
* <p>The request was denied due to throttling: the data speed and rendering may be limited depending on various parameters and conditions.</p>
84+
*
85+
* @throws {@link ValidationException} (client fault)
86+
* <p>Occurs when a B2BI object cannot be validated against a request from another object.</p>
87+
*
7688
* @throws {@link B2biServiceException}
7789
* <p>Base exception class for all service exceptions from B2bi service.</p>
7890
*

clients/client-b2bi/src/commands/StartTransformerJobCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ export interface StartTransformerJobCommandOutput extends StartTransformerJobRes
6666
* @throws {@link AccessDeniedException} (client fault)
6767
* <p>You do not have sufficient access to perform this action.</p>
6868
*
69+
* @throws {@link ConflictException} (client fault)
70+
* <p>A conflict exception is thrown when you attempt to delete a resource (such as a profile or a capability) that is being used by other resources.</p>
71+
*
6972
* @throws {@link InternalServerException} (server fault)
7073
* <p>This exception is thrown when an error occurs in the Amazon Web Services B2B Data Interchange service.</p>
7174
*

clients/client-b2bi/src/models/models_0.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ export interface CreatePartnershipRequest {
905905
* <p>Specifies a list of the capabilities associated with this partnership.</p>
906906
* @public
907907
*/
908-
capabilities?: string[];
908+
capabilities: string[] | undefined;
909909

910910
/**
911911
* <p>Reserved for future use.</p>

codegen/sdk-codegen/aws-models/b2bi.json

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,8 @@
12321232
"capabilities": {
12331233
"target": "com.amazonaws.b2bi#PartnershipCapabilities",
12341234
"traits": {
1235-
"smithy.api#documentation": "<p>Specifies a list of the capabilities associated with this partnership.</p>"
1235+
"smithy.api#documentation": "<p>Specifies a list of the capabilities associated with this partnership.</p>",
1236+
"smithy.api#required": {}
12361237
}
12371238
},
12381239
"clientToken": {
@@ -2829,6 +2830,20 @@
28292830
"output": {
28302831
"target": "com.amazonaws.b2bi#ListCapabilitiesResponse"
28312832
},
2833+
"errors": [
2834+
{
2835+
"target": "com.amazonaws.b2bi#AccessDeniedException"
2836+
},
2837+
{
2838+
"target": "com.amazonaws.b2bi#InternalServerException"
2839+
},
2840+
{
2841+
"target": "com.amazonaws.b2bi#ThrottlingException"
2842+
},
2843+
{
2844+
"target": "com.amazonaws.b2bi#ValidationException"
2845+
}
2846+
],
28322847
"traits": {
28332848
"smithy.api#documentation": "<p>Lists the capabilities associated with your Amazon Web Services account for your current or specified region. A trading capability contains the information required to transform incoming EDI documents into JSON or XML outputs.</p>",
28342849
"smithy.api#examples": [
@@ -3032,6 +3047,20 @@
30323047
"output": {
30333048
"target": "com.amazonaws.b2bi#ListProfilesResponse"
30343049
},
3050+
"errors": [
3051+
{
3052+
"target": "com.amazonaws.b2bi#AccessDeniedException"
3053+
},
3054+
{
3055+
"target": "com.amazonaws.b2bi#InternalServerException"
3056+
},
3057+
{
3058+
"target": "com.amazonaws.b2bi#ThrottlingException"
3059+
},
3060+
{
3061+
"target": "com.amazonaws.b2bi#ValidationException"
3062+
}
3063+
],
30353064
"traits": {
30363065
"smithy.api#documentation": "<p>Lists the profiles associated with your Amazon Web Services account for your current or specified region. A profile is the mechanism used to create the concept of\n a private network.</p>",
30373066
"smithy.api#examples": [
@@ -3196,6 +3225,20 @@
31963225
"output": {
31973226
"target": "com.amazonaws.b2bi#ListTransformersResponse"
31983227
},
3228+
"errors": [
3229+
{
3230+
"target": "com.amazonaws.b2bi#AccessDeniedException"
3231+
},
3232+
{
3233+
"target": "com.amazonaws.b2bi#InternalServerException"
3234+
},
3235+
{
3236+
"target": "com.amazonaws.b2bi#ThrottlingException"
3237+
},
3238+
{
3239+
"target": "com.amazonaws.b2bi#ValidationException"
3240+
}
3241+
],
31993242
"traits": {
32003243
"smithy.api#documentation": "<p>Lists the available transformers. A transformer\n describes how to process the incoming EDI documents and extract the necessary\n information to the output file.</p>",
32013244
"smithy.api#examples": [
@@ -3714,6 +3757,9 @@
37143757
{
37153758
"target": "com.amazonaws.b2bi#AccessDeniedException"
37163759
},
3760+
{
3761+
"target": "com.amazonaws.b2bi#ConflictException"
3762+
},
37173763
{
37183764
"target": "com.amazonaws.b2bi#InternalServerException"
37193765
},

0 commit comments

Comments
 (0)