pub struct Manager { /* private fields */ }
Expand description

Implements AWS EC2 manager.

Implementations

Creates an AWS EC2 key-pair and saves the private key to disk. It overwrites “key_path” file with the newly created key.

Deletes the AWS EC2 key-pair.

Describes all attached volumes by instance Id and device. If “instance_id” is empty, it fetches from the local EC2 instance’s metadata service. The region used for API call is inherited from the EC2 client SDK.

e.g., aws ec2 describe-volumes
–region ${AWS::Region}
–filters
Name=attachment.instance-id,Values=$INSTANCE_ID
Name=attachment.device,Values=/dev/xvdb
–query Volumes[].Attachments[].State
–output text

ref. https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVolumes.html ref. https://github.com/ava-labs/avalanche-ops/blob/fcbac87a219a8d3d6d3c38a1663fe1dafe78e04e/bin/avalancheup-aws/cfn-templates/asg_amd64_ubuntu.yaml#L397-L409

Fetches the EBS volume by its attachment state. If “instance_id” is empty, it fetches from the local EC2 instance’s metadata service.

Polls EBS volume attachment state. If “instance_id” is empty, it fetches from the local EC2 instance’s metadata service.

Fetches all tags for the specified instance.

“If a single piece of data must be accessible from more than one task concurrently, then it must be shared using synchronization primitives such as Arc.” ref. https://tokio.rs/tokio/tutorial/spawning

Lists instances by the Auto Scaling Groups name.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more