- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ModifyInstanceEventStartTimeCommand
Modifies the start time for a scheduled Amazon EC2 instance event.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { EC2Client, ModifyInstanceEventStartTimeCommand } from "@aws-sdk/client-ec2"; // ES Modules import
// const { EC2Client, ModifyInstanceEventStartTimeCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
const client = new EC2Client(config);
const input = { // ModifyInstanceEventStartTimeRequest
DryRun: true || false,
InstanceId: "STRING_VALUE", // required
InstanceEventId: "STRING_VALUE", // required
NotBefore: new Date("TIMESTAMP"), // required
};
const command = new ModifyInstanceEventStartTimeCommand(input);
const response = await client.send(command);
// { // ModifyInstanceEventStartTimeResult
// Event: { // InstanceStatusEvent
// InstanceEventId: "STRING_VALUE",
// Code: "instance-reboot" || "system-reboot" || "system-maintenance" || "instance-retirement" || "instance-stop",
// Description: "STRING_VALUE",
// NotAfter: new Date("TIMESTAMP"),
// NotBefore: new Date("TIMESTAMP"),
// NotBeforeDeadline: new Date("TIMESTAMP"),
// },
// };
ModifyInstanceEventStartTimeCommand Input
See ModifyInstanceEventStartTimeCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
InstanceEventId Required | string | undefined | The ID of the event whose date and time you are modifying. |
InstanceId Required | string | undefined | The ID of the instance with the scheduled event. |
NotBefore Required | Date | undefined | The new date and time when the event will take place. |
DryRun | boolean | undefined | Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is |
ModifyInstanceEventStartTimeCommand Output
See ModifyInstanceEventStartTimeCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Event | InstanceStatusEvent | undefined | Information about the event. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
EC2ServiceException | Base exception class for all service exceptions from EC2 service. |