Stops an Amazon EBS-backed instance. You can restart your instance at any time using the start_instances API. For more information, see Stop and start Amazon EC2 instances in the Amazon EC2 User Guide.
See https://www.paws-r-sdk.com/docs/ec2_stop_instances/ for full documentation.
Usage
ec2_stop_instances(
InstanceIds,
Hibernate = NULL,
SkipOsShutdown = NULL,
DryRun = NULL,
Force = NULL
)Arguments
- InstanceIds
[required] The IDs of the instances.
- Hibernate
Hibernates the instance if the instance was enabled for hibernation at launch. If the instance cannot hibernate successfully, a normal shutdown occurs. For more information, see Hibernate your Amazon EC2 instance in the Amazon EC2 User Guide.
Default:
false- SkipOsShutdown
Specifies whether to bypass the graceful OS shutdown process when the instance is stopped.
Bypassing the graceful OS shutdown might result in data loss or corruption (for example, memory contents not flushed to disk or loss of in-flight IOs) or skipped shutdown scripts.
Default:
false- DryRun
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
DryRunOperation. Otherwise, it isUnauthorizedOperation.- Force
Forces the instance to stop. The instance will first attempt a graceful shutdown, which includes flushing file system caches and metadata. If the graceful shutdown fails to complete within the timeout period, the instance shuts down forcibly without flushing the file system caches and metadata.
After using this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances. For more information, see Troubleshoot Amazon EC2 instance stop issues in the Amazon EC2 User Guide.
Default:
false