AWS SDK for .NET Documentation
AmazonEC2Client Class
AmazonAmazon.EC2AmazonEC2Client Did this page help you?   Yes   No    Tell us about it...
AmazonEC2Client is an implementation of AmazonEC2; the client allows you to manage your AmazonEC2 resources.
If you want to use the AmazonEC2Client from a Medium Trust hosting environment, please create the client with an AmazonEC2Config object whose UseSecureStringForAwsSecretKey property is false.
Declaration Syntax
C#
public class AmazonEC2Client : AmazonEC2, 
	IDisposable
Members
All MembersConstructorsMethods



IconMemberDescription
AmazonEC2Client()()()()
Constructs AmazonEC2Client with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.
CopyC#
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSAccessKey" value="********************"/>
        <add key="AWSSecretKey" value="****************************************"/>
    </appSettings>
</configuration>

AmazonEC2Client(RegionEndpoint)
Constructs AmazonEC2Client with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.
CopyC#
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSAccessKey" value="********************"/>
        <add key="AWSSecretKey" value="****************************************"/>
    </appSettings>
</configuration>

AmazonEC2Client(AmazonEC2Config)
Constructs AmazonEC2Client with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.
CopyC#
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSAccessKey" value="********************"/>
        <add key="AWSSecretKey" value="****************************************"/>
    </appSettings>
</configuration>

AmazonEC2Client(String, String)
Constructs AmazonEC2Client with AWS Access Key ID and AWS Secret Key

AmazonEC2Client(String, String, RegionEndpoint)
Constructs AmazonEC2Client with AWS Access Key ID and AWS Secret Key

AmazonEC2Client(String, String, AmazonEC2Config)
Constructs AmazonEC2Client with AWS Access Key ID, AWS Secret Key and an AmazonEC2 Configuration object. If the config object's UseSecureStringForAwsSecretKey is false, the AWS Secret Key is stored as a clear-text string. Please use this option only if the application environment doesn't allow the use of SecureStrings.

AmazonEC2Client(String, SecureString, AmazonEC2Config)
Constructs an AmazonEC2Client with AWS Access Key ID, AWS Secret Key and an AmazonEC2 Configuration object

AmazonEC2Client(String, SecureString, RegionEndpoint)
Constructs an AmazonEC2Client with AWS Access Key ID, AWS Secret Key and an AmazonEC2 Configuration object

AmazonEC2Client(AWSCredentials)
Constructs an AmazonEC2Client with AWSCredentials

AmazonEC2Client(AWSCredentials, RegionEndpoint)
Constructs an AmazonEC2Client with AWSCredentials

AmazonEC2Client(AWSCredentials, AmazonEC2Config)
Constructs an AmazonEC2Client with AWSCredentials and an AmazonEC2 Configuration object

AmazonEC2Client(String, String, String)
Constructs AmazonEC2Client with AWS Access Key ID and AWS Secret Key

AmazonEC2Client(String, String, String, RegionEndpoint)
Constructs AmazonEC2Client with AWS Access Key ID and AWS Secret Key

AmazonEC2Client(String, String, String, AmazonEC2Config)
Constructs AmazonEC2Client with AWS Access Key ID, AWS Secret Key and an AmazonEC2Config Configuration object. If the config object's UseSecureStringForAwsSecretKey is false, the AWS Secret Key is stored as a clear-text string. Please use this option only if the application environment doesn't allow the use of SecureStrings.

AcceptVpcPeeringConnection(AcceptVpcPeeringConnectionRequest)

Accept a VPC peering connection request. To accept a request, the VPC peering connection must be in the pending-acceptance state, and you must be the owner of the peer VPC. Use the DescribeVpcPeeringConnections request to view your outstanding VPC peering connection requests.


ActivateLicense(ActivateLicenseRequest)
Activates a license.

AllocateAddress(AllocateAddressRequest)
Acquires an elastic IP address for use with your account or your VPC.

AssignPrivateIpAddresses(AssignPrivateIpAddressesRequest)
Assigns one or more secondary private IP addresses to a network interface in Amazon VPC.

AssociateAddress(AssociateAddressRequest)
Associates an elastic IP address with an instance. If the IP address is currently assigned to another instance, the IP address is assigned to the new instance.

AssociateDhcpOptions(AssociateDhcpOptionsRequest)
Associates a set of DHCP options (that you've previously created) with the specified VPC. Or, associates the default DHCP options with the VPC.

AssociateRouteTable(AssociateRouteTableRequest)
Associates a subnet with a route table.

AttachInternetGateway(AttachInternetGatewayRequest)
Attaches an Internet gateway to a VPC, enabling connectivity between the Internet and the VPC.

AttachNetworkInterface(AttachNetworkInterfaceRequest)
Attaches a network interface to an instance.

AttachVolume(AttachVolumeRequest)

Attaches an Amazon EBS volume to a running or stopped instance and exposes it to the instance with the specified device name.

Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide .

For a list of supported device names, see Attaching an Amazon EBS Volume to an Instance . Any device names that aren't reserved for instance store volumes can be used for Amazon EBS volumes. For more information, see Amazon EC2 Instance Store in the Amazon Elastic Compute Cloud User Guide .

If a volume has an AWS Marketplace product code:

  • The volume can only be attached as the root device of a stopped instance.
  • You must be subscribed to the AWS Marketplace code that is on the volume.
  • The configuration (instance type, operating system) of the instance must support that specific AWS Marketplace code. For example, you cannot take a volume from a Windows instance and attach it to a Linux instance.
  • AWS Marketplace product codes are copied from the volume to the instance.

For an overview of the AWS Marketplace, see https://aws.amazon.com/marketplace/help/200900000 . For more information about how to use the AWS Marketplace, see AWS Marketplace .

For more information about Amazon EBS volumes, see Attaching Amazon EBS Volumes in the Amazon Elastic Compute Cloud User Guide .


AttachVpnGateway(AttachVpnGatewayRequest)
Attaches a virtual private gateway to a VPC.

AuthorizeSecurityGroupEgress(AuthorizeSecurityGroupEgressRequest)
Adds one or more egress rules to a VPC security group.

AuthorizeSecurityGroupIngress(AuthorizeSecurityGroupIngressRequest)
Adds one or more ingress rules to a security group. This action applies to both EC2 security groups and VPC security groups.

BundleInstance(BundleInstanceRequest)
Bundles an Amazon instance store-backed Windows instance. This procedure is not applicable for Linux and UNIX instances. During bundling, only the root device volume (C:\) is bundled. Data on other instance store volumes is not preserved.

CancelBundleTask(CancelBundleTaskRequest)
Cancels a bundling operation for an instance store-backed Windows instance.

CancelConversionTask(CancelConversionTaskRequest)
Cancels an active conversion task. The task can be the import of an instance or volume.

CancelExportTask(CancelExportTaskRequest)
Cancels an active export task. The command removes all artifacts of the export, including any partially created Amazon S3 objects. If the export task is complete or is in the process of transferring the final disk image, the command fails and returns an error.

CancelReservedInstancesListing(CancelReservedInstancesListingRequest)
Cancels the specified Reserved Instance listing in the Reserved Instance Marketplace.

CancelSpotInstanceRequests(CancelSpotInstanceRequestsRequest)
Cancels one or more Spot Instance requests.

ConfirmProductInstance(ConfirmProductInstanceRequest)
Determines whether a product code is associated with an instance.

CopyImage(CopyImageRequest)

Initiates the copy of an AMI from the specified source region to the region in which the request was made. You specify the destination region by using its endpoint when making the request. AMIs that use encrypted Amazon EBS snapshots cannot be copied with this method.

For more information, see Copying AMIs in the Amazon Elastic Compute Cloud User Guide .


CopySnapshot(CopySnapshotRequest)

Copies a point-in-time snapshot of an Amazon EBS volume and stores it in Amazon S3. You can copy the snapshot within the same region or from one region to another. You can use the snapshot to create Amazon EBS volumes or Amazon Machine Images (AMIs). The snapshot is copied to the regional endpoint that you send the HTTP request to.

Copies of encrypted Amazon EBS snapshots remain encrypted. Copies of unencrypted snapshots remain unencrypted.

For more information, see Copying an Amazon EBS Snapshot in the Amazon Elastic Compute Cloud User Guide .


CreateCustomerGateway(CreateCustomerGatewayRequest)
Provides information to AWS about your customer gateway device.

CreateDhcpOptions(CreateDhcpOptionsRequest)

Creates a set of DHCP options for your VPC. After creating the set, you must associate it with the VPC, causing all existing and new instances that you launch in the VPC to use this set of DHCP options. The following are the individual DHCP options you can specify. For more information about the options, see RFC 2132 .

  • domain-name-servers - The IP addresses of up to four domain name servers, or AmazonProvidedDNS . The default DHCP option set specifies AmazonProvidedDNS . If specifying more than one domain name server, specify the IP addresses in a single parameter, separated by commas.
  • domain-name - If you're using AmazonProvidedDNS in us-east-1 , specify ec2.internal . If you're using AmazonProvidedDNS in another region, specify region.compute.internal (for example, ap-northeast-1.compute.internal ). Otherwise, specify a domain name (for example, MyCompany.com ).
  • ntp-servers - The IP addresses of up to four Network Time Protocol (NTP) servers.
  • netbios-name-servers - The IP addresses of up to four NetBIOS name servers.
  • netbios-node-type - The NetBIOS node type (1, 2, 4, or 8). We recommend that you specify 2 (broadcast and multicast are not currently supported). For more information about these node types, see RFC 2132 .

For more information about DHCP options, see DHCP Options Sets in the Amazon Virtual Private Cloud User Guide .


CreateImage(CreateImageRequest)
Creates an AMI that uses an Amazon EBS root device from a "running" or "stopped" instance. AMIs that use an Amazon EBS root device boot faster than AMIs that use instance stores. They can be up to 1 TiB in size, use storage that persists on instance failure, and can be stopped and started.

CreateInstanceExportTask(CreateInstanceExportTaskRequest)
Creates a new export task, produces an image of an EC2 instance for use in another virtualization environment, and then writes the image to the specified Amazon S3 bucket. If the instance is running at the time of export, Amazon EC2 will attempt to shut down the instance, initiate the export process, and then reboot the instance. Only instances derived from your own ImportInstance tasks may be exported. When the task is complete, the image can be downloaded from your Amazon S3 bucket.

CreateInternetGateway(CreateInternetGatewayRequest)
Creates a new Internet gateway in your AWS account. After creating the Internet gateway, you attach it to a VPC using AttachInternetGateway.

CreateKeyPair(CreateKeyPairRequest)
Creates a new 2048-bit RSA key pair with the specified name. The public key is stored by Amazon EC2 and the private key is returned to you.

CreateNetworkAcl(CreateNetworkAclRequest)
Creates a network ACL in a VPC.

CreateNetworkAclEntry(CreateNetworkAclEntryRequest)
Creates an entry (i.e., rule) in a network ACL with a rule number you specify.

CreateNetworkInterface(CreateNetworkInterfaceRequest)
Creates a network interface in the specified subnet.

CreatePlacementGroup(CreatePlacementGroupRequest)
Creates a PlacementGroup into which multiple Amazon EC2 instances can be launched. Users must give the group a name unique within the scope of the user account.

CreateReservedInstancesListing(CreateReservedInstancesListingRequest)
Creates a new listing for Amazon EC2 Reserved Instances that will be sold in the Reserved Instance Marketplace. You can submit one Reserved Instance listing at a time.

CreateRoute(CreateRouteRequest)
Creates a new route in a route table within a VPC. The route's target can be either a gateway attached to the VPC or a NAT instance in the VPC.

CreateRouteTable(CreateRouteTableRequest)
Creates a route table within a VPC. After you create a new route table, you can add routes and associate the table with a subnet.

CreateSecurityGroup(CreateSecurityGroupRequest)
Creates a new security group. Group names must be unique per account.

CreateSnapshot(CreateSnapshotRequest)

Creates a snapshot of an Amazon EBS volume and stores it in Amazon S3. You can use snapshots for backups, to make copies of Amazon EBS volumes, and to save data before shutting down an instance.

When a snapshot is created, any AWS Marketplace product codes that are associated with the source volume are propagated to the snapshot.

You can take a snapshot of an attached volume that is in use. However, snapshots only capture data that has been written to your Amazon EBS volume at the time the snapshot command is issued; this may exclude any data that has been cached by any applications or the operating system. If you can pause any file writes to the volume long enough to take a snapshot, your snapshot should be complete. However, if you cannot pause all file writes to the volume, you should unmount the volume from within the instance, issue the snapshot command, and then remount the volume to ensure a consistent and complete snapshot. You may remount and use your volume while the snapshot status is pending .

To create a snapshot for Amazon EBS volumes that serve as root devices, you should stop the instance before taking the snapshot.

Snapshots that are taken from encrypted volumes are automatically encrypted. Volumes that are created from encrypted snapshots are also automatically encrypted. Your encrypted volumes and any associated snapshots always remain protected.

For more information, see Amazon Elastic Block Store and Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide .


CreateSpotDatafeedSubscription(CreateSpotDatafeedSubscriptionRequest)
Creates the datafeed for Spot Instances, enabling you to view Spot Instance usage logs. You can create one data feed per account.

CreateSubnet(CreateSubnetRequest)
Creates a subnet in an existing VPC.

CreateTags(CreateTagsRequest)
Adds or overwrites tags for the specified resources. Each resource can have a maximum of 10 tags. Each tag consists of a key-value pair. Tag keys must be unique per resource.

CreateVolume(CreateVolumeRequest)

Creates an Amazon EBS volume that can be attached to an instance in the same Availability Zone. The volume is created in the specified region.

You can create a new empty volume or restore a volume from an Amazon EBS snapshot. Any AWS Marketplace product codes from the snapshot are propagated to the volume.

You can create encrypted volumes with the Encrypted parameter. Encrypted volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are also automatically encrypted. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide .

For more information, see Creating or Restoring an Amazon EBS Volume in the Amazon Elastic Compute Cloud User Guide .


CreateVpc(CreateVpcRequest)
Creates a VPC with the CIDR block you specify.

CreateVpcPeeringConnection(CreateVpcPeeringConnectionRequest)

Requests a VPC peering connection between two VPCs: a requester VPC that you own and a peer VPC with which to create the connection. The peer VPC can belong to another AWS account. The requester VPC and peer VPC cannot have overlapping CIDR blocks.

The owner of the peer VPC must accept the peering request to activate the peering connection. The VPC peering connection request expires after 7 days, after which it cannot be accepted or rejected.

A CreateVpcPeeringConnection request between VPCs with overlapping CIDR blocks results in the VPC peering connection having a status of failed .


CreateVpnConnection(CreateVpnConnectionRequest)
Creates a VPN connection between an existing virtual private gateway and a VPN customer gateway. The only supported connection type is ipsec.1.

CreateVpnConnectionRoute(CreateVpnConnectionRouteRequest)
Creates a new static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.

CreateVpnGateway(CreateVpnGatewayRequest)
Creates a new VPN gateway.

DeactivateLicense(DeactivateLicenseRequest)
Deactivates a specific number of licenses.

DeleteCustomerGateway(DeleteCustomerGatewayRequest)
Deletes a customer gateway.

DeleteDhcpOptions(DeleteDhcpOptionsRequest)
Deletes a set of DHCP options that you specify.

DeleteInternetGateway(DeleteInternetGatewayRequest)
Deletes an Internet gateway from your AWS account. The gateway must not be attached to a VPC. For more information about your VPC and Internet gateway, go to Amazon Virtual Private Cloud User Guide.

DeleteKeyPair(DeleteKeyPairRequest)
Deletes the specified key pair, by removing the public key from Amazon EC2. You must own the key pair.

DeleteNetworkAcl(DeleteNetworkAclRequest)
Deletes a network ACL from a VPC.

DeleteNetworkAclEntry(DeleteNetworkAclEntryRequest)
Deletes an ingress or egress entry (i.e., rule) from a network ACL.

DeleteNetworkInterface(DeleteNetworkInterfaceRequest)
Deletes the specified network interface.

DeletePlacementGroup(DeletePlacementGroupRequest)
Deletes a PlacementGroupfrom a user's account. Terminate all Amazon EC2 instances in the placement group before deletion.

DeleteRoute(DeleteRouteRequest)
Deletes a route from a route table in a VPC.

DeleteRouteTable(DeleteRouteTableRequest)
Deletes a route table from a VPC. The route table must not be associated with a subnet. You can't delete the main route table.

DeleteSecurityGroup(DeleteSecurityGroupRequest)
Deletes a security group that you own.

DeleteSnapshot(DeleteSnapshotRequest)
Deletes a snapshot of an Amazon EBS volume that you own.

DeleteSpotDatafeedSubscription(DeleteSpotDatafeedSubscriptionRequest)
Deletes the datafeed for Spot Instances.

DeleteSubnet(DeleteSubnetRequest)
Deletes a subnet from a VPC.

DeleteTags(DeleteTagsRequest)
Deletes tags from the specified resources.

DeleteVolume(DeleteVolumeRequest)

Deletes the specified Amazon EBS volume. The volume must be in the available state (not attached to an instance).

NOTE: The volume may remain in the deleting state for several minutes.

For more information, see Deleting an Amazon EBS Volume in the Amazon Elastic Compute Cloud User Guide .


DeleteVpc(DeleteVpcRequest)
Deletes a VPC.

DeleteVpcPeeringConnection(DeleteVpcPeeringConnectionRequest)

Deletes a VPC peering connection. Either the owner of the requester VPC or the owner of the peer VPC can delete the VPC peering connection if it's in the active state. The owner of the requester VPC can delete a VPC peering connection in the pending-acceptance state.


DeleteVpnConnection(DeleteVpnConnectionRequest)
Deletes a VPN connection.

DeleteVpnConnectionRoute(DeleteVpnConnectionRouteRequest)
Deletes a static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.

DeleteVpnGateway(DeleteVpnGatewayRequest)
Deletes a VPN gateway.

DeregisterImage(DeregisterImageRequest)
Deregisters the specified AMI. Once deregistered, the AMI cannot be used to launch new instances.

DescribeAccountAttributes(DescribeAccountAttributesRequest)
Describes account attributes of the caller

DescribeAddresses(DescribeAddressesRequest)
Lists elastic IP addresses assigned to your account or provides information about a specific address.

DescribeAvailabilityZones(DescribeAvailabilityZonesRequest)
Lists Availability Zones that are currently available to the account and their states.

DescribeBundleTasks(DescribeBundleTasksRequest)
Describes current bundling tasks.

DescribeConversionTasks(DescribeConversionTasksRequest)
Describes your conversion tasks. For more information, go to Importing Your Virtual Machines and Volumes into Amazon EC2 in the Amazon Elastic Compute Cloud User Guide.

DescribeCustomerGateways(DescribeCustomerGatewaysRequest)
Returns information about your customer gateways.

DescribeDhcpOptions(DescribeDhcpOptionsRequest)
Gives you information about one or more sets of DHCP options. You can specify one or more DHCP options set IDs, or no IDs (to describe all your sets of DHCP options).

DescribeExportTasks(DescribeExportTasksRequest)
Describes your export tasks. If no export task IDs are specified, all export tasks initiated by you are returned.

DescribeImageAttribute(DescribeImageAttributeRequest)
Gets information about an attribute of an AMI. Only one attribute can be specified per call.

DescribeImages(DescribeImagesRequest)
Returns information about AMIs, AKIs, and ARIs. This includes image type, product codes, architecture, and kernel and RAM disk IDs. Images available to you include public images, private images that you own, and private images owned by other users for which you have explicit launch permissions.

DescribeInstanceAttribute(DescribeInstanceAttributeRequest)
Gets information about an attribute of an instance. Only one attribute can be specified per call.

DescribeInstances(DescribeInstancesRequest)
Returns information about instances that you own.

DescribeInstanceStatus(DescribeInstanceStatusRequest)

Describes the status of one or more instances, including any scheduled events.

Instance status has two main components:

  • System Status reports impaired functionality that stems from issues related to the systems that support an instance, such as such as hardware failures and network connectivity problems. This call reports such problems as impaired reachability.

  • Instance Status reports impaired functionality that arises from problems internal to the instance. This call reports such problems as impaired reachability.

Instance status provides information about four types of scheduled events for an instance that may require your attention:

  • Scheduled Reboot: When Amazon EC2 determines that an instance must be rebooted, the instances status returns one of two event codes: system-reboot or instance-reboot . System reboot commonly occurs if certain maintenance or upgrade operations require a reboot of the underlying host that supports an instance. Instance reboot commonly occurs if the instance must be rebooted, rather than the underlying host. Rebooting events include a scheduled start and end time.

  • System Maintenance: When Amazon EC2 determines that an instance requires maintenance that requires power or network impact, the instance status is the event code system-maintenance . System maintenance is either power maintenance or network maintenance. For power maintenance, your instance will be unavailable for a brief period of time and then rebooted. For network maintenance, your instance will experience a brief loss of network connectivity. System maintenance events include a scheduled start and end time. You will also be notified by email if one of your instances is set for system maintenance. The email message indicates when your instance is scheduled for maintenance.

  • Scheduled Retirement: When Amazon EC2 determines that an instance must be shut down, the instance status is the event code instance-retirement . Retirement commonly occurs when the underlying host is degraded and must be replaced. Retirement events include a scheduled start and end time. You will also be notified by email if one of your instances is set to retiring. The email message indicates when your instance will be permanently retired.

  • Scheduled Stop: When Amazon EC2 determines that an instance must be shut down, the instances status returns an event code called instance-stop . Stop events include a scheduled start and end time. You will also be notified by email if one of your instances is set to stop. The email message indicates when your instance will be stopped.

When your instance is retired, it will either be terminated (if its root device type is the instance-store) or stopped (if its root device type is an EBS volume). Instances stopped due to retirement will not be restarted, but you can do so manually. You can also avoid retirement of EBS-backed instances by manually restarting your instance when its event code is instance-retirement . This ensures that your instance is started on a different underlying host.

For more information about failed status checks, see Troubleshooting Instances with Failed Status Checks in the Amazon Elastic Compute Cloud User Guide . For more information about working with scheduled events, see Working with an Instance That Has a Scheduled Event in the Amazon Elastic Compute Cloud User Guide .


DescribeInternetGateways(DescribeInternetGatewaysRequest)
Gives you information about your Internet gateways.

DescribeKeyPairs(DescribeKeyPairsRequest)
Returns information about key pairs available to you. If you specify key pairs, information about those key pairs is returned. Otherwise, information for all registered key pairs is returned.

DescribeLicenses(DescribeLicensesRequest)
Provides details of a user's registered licenses.

DescribeNetworkAcls(DescribeNetworkAclsRequest)
Gives you information about the network ACLs in your VPC.

DescribeNetworkInterfaceAttribute(DescribeNetworkInterfaceAttributeRequest)
Describes a Network Interface Attribute. Only one attribute can be specified per call.

DescribeNetworkInterfaces(DescribeNetworkInterfacesRequest)
Describes one or more Network Interfaces.

DescribePlacementGroups(DescribePlacementGroupsRequest)
Returns information about one or more PlacementGroup instances in a user's account.

DescribeRegions(DescribeRegionsRequest)
Describes regions that are currently available to the account.

DescribeReservedInstances(DescribeReservedInstancesRequest)
Describes Reserved Instances that you purchased.

DescribeReservedInstancesListings(DescribeReservedInstancesListingsRequest)
Describes your account's Reserved Instance listings in the Reserved Instance Marketplace.

DescribeReservedInstancesModifications(DescribeReservedInstancesModificationsRequest)
Describes modifications made to Reserved Instances in your account.

DescribeReservedInstancesOfferings(DescribeReservedInstancesOfferingsRequest)
Describes Reserved Instance offerings that are available for purchase.

DescribeRouteTables(DescribeRouteTablesRequest)
Gives you information about your route tables.

DescribeSecurityGroups(DescribeSecurityGroupsRequest)
Returns information about security groups that you own.

DescribeSnapshotAttribute(DescribeSnapshotAttributeRequest)
Returns information about an attribute of a snapshot. Only one attribute can be specified per call.

DescribeSnapshots(DescribeSnapshotsRequest)
Returns information about Amazon EBS snapshots available to the user.

DescribeSpotDatafeedSubscription(DescribeSpotDatafeedSubscriptionRequest)
Describes the datafeed for Spot Instances.

DescribeSpotInstanceRequests(DescribeSpotInstanceRequestsRequest)
Describes the Spot Instance requests that belong to your account.

DescribeSpotPriceHistory(DescribeSpotPriceHistoryRequest)
Describes the Spot Price history.

DescribeSubnets(DescribeSubnetsRequest)
Gives you information about your subnets.

DescribeTags(DescribeTagsRequest)
Describes Tags for the specified resources.

DescribeVolumeAttribute(DescribeVolumeAttributeRequest)
Describes an attribute of a volume.

DescribeVolumes(DescribeVolumesRequest)
Describes the specified Amazon EBS volumes that you own.

DescribeVolumeStatus(DescribeVolumeStatusRequest)
Returns the status of one or more volumes.

DescribeVpcAttribute(DescribeVpcAttributeRequest)
Describes VPC attributes.

DescribeVpcPeeringConnections(DescribeVpcPeeringConnectionsRequest)

Describes one or more of your VPC peering connections.


DescribeVpcs(DescribeVpcsRequest)
Gives you information about your VPCs.

DescribeVpnConnections(DescribeVpnConnectionsRequest)
Gives you information about your VPN connections. Important - we strongly recommend you use HTTPS when calling this operation because the response contains sensitive cryptographic information for configuring your customer gateway. You can filter the results to return information only about VPN connections that match criteria you specify. For example, you could ask to get information about a particular VPN connection (or all) only if the VPN's state is pending or available. You can specify multiple filters (e.g., the VPN connection is associated with a particular VPN gateway, and the gateway's state is pending or available). The result includes information for a particular VPN connection only if the VPN connection matches all your filters. If there's no match, no special message is returned; the response is simply empty. The returned information consists of: 1. The VPN connection ID. 2. The type of connection. 3. Customer gateway ID. 4. VPN gateway ID. 5. The current state of the VPN connection (pending, available, deleting, deleted). 6. The customer gateway configuration information in the native XML format.

DescribeVpnGateways(DescribeVpnGatewaysRequest)
Gives you information about your VPN gateways.

DetachInternetGateway(DetachInternetGatewayRequest)
Detaches an Internet gateway from a VPC, disabling connectivity between the Internet and the VPC.

DetachNetworkInterface(DetachNetworkInterfaceRequest)
Detaches a network interface from an instance.

DetachVolume(DetachVolumeRequest)
Detaches an Amazon EBS volume from an instance.

DetachVpnGateway(DetachVpnGatewayRequest)
Detaches a VPN gateway from a VPC.

DisableVGWRoutePropagation(DisableVGWRoutePropagationRequest)
Disables a virtual private gateway (VGW) from propagating routes to the routing tables of an Amazon VPC.

DisassociateAddress(DisassociateAddressRequest)
Disassociates the specified elastic IP address from the instance to which it is assigned.

DisassociateRouteTable(DisassociateRouteTableRequest)
Disassociates a subnet from a route table.

Dispose()()()()
Disposes of all managed and unmanaged resources.

DryRun(EC2Request)
Checks whether you have the required permissions for the action, without actually making the request.

EnableVGWRoutePropagation(EnableVGWRoutePropagationRequest)
Enables a virtual private gateway (VGW) to propagate routes to the routing tables of an Amazon VPC.

EnableVolumeIO(EnableVolumeIORequest)
Enables I/O operations for a volume that had I/O operations disabled because the data on the volume was potentially inconsistent.

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
GetConsoleOutput(GetConsoleOutputRequest)
Retrieves console output for the specified instance.

GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetPasswordData(GetPasswordDataRequest)
Retrieves the encrypted administrator password for the instances running Windows.

GetType()()()()
Gets the type of the current instance.
(Inherited from Object.)
ImportInstance(ImportInstanceRequest)

Creates an import instance task using metadata from the specified disk image. After importing the image, you then upload it using the ec2-import-volume command in the EC2 command line tools. For more information, see Using the Command Line Tools to Import Your Virtual Machine to Amazon EC2 in the Amazon Elastic Compute Cloud User Guide.


ImportKeyPair(ImportKeyPairRequest)
Imports the public key from an RSA key pair created with a third-party tool.

ImportVolume(ImportVolumeRequest)

Creates an import volume task using metadata from the specified disk image. After importing the image, you then upload it using the ec2-import-volume command in the Amazon EC2 command-line interface (CLI) tools. For more information, see Using the Command Line Tools to Import Your Virtual Machine to Amazon EC2 in the Amazon Elastic Compute Cloud User Guide .


ModifyImageAttribute(ModifyImageAttributeRequest)
Modifies an attribute of an AMI

ModifyInstanceAttribute(ModifyInstanceAttributeRequest)
Modifies an attribute of an instance.

ModifyNetworkInterfaceAttribute(ModifyNetworkInterfaceAttributeRequest)
Modifies a network interface attribute. Only one attribute can be specified per call.

ModifyReservedInstances(ModifyReservedInstancesRequest)
Modifies the Availability Zone, instance count, instance type, or network platform (EC2-Classic or EC2-VPC) of your Reserved Instances.

ModifySnapshotAttribute(ModifySnapshotAttributeRequest)
Adds or remove permission settings for the specified snapshot

ModifyVolumeAttribute(ModifyVolumeAttributeRequest)
Modifies a volume attribute.

ModifyVpcAttribute(ModifyVpcAttributeRequest)
Modified attributes on a VPC.

MonitorInstances(MonitorInstancesRequest)
Enables monitoring for a running instance.

PurchaseReservedInstancesOffering(PurchaseReservedInstancesOfferingRequest)
Purchases a Reserved Instance for use with your account.

RebootInstances(RebootInstancesRequest)

Requests a reboot of one or more instances. This operation is asynchronous; it only queues a request to reboot the specified instances. The operation succeeds if the instances are valid and belong to you. Requests to reboot terminated instances are ignored.

If a Linux/Unix instance does not cleanly shut down within four minutes, Amazon EC2 performs a hard reboot.

For more information about troubleshooting, see Getting Console Output and Rebooting Instances in the Amazon Elastic Compute Cloud User Guide .


RegisterImage(RegisterImageRequest)
Registers an AMI with Amazon EC2.

RejectVpcPeeringConnection(RejectVpcPeeringConnectionRequest)

Rejects a VPC peering connection request. The VPC peering connection must be in the pending-acceptance state. Use the DescribeVpcPeeringConnections request to view your outstanding VPC peering connection requests.


ReleaseAddress(ReleaseAddressRequest)
Releases an elastic IP address associated with your account.

ReplaceNetworkAclAssociation(ReplaceNetworkAclAssociationRequest)
Changes which network ACL a subnet is associated with.

ReplaceNetworkAclEntry(ReplaceNetworkAclEntryRequest)
Replaces an entry (i.e., rule) in a network ACL.

ReplaceRoute(ReplaceRouteRequest)
Replaces an existing route within a route table in a VPC.

ReplaceRouteTableAssociation(ReplaceRouteTableAssociationRequest)
Changes the route table associated with a given subnet in a VPC.

ReportInstanceStatus(ReportInstanceStatusRequest)
Submits feedback about an instance's status.

RequestSpotInstances(RequestSpotInstancesRequest)
Creates a Spot Instance request.

ResetImageAttribute(ResetImageAttributeRequest)
Resets an attribute of an AMI to its default value. Note - The productCodes attribute cannot be reset.

ResetInstanceAttribute(ResetInstanceAttributeRequest)
Resets an attribute of an instance to its default value.

ResetNetworkInterfaceAttribute(ResetNetworkInterfaceAttributeRequest)
Reset Network Interface Attribute request

ResetSnapshotAttribute(ResetSnapshotAttributeRequest)
Resets permission settings for the specified snapshot

RevokeSecurityGroupEgress(RevokeSecurityGroupEgressRequest)
Removes one or more egress rules from a VPC security group.

RevokeSecurityGroupIngress(RevokeSecurityGroupIngressRequest)
Revokes permissions from a security group.

RunInstances(RunInstancesRequest)

Launches the specified number of instances using an AMI for which you have permissions.

When you launch an instance, it enters the pending state. After the instance is ready for you, it enters the running state. To check the state of your instance, call DescribeInstances.

If you don't specify a security group when launching an instance, Amazon EC2 uses the default security group. For more information, see Security Groups in the Amazon Elastic Compute Cloud User Guide .

Linux instances have access to the public key of the key pair at boot. You can use this key to provide secure access to the instance. Amazon EC2 public images use this feature to provide secure access without passwords. For more information, see Key Pairs in the Amazon Elastic Compute Cloud User Guide .

You can provide optional user data when launching an instance. For more information, see Instance Metadata in the Amazon Elastic Compute Cloud User Guide .

If any of the AMIs have a product code attached for which the user has not subscribed, RunInstances fails.

For more information about troubleshooting, see What To Do If An Instance Immediately Terminates , and Troubleshooting Connecting to Your Instance in the Amazon Elastic Compute Cloud User Guide .


StartInstances(StartInstancesRequest)
Starts an Amazon EBS-backed AMI that you've previously stopped.

StopInstances(StopInstancesRequest)

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.

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, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between stopping and terminating instances, see Instance Lifecycle in the Amazon Elastic Compute Cloud User Guide .

For more information about troubleshooting, see Troubleshooting Stopping Your Instance in the Amazon Elastic Compute Cloud User Guide .


TerminateInstances(TerminateInstancesRequest)

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 Amazon 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, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between stopping and terminating instances, see Instance Lifecycle in the Amazon Elastic Compute Cloud User Guide .

For more information about troubleshooting, see Troubleshooting Terminating Your Instance in the Amazon Elastic Compute Cloud User Guide .


ToString()()()()
Returns a string that represents the current object.
(Inherited from Object.)
UnassignPrivateIpAddresses(UnassignPrivateIpAddressesRequest)
Unassigns one or more secondary private IP addresses from a network interface in Amazon VPC. This command is only available in Amazon VPC

UnmonitorInstances(UnmonitorInstancesRequest)
Disables monitoring for a running instance.

Remarks
The Amazon Elastic Compute Cloud (Amazon EC2) web service provides you with the ability to execute your applications in Amazon's computing environment. To use Amazon EC2 you simply: 1. Create an Amazon Machine Image (AMI) containing all your software, including your operating system and associated configuration settings, applications, libraries, etc. Think of this as zipping up the contents of your hard drive. We provide all the necessary tools to create and package your AMI. 2. Upload this AMI to the Amazon S3 (Amazon Simple Storage Service) service. This gives us reliable, secure access to your AMI. 3. Register your AMI with Amazon EC2. This allows us to verify that your AMI has been uploaded correctly and to allocate a unique identifier for it. 4. Use this AMI ID and the Amazon EC2 web service APIs to run, monitor, and terminate as many instances of this AMI as required. You can also skip the first three steps and choose to launch an AMI that is provided by Amazon or shared by another user. While instances are running, you are billed for the computing and network resources that they consume. You can also skip the first three steps and choose to launch an AMI that is provided by Amazon or shared by another user. While instances are running, you are billed for the computing and network resources that they consume.
Inheritance Hierarchy
Object
AmazonEC2Client
See Also

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)