Skip to content

Commit 611d06e

Browse files
author
awstools
committed
feat(client-service-quotas): This release introduces CreateSupportCase operation to SDK.
1 parent bbf9999 commit 611d06e

File tree

8 files changed

+339
-69
lines changed

8 files changed

+339
-69
lines changed

clients/client-service-quotas/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,14 @@ AssociateServiceQuotaTemplate
214214

215215
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/service-quotas/command/AssociateServiceQuotaTemplateCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-service-quotas/Interface/AssociateServiceQuotaTemplateCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-service-quotas/Interface/AssociateServiceQuotaTemplateCommandOutput/)
216216

217+
</details>
218+
<details>
219+
<summary>
220+
CreateSupportCase
221+
</summary>
222+
223+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/service-quotas/command/CreateSupportCaseCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-service-quotas/Interface/CreateSupportCaseCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-service-quotas/Interface/CreateSupportCaseCommandOutput/)
224+
217225
</details>
218226
<details>
219227
<summary>

clients/client-service-quotas/src/ServiceQuotas.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ import {
77
AssociateServiceQuotaTemplateCommandInput,
88
AssociateServiceQuotaTemplateCommandOutput,
99
} from "./commands/AssociateServiceQuotaTemplateCommand";
10+
import {
11+
CreateSupportCaseCommand,
12+
CreateSupportCaseCommandInput,
13+
CreateSupportCaseCommandOutput,
14+
} from "./commands/CreateSupportCaseCommand";
1015
import {
1116
DeleteServiceQuotaIncreaseRequestFromTemplateCommand,
1217
DeleteServiceQuotaIncreaseRequestFromTemplateCommandInput,
@@ -97,6 +102,7 @@ import { ServiceQuotasClient, ServiceQuotasClientConfig } from "./ServiceQuotasC
97102

98103
const commands = {
99104
AssociateServiceQuotaTemplateCommand,
105+
CreateSupportCaseCommand,
100106
DeleteServiceQuotaIncreaseRequestFromTemplateCommand,
101107
DisassociateServiceQuotaTemplateCommand,
102108
GetAssociationForServiceQuotaTemplateCommand,
@@ -136,6 +142,23 @@ export interface ServiceQuotas {
136142
cb: (err: any, data?: AssociateServiceQuotaTemplateCommandOutput) => void
137143
): void;
138144

145+
/**
146+
* @see {@link CreateSupportCaseCommand}
147+
*/
148+
createSupportCase(
149+
args: CreateSupportCaseCommandInput,
150+
options?: __HttpHandlerOptions
151+
): Promise<CreateSupportCaseCommandOutput>;
152+
createSupportCase(
153+
args: CreateSupportCaseCommandInput,
154+
cb: (err: any, data?: CreateSupportCaseCommandOutput) => void
155+
): void;
156+
createSupportCase(
157+
args: CreateSupportCaseCommandInput,
158+
options: __HttpHandlerOptions,
159+
cb: (err: any, data?: CreateSupportCaseCommandOutput) => void
160+
): void;
161+
139162
/**
140163
* @see {@link DeleteServiceQuotaIncreaseRequestFromTemplateCommand}
141164
*/

clients/client-service-quotas/src/ServiceQuotasClient.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ import {
5757
AssociateServiceQuotaTemplateCommandInput,
5858
AssociateServiceQuotaTemplateCommandOutput,
5959
} from "./commands/AssociateServiceQuotaTemplateCommand";
60+
import { CreateSupportCaseCommandInput, CreateSupportCaseCommandOutput } from "./commands/CreateSupportCaseCommand";
6061
import {
6162
DeleteServiceQuotaIncreaseRequestFromTemplateCommandInput,
6263
DeleteServiceQuotaIncreaseRequestFromTemplateCommandOutput,
@@ -130,6 +131,7 @@ export { __Client };
130131
*/
131132
export type ServiceInputTypes =
132133
| AssociateServiceQuotaTemplateCommandInput
134+
| CreateSupportCaseCommandInput
133135
| DeleteServiceQuotaIncreaseRequestFromTemplateCommandInput
134136
| DisassociateServiceQuotaTemplateCommandInput
135137
| GetAWSDefaultServiceQuotaCommandInput
@@ -154,6 +156,7 @@ export type ServiceInputTypes =
154156
*/
155157
export type ServiceOutputTypes =
156158
| AssociateServiceQuotaTemplateCommandOutput
159+
| CreateSupportCaseCommandOutput
157160
| DeleteServiceQuotaIncreaseRequestFromTemplateCommandOutput
158161
| DisassociateServiceQuotaTemplateCommandOutput
159162
| GetAWSDefaultServiceQuotaCommandOutput
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import { CreateSupportCaseRequest, CreateSupportCaseResponse } from "../models/models_0";
9+
import { de_CreateSupportCaseCommand, se_CreateSupportCaseCommand } from "../protocols/Aws_json1_1";
10+
import { ServiceInputTypes, ServiceOutputTypes, ServiceQuotasClientResolvedConfig } from "../ServiceQuotasClient";
11+
12+
/**
13+
* @public
14+
*/
15+
export type { __MetadataBearer };
16+
export { $Command };
17+
/**
18+
* @public
19+
*
20+
* The input for {@link CreateSupportCaseCommand}.
21+
*/
22+
export interface CreateSupportCaseCommandInput extends CreateSupportCaseRequest {}
23+
/**
24+
* @public
25+
*
26+
* The output of {@link CreateSupportCaseCommand}.
27+
*/
28+
export interface CreateSupportCaseCommandOutput extends CreateSupportCaseResponse, __MetadataBearer {}
29+
30+
/**
31+
* <p>Creates a Support case for an existing quota increase request. This call only creates
32+
* a Support case if the request has a <code>Pending</code> status. </p>
33+
* @example
34+
* Use a bare-bones client and the command you need to make an API call.
35+
* ```javascript
36+
* import { ServiceQuotasClient, CreateSupportCaseCommand } from "@aws-sdk/client-service-quotas"; // ES Modules import
37+
* // const { ServiceQuotasClient, CreateSupportCaseCommand } = require("@aws-sdk/client-service-quotas"); // CommonJS import
38+
* const client = new ServiceQuotasClient(config);
39+
* const input = { // CreateSupportCaseRequest
40+
* RequestId: "STRING_VALUE", // required
41+
* };
42+
* const command = new CreateSupportCaseCommand(input);
43+
* const response = await client.send(command);
44+
* // {};
45+
*
46+
* ```
47+
*
48+
* @param CreateSupportCaseCommandInput - {@link CreateSupportCaseCommandInput}
49+
* @returns {@link CreateSupportCaseCommandOutput}
50+
* @see {@link CreateSupportCaseCommandInput} for command's `input` shape.
51+
* @see {@link CreateSupportCaseCommandOutput} for command's `response` shape.
52+
* @see {@link ServiceQuotasClientResolvedConfig | config} for ServiceQuotasClient's `config` shape.
53+
*
54+
* @throws {@link AccessDeniedException} (client fault)
55+
* <p>You do not have sufficient permission to perform this action.</p>
56+
*
57+
* @throws {@link DependencyAccessDeniedException} (client fault)
58+
* <p>You can't perform this action because a dependency does not have access.</p>
59+
*
60+
* @throws {@link IllegalArgumentException} (client fault)
61+
* <p>Invalid input was provided.</p>
62+
*
63+
* @throws {@link InvalidResourceStateException} (client fault)
64+
* <p>The resource is in an invalid state.</p>
65+
*
66+
* @throws {@link NoSuchResourceException} (client fault)
67+
* <p>The specified resource does not exist.</p>
68+
*
69+
* @throws {@link ResourceAlreadyExistsException} (client fault)
70+
* <p>The specified resource already exists.</p>
71+
*
72+
* @throws {@link ServiceException} (server fault)
73+
* <p>Something went wrong.</p>
74+
*
75+
* @throws {@link TooManyRequestsException} (client fault)
76+
* <p>Due to throttling, the request was denied. Slow down the rate of request calls, or
77+
* request an increase for this quota.</p>
78+
*
79+
* @throws {@link ServiceQuotasServiceException}
80+
* <p>Base exception class for all service exceptions from ServiceQuotas service.</p>
81+
*
82+
*
83+
* @public
84+
*/
85+
export class CreateSupportCaseCommand extends $Command
86+
.classBuilder<
87+
CreateSupportCaseCommandInput,
88+
CreateSupportCaseCommandOutput,
89+
ServiceQuotasClientResolvedConfig,
90+
ServiceInputTypes,
91+
ServiceOutputTypes
92+
>()
93+
.ep(commonParams)
94+
.m(function (this: any, Command: any, cs: any, config: ServiceQuotasClientResolvedConfig, o: any) {
95+
return [
96+
getSerdePlugin(config, this.serialize, this.deserialize),
97+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
98+
];
99+
})
100+
.s("ServiceQuotasV20190624", "CreateSupportCase", {})
101+
.n("ServiceQuotasClient", "CreateSupportCaseCommand")
102+
.f(void 0, void 0)
103+
.ser(se_CreateSupportCaseCommand)
104+
.de(de_CreateSupportCaseCommand)
105+
.build() {
106+
/** @internal type navigation helper, not in runtime. */
107+
protected declare static __types: {
108+
api: {
109+
input: CreateSupportCaseRequest;
110+
output: {};
111+
};
112+
sdk: {
113+
input: CreateSupportCaseCommandInput;
114+
output: CreateSupportCaseCommandOutput;
115+
};
116+
};
117+
}

clients/client-service-quotas/src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// smithy-typescript generated code
22
export * from "./AssociateServiceQuotaTemplateCommand";
3+
export * from "./CreateSupportCaseCommand";
34
export * from "./DeleteServiceQuotaIncreaseRequestFromTemplateCommand";
45
export * from "./DisassociateServiceQuotaTemplateCommand";
56
export * from "./GetAWSDefaultServiceQuotaCommand";

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

Lines changed: 79 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -210,33 +210,18 @@ export class TooManyRequestsException extends __BaseException {
210210
/**
211211
* @public
212212
*/
213-
export interface DeleteServiceQuotaIncreaseRequestFromTemplateRequest {
214-
/**
215-
* <p>Specifies the service identifier. To find the service code value
216-
* for an Amazon Web Services service, use the <a>ListServices</a> operation.</p>
217-
* @public
218-
*/
219-
ServiceCode: string | undefined;
220-
221-
/**
222-
* <p>Specifies the quota identifier. To find the quota code for a specific
223-
* quota, use the <a>ListServiceQuotas</a> operation, and look for the
224-
* <code>QuotaCode</code> response in the output for the quota you want.</p>
225-
* @public
226-
*/
227-
QuotaCode: string | undefined;
228-
213+
export interface CreateSupportCaseRequest {
229214
/**
230-
* <p>Specifies the Amazon Web Services Region for which the request was made.</p>
215+
* <p>The ID of the pending quota increase request for which you want to open a Support case. </p>
231216
* @public
232217
*/
233-
AwsRegion: string | undefined;
218+
RequestId: string | undefined;
234219
}
235220

236221
/**
237222
* @public
238223
*/
239-
export interface DeleteServiceQuotaIncreaseRequestFromTemplateResponse {}
224+
export interface CreateSupportCaseResponse {}
240225

241226
/**
242227
* <p>Invalid input was provided.</p>
@@ -260,6 +245,28 @@ export class IllegalArgumentException extends __BaseException {
260245
}
261246
}
262247

248+
/**
249+
* <p>The resource is in an invalid state.</p>
250+
* @public
251+
*/
252+
export class InvalidResourceStateException extends __BaseException {
253+
readonly name: "InvalidResourceStateException" = "InvalidResourceStateException";
254+
readonly $fault: "client" = "client";
255+
Message?: string | undefined;
256+
/**
257+
* @internal
258+
*/
259+
constructor(opts: __ExceptionOptionType<InvalidResourceStateException, __BaseException>) {
260+
super({
261+
name: "InvalidResourceStateException",
262+
$fault: "client",
263+
...opts,
264+
});
265+
Object.setPrototypeOf(this, InvalidResourceStateException.prototype);
266+
this.Message = opts.Message;
267+
}
268+
}
269+
263270
/**
264271
* <p>The specified resource does not exist.</p>
265272
* @public
@@ -282,6 +289,59 @@ export class NoSuchResourceException extends __BaseException {
282289
}
283290
}
284291

292+
/**
293+
* <p>The specified resource already exists.</p>
294+
* @public
295+
*/
296+
export class ResourceAlreadyExistsException extends __BaseException {
297+
readonly name: "ResourceAlreadyExistsException" = "ResourceAlreadyExistsException";
298+
readonly $fault: "client" = "client";
299+
Message?: string | undefined;
300+
/**
301+
* @internal
302+
*/
303+
constructor(opts: __ExceptionOptionType<ResourceAlreadyExistsException, __BaseException>) {
304+
super({
305+
name: "ResourceAlreadyExistsException",
306+
$fault: "client",
307+
...opts,
308+
});
309+
Object.setPrototypeOf(this, ResourceAlreadyExistsException.prototype);
310+
this.Message = opts.Message;
311+
}
312+
}
313+
314+
/**
315+
* @public
316+
*/
317+
export interface DeleteServiceQuotaIncreaseRequestFromTemplateRequest {
318+
/**
319+
* <p>Specifies the service identifier. To find the service code value
320+
* for an Amazon Web Services service, use the <a>ListServices</a> operation.</p>
321+
* @public
322+
*/
323+
ServiceCode: string | undefined;
324+
325+
/**
326+
* <p>Specifies the quota identifier. To find the quota code for a specific
327+
* quota, use the <a>ListServiceQuotas</a> operation, and look for the
328+
* <code>QuotaCode</code> response in the output for the quota you want.</p>
329+
* @public
330+
*/
331+
QuotaCode: string | undefined;
332+
333+
/**
334+
* <p>Specifies the Amazon Web Services Region for which the request was made.</p>
335+
* @public
336+
*/
337+
AwsRegion: string | undefined;
338+
}
339+
340+
/**
341+
* @public
342+
*/
343+
export interface DeleteServiceQuotaIncreaseRequestFromTemplateResponse {}
344+
285345
/**
286346
* @public
287347
*/
@@ -997,28 +1057,6 @@ export class InvalidPaginationTokenException extends __BaseException {
9971057
}
9981058
}
9991059

1000-
/**
1001-
* <p>The resource is in an invalid state.</p>
1002-
* @public
1003-
*/
1004-
export class InvalidResourceStateException extends __BaseException {
1005-
readonly name: "InvalidResourceStateException" = "InvalidResourceStateException";
1006-
readonly $fault: "client" = "client";
1007-
Message?: string | undefined;
1008-
/**
1009-
* @internal
1010-
*/
1011-
constructor(opts: __ExceptionOptionType<InvalidResourceStateException, __BaseException>) {
1012-
super({
1013-
name: "InvalidResourceStateException",
1014-
$fault: "client",
1015-
...opts,
1016-
});
1017-
Object.setPrototypeOf(this, InvalidResourceStateException.prototype);
1018-
this.Message = opts.Message;
1019-
}
1020-
}
1021-
10221060
/**
10231061
* @public
10241062
*/
@@ -1576,28 +1614,6 @@ export interface RequestServiceQuotaIncreaseResponse {
15761614
RequestedQuota?: RequestedServiceQuotaChange | undefined;
15771615
}
15781616

1579-
/**
1580-
* <p>The specified resource already exists.</p>
1581-
* @public
1582-
*/
1583-
export class ResourceAlreadyExistsException extends __BaseException {
1584-
readonly name: "ResourceAlreadyExistsException" = "ResourceAlreadyExistsException";
1585-
readonly $fault: "client" = "client";
1586-
Message?: string | undefined;
1587-
/**
1588-
* @internal
1589-
*/
1590-
constructor(opts: __ExceptionOptionType<ResourceAlreadyExistsException, __BaseException>) {
1591-
super({
1592-
name: "ResourceAlreadyExistsException",
1593-
$fault: "client",
1594-
...opts,
1595-
});
1596-
Object.setPrototypeOf(this, ResourceAlreadyExistsException.prototype);
1597-
this.Message = opts.Message;
1598-
}
1599-
}
1600-
16011617
/**
16021618
* <p>The specified tag is a reserved word and cannot be used.</p>
16031619
* @public

0 commit comments

Comments
 (0)