Skip to content

Commit b2f3261

Browse files
author
awstools
committed
feat(client-ec2): This release adds the new DescribeMacHosts API operation for getting information about EC2 Mac Dedicated Hosts. Users can now see the latest macOS versions that their underlying Apple Mac can support without needing to be updated.
1 parent d5823e3 commit b2f3261

17 files changed

+987
-469
lines changed

clients/client-ec2/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -2541,6 +2541,14 @@ DescribeLockedSnapshots
25412541

25422542
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/command/DescribeLockedSnapshotsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/DescribeLockedSnapshotsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/DescribeLockedSnapshotsCommandOutput/)
25432543

2544+
</details>
2545+
<details>
2546+
<summary>
2547+
DescribeMacHosts
2548+
</summary>
2549+
2550+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/command/DescribeMacHostsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/DescribeMacHostsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/DescribeMacHostsCommandOutput/)
2551+
25442552
</details>
25452553
<details>
25462554
<summary>

clients/client-ec2/src/EC2.ts

+24
Original file line numberDiff line numberDiff line change
@@ -1418,6 +1418,11 @@ import {
14181418
DescribeLockedSnapshotsCommandInput,
14191419
DescribeLockedSnapshotsCommandOutput,
14201420
} from "./commands/DescribeLockedSnapshotsCommand";
1421+
import {
1422+
DescribeMacHostsCommand,
1423+
DescribeMacHostsCommandInput,
1424+
DescribeMacHostsCommandOutput,
1425+
} from "./commands/DescribeMacHostsCommand";
14211426
import {
14221427
DescribeManagedPrefixListsCommand,
14231428
DescribeManagedPrefixListsCommandInput,
@@ -3304,6 +3309,7 @@ const commands = {
33043309
DescribeLocalGatewayVirtualInterfaceGroupsCommand,
33053310
DescribeLocalGatewayVirtualInterfacesCommand,
33063311
DescribeLockedSnapshotsCommand,
3312+
DescribeMacHostsCommand,
33073313
DescribeManagedPrefixListsCommand,
33083314
DescribeMovingAddressesCommand,
33093315
DescribeNatGatewaysCommand,
@@ -8475,6 +8481,24 @@ export interface EC2 {
84758481
cb: (err: any, data?: DescribeLockedSnapshotsCommandOutput) => void
84768482
): void;
84778483

8484+
/**
8485+
* @see {@link DescribeMacHostsCommand}
8486+
*/
8487+
describeMacHosts(): Promise<DescribeMacHostsCommandOutput>;
8488+
describeMacHosts(
8489+
args: DescribeMacHostsCommandInput,
8490+
options?: __HttpHandlerOptions
8491+
): Promise<DescribeMacHostsCommandOutput>;
8492+
describeMacHosts(
8493+
args: DescribeMacHostsCommandInput,
8494+
cb: (err: any, data?: DescribeMacHostsCommandOutput) => void
8495+
): void;
8496+
describeMacHosts(
8497+
args: DescribeMacHostsCommandInput,
8498+
options: __HttpHandlerOptions,
8499+
cb: (err: any, data?: DescribeMacHostsCommandOutput) => void
8500+
): void;
8501+
84788502
/**
84798503
* @see {@link DescribeManagedPrefixListsCommand}
84808504
*/

clients/client-ec2/src/EC2Client.ts

+3
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,7 @@ import {
996996
DescribeLockedSnapshotsCommandInput,
997997
DescribeLockedSnapshotsCommandOutput,
998998
} from "./commands/DescribeLockedSnapshotsCommand";
999+
import { DescribeMacHostsCommandInput, DescribeMacHostsCommandOutput } from "./commands/DescribeMacHostsCommand";
9991000
import {
10001001
DescribeManagedPrefixListsCommandInput,
10011002
DescribeManagedPrefixListsCommandOutput,
@@ -2439,6 +2440,7 @@ export type ServiceInputTypes =
24392440
| DescribeLocalGatewayVirtualInterfacesCommandInput
24402441
| DescribeLocalGatewaysCommandInput
24412442
| DescribeLockedSnapshotsCommandInput
2443+
| DescribeMacHostsCommandInput
24422444
| DescribeManagedPrefixListsCommandInput
24432445
| DescribeMovingAddressesCommandInput
24442446
| DescribeNatGatewaysCommandInput
@@ -3059,6 +3061,7 @@ export type ServiceOutputTypes =
30593061
| DescribeLocalGatewayVirtualInterfacesCommandOutput
30603062
| DescribeLocalGatewaysCommandOutput
30613063
| DescribeLockedSnapshotsCommandOutput
3064+
| DescribeMacHostsCommandOutput
30623065
| DescribeManagedPrefixListsCommandOutput
30633066
| DescribeMovingAddressesCommandOutput
30643067
| DescribeNatGatewaysCommandOutput
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
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 { DescribeMacHostsRequest, DescribeMacHostsResult } from "../models/models_4";
10+
import { de_DescribeMacHostsCommand, se_DescribeMacHostsCommand } from "../protocols/Aws_ec2";
11+
12+
/**
13+
* @public
14+
*/
15+
export { __MetadataBearer, $Command };
16+
/**
17+
* @public
18+
*
19+
* The input for {@link DescribeMacHostsCommand}.
20+
*/
21+
export interface DescribeMacHostsCommandInput extends DescribeMacHostsRequest {}
22+
/**
23+
* @public
24+
*
25+
* The output of {@link DescribeMacHostsCommand}.
26+
*/
27+
export interface DescribeMacHostsCommandOutput extends DescribeMacHostsResult, __MetadataBearer {}
28+
29+
/**
30+
* <p>Describes the specified EC2 Mac Dedicated Host or all of your EC2 Mac Dedicated Hosts.</p>
31+
* @example
32+
* Use a bare-bones client and the command you need to make an API call.
33+
* ```javascript
34+
* import { EC2Client, DescribeMacHostsCommand } from "@aws-sdk/client-ec2"; // ES Modules import
35+
* // const { EC2Client, DescribeMacHostsCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
36+
* const client = new EC2Client(config);
37+
* const input = { // DescribeMacHostsRequest
38+
* Filters: [ // FilterList
39+
* { // Filter
40+
* Name: "STRING_VALUE",
41+
* Values: [ // ValueStringList
42+
* "STRING_VALUE",
43+
* ],
44+
* },
45+
* ],
46+
* HostIds: [ // RequestHostIdList
47+
* "STRING_VALUE",
48+
* ],
49+
* MaxResults: Number("int"),
50+
* NextToken: "STRING_VALUE",
51+
* };
52+
* const command = new DescribeMacHostsCommand(input);
53+
* const response = await client.send(command);
54+
* // { // DescribeMacHostsResult
55+
* // MacHosts: [ // MacHostList
56+
* // { // MacHost
57+
* // HostId: "STRING_VALUE",
58+
* // MacOSLatestSupportedVersions: [ // MacOSVersionStringList
59+
* // "STRING_VALUE",
60+
* // ],
61+
* // },
62+
* // ],
63+
* // NextToken: "STRING_VALUE",
64+
* // };
65+
*
66+
* ```
67+
*
68+
* @param DescribeMacHostsCommandInput - {@link DescribeMacHostsCommandInput}
69+
* @returns {@link DescribeMacHostsCommandOutput}
70+
* @see {@link DescribeMacHostsCommandInput} for command's `input` shape.
71+
* @see {@link DescribeMacHostsCommandOutput} for command's `response` shape.
72+
* @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
73+
*
74+
* @throws {@link EC2ServiceException}
75+
* <p>Base exception class for all service exceptions from EC2 service.</p>
76+
*
77+
* @public
78+
*/
79+
export class DescribeMacHostsCommand extends $Command
80+
.classBuilder<
81+
DescribeMacHostsCommandInput,
82+
DescribeMacHostsCommandOutput,
83+
EC2ClientResolvedConfig,
84+
ServiceInputTypes,
85+
ServiceOutputTypes
86+
>()
87+
.ep({
88+
...commonParams,
89+
})
90+
.m(function (this: any, Command: any, cs: any, config: EC2ClientResolvedConfig, o: any) {
91+
return [
92+
getSerdePlugin(config, this.serialize, this.deserialize),
93+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
94+
];
95+
})
96+
.s("AmazonEC2", "DescribeMacHosts", {})
97+
.n("EC2Client", "DescribeMacHostsCommand")
98+
.f(void 0, void 0)
99+
.ser(se_DescribeMacHostsCommand)
100+
.de(de_DescribeMacHostsCommand)
101+
.build() {}

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

+2-1
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 { DescribeSpotPriceHistoryRequest, DescribeSpotPriceHistoryResult } from "../models/models_4";
9+
import { DescribeSpotPriceHistoryRequest } from "../models/models_4";
10+
import { DescribeSpotPriceHistoryResult } from "../models/models_5";
1011
import { de_DescribeSpotPriceHistoryCommand, se_DescribeSpotPriceHistoryCommand } from "../protocols/Aws_ec2";
1112

1213
/**

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

+1-2
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 { DescribeStaleSecurityGroupsRequest } from "../models/models_4";
10-
import { DescribeStaleSecurityGroupsResult } from "../models/models_5";
9+
import { DescribeStaleSecurityGroupsRequest, DescribeStaleSecurityGroupsResult } from "../models/models_5";
1110
import { de_DescribeStaleSecurityGroupsCommand, se_DescribeStaleSecurityGroupsCommand } from "../protocols/Aws_ec2";
1211

1312
/**

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

+2-1
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 { GetIpamDiscoveredPublicAddressesRequest, GetIpamDiscoveredPublicAddressesResult } from "../models/models_5";
9+
import { GetIpamDiscoveredPublicAddressesRequest } from "../models/models_5";
10+
import { GetIpamDiscoveredPublicAddressesResult } from "../models/models_6";
1011
import {
1112
de_GetIpamDiscoveredPublicAddressesCommand,
1213
se_GetIpamDiscoveredPublicAddressesCommand,

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +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 { RegisterImageRequest, RegisterImageResult } from "../models/models_6";
9+
import { RegisterImageRequest, RegisterImageResult } from "../models/models_7";
1010
import { de_RegisterImageCommand, se_RegisterImageCommand } from "../protocols/Aws_ec2";
1111

1212
/**

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

+1
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ export * from "./DescribeLocalGatewayVirtualInterfaceGroupsCommand";
291291
export * from "./DescribeLocalGatewayVirtualInterfacesCommand";
292292
export * from "./DescribeLocalGatewaysCommand";
293293
export * from "./DescribeLockedSnapshotsCommand";
294+
export * from "./DescribeMacHostsCommand";
294295
export * from "./DescribeManagedPrefixListsCommand";
295296
export * from "./DescribeMovingAddressesCommand";
296297
export * from "./DescribeNatGatewaysCommand";

0 commit comments

Comments
 (0)