Skip to main content

Ec2Client

Struct Ec2Client 

Source
pub struct Ec2Client<'a> { /* private fields */ }
Expand description

Client for the Amazon EC2 API

Implementations§

Source§

impl<'a> Ec2Client<'a>

Source

pub async fn describe_instances( &self, body: &DescribeInstancesRequest, ) -> Result<DescribeInstancesResponse>

Describes the specified instances or all instances.

Source

pub async fn describe_volumes( &self, body: &DescribeVolumesRequest, ) -> Result<DescribeVolumesResponse>

Describes the specified EBS volumes or all EBS volumes.

Source

pub async fn describe_snapshots( &self, body: &DescribeSnapshotsRequest, ) -> Result<DescribeSnapshotsResponse>

Describes the specified EBS snapshots.

Source

pub async fn describe_images( &self, body: &DescribeImagesRequest, ) -> Result<DescribeImagesResponse>

Describes the specified images (AMIs).

Source

pub async fn describe_security_groups( &self, body: &DescribeSecurityGroupsRequest, ) -> Result<DescribeSecurityGroupsResponse>

Describes the specified security groups.

Source

pub async fn describe_addresses( &self, body: &DescribeAddressesRequest, ) -> Result<DescribeAddressesResponse>

Describes the specified Elastic IP addresses.

Source

pub async fn describe_nat_gateways( &self, body: &DescribeNatGatewaysRequest, ) -> Result<DescribeNatGatewaysResponse>

Describes the specified NAT gateways.

Source

pub async fn describe_route_tables( &self, body: &DescribeRouteTablesRequest, ) -> Result<DescribeRouteTablesResponse>

Describes the specified route tables.

Source

pub async fn describe_network_acls( &self, body: &DescribeNetworkAclsRequest, ) -> Result<DescribeNetworkAclsResponse>

Describes the specified network ACLs.

Source

pub async fn describe_flow_logs( &self, body: &DescribeFlowLogsRequest, ) -> Result<DescribeFlowLogsResponse>

Describes the specified flow logs.

Source

pub async fn describe_vpcs( &self, body: &DescribeVpcsRequest, ) -> Result<DescribeVpcsResponse>

Describes the specified VPCs.

Source

pub async fn describe_vpc_endpoints( &self, body: &DescribeVpcEndpointsRequest, ) -> Result<DescribeVpcEndpointsResponse>

Describes the specified VPC endpoints.

Source

pub async fn describe_vpc_peering_connections( &self, body: &DescribeVpcPeeringConnectionsRequest, ) -> Result<DescribeVpcPeeringConnectionsResponse>

Describes one or more VPC peering connections.

Optionally filter by connection IDs. Passing an empty slice returns all peering connections in the current account/region.

CIS 6.6: used to enumerate peering connections and cross-reference with describe_route_tables to verify that route tables don’t enable direct access between peered VPCs where it shouldn’t exist.

Source

pub async fn list_vpc_peering_connections( &self, ) -> Result<Vec<VpcPeeringConnection>>

Return all VPC peering connections as a flat Vec.

Source

pub async fn describe_launch_templates( &self, body: &DescribeLaunchTemplatesRequest, ) -> Result<DescribeLaunchTemplatesResponse>

Describes the specified launch templates.

Source

pub async fn describe_launch_template_versions( &self, body: &DescribeLaunchTemplateVersionsRequest, ) -> Result<DescribeLaunchTemplateVersionsResponse>

Describes the specified launch template versions.

Source

pub async fn describe_snapshot_attribute( &self, body: &DescribeSnapshotAttributeRequest, ) -> Result<DescribeSnapshotAttributeResponse>

Describes the specified attribute of the specified snapshot.

Source

pub async fn get_ebs_encryption_by_default( &self, body: &GetEbsEncryptionByDefaultRequest, ) -> Result<GetEbsEncryptionByDefaultResponse>

Describes whether EBS encryption by default is enabled for the account.

Source

pub async fn terminate_instances( &self, body: &TerminateInstancesRequest, ) -> Result<TerminateInstancesResponse>

Shuts down the specified instances.

Source

pub async fn stop_instances( &self, body: &StopInstancesRequest, ) -> Result<StopInstancesResponse>

Stops the specified instances.

Source

pub async fn start_instances( &self, body: &StartInstancesRequest, ) -> Result<StartInstancesResponse>

Starts the specified instances.

Source

pub async fn modify_instance_attribute( &self, body: &ModifyInstanceAttributeRequest, ) -> Result<()>

Modifies the specified attribute of the specified instance.

Source

pub async fn modify_instance_metadata_options( &self, body: &ModifyInstanceMetadataOptionsRequest, ) -> Result<ModifyInstanceMetadataOptionsResponse>

Modify the instance metadata parameters on a running or stopped instance.

Source

pub async fn monitor_instances( &self, body: &MonitorInstancesRequest, ) -> Result<MonitorInstancesResponse>

Enables detailed monitoring for the specified instances.

Source

pub async fn associate_iam_instance_profile( &self, body: &AssociateIamInstanceProfileRequest, ) -> Result<AssociateIamInstanceProfileResponse>

Associates an IAM instance profile with a running or stopped instance.

Source

pub async fn detach_volume( &self, body: &DetachVolumeRequest, ) -> Result<VolumeAttachment>

Detaches an EBS volume from an instance.

Source

pub async fn delete_volume(&self, body: &DeleteVolumeRequest) -> Result<()>

Deletes the specified EBS volume.

Source

pub async fn modify_volume( &self, body: &ModifyVolumeRequest, ) -> Result<ModifyVolumeResponse>

Modifies the size, IOPS, throughput, or type of an EBS volume.

Source

pub async fn create_snapshot( &self, body: &CreateSnapshotRequest, ) -> Result<Snapshot>

Creates a snapshot of an EBS volume.

Source

pub async fn delete_snapshot(&self, body: &DeleteSnapshotRequest) -> Result<()>

Deletes the specified snapshot.

Source

pub async fn modify_snapshot_attribute( &self, body: &ModifySnapshotAttributeRequest, ) -> Result<()>

Modifies the specified snapshot attribute.

Source

pub async fn enable_snapshot_block_public_access( &self, body: &EnableSnapshotBlockPublicAccessRequest, ) -> Result<EnableSnapshotBlockPublicAccessResponse>

Enables the block public access for snapshots setting.

Source

pub async fn deregister_image( &self, body: &DeregisterImageRequest, ) -> Result<DeregisterImageResponse>

Deregisters the specified AMI.

Source

pub async fn modify_image_attribute( &self, body: &ModifyImageAttributeRequest, ) -> Result<()>

Modifies the specified attribute of the specified AMI.

Source

pub async fn enable_image_block_public_access( &self, body: &EnableImageBlockPublicAccessRequest, ) -> Result<EnableImageBlockPublicAccessResponse>

Enables the block public access for AMIs setting.

Source

pub async fn revoke_security_group_ingress( &self, body: &RevokeSecurityGroupIngressRequest, ) -> Result<RevokeSecurityGroupIngressResponse>

Removes the specified inbound rules from a security group.

Source

pub async fn revoke_security_group_egress( &self, body: &RevokeSecurityGroupEgressRequest, ) -> Result<RevokeSecurityGroupEgressResponse>

Removes the specified outbound rules from a security group.

Source

pub async fn authorize_security_group_ingress( &self, body: &AuthorizeSecurityGroupIngressRequest, ) -> Result<AuthorizeSecurityGroupIngressResponse>

Adds the specified inbound rules to a security group.

Source

pub async fn delete_security_group( &self, body: &DeleteSecurityGroupRequest, ) -> Result<DeleteSecurityGroupResponse>

Deletes the specified security group.

Source

pub async fn release_address(&self, body: &ReleaseAddressRequest) -> Result<()>

Releases the specified Elastic IP address.

Source

pub async fn delete_nat_gateway( &self, body: &DeleteNatGatewayRequest, ) -> Result<DeleteNatGatewayResponse>

Deletes the specified NAT gateway.

Source

pub async fn delete_vpc_endpoints( &self, body: &DeleteVpcEndpointsRequest, ) -> Result<DeleteVpcEndpointsResponse>

Deletes the specified VPC endpoints.

Source

pub async fn create_flow_logs( &self, body: &CreateFlowLogsRequest, ) -> Result<CreateFlowLogsResponse>

Creates one or more flow logs.

Source

pub async fn create_tags(&self, body: &CreateTagsRequest) -> Result<()>

Adds or overwrites only the specified tags for the specified resources.

Source

pub async fn enable_ebs_encryption_by_default( &self, body: &EnableEbsEncryptionByDefaultRequest, ) -> Result<EnableEbsEncryptionByDefaultResponse>

Enables EBS encryption by default for the account.

Auto Trait Implementations§

§

impl<'a> Freeze for Ec2Client<'a>

§

impl<'a> !RefUnwindSafe for Ec2Client<'a>

§

impl<'a> Send for Ec2Client<'a>

§

impl<'a> Sync for Ec2Client<'a>

§

impl<'a> Unpin for Ec2Client<'a>

§

impl<'a> UnsafeUnpin for Ec2Client<'a>

§

impl<'a> !UnwindSafe for Ec2Client<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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