EC2Manager.

TerminateInstances(IList<string>, EC2Settings, CancellationToken) Method

Summary

Shuts down one or more instances. This operation is idempotent; if you terminate an instance more than once, each call succeeds. Terminated instances remain visible after termination (for approximately one hour). By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Volumes attached after instance launch continue running. You can stop, start, and terminate EBS-backed instances. You can only terminate instance store-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, any attached EBS volumes with the DeleteOnTermination block device mapping parameter set to true are automatically deleted. For more information about the differences between stopping and terminating instances, see Instance Lifecycle in the Amazon EC2 User Guide.
Assembly
Cake.AWS.EC2.dll
Namespace
Cake.AWS.EC2
Containing Type
EC2Manager

Syntax

public Task<bool> TerminateInstances(IList<string> instances, EC2Settings settings, CancellationToken cancellationToken = null)

Attributes

Type Description
AsyncStateMachineAttribute

Parameters

Name Type Description
instances IList<string> A list of instance IDs to be stopped.
settings EC2Settings The EC2Settings used during the request to AWS.
cancellationToken CancellationToken A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Return Value

Type Description
Task<bool>