pub struct Ec2Client<'a> { /* private fields */ }Expand description
Client for the Amazon EC2 API
Implementations§
Source§impl<'a> Ec2Client<'a>
impl<'a> Ec2Client<'a>
Sourcepub async fn describe_instances(
&self,
body: &DescribeInstancesRequest,
) -> Result<DescribeInstancesResponse>
pub async fn describe_instances( &self, body: &DescribeInstancesRequest, ) -> Result<DescribeInstancesResponse>
Describes the specified instances or all instances.
Sourcepub async fn describe_volumes(
&self,
body: &DescribeVolumesRequest,
) -> Result<DescribeVolumesResponse>
pub async fn describe_volumes( &self, body: &DescribeVolumesRequest, ) -> Result<DescribeVolumesResponse>
Describes the specified EBS volumes or all EBS volumes.
Sourcepub async fn describe_snapshots(
&self,
body: &DescribeSnapshotsRequest,
) -> Result<DescribeSnapshotsResponse>
pub async fn describe_snapshots( &self, body: &DescribeSnapshotsRequest, ) -> Result<DescribeSnapshotsResponse>
Describes the specified EBS snapshots.
Sourcepub async fn describe_images(
&self,
body: &DescribeImagesRequest,
) -> Result<DescribeImagesResponse>
pub async fn describe_images( &self, body: &DescribeImagesRequest, ) -> Result<DescribeImagesResponse>
Describes the specified images (AMIs).
Sourcepub async fn describe_security_groups(
&self,
body: &DescribeSecurityGroupsRequest,
) -> Result<DescribeSecurityGroupsResponse>
pub async fn describe_security_groups( &self, body: &DescribeSecurityGroupsRequest, ) -> Result<DescribeSecurityGroupsResponse>
Describes the specified security groups.
Sourcepub async fn describe_addresses(
&self,
body: &DescribeAddressesRequest,
) -> Result<DescribeAddressesResponse>
pub async fn describe_addresses( &self, body: &DescribeAddressesRequest, ) -> Result<DescribeAddressesResponse>
Describes the specified Elastic IP addresses.
Sourcepub async fn describe_nat_gateways(
&self,
body: &DescribeNatGatewaysRequest,
) -> Result<DescribeNatGatewaysResponse>
pub async fn describe_nat_gateways( &self, body: &DescribeNatGatewaysRequest, ) -> Result<DescribeNatGatewaysResponse>
Describes the specified NAT gateways.
Sourcepub async fn describe_route_tables(
&self,
body: &DescribeRouteTablesRequest,
) -> Result<DescribeRouteTablesResponse>
pub async fn describe_route_tables( &self, body: &DescribeRouteTablesRequest, ) -> Result<DescribeRouteTablesResponse>
Describes the specified route tables.
Sourcepub async fn describe_network_acls(
&self,
body: &DescribeNetworkAclsRequest,
) -> Result<DescribeNetworkAclsResponse>
pub async fn describe_network_acls( &self, body: &DescribeNetworkAclsRequest, ) -> Result<DescribeNetworkAclsResponse>
Describes the specified network ACLs.
Sourcepub async fn describe_flow_logs(
&self,
body: &DescribeFlowLogsRequest,
) -> Result<DescribeFlowLogsResponse>
pub async fn describe_flow_logs( &self, body: &DescribeFlowLogsRequest, ) -> Result<DescribeFlowLogsResponse>
Describes the specified flow logs.
Sourcepub async fn describe_vpcs(
&self,
body: &DescribeVpcsRequest,
) -> Result<DescribeVpcsResponse>
pub async fn describe_vpcs( &self, body: &DescribeVpcsRequest, ) -> Result<DescribeVpcsResponse>
Describes the specified VPCs.
Sourcepub async fn describe_vpc_endpoints(
&self,
body: &DescribeVpcEndpointsRequest,
) -> Result<DescribeVpcEndpointsResponse>
pub async fn describe_vpc_endpoints( &self, body: &DescribeVpcEndpointsRequest, ) -> Result<DescribeVpcEndpointsResponse>
Describes the specified VPC endpoints.
Sourcepub async fn describe_vpc_peering_connections(
&self,
body: &DescribeVpcPeeringConnectionsRequest,
) -> Result<DescribeVpcPeeringConnectionsResponse>
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.
Sourcepub async fn list_vpc_peering_connections(
&self,
) -> Result<Vec<VpcPeeringConnection>>
pub async fn list_vpc_peering_connections( &self, ) -> Result<Vec<VpcPeeringConnection>>
Return all VPC peering connections as a flat Vec.
Sourcepub async fn describe_launch_templates(
&self,
body: &DescribeLaunchTemplatesRequest,
) -> Result<DescribeLaunchTemplatesResponse>
pub async fn describe_launch_templates( &self, body: &DescribeLaunchTemplatesRequest, ) -> Result<DescribeLaunchTemplatesResponse>
Describes the specified launch templates.
Sourcepub async fn describe_launch_template_versions(
&self,
body: &DescribeLaunchTemplateVersionsRequest,
) -> Result<DescribeLaunchTemplateVersionsResponse>
pub async fn describe_launch_template_versions( &self, body: &DescribeLaunchTemplateVersionsRequest, ) -> Result<DescribeLaunchTemplateVersionsResponse>
Describes the specified launch template versions.
Sourcepub async fn describe_snapshot_attribute(
&self,
body: &DescribeSnapshotAttributeRequest,
) -> Result<DescribeSnapshotAttributeResponse>
pub async fn describe_snapshot_attribute( &self, body: &DescribeSnapshotAttributeRequest, ) -> Result<DescribeSnapshotAttributeResponse>
Describes the specified attribute of the specified snapshot.
Sourcepub async fn get_ebs_encryption_by_default(
&self,
body: &GetEbsEncryptionByDefaultRequest,
) -> Result<GetEbsEncryptionByDefaultResponse>
pub async fn get_ebs_encryption_by_default( &self, body: &GetEbsEncryptionByDefaultRequest, ) -> Result<GetEbsEncryptionByDefaultResponse>
Describes whether EBS encryption by default is enabled for the account.
Sourcepub async fn terminate_instances(
&self,
body: &TerminateInstancesRequest,
) -> Result<TerminateInstancesResponse>
pub async fn terminate_instances( &self, body: &TerminateInstancesRequest, ) -> Result<TerminateInstancesResponse>
Shuts down the specified instances.
Sourcepub async fn stop_instances(
&self,
body: &StopInstancesRequest,
) -> Result<StopInstancesResponse>
pub async fn stop_instances( &self, body: &StopInstancesRequest, ) -> Result<StopInstancesResponse>
Stops the specified instances.
Sourcepub async fn start_instances(
&self,
body: &StartInstancesRequest,
) -> Result<StartInstancesResponse>
pub async fn start_instances( &self, body: &StartInstancesRequest, ) -> Result<StartInstancesResponse>
Starts the specified instances.
Sourcepub async fn modify_instance_attribute(
&self,
body: &ModifyInstanceAttributeRequest,
) -> Result<()>
pub async fn modify_instance_attribute( &self, body: &ModifyInstanceAttributeRequest, ) -> Result<()>
Modifies the specified attribute of the specified instance.
Sourcepub async fn modify_instance_metadata_options(
&self,
body: &ModifyInstanceMetadataOptionsRequest,
) -> Result<ModifyInstanceMetadataOptionsResponse>
pub async fn modify_instance_metadata_options( &self, body: &ModifyInstanceMetadataOptionsRequest, ) -> Result<ModifyInstanceMetadataOptionsResponse>
Modify the instance metadata parameters on a running or stopped instance.
Sourcepub async fn monitor_instances(
&self,
body: &MonitorInstancesRequest,
) -> Result<MonitorInstancesResponse>
pub async fn monitor_instances( &self, body: &MonitorInstancesRequest, ) -> Result<MonitorInstancesResponse>
Enables detailed monitoring for the specified instances.
Sourcepub async fn associate_iam_instance_profile(
&self,
body: &AssociateIamInstanceProfileRequest,
) -> Result<AssociateIamInstanceProfileResponse>
pub async fn associate_iam_instance_profile( &self, body: &AssociateIamInstanceProfileRequest, ) -> Result<AssociateIamInstanceProfileResponse>
Associates an IAM instance profile with a running or stopped instance.
Sourcepub async fn detach_volume(
&self,
body: &DetachVolumeRequest,
) -> Result<VolumeAttachment>
pub async fn detach_volume( &self, body: &DetachVolumeRequest, ) -> Result<VolumeAttachment>
Detaches an EBS volume from an instance.
Sourcepub async fn delete_volume(&self, body: &DeleteVolumeRequest) -> Result<()>
pub async fn delete_volume(&self, body: &DeleteVolumeRequest) -> Result<()>
Deletes the specified EBS volume.
Sourcepub async fn modify_volume(
&self,
body: &ModifyVolumeRequest,
) -> Result<ModifyVolumeResponse>
pub async fn modify_volume( &self, body: &ModifyVolumeRequest, ) -> Result<ModifyVolumeResponse>
Modifies the size, IOPS, throughput, or type of an EBS volume.
Sourcepub async fn create_snapshot(
&self,
body: &CreateSnapshotRequest,
) -> Result<Snapshot>
pub async fn create_snapshot( &self, body: &CreateSnapshotRequest, ) -> Result<Snapshot>
Creates a snapshot of an EBS volume.
Sourcepub async fn delete_snapshot(&self, body: &DeleteSnapshotRequest) -> Result<()>
pub async fn delete_snapshot(&self, body: &DeleteSnapshotRequest) -> Result<()>
Deletes the specified snapshot.
Sourcepub async fn modify_snapshot_attribute(
&self,
body: &ModifySnapshotAttributeRequest,
) -> Result<()>
pub async fn modify_snapshot_attribute( &self, body: &ModifySnapshotAttributeRequest, ) -> Result<()>
Modifies the specified snapshot attribute.
Sourcepub async fn enable_snapshot_block_public_access(
&self,
body: &EnableSnapshotBlockPublicAccessRequest,
) -> Result<EnableSnapshotBlockPublicAccessResponse>
pub async fn enable_snapshot_block_public_access( &self, body: &EnableSnapshotBlockPublicAccessRequest, ) -> Result<EnableSnapshotBlockPublicAccessResponse>
Enables the block public access for snapshots setting.
Sourcepub async fn deregister_image(
&self,
body: &DeregisterImageRequest,
) -> Result<DeregisterImageResponse>
pub async fn deregister_image( &self, body: &DeregisterImageRequest, ) -> Result<DeregisterImageResponse>
Deregisters the specified AMI.
Sourcepub async fn modify_image_attribute(
&self,
body: &ModifyImageAttributeRequest,
) -> Result<()>
pub async fn modify_image_attribute( &self, body: &ModifyImageAttributeRequest, ) -> Result<()>
Modifies the specified attribute of the specified AMI.
Sourcepub async fn enable_image_block_public_access(
&self,
body: &EnableImageBlockPublicAccessRequest,
) -> Result<EnableImageBlockPublicAccessResponse>
pub async fn enable_image_block_public_access( &self, body: &EnableImageBlockPublicAccessRequest, ) -> Result<EnableImageBlockPublicAccessResponse>
Enables the block public access for AMIs setting.
Sourcepub async fn revoke_security_group_ingress(
&self,
body: &RevokeSecurityGroupIngressRequest,
) -> Result<RevokeSecurityGroupIngressResponse>
pub async fn revoke_security_group_ingress( &self, body: &RevokeSecurityGroupIngressRequest, ) -> Result<RevokeSecurityGroupIngressResponse>
Removes the specified inbound rules from a security group.
Sourcepub async fn revoke_security_group_egress(
&self,
body: &RevokeSecurityGroupEgressRequest,
) -> Result<RevokeSecurityGroupEgressResponse>
pub async fn revoke_security_group_egress( &self, body: &RevokeSecurityGroupEgressRequest, ) -> Result<RevokeSecurityGroupEgressResponse>
Removes the specified outbound rules from a security group.
Adds the specified inbound rules to a security group.
Sourcepub async fn delete_security_group(
&self,
body: &DeleteSecurityGroupRequest,
) -> Result<DeleteSecurityGroupResponse>
pub async fn delete_security_group( &self, body: &DeleteSecurityGroupRequest, ) -> Result<DeleteSecurityGroupResponse>
Deletes the specified security group.
Sourcepub async fn release_address(&self, body: &ReleaseAddressRequest) -> Result<()>
pub async fn release_address(&self, body: &ReleaseAddressRequest) -> Result<()>
Releases the specified Elastic IP address.
Sourcepub async fn delete_nat_gateway(
&self,
body: &DeleteNatGatewayRequest,
) -> Result<DeleteNatGatewayResponse>
pub async fn delete_nat_gateway( &self, body: &DeleteNatGatewayRequest, ) -> Result<DeleteNatGatewayResponse>
Deletes the specified NAT gateway.
Sourcepub async fn delete_vpc_endpoints(
&self,
body: &DeleteVpcEndpointsRequest,
) -> Result<DeleteVpcEndpointsResponse>
pub async fn delete_vpc_endpoints( &self, body: &DeleteVpcEndpointsRequest, ) -> Result<DeleteVpcEndpointsResponse>
Deletes the specified VPC endpoints.
Sourcepub async fn create_flow_logs(
&self,
body: &CreateFlowLogsRequest,
) -> Result<CreateFlowLogsResponse>
pub async fn create_flow_logs( &self, body: &CreateFlowLogsRequest, ) -> Result<CreateFlowLogsResponse>
Creates one or more flow logs.
Adds or overwrites only the specified tags for the specified resources.
Sourcepub async fn enable_ebs_encryption_by_default(
&self,
body: &EnableEbsEncryptionByDefaultRequest,
) -> Result<EnableEbsEncryptionByDefaultResponse>
pub async fn enable_ebs_encryption_by_default( &self, body: &EnableEbsEncryptionByDefaultRequest, ) -> Result<EnableEbsEncryptionByDefaultResponse>
Enables EBS encryption by default for the account.