-
Notifications
You must be signed in to change notification settings - Fork 599
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-ec2): This release includes a new API for modifying insta…
…nce cpu-options after launch.
- Loading branch information
awstools
committed
Oct 3, 2024
1 parent
a7f70be
commit a29a5e4
Showing
17 changed files
with
596 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
clients/client-ec2/src/commands/ModifyInstanceCpuOptionsCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
// 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 { ModifyInstanceCpuOptionsRequest, ModifyInstanceCpuOptionsResult } from "../models/models_6"; | ||
import { de_ModifyInstanceCpuOptionsCommand, se_ModifyInstanceCpuOptionsCommand } from "../protocols/Aws_ec2"; | ||
|
||
/** | ||
* @public | ||
*/ | ||
export type { __MetadataBearer }; | ||
export { $Command }; | ||
/** | ||
* @public | ||
* | ||
* The input for {@link ModifyInstanceCpuOptionsCommand}. | ||
*/ | ||
export interface ModifyInstanceCpuOptionsCommandInput extends ModifyInstanceCpuOptionsRequest {} | ||
/** | ||
* @public | ||
* | ||
* The output of {@link ModifyInstanceCpuOptionsCommand}. | ||
*/ | ||
export interface ModifyInstanceCpuOptionsCommandOutput extends ModifyInstanceCpuOptionsResult, __MetadataBearer {} | ||
|
||
/** | ||
* <p>By default, all vCPUs for the instance type are active when you launch an instance. When you | ||
* configure the number of active vCPUs for the instance, it can help you save on licensing costs and | ||
* optimize performance. The base cost of the instance remains unchanged.</p> | ||
* <p>The number of active vCPUs equals the number of threads per CPU core multiplied by the number | ||
* of cores.</p> | ||
* <note> | ||
* <p>Some instance type options do not support this capability. For more information, see | ||
* <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cpu-options-supported-instances-values.html">Supported CPU | ||
* options</a> in the <i>Amazon EC2 User Guide</i>.</p> | ||
* </note> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { EC2Client, ModifyInstanceCpuOptionsCommand } from "@aws-sdk/client-ec2"; // ES Modules import | ||
* // const { EC2Client, ModifyInstanceCpuOptionsCommand } = require("@aws-sdk/client-ec2"); // CommonJS import | ||
* const client = new EC2Client(config); | ||
* const input = { // ModifyInstanceCpuOptionsRequest | ||
* InstanceId: "STRING_VALUE", // required | ||
* CoreCount: Number("int"), // required | ||
* ThreadsPerCore: Number("int"), // required | ||
* DryRun: true || false, | ||
* }; | ||
* const command = new ModifyInstanceCpuOptionsCommand(input); | ||
* const response = await client.send(command); | ||
* // { // ModifyInstanceCpuOptionsResult | ||
* // InstanceId: "STRING_VALUE", | ||
* // CoreCount: Number("int"), | ||
* // ThreadsPerCore: Number("int"), | ||
* // }; | ||
* | ||
* ``` | ||
* | ||
* @param ModifyInstanceCpuOptionsCommandInput - {@link ModifyInstanceCpuOptionsCommandInput} | ||
* @returns {@link ModifyInstanceCpuOptionsCommandOutput} | ||
* @see {@link ModifyInstanceCpuOptionsCommandInput} for command's `input` shape. | ||
* @see {@link ModifyInstanceCpuOptionsCommandOutput} 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 ModifyInstanceCpuOptionsCommand extends $Command | ||
.classBuilder< | ||
ModifyInstanceCpuOptionsCommandInput, | ||
ModifyInstanceCpuOptionsCommandOutput, | ||
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", "ModifyInstanceCpuOptions", {}) | ||
.n("EC2Client", "ModifyInstanceCpuOptionsCommand") | ||
.f(void 0, void 0) | ||
.ser(se_ModifyInstanceCpuOptionsCommand) | ||
.de(de_ModifyInstanceCpuOptionsCommand) | ||
.build() { | ||
/** @internal type navigation helper, not in runtime. */ | ||
protected declare static __types: { | ||
api: { | ||
input: ModifyInstanceCpuOptionsRequest; | ||
output: ModifyInstanceCpuOptionsResult; | ||
}; | ||
sdk: { | ||
input: ModifyInstanceCpuOptionsCommandInput; | ||
output: ModifyInstanceCpuOptionsCommandOutput; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.