Skip to content

Commit

Permalink
feat(client-ec2): This release adds the new DescribeMacHosts API oper…
Browse files Browse the repository at this point in the history
…ation 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.
  • Loading branch information
awstools committed Mar 19, 2024
1 parent d5823e3 commit b2f3261
Show file tree
Hide file tree
Showing 17 changed files with 987 additions and 469 deletions.
8 changes: 8 additions & 0 deletions clients/client-ec2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2541,6 +2541,14 @@ DescribeLockedSnapshots

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

</details>
<details>
<summary>
DescribeMacHosts
</summary>

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

</details>
<details>
<summary>
Expand Down
24 changes: 24 additions & 0 deletions clients/client-ec2/src/EC2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1418,6 +1418,11 @@ import {
DescribeLockedSnapshotsCommandInput,
DescribeLockedSnapshotsCommandOutput,
} from "./commands/DescribeLockedSnapshotsCommand";
import {
DescribeMacHostsCommand,
DescribeMacHostsCommandInput,
DescribeMacHostsCommandOutput,
} from "./commands/DescribeMacHostsCommand";
import {
DescribeManagedPrefixListsCommand,
DescribeManagedPrefixListsCommandInput,
Expand Down Expand Up @@ -3304,6 +3309,7 @@ const commands = {
DescribeLocalGatewayVirtualInterfaceGroupsCommand,
DescribeLocalGatewayVirtualInterfacesCommand,
DescribeLockedSnapshotsCommand,
DescribeMacHostsCommand,
DescribeManagedPrefixListsCommand,
DescribeMovingAddressesCommand,
DescribeNatGatewaysCommand,
Expand Down Expand Up @@ -8475,6 +8481,24 @@ export interface EC2 {
cb: (err: any, data?: DescribeLockedSnapshotsCommandOutput) => void
): void;

/**
* @see {@link DescribeMacHostsCommand}
*/
describeMacHosts(): Promise<DescribeMacHostsCommandOutput>;
describeMacHosts(
args: DescribeMacHostsCommandInput,
options?: __HttpHandlerOptions
): Promise<DescribeMacHostsCommandOutput>;
describeMacHosts(
args: DescribeMacHostsCommandInput,
cb: (err: any, data?: DescribeMacHostsCommandOutput) => void
): void;
describeMacHosts(
args: DescribeMacHostsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DescribeMacHostsCommandOutput) => void
): void;

/**
* @see {@link DescribeManagedPrefixListsCommand}
*/
Expand Down
3 changes: 3 additions & 0 deletions clients/client-ec2/src/EC2Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,7 @@ import {
DescribeLockedSnapshotsCommandInput,
DescribeLockedSnapshotsCommandOutput,
} from "./commands/DescribeLockedSnapshotsCommand";
import { DescribeMacHostsCommandInput, DescribeMacHostsCommandOutput } from "./commands/DescribeMacHostsCommand";
import {
DescribeManagedPrefixListsCommandInput,
DescribeManagedPrefixListsCommandOutput,
Expand Down Expand Up @@ -2439,6 +2440,7 @@ export type ServiceInputTypes =
| DescribeLocalGatewayVirtualInterfacesCommandInput
| DescribeLocalGatewaysCommandInput
| DescribeLockedSnapshotsCommandInput
| DescribeMacHostsCommandInput
| DescribeManagedPrefixListsCommandInput
| DescribeMovingAddressesCommandInput
| DescribeNatGatewaysCommandInput
Expand Down Expand Up @@ -3059,6 +3061,7 @@ export type ServiceOutputTypes =
| DescribeLocalGatewayVirtualInterfacesCommandOutput
| DescribeLocalGatewaysCommandOutput
| DescribeLockedSnapshotsCommandOutput
| DescribeMacHostsCommandOutput
| DescribeManagedPrefixListsCommandOutput
| DescribeMovingAddressesCommandOutput
| DescribeNatGatewaysCommandOutput
Expand Down
101 changes: 101 additions & 0 deletions clients/client-ec2/src/commands/DescribeMacHostsCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
// 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 { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { commonParams } from "../endpoint/EndpointParameters";
import { DescribeMacHostsRequest, DescribeMacHostsResult } from "../models/models_4";
import { de_DescribeMacHostsCommand, se_DescribeMacHostsCommand } from "../protocols/Aws_ec2";

/**
* @public
*/
export { __MetadataBearer, $Command };
/**
* @public
*
* The input for {@link DescribeMacHostsCommand}.
*/
export interface DescribeMacHostsCommandInput extends DescribeMacHostsRequest {}
/**
* @public
*
* The output of {@link DescribeMacHostsCommand}.
*/
export interface DescribeMacHostsCommandOutput extends DescribeMacHostsResult, __MetadataBearer {}

/**
* <p>Describes the specified EC2 Mac Dedicated Host or all of your EC2 Mac Dedicated Hosts.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { EC2Client, DescribeMacHostsCommand } from "@aws-sdk/client-ec2"; // ES Modules import
* // const { EC2Client, DescribeMacHostsCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
* const client = new EC2Client(config);
* const input = { // DescribeMacHostsRequest
* Filters: [ // FilterList
* { // Filter
* Name: "STRING_VALUE",
* Values: [ // ValueStringList
* "STRING_VALUE",
* ],
* },
* ],
* HostIds: [ // RequestHostIdList
* "STRING_VALUE",
* ],
* MaxResults: Number("int"),
* NextToken: "STRING_VALUE",
* };
* const command = new DescribeMacHostsCommand(input);
* const response = await client.send(command);
* // { // DescribeMacHostsResult
* // MacHosts: [ // MacHostList
* // { // MacHost
* // HostId: "STRING_VALUE",
* // MacOSLatestSupportedVersions: [ // MacOSVersionStringList
* // "STRING_VALUE",
* // ],
* // },
* // ],
* // NextToken: "STRING_VALUE",
* // };
*
* ```
*
* @param DescribeMacHostsCommandInput - {@link DescribeMacHostsCommandInput}
* @returns {@link DescribeMacHostsCommandOutput}
* @see {@link DescribeMacHostsCommandInput} for command's `input` shape.
* @see {@link DescribeMacHostsCommandOutput} for command's `response` shape.
* @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
*
* @throws {@link EC2ServiceException}
* <p>Base exception class for all service exceptions from EC2 service.</p>
*
* @public
*/
export class DescribeMacHostsCommand extends $Command
.classBuilder<
DescribeMacHostsCommandInput,
DescribeMacHostsCommandOutput,
EC2ClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep({
...commonParams,
})
.m(function (this: any, Command: any, cs: any, config: EC2ClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("AmazonEC2", "DescribeMacHosts", {})
.n("EC2Client", "DescribeMacHostsCommand")
.f(void 0, void 0)
.ser(se_DescribeMacHostsCommand)
.de(de_DescribeMacHostsCommand)
.build() {}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { commonParams } from "../endpoint/EndpointParameters";
import { DescribeSpotPriceHistoryRequest, DescribeSpotPriceHistoryResult } from "../models/models_4";
import { DescribeSpotPriceHistoryRequest } from "../models/models_4";
import { DescribeSpotPriceHistoryResult } from "../models/models_5";
import { de_DescribeSpotPriceHistoryCommand, se_DescribeSpotPriceHistoryCommand } from "../protocols/Aws_ec2";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { commonParams } from "../endpoint/EndpointParameters";
import { DescribeStaleSecurityGroupsRequest } from "../models/models_4";
import { DescribeStaleSecurityGroupsResult } from "../models/models_5";
import { DescribeStaleSecurityGroupsRequest, DescribeStaleSecurityGroupsResult } from "../models/models_5";
import { de_DescribeStaleSecurityGroupsCommand, se_DescribeStaleSecurityGroupsCommand } from "../protocols/Aws_ec2";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { commonParams } from "../endpoint/EndpointParameters";
import { GetIpamDiscoveredPublicAddressesRequest, GetIpamDiscoveredPublicAddressesResult } from "../models/models_5";
import { GetIpamDiscoveredPublicAddressesRequest } from "../models/models_5";
import { GetIpamDiscoveredPublicAddressesResult } from "../models/models_6";
import {
de_GetIpamDiscoveredPublicAddressesCommand,
se_GetIpamDiscoveredPublicAddressesCommand,
Expand Down
2 changes: 1 addition & 1 deletion clients/client-ec2/src/commands/RegisterImageCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { commonParams } from "../endpoint/EndpointParameters";
import { RegisterImageRequest, RegisterImageResult } from "../models/models_6";
import { RegisterImageRequest, RegisterImageResult } from "../models/models_7";
import { de_RegisterImageCommand, se_RegisterImageCommand } from "../protocols/Aws_ec2";

/**
Expand Down
1 change: 1 addition & 0 deletions clients/client-ec2/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ export * from "./DescribeLocalGatewayVirtualInterfaceGroupsCommand";
export * from "./DescribeLocalGatewayVirtualInterfacesCommand";
export * from "./DescribeLocalGatewaysCommand";
export * from "./DescribeLockedSnapshotsCommand";
export * from "./DescribeMacHostsCommand";
export * from "./DescribeManagedPrefixListsCommand";
export * from "./DescribeMovingAddressesCommand";
export * from "./DescribeNatGatewaysCommand";
Expand Down
Loading

0 comments on commit b2f3261

Please sign in to comment.