Skip to content

Commit

Permalink
feat(client-elastic-load-balancing-v2): This release adds support for…
Browse files Browse the repository at this point in the history
… configuring Load balancer Capacity Unit reservations
  • Loading branch information
awstools committed Nov 20, 2024
1 parent ed19e89 commit 1cc5eef
Show file tree
Hide file tree
Showing 10 changed files with 1,381 additions and 0 deletions.
16 changes: 16 additions & 0 deletions clients/client-elastic-load-balancing-v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,14 @@ DescribeAccountLimits

[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/)

</details>
<details>
<summary>
DescribeCapacityReservation
</summary>

[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/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -495,6 +503,14 @@ GetTrustStoreRevocationContent

[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/)

</details>
<details>
<summary>
ModifyCapacityReservation
</summary>

[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/)

</details>
<details>
<summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ import {
DescribeAccountLimitsCommandInput,
DescribeAccountLimitsCommandOutput,
} from "./commands/DescribeAccountLimitsCommand";
import {
DescribeCapacityReservationCommand,
DescribeCapacityReservationCommandInput,
DescribeCapacityReservationCommandOutput,
} from "./commands/DescribeCapacityReservationCommand";
import {
DescribeListenerAttributesCommand,
DescribeListenerAttributesCommandInput,
Expand Down Expand Up @@ -155,6 +160,11 @@ import {
GetTrustStoreRevocationContentCommandInput,
GetTrustStoreRevocationContentCommandOutput,
} from "./commands/GetTrustStoreRevocationContentCommand";
import {
ModifyCapacityReservationCommand,
ModifyCapacityReservationCommandInput,
ModifyCapacityReservationCommandOutput,
} from "./commands/ModifyCapacityReservationCommand";
import {
ModifyListenerAttributesCommand,
ModifyListenerAttributesCommandInput,
Expand Down Expand Up @@ -237,6 +247,7 @@ const commands = {
DeleteTrustStoreCommand,
DeregisterTargetsCommand,
DescribeAccountLimitsCommand,
DescribeCapacityReservationCommand,
DescribeListenerAttributesCommand,
DescribeListenerCertificatesCommand,
DescribeListenersCommand,
Expand All @@ -254,6 +265,7 @@ const commands = {
GetResourcePolicyCommand,
GetTrustStoreCaCertificatesBundleCommand,
GetTrustStoreRevocationContentCommand,
ModifyCapacityReservationCommand,
ModifyListenerCommand,
ModifyListenerAttributesCommand,
ModifyLoadBalancerAttributesCommand,
Expand Down Expand Up @@ -521,6 +533,23 @@ export interface ElasticLoadBalancingV2 {
cb: (err: any, data?: DescribeAccountLimitsCommandOutput) => void
): void;

/**
* @see {@link DescribeCapacityReservationCommand}
*/
describeCapacityReservation(
args: DescribeCapacityReservationCommandInput,
options?: __HttpHandlerOptions
): Promise<DescribeCapacityReservationCommandOutput>;
describeCapacityReservation(
args: DescribeCapacityReservationCommandInput,
cb: (err: any, data?: DescribeCapacityReservationCommandOutput) => void
): void;
describeCapacityReservation(
args: DescribeCapacityReservationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DescribeCapacityReservationCommandOutput) => void
): void;

/**
* @see {@link DescribeListenerAttributesCommand}
*/
Expand Down Expand Up @@ -804,6 +833,23 @@ export interface ElasticLoadBalancingV2 {
cb: (err: any, data?: GetTrustStoreRevocationContentCommandOutput) => void
): void;

/**
* @see {@link ModifyCapacityReservationCommand}
*/
modifyCapacityReservation(
args: ModifyCapacityReservationCommandInput,
options?: __HttpHandlerOptions
): Promise<ModifyCapacityReservationCommandOutput>;
modifyCapacityReservation(
args: ModifyCapacityReservationCommandInput,
cb: (err: any, data?: ModifyCapacityReservationCommandOutput) => void
): void;
modifyCapacityReservation(
args: ModifyCapacityReservationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ModifyCapacityReservationCommandOutput) => void
): void;

/**
* @see {@link ModifyListenerCommand}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ import {
DescribeAccountLimitsCommandInput,
DescribeAccountLimitsCommandOutput,
} from "./commands/DescribeAccountLimitsCommand";
import {
DescribeCapacityReservationCommandInput,
DescribeCapacityReservationCommandOutput,
} from "./commands/DescribeCapacityReservationCommand";
import {
DescribeListenerAttributesCommandInput,
DescribeListenerAttributesCommandOutput,
Expand Down Expand Up @@ -137,6 +141,10 @@ import {
GetTrustStoreRevocationContentCommandInput,
GetTrustStoreRevocationContentCommandOutput,
} from "./commands/GetTrustStoreRevocationContentCommand";
import {
ModifyCapacityReservationCommandInput,
ModifyCapacityReservationCommandOutput,
} from "./commands/ModifyCapacityReservationCommand";
import {
ModifyListenerAttributesCommandInput,
ModifyListenerAttributesCommandOutput,
Expand Down Expand Up @@ -198,6 +206,7 @@ export type ServiceInputTypes =
| DeleteTrustStoreCommandInput
| DeregisterTargetsCommandInput
| DescribeAccountLimitsCommandInput
| DescribeCapacityReservationCommandInput
| DescribeListenerAttributesCommandInput
| DescribeListenerCertificatesCommandInput
| DescribeListenersCommandInput
Expand All @@ -215,6 +224,7 @@ export type ServiceInputTypes =
| GetResourcePolicyCommandInput
| GetTrustStoreCaCertificatesBundleCommandInput
| GetTrustStoreRevocationContentCommandInput
| ModifyCapacityReservationCommandInput
| ModifyListenerAttributesCommandInput
| ModifyListenerCommandInput
| ModifyLoadBalancerAttributesCommandInput
Expand Down Expand Up @@ -251,6 +261,7 @@ export type ServiceOutputTypes =
| DeleteTrustStoreCommandOutput
| DeregisterTargetsCommandOutput
| DescribeAccountLimitsCommandOutput
| DescribeCapacityReservationCommandOutput
| DescribeListenerAttributesCommandOutput
| DescribeListenerCertificatesCommandOutput
| DescribeListenersCommandOutput
Expand All @@ -268,6 +279,7 @@ export type ServiceOutputTypes =
| GetResourcePolicyCommandOutput
| GetTrustStoreCaCertificatesBundleCommandOutput
| GetTrustStoreRevocationContentCommandOutput
| ModifyCapacityReservationCommandOutput
| ModifyListenerAttributesCommandOutput
| ModifyListenerCommandOutput
| ModifyLoadBalancerAttributesCommandOutput
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
// smithy-typescript generated code
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import {
ElasticLoadBalancingV2ClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../ElasticLoadBalancingV2Client";
import { commonParams } from "../endpoint/EndpointParameters";
import { DescribeCapacityReservationInput, DescribeCapacityReservationOutput } from "../models/models_0";
import { de_DescribeCapacityReservationCommand, se_DescribeCapacityReservationCommand } from "../protocols/Aws_query";

/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link DescribeCapacityReservationCommand}.
*/
export interface DescribeCapacityReservationCommandInput extends DescribeCapacityReservationInput {}
/**
* @public
*
* The output of {@link DescribeCapacityReservationCommand}.
*/
export interface DescribeCapacityReservationCommandOutput extends DescribeCapacityReservationOutput, __MetadataBearer {}

/**
* <p>Describes the capacity reservation status for the specified load balancer.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { ElasticLoadBalancingV2Client, DescribeCapacityReservationCommand } from "@aws-sdk/client-elastic-load-balancing-v2"; // ES Modules import
* // const { ElasticLoadBalancingV2Client, DescribeCapacityReservationCommand } = require("@aws-sdk/client-elastic-load-balancing-v2"); // CommonJS import
* const client = new ElasticLoadBalancingV2Client(config);
* const input = { // DescribeCapacityReservationInput
* LoadBalancerArn: "STRING_VALUE", // required
* };
* const command = new DescribeCapacityReservationCommand(input);
* const response = await client.send(command);
* // { // DescribeCapacityReservationOutput
* // LastModifiedTime: new Date("TIMESTAMP"),
* // DecreaseRequestsRemaining: Number("int"),
* // MinimumLoadBalancerCapacity: { // MinimumLoadBalancerCapacity
* // CapacityUnits: Number("int"),
* // },
* // CapacityReservationState: [ // ZonalCapacityReservationStates
* // { // ZonalCapacityReservationState
* // State: { // CapacityReservationStatus
* // Code: "provisioned" || "pending" || "rebalancing" || "failed",
* // Reason: "STRING_VALUE",
* // },
* // AvailabilityZone: "STRING_VALUE",
* // EffectiveCapacityUnits: Number("double"),
* // },
* // ],
* // };
*
* ```
*
* @param DescribeCapacityReservationCommandInput - {@link DescribeCapacityReservationCommandInput}
* @returns {@link DescribeCapacityReservationCommandOutput}
* @see {@link DescribeCapacityReservationCommandInput} for command's `input` shape.
* @see {@link DescribeCapacityReservationCommandOutput} for command's `response` shape.
* @see {@link ElasticLoadBalancingV2ClientResolvedConfig | config} for ElasticLoadBalancingV2Client's `config` shape.
*
* @throws {@link LoadBalancerNotFoundException} (client fault)
* <p>The specified load balancer does not exist.</p>
*
* @throws {@link ElasticLoadBalancingV2ServiceException}
* <p>Base exception class for all service exceptions from ElasticLoadBalancingV2 service.</p>
*
* @public
*/
export class DescribeCapacityReservationCommand extends $Command
.classBuilder<
DescribeCapacityReservationCommandInput,
DescribeCapacityReservationCommandOutput,
ElasticLoadBalancingV2ClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: ElasticLoadBalancingV2ClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("ElasticLoadBalancing_v10", "DescribeCapacityReservation", {})
.n("ElasticLoadBalancingV2Client", "DescribeCapacityReservationCommand")
.f(void 0, void 0)
.ser(se_DescribeCapacityReservationCommand)
.de(de_DescribeCapacityReservationCommand)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
api: {
input: DescribeCapacityReservationInput;
output: DescribeCapacityReservationOutput;
};
sdk: {
input: DescribeCapacityReservationCommandInput;
output: DescribeCapacityReservationCommandOutput;
};
};
}
Loading

0 comments on commit 1cc5eef

Please sign in to comment.