EC2Manager Class

Summary

Provides a high level utility for managing transfers to and from Amazon S3. It makes extensive use of Amazon S3 multipart uploads to achieve enhanced throughput, performance, and reliability. When uploading large files by specifying file paths instead of a stream, TransferUtility uses multiple threads to upload multiple parts of a single upload at once. When dealing with large content sizes and high bandwidth, this can increase throughput significantly.
Assembly
Cake.AWS.EC2.dll
Namespace
Cake.AWS.EC2
Interfaces
Base Types
  • Object
graph BT Type-->Base0["Object"] Type-.->Interface0["IEC2Manager"] click Interface0 "/api/Cake.AWS.EC2/IEC2Manager" Type["EC2Manager"] class Type type-node

Syntax

public class EC2Manager : IEC2Manager

Constructors

Name Summary
EC2Manager(ICakeEnvironment, ICakeLog) Initializes a new instance of the EC2Manager class.

Methods

Name Value Summary
DescribeInstances(IList<string>, EC2Settings, CancellationToken) Task<IList<InstanceStatus>>
Describes the status of one or more instances. Instance status includes the following components: Status checks - Amazon EC2 performs status checks on running EC2 instances to identify hardware and software issues. For more information, see Status Checks for Your Instances and Troubleshooting Instances with Failed Status Checks in the Amazon Elastic Compute Cloud User Guide. Scheduled events - Amazon EC2 can schedule events (such as reboot, stop, or terminate) for your instances related to hardware issues, software updates, or system maintenance. For more information, see Scheduled Events for Your Instances in the Amazon Elastic Compute Cloud User Guide. Instance state - You can manage your instances from the moment you launch them through their termination. For more information, see Instance Lifecycle in the Amazon Elastic Compute Cloud User Guide.
DescribeTags(IList<string>, EC2Settings, CancellationToken) Task<IList<TagDescription>>
Describes one or more of the tags for your EC2 resources.
StartInstances(IList<string>, EC2Settings, CancellationToken) Task<bool>
Starts an Amazon EBS-backed AMI that you've previously stopped. Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for hourly instance usage. However, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour.
StopInstances(IList<string>, EC2Settings, CancellationToken) Task<bool>
Stops an Amazon EBS-backed instance. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour. You can't start or stop Spot Instances. Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for hourly instance usage. However, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM. Performing this operation on an instance that uses an instance store as its root device returns an error.
TerminateInstances(IList<string>, EC2Settings, CancellationToken) Task<bool>
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.

Extension Methods

Name Value Summary
Dump<EC2Manager>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<EC2Manager>(EC2Manager[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<EC2Manager>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<EC2Manager>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<EC2Manager>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<EC2Manager>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Returns the string value or a Not set> markup suitable for Spectre.Console.
Requires the Cake.Issues addin