Skip to content

Commit

Permalink
feat(client-ec2): This release includes a new API for modifying insta…
Browse files Browse the repository at this point in the history
…nce network-performance-options after launch.
  • Loading branch information
awstools committed Dec 9, 2024
1 parent a4233c3 commit 2f49c14
Show file tree
Hide file tree
Showing 37 changed files with 1,539 additions and 780 deletions.
8 changes: 8 additions & 0 deletions clients/client-ec2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4493,6 +4493,14 @@ ModifyInstanceMetadataOptions

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/command/ModifyInstanceMetadataOptionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/ModifyInstanceMetadataOptionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/ModifyInstanceMetadataOptionsCommandOutput/)

</details>
<details>
<summary>
ModifyInstanceNetworkPerformanceOptions
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/command/ModifyInstanceNetworkPerformanceOptionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/ModifyInstanceNetworkPerformanceOptionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/ModifyInstanceNetworkPerformanceOptionsCommandOutput/)

</details>
<details>
<summary>
Expand Down
23 changes: 23 additions & 0 deletions clients/client-ec2/src/EC2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2618,6 +2618,11 @@ import {
ModifyInstanceMetadataOptionsCommandInput,
ModifyInstanceMetadataOptionsCommandOutput,
} from "./commands/ModifyInstanceMetadataOptionsCommand";
import {
ModifyInstanceNetworkPerformanceOptionsCommand,
ModifyInstanceNetworkPerformanceOptionsCommandInput,
ModifyInstanceNetworkPerformanceOptionsCommandOutput,
} from "./commands/ModifyInstanceNetworkPerformanceOptionsCommand";
import {
ModifyInstancePlacementCommand,
ModifyInstancePlacementCommandInput,
Expand Down Expand Up @@ -3758,6 +3763,7 @@ const commands = {
ModifyInstanceMaintenanceOptionsCommand,
ModifyInstanceMetadataDefaultsCommand,
ModifyInstanceMetadataOptionsCommand,
ModifyInstanceNetworkPerformanceOptionsCommand,
ModifyInstancePlacementCommand,
ModifyIpamCommand,
ModifyIpamPoolCommand,
Expand Down Expand Up @@ -12882,6 +12888,23 @@ export interface EC2 {
cb: (err: any, data?: ModifyInstanceMetadataOptionsCommandOutput) => void
): void;

/**
* @see {@link ModifyInstanceNetworkPerformanceOptionsCommand}
*/
modifyInstanceNetworkPerformanceOptions(
args: ModifyInstanceNetworkPerformanceOptionsCommandInput,
options?: __HttpHandlerOptions
): Promise<ModifyInstanceNetworkPerformanceOptionsCommandOutput>;
modifyInstanceNetworkPerformanceOptions(
args: ModifyInstanceNetworkPerformanceOptionsCommandInput,
cb: (err: any, data?: ModifyInstanceNetworkPerformanceOptionsCommandOutput) => void
): void;
modifyInstanceNetworkPerformanceOptions(
args: ModifyInstanceNetworkPerformanceOptionsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ModifyInstanceNetworkPerformanceOptionsCommandOutput) => void
): void;

/**
* @see {@link ModifyInstancePlacementCommand}
*/
Expand Down
6 changes: 6 additions & 0 deletions clients/client-ec2/src/EC2Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1888,6 +1888,10 @@ import {
ModifyInstanceMetadataOptionsCommandInput,
ModifyInstanceMetadataOptionsCommandOutput,
} from "./commands/ModifyInstanceMetadataOptionsCommand";
import {
ModifyInstanceNetworkPerformanceOptionsCommandInput,
ModifyInstanceNetworkPerformanceOptionsCommandOutput,
} from "./commands/ModifyInstanceNetworkPerformanceOptionsCommand";
import {
ModifyInstancePlacementCommandInput,
ModifyInstancePlacementCommandOutput,
Expand Down Expand Up @@ -2848,6 +2852,7 @@ export type ServiceInputTypes =
| ModifyInstanceMaintenanceOptionsCommandInput
| ModifyInstanceMetadataDefaultsCommandInput
| ModifyInstanceMetadataOptionsCommandInput
| ModifyInstanceNetworkPerformanceOptionsCommandInput
| ModifyInstancePlacementCommandInput
| ModifyIpamCommandInput
| ModifyIpamPoolCommandInput
Expand Down Expand Up @@ -3510,6 +3515,7 @@ export type ServiceOutputTypes =
| ModifyInstanceMaintenanceOptionsCommandOutput
| ModifyInstanceMetadataDefaultsCommandOutput
| ModifyInstanceMetadataOptionsCommandOutput
| ModifyInstanceNetworkPerformanceOptionsCommandOutput
| ModifyInstancePlacementCommandOutput
| ModifyIpamCommandOutput
| ModifyIpamPoolCommandOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,9 @@ export interface CreateLaunchTemplateCommandOutput extends CreateLaunchTemplateR
* Operator: { // OperatorRequest
* Principal: "STRING_VALUE",
* },
* NetworkPerformanceOptions: { // LaunchTemplateNetworkPerformanceOptionsRequest
* BandwidthWeighting: "default" || "vpc-1" || "ebs-1",
* },
* },
* Operator: {
* Principal: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,9 @@ export interface CreateLaunchTemplateVersionCommandOutput extends CreateLaunchTe
* Operator: { // OperatorRequest
* Principal: "STRING_VALUE",
* },
* NetworkPerformanceOptions: { // LaunchTemplateNetworkPerformanceOptionsRequest
* BandwidthWeighting: "default" || "vpc-1" || "ebs-1",
* },
* },
* ResolveAlias: true || false,
* };
Expand Down Expand Up @@ -593,6 +596,9 @@ export interface CreateLaunchTemplateVersionCommandOutput extends CreateLaunchTe
* // Managed: true || false,
* // Principal: "STRING_VALUE",
* // },
* // NetworkPerformanceOptions: { // LaunchTemplateNetworkPerformanceOptions
* // BandwidthWeighting: "default" || "vpc-1" || "ebs-1",
* // },
* // },
* // Operator: {
* // Managed: true || false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { commonParams } from "../endpoint/EndpointParameters";
import {
CreateLocalGatewayRouteTableVpcAssociationRequest,
CreateLocalGatewayRouteTableVpcAssociationResult,
} from "../models/models_1";
import { CreateLocalGatewayRouteTableVpcAssociationRequest } from "../models/models_1";
import { CreateLocalGatewayRouteTableVpcAssociationResult } from "../models/models_2";
import {
de_CreateLocalGatewayRouteTableVpcAssociationCommand,
se_CreateLocalGatewayRouteTableVpcAssociationCommand,
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 { CreateManagedPrefixListRequest } from "../models/models_1";
import { CreateManagedPrefixListResult } from "../models/models_2";
import { CreateManagedPrefixListRequest, CreateManagedPrefixListResult } from "../models/models_2";
import { de_CreateManagedPrefixListCommand, se_CreateManagedPrefixListCommand } 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 { DeleteClientVpnRouteRequest, DeleteClientVpnRouteResult } from "../models/models_2";
import { DeleteClientVpnRouteRequest } from "../models/models_2";
import { DeleteClientVpnRouteResult } from "../models/models_3";
import { de_DeleteClientVpnRouteCommand, se_DeleteClientVpnRouteCommand } from "../protocols/Aws_ec2";

/**
Expand Down
2 changes: 1 addition & 1 deletion clients/client-ec2/src/commands/DeleteCoipCidrCommand.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 { DeleteCoipCidrRequest, DeleteCoipCidrResult } from "../models/models_2";
import { DeleteCoipCidrRequest, DeleteCoipCidrResult } from "../models/models_3";
import { de_DeleteCoipCidrCommand, se_DeleteCoipCidrCommand } 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 { DescribeFleetInstancesRequest, DescribeFleetInstancesResult } from "../models/models_3";
import { DescribeFleetInstancesRequest } from "../models/models_3";
import { DescribeFleetInstancesResult } from "../models/models_4";
import { de_DescribeFleetInstancesCommand, se_DescribeFleetInstancesCommand } from "../protocols/Aws_ec2";

/**
Expand Down
3 changes: 1 addition & 2 deletions clients/client-ec2/src/commands/DescribeFleetsCommand.ts
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 { DescribeFleetsRequest } from "../models/models_3";
import { DescribeFleetsResult } from "../models/models_4";
import { DescribeFleetsRequest, DescribeFleetsResult } from "../models/models_4";
import { de_DescribeFleetsCommand, se_DescribeFleetsCommand } from "../protocols/Aws_ec2";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export interface DescribeInstanceTopologyCommandOutput extends DescribeInstanceT
* <p>
* <code>p3dn.24xlarge</code> | <code>p4d.24xlarge</code> |
* <code>p4de.24xlarge</code> | <code>p5.48xlarge</code> |
* <code>p5e.48xlarge</code>
* <code>p5e.48xlarge</code> | <code>p5en.48xlarge</code>
* </p>
* </li>
* <li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ export interface DescribeInstanceTypesCommandOutput extends DescribeInstanceType
* // },
* // EncryptionInTransitSupported: true || false,
* // EnaSrdSupported: true || false,
* // BandwidthWeightings: [ // BandwidthWeightingTypeList
* // "default" || "vpc-1" || "ebs-1",
* // ],
* // },
* // GpuInfo: { // GpuInfo
* // Gpus: [ // GpuDeviceInfoList
Expand Down
3 changes: 3 additions & 0 deletions clients/client-ec2/src/commands/DescribeInstancesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ export interface DescribeInstancesCommandOutput extends DescribeInstancesResult,
* // AutoRecovery: "disabled" || "default",
* // },
* // CurrentInstanceBootMode: "legacy-bios" || "uefi",
* // NetworkPerformanceOptions: { // InstanceNetworkPerformanceOptions
* // BandwidthWeighting: "default" || "vpc-1" || "ebs-1",
* // },
* // Operator: "<OperatorResponse>",
* // InstanceId: "STRING_VALUE",
* // ImageId: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,9 @@ export interface DescribeLaunchTemplateVersionsCommandOutput
* // Managed: true || false,
* // Principal: "STRING_VALUE",
* // },
* // NetworkPerformanceOptions: { // LaunchTemplateNetworkPerformanceOptions
* // BandwidthWeighting: "default" || "vpc-1" || "ebs-1",
* // },
* // },
* // Operator: {
* // Managed: true || false,
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 { EnableAllowedImagesSettingsRequest, EnableAllowedImagesSettingsResult } from "../models/models_5";
import { EnableAllowedImagesSettingsRequest } from "../models/models_5";
import { EnableAllowedImagesSettingsResult } from "../models/models_6";
import { de_EnableAllowedImagesSettingsCommand, se_EnableAllowedImagesSettingsCommand } from "../protocols/Aws_ec2";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { commonParams } from "../endpoint/EndpointParameters";
import {
EnableAwsNetworkPerformanceMetricSubscriptionRequest,
EnableAwsNetworkPerformanceMetricSubscriptionResult,
} from "../models/models_5";
} from "../models/models_6";
import {
de_EnableAwsNetworkPerformanceMetricSubscriptionCommand,
se_EnableAwsNetworkPerformanceMetricSubscriptionCommand,
Expand Down
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 { EnableEbsEncryptionByDefaultRequest, EnableEbsEncryptionByDefaultResult } from "../models/models_5";
import { EnableEbsEncryptionByDefaultRequest, EnableEbsEncryptionByDefaultResult } from "../models/models_6";
import { de_EnableEbsEncryptionByDefaultCommand, se_EnableEbsEncryptionByDefaultCommand } from "../protocols/Aws_ec2";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,9 @@ export interface GetLaunchTemplateDataCommandOutput extends GetLaunchTemplateDat
* // Managed: true || false,
* // Principal: "STRING_VALUE",
* // },
* // NetworkPerformanceOptions: { // LaunchTemplateNetworkPerformanceOptions
* // BandwidthWeighting: "default" || "vpc-1" || "ebs-1",
* // },
* // },
* // };
*
Expand Down
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 { ModifyInstanceMaintenanceOptionsRequest, ModifyInstanceMaintenanceOptionsResult } from "../models/models_6";
import { ModifyInstanceMaintenanceOptionsRequest, ModifyInstanceMaintenanceOptionsResult } from "../models/models_7";
import {
de_ModifyInstanceMaintenanceOptionsCommand,
se_ModifyInstanceMaintenanceOptionsCommand,
Expand Down
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 { ModifyInstanceNetworkPerformanceRequest, ModifyInstanceNetworkPerformanceResult } from "../models/models_7";
import {
de_ModifyInstanceNetworkPerformanceOptionsCommand,
se_ModifyInstanceNetworkPerformanceOptionsCommand,
} from "../protocols/Aws_ec2";

/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link ModifyInstanceNetworkPerformanceOptionsCommand}.
*/
export interface ModifyInstanceNetworkPerformanceOptionsCommandInput extends ModifyInstanceNetworkPerformanceRequest {}
/**
* @public
*
* The output of {@link ModifyInstanceNetworkPerformanceOptionsCommand}.
*/
export interface ModifyInstanceNetworkPerformanceOptionsCommandOutput
extends ModifyInstanceNetworkPerformanceResult,
__MetadataBearer {}

/**
* <p>Change the configuration of the network performance options for an existing
* instance.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { EC2Client, ModifyInstanceNetworkPerformanceOptionsCommand } from "@aws-sdk/client-ec2"; // ES Modules import
* // const { EC2Client, ModifyInstanceNetworkPerformanceOptionsCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
* const client = new EC2Client(config);
* const input = { // ModifyInstanceNetworkPerformanceRequest
* InstanceId: "STRING_VALUE", // required
* BandwidthWeighting: "default" || "vpc-1" || "ebs-1", // required
* DryRun: true || false,
* };
* const command = new ModifyInstanceNetworkPerformanceOptionsCommand(input);
* const response = await client.send(command);
* // { // ModifyInstanceNetworkPerformanceResult
* // InstanceId: "STRING_VALUE",
* // BandwidthWeighting: "default" || "vpc-1" || "ebs-1",
* // };
*
* ```
*
* @param ModifyInstanceNetworkPerformanceOptionsCommandInput - {@link ModifyInstanceNetworkPerformanceOptionsCommandInput}
* @returns {@link ModifyInstanceNetworkPerformanceOptionsCommandOutput}
* @see {@link ModifyInstanceNetworkPerformanceOptionsCommandInput} for command's `input` shape.
* @see {@link ModifyInstanceNetworkPerformanceOptionsCommandOutput} 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 ModifyInstanceNetworkPerformanceOptionsCommand extends $Command
.classBuilder<
ModifyInstanceNetworkPerformanceOptionsCommandInput,
ModifyInstanceNetworkPerformanceOptionsCommandOutput,
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", "ModifyInstanceNetworkPerformanceOptions", {})
.n("EC2Client", "ModifyInstanceNetworkPerformanceOptionsCommand")
.f(void 0, void 0)
.ser(se_ModifyInstanceNetworkPerformanceOptionsCommand)
.de(de_ModifyInstanceNetworkPerformanceOptionsCommand)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
api: {
input: ModifyInstanceNetworkPerformanceRequest;
output: ModifyInstanceNetworkPerformanceResult;
};
sdk: {
input: ModifyInstanceNetworkPerformanceOptionsCommandInput;
output: ModifyInstanceNetworkPerformanceOptionsCommandOutput;
};
};
}
6 changes: 6 additions & 0 deletions clients/client-ec2/src/commands/RunInstancesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ export interface RunInstancesCommandOutput extends Reservation, __MetadataBearer
* },
* DisableApiStop: true || false,
* EnablePrimaryIpv6: true || false,
* NetworkPerformanceOptions: { // InstanceNetworkPerformanceOptionsRequest
* BandwidthWeighting: "default" || "vpc-1" || "ebs-1",
* },
* Operator: { // OperatorRequest
* Principal: "STRING_VALUE",
* },
Expand Down Expand Up @@ -494,6 +497,9 @@ export interface RunInstancesCommandOutput extends Reservation, __MetadataBearer
* // AutoRecovery: "disabled" || "default",
* // },
* // CurrentInstanceBootMode: "legacy-bios" || "uefi",
* // NetworkPerformanceOptions: { // InstanceNetworkPerformanceOptions
* // BandwidthWeighting: "default" || "vpc-1" || "ebs-1",
* // },
* // Operator: "<OperatorResponse>",
* // InstanceId: "STRING_VALUE",
* // ImageId: "STRING_VALUE",
Expand Down
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 { UnmonitorInstancesRequest, UnmonitorInstancesResult } from "../models/models_7";
import { UnmonitorInstancesRequest, UnmonitorInstancesResult } from "../models/models_8";
import { de_UnmonitorInstancesCommand, se_UnmonitorInstancesCommand } from "../protocols/Aws_ec2";

/**
Expand Down
Loading

0 comments on commit 2f49c14

Please sign in to comment.