Skip to content

Commit 1cc5eef

Browse files
author
awstools
committed
feat(client-elastic-load-balancing-v2): This release adds support for configuring Load balancer Capacity Unit reservations
1 parent ed19e89 commit 1cc5eef

File tree

10 files changed

+1381
-0
lines changed

10 files changed

+1381
-0
lines changed

clients/client-elastic-load-balancing-v2/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,14 @@ DescribeAccountLimits
359359

360360
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/elastic-load-balancing-v2/command/DescribeAccountLimitsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-elastic-load-balancing-v2/Interface/DescribeAccountLimitsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-elastic-load-balancing-v2/Interface/DescribeAccountLimitsCommandOutput/)
361361

362+
</details>
363+
<details>
364+
<summary>
365+
DescribeCapacityReservation
366+
</summary>
367+
368+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/elastic-load-balancing-v2/command/DescribeCapacityReservationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-elastic-load-balancing-v2/Interface/DescribeCapacityReservationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-elastic-load-balancing-v2/Interface/DescribeCapacityReservationCommandOutput/)
369+
362370
</details>
363371
<details>
364372
<summary>
@@ -495,6 +503,14 @@ GetTrustStoreRevocationContent
495503

496504
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/elastic-load-balancing-v2/command/GetTrustStoreRevocationContentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-elastic-load-balancing-v2/Interface/GetTrustStoreRevocationContentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-elastic-load-balancing-v2/Interface/GetTrustStoreRevocationContentCommandOutput/)
497505

506+
</details>
507+
<details>
508+
<summary>
509+
ModifyCapacityReservation
510+
</summary>
511+
512+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/elastic-load-balancing-v2/command/ModifyCapacityReservationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-elastic-load-balancing-v2/Interface/ModifyCapacityReservationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-elastic-load-balancing-v2/Interface/ModifyCapacityReservationCommandOutput/)
513+
498514
</details>
499515
<details>
500516
<summary>

clients/client-elastic-load-balancing-v2/src/ElasticLoadBalancingV2.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ import {
7070
DescribeAccountLimitsCommandInput,
7171
DescribeAccountLimitsCommandOutput,
7272
} from "./commands/DescribeAccountLimitsCommand";
73+
import {
74+
DescribeCapacityReservationCommand,
75+
DescribeCapacityReservationCommandInput,
76+
DescribeCapacityReservationCommandOutput,
77+
} from "./commands/DescribeCapacityReservationCommand";
7378
import {
7479
DescribeListenerAttributesCommand,
7580
DescribeListenerAttributesCommandInput,
@@ -155,6 +160,11 @@ import {
155160
GetTrustStoreRevocationContentCommandInput,
156161
GetTrustStoreRevocationContentCommandOutput,
157162
} from "./commands/GetTrustStoreRevocationContentCommand";
163+
import {
164+
ModifyCapacityReservationCommand,
165+
ModifyCapacityReservationCommandInput,
166+
ModifyCapacityReservationCommandOutput,
167+
} from "./commands/ModifyCapacityReservationCommand";
158168
import {
159169
ModifyListenerAttributesCommand,
160170
ModifyListenerAttributesCommandInput,
@@ -237,6 +247,7 @@ const commands = {
237247
DeleteTrustStoreCommand,
238248
DeregisterTargetsCommand,
239249
DescribeAccountLimitsCommand,
250+
DescribeCapacityReservationCommand,
240251
DescribeListenerAttributesCommand,
241252
DescribeListenerCertificatesCommand,
242253
DescribeListenersCommand,
@@ -254,6 +265,7 @@ const commands = {
254265
GetResourcePolicyCommand,
255266
GetTrustStoreCaCertificatesBundleCommand,
256267
GetTrustStoreRevocationContentCommand,
268+
ModifyCapacityReservationCommand,
257269
ModifyListenerCommand,
258270
ModifyListenerAttributesCommand,
259271
ModifyLoadBalancerAttributesCommand,
@@ -521,6 +533,23 @@ export interface ElasticLoadBalancingV2 {
521533
cb: (err: any, data?: DescribeAccountLimitsCommandOutput) => void
522534
): void;
523535

536+
/**
537+
* @see {@link DescribeCapacityReservationCommand}
538+
*/
539+
describeCapacityReservation(
540+
args: DescribeCapacityReservationCommandInput,
541+
options?: __HttpHandlerOptions
542+
): Promise<DescribeCapacityReservationCommandOutput>;
543+
describeCapacityReservation(
544+
args: DescribeCapacityReservationCommandInput,
545+
cb: (err: any, data?: DescribeCapacityReservationCommandOutput) => void
546+
): void;
547+
describeCapacityReservation(
548+
args: DescribeCapacityReservationCommandInput,
549+
options: __HttpHandlerOptions,
550+
cb: (err: any, data?: DescribeCapacityReservationCommandOutput) => void
551+
): void;
552+
524553
/**
525554
* @see {@link DescribeListenerAttributesCommand}
526555
*/
@@ -804,6 +833,23 @@ export interface ElasticLoadBalancingV2 {
804833
cb: (err: any, data?: GetTrustStoreRevocationContentCommandOutput) => void
805834
): void;
806835

836+
/**
837+
* @see {@link ModifyCapacityReservationCommand}
838+
*/
839+
modifyCapacityReservation(
840+
args: ModifyCapacityReservationCommandInput,
841+
options?: __HttpHandlerOptions
842+
): Promise<ModifyCapacityReservationCommandOutput>;
843+
modifyCapacityReservation(
844+
args: ModifyCapacityReservationCommandInput,
845+
cb: (err: any, data?: ModifyCapacityReservationCommandOutput) => void
846+
): void;
847+
modifyCapacityReservation(
848+
args: ModifyCapacityReservationCommandInput,
849+
options: __HttpHandlerOptions,
850+
cb: (err: any, data?: ModifyCapacityReservationCommandOutput) => void
851+
): void;
852+
807853
/**
808854
* @see {@link ModifyListenerCommand}
809855
*/

clients/client-elastic-load-balancing-v2/src/ElasticLoadBalancingV2Client.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ import {
8181
DescribeAccountLimitsCommandInput,
8282
DescribeAccountLimitsCommandOutput,
8383
} from "./commands/DescribeAccountLimitsCommand";
84+
import {
85+
DescribeCapacityReservationCommandInput,
86+
DescribeCapacityReservationCommandOutput,
87+
} from "./commands/DescribeCapacityReservationCommand";
8488
import {
8589
DescribeListenerAttributesCommandInput,
8690
DescribeListenerAttributesCommandOutput,
@@ -137,6 +141,10 @@ import {
137141
GetTrustStoreRevocationContentCommandInput,
138142
GetTrustStoreRevocationContentCommandOutput,
139143
} from "./commands/GetTrustStoreRevocationContentCommand";
144+
import {
145+
ModifyCapacityReservationCommandInput,
146+
ModifyCapacityReservationCommandOutput,
147+
} from "./commands/ModifyCapacityReservationCommand";
140148
import {
141149
ModifyListenerAttributesCommandInput,
142150
ModifyListenerAttributesCommandOutput,
@@ -198,6 +206,7 @@ export type ServiceInputTypes =
198206
| DeleteTrustStoreCommandInput
199207
| DeregisterTargetsCommandInput
200208
| DescribeAccountLimitsCommandInput
209+
| DescribeCapacityReservationCommandInput
201210
| DescribeListenerAttributesCommandInput
202211
| DescribeListenerCertificatesCommandInput
203212
| DescribeListenersCommandInput
@@ -215,6 +224,7 @@ export type ServiceInputTypes =
215224
| GetResourcePolicyCommandInput
216225
| GetTrustStoreCaCertificatesBundleCommandInput
217226
| GetTrustStoreRevocationContentCommandInput
227+
| ModifyCapacityReservationCommandInput
218228
| ModifyListenerAttributesCommandInput
219229
| ModifyListenerCommandInput
220230
| ModifyLoadBalancerAttributesCommandInput
@@ -251,6 +261,7 @@ export type ServiceOutputTypes =
251261
| DeleteTrustStoreCommandOutput
252262
| DeregisterTargetsCommandOutput
253263
| DescribeAccountLimitsCommandOutput
264+
| DescribeCapacityReservationCommandOutput
254265
| DescribeListenerAttributesCommandOutput
255266
| DescribeListenerCertificatesCommandOutput
256267
| DescribeListenersCommandOutput
@@ -268,6 +279,7 @@ export type ServiceOutputTypes =
268279
| GetResourcePolicyCommandOutput
269280
| GetTrustStoreCaCertificatesBundleCommandOutput
270281
| GetTrustStoreRevocationContentCommandOutput
282+
| ModifyCapacityReservationCommandOutput
271283
| ModifyListenerAttributesCommandOutput
272284
| ModifyListenerCommandOutput
273285
| ModifyLoadBalancerAttributesCommandOutput
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
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 {
8+
ElasticLoadBalancingV2ClientResolvedConfig,
9+
ServiceInputTypes,
10+
ServiceOutputTypes,
11+
} from "../ElasticLoadBalancingV2Client";
12+
import { commonParams } from "../endpoint/EndpointParameters";
13+
import { DescribeCapacityReservationInput, DescribeCapacityReservationOutput } from "../models/models_0";
14+
import { de_DescribeCapacityReservationCommand, se_DescribeCapacityReservationCommand } from "../protocols/Aws_query";
15+
16+
/**
17+
* @public
18+
*/
19+
export type { __MetadataBearer };
20+
export { $Command };
21+
/**
22+
* @public
23+
*
24+
* The input for {@link DescribeCapacityReservationCommand}.
25+
*/
26+
export interface DescribeCapacityReservationCommandInput extends DescribeCapacityReservationInput {}
27+
/**
28+
* @public
29+
*
30+
* The output of {@link DescribeCapacityReservationCommand}.
31+
*/
32+
export interface DescribeCapacityReservationCommandOutput extends DescribeCapacityReservationOutput, __MetadataBearer {}
33+
34+
/**
35+
* <p>Describes the capacity reservation status for the specified load balancer.</p>
36+
* @example
37+
* Use a bare-bones client and the command you need to make an API call.
38+
* ```javascript
39+
* import { ElasticLoadBalancingV2Client, DescribeCapacityReservationCommand } from "@aws-sdk/client-elastic-load-balancing-v2"; // ES Modules import
40+
* // const { ElasticLoadBalancingV2Client, DescribeCapacityReservationCommand } = require("@aws-sdk/client-elastic-load-balancing-v2"); // CommonJS import
41+
* const client = new ElasticLoadBalancingV2Client(config);
42+
* const input = { // DescribeCapacityReservationInput
43+
* LoadBalancerArn: "STRING_VALUE", // required
44+
* };
45+
* const command = new DescribeCapacityReservationCommand(input);
46+
* const response = await client.send(command);
47+
* // { // DescribeCapacityReservationOutput
48+
* // LastModifiedTime: new Date("TIMESTAMP"),
49+
* // DecreaseRequestsRemaining: Number("int"),
50+
* // MinimumLoadBalancerCapacity: { // MinimumLoadBalancerCapacity
51+
* // CapacityUnits: Number("int"),
52+
* // },
53+
* // CapacityReservationState: [ // ZonalCapacityReservationStates
54+
* // { // ZonalCapacityReservationState
55+
* // State: { // CapacityReservationStatus
56+
* // Code: "provisioned" || "pending" || "rebalancing" || "failed",
57+
* // Reason: "STRING_VALUE",
58+
* // },
59+
* // AvailabilityZone: "STRING_VALUE",
60+
* // EffectiveCapacityUnits: Number("double"),
61+
* // },
62+
* // ],
63+
* // };
64+
*
65+
* ```
66+
*
67+
* @param DescribeCapacityReservationCommandInput - {@link DescribeCapacityReservationCommandInput}
68+
* @returns {@link DescribeCapacityReservationCommandOutput}
69+
* @see {@link DescribeCapacityReservationCommandInput} for command's `input` shape.
70+
* @see {@link DescribeCapacityReservationCommandOutput} for command's `response` shape.
71+
* @see {@link ElasticLoadBalancingV2ClientResolvedConfig | config} for ElasticLoadBalancingV2Client's `config` shape.
72+
*
73+
* @throws {@link LoadBalancerNotFoundException} (client fault)
74+
* <p>The specified load balancer does not exist.</p>
75+
*
76+
* @throws {@link ElasticLoadBalancingV2ServiceException}
77+
* <p>Base exception class for all service exceptions from ElasticLoadBalancingV2 service.</p>
78+
*
79+
* @public
80+
*/
81+
export class DescribeCapacityReservationCommand extends $Command
82+
.classBuilder<
83+
DescribeCapacityReservationCommandInput,
84+
DescribeCapacityReservationCommandOutput,
85+
ElasticLoadBalancingV2ClientResolvedConfig,
86+
ServiceInputTypes,
87+
ServiceOutputTypes
88+
>()
89+
.ep(commonParams)
90+
.m(function (this: any, Command: any, cs: any, config: ElasticLoadBalancingV2ClientResolvedConfig, o: any) {
91+
return [
92+
getSerdePlugin(config, this.serialize, this.deserialize),
93+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
94+
];
95+
})
96+
.s("ElasticLoadBalancing_v10", "DescribeCapacityReservation", {})
97+
.n("ElasticLoadBalancingV2Client", "DescribeCapacityReservationCommand")
98+
.f(void 0, void 0)
99+
.ser(se_DescribeCapacityReservationCommand)
100+
.de(de_DescribeCapacityReservationCommand)
101+
.build() {
102+
/** @internal type navigation helper, not in runtime. */
103+
protected declare static __types: {
104+
api: {
105+
input: DescribeCapacityReservationInput;
106+
output: DescribeCapacityReservationOutput;
107+
};
108+
sdk: {
109+
input: DescribeCapacityReservationCommandInput;
110+
output: DescribeCapacityReservationCommandOutput;
111+
};
112+
};
113+
}

0 commit comments

Comments
 (0)