Skip to content

Commit 245f5da

Browse files
author
awstools
committed
feat(client-ec2): This released the DescribeCapacityReservationTopology API.
1 parent cdf2915 commit 245f5da

19 files changed

+1251
-571
lines changed

clients/client-ec2/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,6 +2317,14 @@ DescribeCapacityReservations
23172317

23182318
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/command/DescribeCapacityReservationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/DescribeCapacityReservationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/DescribeCapacityReservationsCommandOutput/)
23192319

2320+
</details>
2321+
<details>
2322+
<summary>
2323+
DescribeCapacityReservationTopology
2324+
</summary>
2325+
2326+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/command/DescribeCapacityReservationTopologyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/DescribeCapacityReservationTopologyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/DescribeCapacityReservationTopologyCommandOutput/)
2327+
23202328
</details>
23212329
<details>
23222330
<summary>

clients/client-ec2/src/EC2.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,6 +1274,11 @@ import {
12741274
DescribeCapacityReservationsCommandInput,
12751275
DescribeCapacityReservationsCommandOutput,
12761276
} from "./commands/DescribeCapacityReservationsCommand";
1277+
import {
1278+
DescribeCapacityReservationTopologyCommand,
1279+
DescribeCapacityReservationTopologyCommandInput,
1280+
DescribeCapacityReservationTopologyCommandOutput,
1281+
} from "./commands/DescribeCapacityReservationTopologyCommand";
12771282
import {
12781283
DescribeCarrierGatewaysCommand,
12791284
DescribeCarrierGatewaysCommandInput,
@@ -3717,6 +3722,7 @@ const commands = {
37173722
DescribeCapacityReservationBillingRequestsCommand,
37183723
DescribeCapacityReservationFleetsCommand,
37193724
DescribeCapacityReservationsCommand,
3725+
DescribeCapacityReservationTopologyCommand,
37203726
DescribeCarrierGatewaysCommand,
37213727
DescribeClassicLinkInstancesCommand,
37223728
DescribeClientVpnAuthorizationRulesCommand,
@@ -8497,6 +8503,24 @@ export interface EC2 {
84978503
cb: (err: any, data?: DescribeCapacityReservationsCommandOutput) => void
84988504
): void;
84998505

8506+
/**
8507+
* @see {@link DescribeCapacityReservationTopologyCommand}
8508+
*/
8509+
describeCapacityReservationTopology(): Promise<DescribeCapacityReservationTopologyCommandOutput>;
8510+
describeCapacityReservationTopology(
8511+
args: DescribeCapacityReservationTopologyCommandInput,
8512+
options?: __HttpHandlerOptions
8513+
): Promise<DescribeCapacityReservationTopologyCommandOutput>;
8514+
describeCapacityReservationTopology(
8515+
args: DescribeCapacityReservationTopologyCommandInput,
8516+
cb: (err: any, data?: DescribeCapacityReservationTopologyCommandOutput) => void
8517+
): void;
8518+
describeCapacityReservationTopology(
8519+
args: DescribeCapacityReservationTopologyCommandInput,
8520+
options: __HttpHandlerOptions,
8521+
cb: (err: any, data?: DescribeCapacityReservationTopologyCommandOutput) => void
8522+
): void;
8523+
85008524
/**
85018525
* @see {@link DescribeCarrierGatewaysCommand}
85028526
*/

clients/client-ec2/src/EC2Client.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,10 @@ import {
917917
DescribeCapacityReservationsCommandInput,
918918
DescribeCapacityReservationsCommandOutput,
919919
} from "./commands/DescribeCapacityReservationsCommand";
920+
import {
921+
DescribeCapacityReservationTopologyCommandInput,
922+
DescribeCapacityReservationTopologyCommandOutput,
923+
} from "./commands/DescribeCapacityReservationTopologyCommand";
920924
import {
921925
DescribeCarrierGatewaysCommandInput,
922926
DescribeCarrierGatewaysCommandOutput,
@@ -2751,6 +2755,7 @@ export type ServiceInputTypes =
27512755
| DescribeCapacityManagerDataExportsCommandInput
27522756
| DescribeCapacityReservationBillingRequestsCommandInput
27532757
| DescribeCapacityReservationFleetsCommandInput
2758+
| DescribeCapacityReservationTopologyCommandInput
27542759
| DescribeCapacityReservationsCommandInput
27552760
| DescribeCarrierGatewaysCommandInput
27562761
| DescribeClassicLinkInstancesCommandInput
@@ -3460,6 +3465,7 @@ export type ServiceOutputTypes =
34603465
| DescribeCapacityManagerDataExportsCommandOutput
34613466
| DescribeCapacityReservationBillingRequestsCommandOutput
34623467
| DescribeCapacityReservationFleetsCommandOutput
3468+
| DescribeCapacityReservationTopologyCommandOutput
34633469
| DescribeCapacityReservationsCommandOutput
34643470
| DescribeCarrierGatewaysCommandOutput
34653471
| DescribeClassicLinkInstancesCommandOutput
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
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 { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
8+
import { commonParams } from "../endpoint/EndpointParameters";
9+
import {
10+
DescribeCapacityReservationTopologyRequest,
11+
DescribeCapacityReservationTopologyResult,
12+
} from "../models/models_4";
13+
import {
14+
de_DescribeCapacityReservationTopologyCommand,
15+
se_DescribeCapacityReservationTopologyCommand,
16+
} from "../protocols/Aws_ec2";
17+
18+
/**
19+
* @public
20+
*/
21+
export type { __MetadataBearer };
22+
export { $Command };
23+
/**
24+
* @public
25+
*
26+
* The input for {@link DescribeCapacityReservationTopologyCommand}.
27+
*/
28+
export interface DescribeCapacityReservationTopologyCommandInput extends DescribeCapacityReservationTopologyRequest {}
29+
/**
30+
* @public
31+
*
32+
* The output of {@link DescribeCapacityReservationTopologyCommand}.
33+
*/
34+
export interface DescribeCapacityReservationTopologyCommandOutput
35+
extends DescribeCapacityReservationTopologyResult,
36+
__MetadataBearer {}
37+
38+
/**
39+
* <p>Describes a tree-based hierarchy that represents the physical host placement of your
40+
* pending or active Capacity Reservations within an Availability Zone or Local Zone. You
41+
* can use this information to determine the relative proximity of your capacity within the
42+
* Amazon Web Services network before it is launched and use this information to allocate capacity
43+
* together to support your tightly coupled workloads.</p>
44+
* <p>Capacity Reservation topology is supported for specific instance types only. For more
45+
* information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-topology-prerequisites.html">Prerequisites
46+
* for Amazon EC2 instance topology</a> in the
47+
* <i>Amazon EC2 User Guide</i>.</p>
48+
* <note>
49+
* <p>The Amazon EC2 API follows an eventual consistency model due to the
50+
* distributed nature of the system supporting it. As a result, when you call the
51+
* DescribeCapacityReservationTopology API command immediately after launching
52+
* instances, the response might return a <code>null</code> value for
53+
* <code>capacityBlockId</code> because the data might not have fully propagated
54+
* across all subsystems. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/eventual-consistency.html">Eventual consistency in the
55+
* Amazon EC2 API</a> in the <i>Amazon EC2 Developer
56+
* Guide</i>.</p>
57+
* </note>
58+
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-topology.html">Amazon EC2 topology</a> in
59+
* the <i>Amazon EC2 User Guide</i>.</p>
60+
* <p></p>
61+
* @example
62+
* Use a bare-bones client and the command you need to make an API call.
63+
* ```javascript
64+
* import { EC2Client, DescribeCapacityReservationTopologyCommand } from "@aws-sdk/client-ec2"; // ES Modules import
65+
* // const { EC2Client, DescribeCapacityReservationTopologyCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
66+
* // import type { EC2ClientConfig } from "@aws-sdk/client-ec2";
67+
* const config = {}; // type is EC2ClientConfig
68+
* const client = new EC2Client(config);
69+
* const input = { // DescribeCapacityReservationTopologyRequest
70+
* DryRun: true || false,
71+
* NextToken: "STRING_VALUE",
72+
* MaxResults: Number("int"),
73+
* CapacityReservationIds: [ // CapacityReservationIdSet
74+
* "STRING_VALUE",
75+
* ],
76+
* Filters: [ // FilterList
77+
* { // Filter
78+
* Name: "STRING_VALUE",
79+
* Values: [ // ValueStringList
80+
* "STRING_VALUE",
81+
* ],
82+
* },
83+
* ],
84+
* };
85+
* const command = new DescribeCapacityReservationTopologyCommand(input);
86+
* const response = await client.send(command);
87+
* // { // DescribeCapacityReservationTopologyResult
88+
* // NextToken: "STRING_VALUE",
89+
* // CapacityReservations: [ // CapacityReservationTopologySet
90+
* // { // CapacityReservationTopology
91+
* // CapacityReservationId: "STRING_VALUE",
92+
* // CapacityBlockId: "STRING_VALUE",
93+
* // State: "STRING_VALUE",
94+
* // InstanceType: "STRING_VALUE",
95+
* // GroupName: "STRING_VALUE",
96+
* // NetworkNodes: [ // NetworkNodeSet
97+
* // "STRING_VALUE",
98+
* // ],
99+
* // AvailabilityZoneId: "STRING_VALUE",
100+
* // AvailabilityZone: "STRING_VALUE",
101+
* // },
102+
* // ],
103+
* // };
104+
*
105+
* ```
106+
*
107+
* @param DescribeCapacityReservationTopologyCommandInput - {@link DescribeCapacityReservationTopologyCommandInput}
108+
* @returns {@link DescribeCapacityReservationTopologyCommandOutput}
109+
* @see {@link DescribeCapacityReservationTopologyCommandInput} for command's `input` shape.
110+
* @see {@link DescribeCapacityReservationTopologyCommandOutput} for command's `response` shape.
111+
* @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
112+
*
113+
* @throws {@link EC2ServiceException}
114+
* <p>Base exception class for all service exceptions from EC2 service.</p>
115+
*
116+
*
117+
* @public
118+
*/
119+
export class DescribeCapacityReservationTopologyCommand extends $Command
120+
.classBuilder<
121+
DescribeCapacityReservationTopologyCommandInput,
122+
DescribeCapacityReservationTopologyCommandOutput,
123+
EC2ClientResolvedConfig,
124+
ServiceInputTypes,
125+
ServiceOutputTypes
126+
>()
127+
.ep(commonParams)
128+
.m(function (this: any, Command: any, cs: any, config: EC2ClientResolvedConfig, o: any) {
129+
return [
130+
getSerdePlugin(config, this.serialize, this.deserialize),
131+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
132+
];
133+
})
134+
.s("AmazonEC2", "DescribeCapacityReservationTopology", {})
135+
.n("EC2Client", "DescribeCapacityReservationTopologyCommand")
136+
.f(void 0, void 0)
137+
.ser(se_DescribeCapacityReservationTopologyCommand)
138+
.de(de_DescribeCapacityReservationTopologyCommand)
139+
.build() {
140+
/** @internal type navigation helper, not in runtime. */
141+
protected declare static __types: {
142+
api: {
143+
input: DescribeCapacityReservationTopologyRequest;
144+
output: DescribeCapacityReservationTopologyResult;
145+
};
146+
sdk: {
147+
input: DescribeCapacityReservationTopologyCommandInput;
148+
output: DescribeCapacityReservationTopologyCommandOutput;
149+
};
150+
};
151+
}

clients/client-ec2/src/commands/DescribeInstanceTopologyCommand.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,21 @@ export interface DescribeInstanceTopologyCommandOutput extends DescribeInstanceT
3333
* determine the relative proximity of your EC2 instances within the Amazon Web Services network to
3434
* support your tightly coupled workloads.</p>
3535
* <p>Instance topology is supported for specific instance types only. For more information,
36-
* see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-topology-prerequisites.html">
37-
* Prerequisites for Amazon EC2 instance topology</a> in the <i>Amazon EC2 User Guide</i>.</p>
36+
* see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-topology-prerequisites.html">Prerequisites
37+
* for Amazon EC2 instance topology</a> in the
38+
* <i>Amazon EC2 User Guide</i>.</p>
3839
* <note>
3940
* <p>The Amazon EC2 API follows an eventual consistency model due to the
4041
* distributed nature of the system supporting it. As a result, when you call the
4142
* DescribeInstanceTopology API command immediately after launching instances, the
4243
* response might return a <code>null</code> value for <code>capacityBlockId</code>
4344
* because the data might not have fully propagated across all subsystems. For more
4445
* information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/eventual-consistency.html">Eventual consistency in the
45-
* Amazon EC2 API</a> in the <i>Amazon EC2 Developer
46-
* Guide</i>.</p>
46+
* Amazon EC2 API</a> in the <i>Amazon EC2 Developer
47+
* Guide</i>.</p>
4748
* </note>
48-
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-topology.html">Amazon EC2 instance
49-
* topology</a> in the <i>Amazon EC2 User Guide</i>.</p>
49+
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-topology.html">Amazon EC2 topology</a> in
50+
* the <i>Amazon EC2 User Guide</i>.</p>
5051
* @example
5152
* Use a bare-bones client and the command you need to make an API call.
5253
* ```javascript

clients/client-ec2/src/commands/DescribeVolumeStatusCommand.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { DescribeVolumeStatusRequest } from "../models/models_5";
10-
import { DescribeVolumeStatusResult } from "../models/models_6";
9+
import { DescribeVolumeStatusRequest, DescribeVolumeStatusResult } from "../models/models_6";
1110
import { de_DescribeVolumeStatusCommand, se_DescribeVolumeStatusCommand } from "../protocols/Aws_ec2";
1211

1312
/**

clients/client-ec2/src/commands/DescribeVolumesModificationsCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { DescribeVolumesModificationsRequest, DescribeVolumesModificationsResult } from "../models/models_5";
9+
import { DescribeVolumesModificationsRequest } from "../models/models_5";
10+
import { DescribeVolumesModificationsResult } from "../models/models_6";
1011
import { de_DescribeVolumesModificationsCommand, se_DescribeVolumesModificationsCommand } from "../protocols/Aws_ec2";
1112

1213
/**

clients/client-ec2/src/commands/GetIpamAddressHistoryCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { GetIpamAddressHistoryRequest, GetIpamAddressHistoryResult } from "../models/models_6";
9+
import { GetIpamAddressHistoryRequest } from "../models/models_6";
10+
import { GetIpamAddressHistoryResult } from "../models/models_7";
1011
import { de_GetIpamAddressHistoryCommand, se_GetIpamAddressHistoryCommand } from "../protocols/Aws_ec2";
1112

1213
/**

clients/client-ec2/src/commands/GetIpamDiscoveredAccountsCommand.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { GetIpamDiscoveredAccountsRequest } from "../models/models_6";
10-
import { GetIpamDiscoveredAccountsResult } from "../models/models_7";
9+
import { GetIpamDiscoveredAccountsRequest, GetIpamDiscoveredAccountsResult } from "../models/models_7";
1110
import { de_GetIpamDiscoveredAccountsCommand, se_GetIpamDiscoveredAccountsCommand } from "../protocols/Aws_ec2";
1211

1312
/**

clients/client-ec2/src/commands/ModifyVpcEndpointConnectionNotificationCommand.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import {
10-
ModifyVpcEndpointConnectionNotificationRequest,
11-
ModifyVpcEndpointConnectionNotificationResult,
12-
} from "../models/models_7";
9+
import { ModifyVpcEndpointConnectionNotificationRequest } from "../models/models_7";
10+
import { ModifyVpcEndpointConnectionNotificationResult } from "../models/models_8";
1311
import {
1412
de_ModifyVpcEndpointConnectionNotificationCommand,
1513
se_ModifyVpcEndpointConnectionNotificationCommand,

0 commit comments

Comments
 (0)