Skip to content

Commit 136894b

Browse files
author
awstools
committed
feat(client-service-quotas): introduces Service Quotas Automatic Management. Users can opt-in to monitoring and managing service quotas, receive notifications when quota usage reaches thresholds, configure notification channels, subscribe to EventBridge events for automation, and view notifications in the AWS Health dashboard.
1 parent 99121e8 commit 136894b

17 files changed

+1386
-25
lines changed

clients/client-service-quotas/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,14 @@ GetAssociationForServiceQuotaTemplate
246246

247247
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/service-quotas/command/GetAssociationForServiceQuotaTemplateCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-service-quotas/Interface/GetAssociationForServiceQuotaTemplateCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-service-quotas/Interface/GetAssociationForServiceQuotaTemplateCommandOutput/)
248248

249+
</details>
250+
<details>
251+
<summary>
252+
GetAutoManagementConfiguration
253+
</summary>
254+
255+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/service-quotas/command/GetAutoManagementConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-service-quotas/Interface/GetAutoManagementConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-service-quotas/Interface/GetAutoManagementConfigurationCommandOutput/)
256+
249257
</details>
250258
<details>
251259
<summary>
@@ -350,6 +358,22 @@ RequestServiceQuotaIncrease
350358

351359
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/service-quotas/command/RequestServiceQuotaIncreaseCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-service-quotas/Interface/RequestServiceQuotaIncreaseCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-service-quotas/Interface/RequestServiceQuotaIncreaseCommandOutput/)
352360

361+
</details>
362+
<details>
363+
<summary>
364+
StartAutoManagement
365+
</summary>
366+
367+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/service-quotas/command/StartAutoManagementCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-service-quotas/Interface/StartAutoManagementCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-service-quotas/Interface/StartAutoManagementCommandOutput/)
368+
369+
</details>
370+
<details>
371+
<summary>
372+
StopAutoManagement
373+
</summary>
374+
375+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/service-quotas/command/StopAutoManagementCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-service-quotas/Interface/StopAutoManagementCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-service-quotas/Interface/StopAutoManagementCommandOutput/)
376+
353377
</details>
354378
<details>
355379
<summary>
@@ -367,3 +391,11 @@ UntagResource
367391
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/service-quotas/command/UntagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-service-quotas/Interface/UntagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-service-quotas/Interface/UntagResourceCommandOutput/)
368392

369393
</details>
394+
<details>
395+
<summary>
396+
UpdateAutoManagement
397+
</summary>
398+
399+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/service-quotas/command/UpdateAutoManagementCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-service-quotas/Interface/UpdateAutoManagementCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-service-quotas/Interface/UpdateAutoManagementCommandOutput/)
400+
401+
</details>

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

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ import {
2727
GetAssociationForServiceQuotaTemplateCommandInput,
2828
GetAssociationForServiceQuotaTemplateCommandOutput,
2929
} from "./commands/GetAssociationForServiceQuotaTemplateCommand";
30+
import {
31+
GetAutoManagementConfigurationCommand,
32+
GetAutoManagementConfigurationCommandInput,
33+
GetAutoManagementConfigurationCommandOutput,
34+
} from "./commands/GetAutoManagementConfigurationCommand";
3035
import {
3136
GetAWSDefaultServiceQuotaCommand,
3237
GetAWSDefaultServiceQuotaCommandInput,
@@ -92,12 +97,27 @@ import {
9297
RequestServiceQuotaIncreaseCommandInput,
9398
RequestServiceQuotaIncreaseCommandOutput,
9499
} from "./commands/RequestServiceQuotaIncreaseCommand";
100+
import {
101+
StartAutoManagementCommand,
102+
StartAutoManagementCommandInput,
103+
StartAutoManagementCommandOutput,
104+
} from "./commands/StartAutoManagementCommand";
105+
import {
106+
StopAutoManagementCommand,
107+
StopAutoManagementCommandInput,
108+
StopAutoManagementCommandOutput,
109+
} from "./commands/StopAutoManagementCommand";
95110
import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
96111
import {
97112
UntagResourceCommand,
98113
UntagResourceCommandInput,
99114
UntagResourceCommandOutput,
100115
} from "./commands/UntagResourceCommand";
116+
import {
117+
UpdateAutoManagementCommand,
118+
UpdateAutoManagementCommandInput,
119+
UpdateAutoManagementCommandOutput,
120+
} from "./commands/UpdateAutoManagementCommand";
101121
import { ServiceQuotasClient, ServiceQuotasClientConfig } from "./ServiceQuotasClient";
102122

103123
const commands = {
@@ -106,6 +126,7 @@ const commands = {
106126
DeleteServiceQuotaIncreaseRequestFromTemplateCommand,
107127
DisassociateServiceQuotaTemplateCommand,
108128
GetAssociationForServiceQuotaTemplateCommand,
129+
GetAutoManagementConfigurationCommand,
109130
GetAWSDefaultServiceQuotaCommand,
110131
GetRequestedServiceQuotaChangeCommand,
111132
GetServiceQuotaCommand,
@@ -119,8 +140,11 @@ const commands = {
119140
ListTagsForResourceCommand,
120141
PutServiceQuotaIncreaseRequestIntoTemplateCommand,
121142
RequestServiceQuotaIncreaseCommand,
143+
StartAutoManagementCommand,
144+
StopAutoManagementCommand,
122145
TagResourceCommand,
123146
UntagResourceCommand,
147+
UpdateAutoManagementCommand,
124148
};
125149

126150
export interface ServiceQuotas {
@@ -212,6 +236,24 @@ export interface ServiceQuotas {
212236
cb: (err: any, data?: GetAssociationForServiceQuotaTemplateCommandOutput) => void
213237
): void;
214238

239+
/**
240+
* @see {@link GetAutoManagementConfigurationCommand}
241+
*/
242+
getAutoManagementConfiguration(): Promise<GetAutoManagementConfigurationCommandOutput>;
243+
getAutoManagementConfiguration(
244+
args: GetAutoManagementConfigurationCommandInput,
245+
options?: __HttpHandlerOptions
246+
): Promise<GetAutoManagementConfigurationCommandOutput>;
247+
getAutoManagementConfiguration(
248+
args: GetAutoManagementConfigurationCommandInput,
249+
cb: (err: any, data?: GetAutoManagementConfigurationCommandOutput) => void
250+
): void;
251+
getAutoManagementConfiguration(
252+
args: GetAutoManagementConfigurationCommandInput,
253+
options: __HttpHandlerOptions,
254+
cb: (err: any, data?: GetAutoManagementConfigurationCommandOutput) => void
255+
): void;
256+
215257
/**
216258
* @see {@link GetAWSDefaultServiceQuotaCommand}
217259
*/
@@ -427,6 +469,41 @@ export interface ServiceQuotas {
427469
cb: (err: any, data?: RequestServiceQuotaIncreaseCommandOutput) => void
428470
): void;
429471

472+
/**
473+
* @see {@link StartAutoManagementCommand}
474+
*/
475+
startAutoManagement(
476+
args: StartAutoManagementCommandInput,
477+
options?: __HttpHandlerOptions
478+
): Promise<StartAutoManagementCommandOutput>;
479+
startAutoManagement(
480+
args: StartAutoManagementCommandInput,
481+
cb: (err: any, data?: StartAutoManagementCommandOutput) => void
482+
): void;
483+
startAutoManagement(
484+
args: StartAutoManagementCommandInput,
485+
options: __HttpHandlerOptions,
486+
cb: (err: any, data?: StartAutoManagementCommandOutput) => void
487+
): void;
488+
489+
/**
490+
* @see {@link StopAutoManagementCommand}
491+
*/
492+
stopAutoManagement(): Promise<StopAutoManagementCommandOutput>;
493+
stopAutoManagement(
494+
args: StopAutoManagementCommandInput,
495+
options?: __HttpHandlerOptions
496+
): Promise<StopAutoManagementCommandOutput>;
497+
stopAutoManagement(
498+
args: StopAutoManagementCommandInput,
499+
cb: (err: any, data?: StopAutoManagementCommandOutput) => void
500+
): void;
501+
stopAutoManagement(
502+
args: StopAutoManagementCommandInput,
503+
options: __HttpHandlerOptions,
504+
cb: (err: any, data?: StopAutoManagementCommandOutput) => void
505+
): void;
506+
430507
/**
431508
* @see {@link TagResourceCommand}
432509
*/
@@ -448,6 +525,24 @@ export interface ServiceQuotas {
448525
options: __HttpHandlerOptions,
449526
cb: (err: any, data?: UntagResourceCommandOutput) => void
450527
): void;
528+
529+
/**
530+
* @see {@link UpdateAutoManagementCommand}
531+
*/
532+
updateAutoManagement(): Promise<UpdateAutoManagementCommandOutput>;
533+
updateAutoManagement(
534+
args: UpdateAutoManagementCommandInput,
535+
options?: __HttpHandlerOptions
536+
): Promise<UpdateAutoManagementCommandOutput>;
537+
updateAutoManagement(
538+
args: UpdateAutoManagementCommandInput,
539+
cb: (err: any, data?: UpdateAutoManagementCommandOutput) => void
540+
): void;
541+
updateAutoManagement(
542+
args: UpdateAutoManagementCommandInput,
543+
options: __HttpHandlerOptions,
544+
cb: (err: any, data?: UpdateAutoManagementCommandOutput) => void
545+
): void;
451546
}
452547

453548
/**

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

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ import {
7070
GetAssociationForServiceQuotaTemplateCommandInput,
7171
GetAssociationForServiceQuotaTemplateCommandOutput,
7272
} from "./commands/GetAssociationForServiceQuotaTemplateCommand";
73+
import {
74+
GetAutoManagementConfigurationCommandInput,
75+
GetAutoManagementConfigurationCommandOutput,
76+
} from "./commands/GetAutoManagementConfigurationCommand";
7377
import {
7478
GetAWSDefaultServiceQuotaCommandInput,
7579
GetAWSDefaultServiceQuotaCommandOutput,
@@ -113,8 +117,17 @@ import {
113117
RequestServiceQuotaIncreaseCommandInput,
114118
RequestServiceQuotaIncreaseCommandOutput,
115119
} from "./commands/RequestServiceQuotaIncreaseCommand";
120+
import {
121+
StartAutoManagementCommandInput,
122+
StartAutoManagementCommandOutput,
123+
} from "./commands/StartAutoManagementCommand";
124+
import { StopAutoManagementCommandInput, StopAutoManagementCommandOutput } from "./commands/StopAutoManagementCommand";
116125
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
117126
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
127+
import {
128+
UpdateAutoManagementCommandInput,
129+
UpdateAutoManagementCommandOutput,
130+
} from "./commands/UpdateAutoManagementCommand";
118131
import {
119132
ClientInputEndpointParameters,
120133
ClientResolvedEndpointParameters,
@@ -136,6 +149,7 @@ export type ServiceInputTypes =
136149
| DisassociateServiceQuotaTemplateCommandInput
137150
| GetAWSDefaultServiceQuotaCommandInput
138151
| GetAssociationForServiceQuotaTemplateCommandInput
152+
| GetAutoManagementConfigurationCommandInput
139153
| GetRequestedServiceQuotaChangeCommandInput
140154
| GetServiceQuotaCommandInput
141155
| GetServiceQuotaIncreaseRequestFromTemplateCommandInput
@@ -148,8 +162,11 @@ export type ServiceInputTypes =
148162
| ListTagsForResourceCommandInput
149163
| PutServiceQuotaIncreaseRequestIntoTemplateCommandInput
150164
| RequestServiceQuotaIncreaseCommandInput
165+
| StartAutoManagementCommandInput
166+
| StopAutoManagementCommandInput
151167
| TagResourceCommandInput
152-
| UntagResourceCommandInput;
168+
| UntagResourceCommandInput
169+
| UpdateAutoManagementCommandInput;
153170

154171
/**
155172
* @public
@@ -161,6 +178,7 @@ export type ServiceOutputTypes =
161178
| DisassociateServiceQuotaTemplateCommandOutput
162179
| GetAWSDefaultServiceQuotaCommandOutput
163180
| GetAssociationForServiceQuotaTemplateCommandOutput
181+
| GetAutoManagementConfigurationCommandOutput
164182
| GetRequestedServiceQuotaChangeCommandOutput
165183
| GetServiceQuotaCommandOutput
166184
| GetServiceQuotaIncreaseRequestFromTemplateCommandOutput
@@ -173,8 +191,11 @@ export type ServiceOutputTypes =
173191
| ListTagsForResourceCommandOutput
174192
| PutServiceQuotaIncreaseRequestIntoTemplateCommandOutput
175193
| RequestServiceQuotaIncreaseCommandOutput
194+
| StartAutoManagementCommandOutput
195+
| StopAutoManagementCommandOutput
176196
| TagResourceCommandOutput
177-
| UntagResourceCommandOutput;
197+
| UntagResourceCommandOutput
198+
| UpdateAutoManagementCommandOutput;
178199

179200
/**
180201
* @public
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
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 { GetAutoManagementConfigurationRequest, GetAutoManagementConfigurationResponse } from "../models/models_0";
9+
import {
10+
de_GetAutoManagementConfigurationCommand,
11+
se_GetAutoManagementConfigurationCommand,
12+
} from "../protocols/Aws_json1_1";
13+
import { ServiceInputTypes, ServiceOutputTypes, ServiceQuotasClientResolvedConfig } from "../ServiceQuotasClient";
14+
15+
/**
16+
* @public
17+
*/
18+
export type { __MetadataBearer };
19+
export { $Command };
20+
/**
21+
* @public
22+
*
23+
* The input for {@link GetAutoManagementConfigurationCommand}.
24+
*/
25+
export interface GetAutoManagementConfigurationCommandInput extends GetAutoManagementConfigurationRequest {}
26+
/**
27+
* @public
28+
*
29+
* The output of {@link GetAutoManagementConfigurationCommand}.
30+
*/
31+
export interface GetAutoManagementConfigurationCommandOutput
32+
extends GetAutoManagementConfigurationResponse,
33+
__MetadataBearer {}
34+
35+
/**
36+
* <p>Retrieves information about your <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/automatic-management.html">Service Quotas Automatic Management</a> configuration. Automatic Management monitors your Service Quotas utilization and notifies you before you
37+
* run out of your allocated quotas.</p>
38+
* @example
39+
* Use a bare-bones client and the command you need to make an API call.
40+
* ```javascript
41+
* import { ServiceQuotasClient, GetAutoManagementConfigurationCommand } from "@aws-sdk/client-service-quotas"; // ES Modules import
42+
* // const { ServiceQuotasClient, GetAutoManagementConfigurationCommand } = require("@aws-sdk/client-service-quotas"); // CommonJS import
43+
* // import type { ServiceQuotasClientConfig } from "@aws-sdk/client-service-quotas";
44+
* const config = {}; // type is ServiceQuotasClientConfig
45+
* const client = new ServiceQuotasClient(config);
46+
* const input = {};
47+
* const command = new GetAutoManagementConfigurationCommand(input);
48+
* const response = await client.send(command);
49+
* // { // GetAutoManagementConfigurationResponse
50+
* // OptInLevel: "ACCOUNT",
51+
* // OptInType: "NotifyOnly" || "NotifyAndAdjust",
52+
* // NotificationArn: "STRING_VALUE",
53+
* // OptInStatus: "ENABLED" || "DISABLED",
54+
* // ExclusionList: { // ExclusionQuotaList
55+
* // "<keys>": [ // QuotaInfoList
56+
* // { // QuotaInfo
57+
* // QuotaCode: "STRING_VALUE",
58+
* // QuotaName: "STRING_VALUE",
59+
* // },
60+
* // ],
61+
* // },
62+
* // };
63+
*
64+
* ```
65+
*
66+
* @param GetAutoManagementConfigurationCommandInput - {@link GetAutoManagementConfigurationCommandInput}
67+
* @returns {@link GetAutoManagementConfigurationCommandOutput}
68+
* @see {@link GetAutoManagementConfigurationCommandInput} for command's `input` shape.
69+
* @see {@link GetAutoManagementConfigurationCommandOutput} for command's `response` shape.
70+
* @see {@link ServiceQuotasClientResolvedConfig | config} for ServiceQuotasClient's `config` shape.
71+
*
72+
* @throws {@link AccessDeniedException} (client fault)
73+
* <p>You do not have sufficient permission to perform this action.</p>
74+
*
75+
* @throws {@link IllegalArgumentException} (client fault)
76+
* <p>Invalid input was provided.</p>
77+
*
78+
* @throws {@link NoSuchResourceException} (client fault)
79+
* <p>The specified resource does not exist.</p>
80+
*
81+
* @throws {@link ServiceException} (server fault)
82+
* <p>Something went wrong.</p>
83+
*
84+
* @throws {@link TooManyRequestsException} (client fault)
85+
* <p>Due to throttling, the request was denied. Slow down the rate of request calls, or
86+
* request an increase for this quota.</p>
87+
*
88+
* @throws {@link ServiceQuotasServiceException}
89+
* <p>Base exception class for all service exceptions from ServiceQuotas service.</p>
90+
*
91+
*
92+
* @public
93+
*/
94+
export class GetAutoManagementConfigurationCommand extends $Command
95+
.classBuilder<
96+
GetAutoManagementConfigurationCommandInput,
97+
GetAutoManagementConfigurationCommandOutput,
98+
ServiceQuotasClientResolvedConfig,
99+
ServiceInputTypes,
100+
ServiceOutputTypes
101+
>()
102+
.ep(commonParams)
103+
.m(function (this: any, Command: any, cs: any, config: ServiceQuotasClientResolvedConfig, o: any) {
104+
return [
105+
getSerdePlugin(config, this.serialize, this.deserialize),
106+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
107+
];
108+
})
109+
.s("ServiceQuotasV20190624", "GetAutoManagementConfiguration", {})
110+
.n("ServiceQuotasClient", "GetAutoManagementConfigurationCommand")
111+
.f(void 0, void 0)
112+
.ser(se_GetAutoManagementConfigurationCommand)
113+
.de(de_GetAutoManagementConfigurationCommand)
114+
.build() {
115+
/** @internal type navigation helper, not in runtime. */
116+
protected declare static __types: {
117+
api: {
118+
input: {};
119+
output: GetAutoManagementConfigurationResponse;
120+
};
121+
sdk: {
122+
input: GetAutoManagementConfigurationCommandInput;
123+
output: GetAutoManagementConfigurationCommandOutput;
124+
};
125+
};
126+
}

0 commit comments

Comments
 (0)