This module provides an interface to the Elastic Compute Cloud (EC2) service from AWS.
Given a valid region name, return a boto.ec2.connection.EC2Connection. Any additional parameters after the region_name are passed on to the connect method of the region object.
Type: | str |
---|---|
Parameters: | region_name – The name of the region to connect to. |
Return type: | boto.ec2.connection.EC2Connection or None |
Returns: | A connection to the given region, or None if an invalid region name is given |
Find and return a boto.ec2.regioninfo.RegionInfo object given a region name.
Type: | str |
---|---|
Param: | The name of the region. |
Return type: | boto.ec2.regioninfo.RegionInfo |
Returns: | The RegionInfo object for the given region or None if an invalid region name is provided. |
Get all available regions for the EC2 service. You may pass any of the arguments accepted by the EC2Connection object’s constructor as keyword arguments and they will be passed along to the EC2Connection object.
Return type: | list |
---|---|
Returns: | A list of boto.ec2.regioninfo.RegionInfo |
Represents an EC2 Elastic IP Address
Variables: |
|
---|
Associate this Elastic IP address with a currently running instance. :see: boto.ec2.connection.EC2Connection.associate_address()
Free up this Elastic IP address. :see: boto.ec2.connection.EC2Connection.release_address()
Disassociate this Elastic IP address from a currently running instance. :see: boto.ec2.connection.EC2Connection.disassociate_address()
Free up this Elastic IP address. :see: boto.ec2.connection.EC2Connection.release_address()
See the Auto Scaling Reference.
Represents a collection of BlockDeviceTypes when creating ec2 instances.
Example: dev_sda1 = BlockDeviceType() dev_sda1.size = 100 # change root volume to 100GB instead of default bdm = BlockDeviceMapping() bdm[‘/dev/sda1’] = dev_sda1 reservation = image.run(..., block_device_map=bdm, ...)
Parameters: | connection (boto.ec2.EC2Connection) – Optional connection. |
---|
Represents parameters for a block device.
alias of BlockDeviceType
See the CloudWatch Reference.
Represents a connection to the EC2 service.
Init method to create a new connection to EC2.
alias of EC2ResponseError
Allocate a new Elastic IP address and associate it with your account.
Parameters: | |
---|---|
Return type: | |
Returns: | The newly allocated Address |
Assigns one or more secondary private IP addresses to a network interface in Amazon VPC.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | True if successful |
Associate an Elastic IP address with a currently running instance. This requires one of public_ip or allocation_id depending on if you’re associating a VPC address or a plain EC2 address.
When using an Allocation ID, make sure to pass None for public_ip as EC2 expects a single parameter and if public_ip is passed boto will preference that instead of allocation_id.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | True if successful |
Associate an Elastic IP address with a currently running instance. This requires one of public_ip or allocation_id depending on if you’re associating a VPC address or a plain EC2 address.
When using an Allocation ID, make sure to pass None for public_ip as EC2 expects a single parameter and if public_ip is passed boto will preference that instead of allocation_id.
Parameters: |
|
---|---|
Return type: | class:boto.ec2.address.Address |
Returns: | The associated address instance |
Attaches a network interface to an instance.
Parameters: |
|
---|
Attach an EBS volume to an EC2 instance.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | True if successful |
Add a new rule to an existing security group. You need to pass in either src_security_group_name and src_security_group_owner_id OR ip_protocol, from_port, to_port, and cidr_ip. In other words, either you are authorizing another group or you are authorizing some ip-based rule.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | True if successful. |
Parameters: |
|
---|---|
Return type: | bool |
Returns: | True if successful. |
The action adds one or more egress rules to a VPC security group. Specifically, this action permits instances in a security group to send traffic to one or more destination CIDR IP address ranges, or to one or more destination security groups in the same VPC.
Parameters: | dry_run (bool) – Set to True if the operation should not actually run. |
---|
Bundle Windows instance.
Parameters: |
|
---|
Cancel a previously submitted bundle task
Parameters: |
---|
Cancels the specified Reserved Instance listing.
Parameters: |
|
---|---|
Return type: | list |
Returns: |
Cancel the specified Spot Instance Requests.
Parameters: | |
---|---|
Return type: | list |
Returns: | A list of the instances terminated |
Parameters: | dry_run (bool) – Set to True if the operation should not actually run. |
---|
Parameters: | dry_run (bool) – Set to True if the operation should not actually run. |
---|---|
Return type: | boto.ec2.image.CopyImage |
Returns: | Object containing the image_id of the copied image. |
Copies a point-in-time snapshot of an Amazon Elastic Block Store (Amazon EBS) volume and stores it in Amazon Simple Storage Service (Amazon S3). You can copy the snapshot within the same region or from one region to another. You can use the snapshot to create new Amazon EBS volumes or Amazon Machine Images (AMIs).
Parameters: |
|
---|---|
Return type: | str |
Returns: | The snapshot ID |
Will create an AMI from the instance in the running or stopped state.
Parameters: |
|
---|---|
Return type: | string |
Returns: | The new image id |
Create a new key pair for your account. This will create the key pair within the region you are currently connected to.
Parameters: | |
---|---|
Return type: | |
Returns: | The newly created boto.ec2.keypair.KeyPair. The material attribute of the new KeyPair object will contain the the unencrypted PEM encoded RSA private key. |
Creates a network interface in the specified subnet.
Parameters: |
|
---|---|
Return type: | |
Returns: | The newly created network interface. |
Create a new placement group for your account. This will create the placement group within the region you are currently connected to.
Parameters: | |
---|---|
Return type: | bool |
Returns: | True if successful |
Creates a new listing for Reserved Instances.
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.
The Reserved Instance Marketplace matches sellers who want to resell Reserved Instance capacity that they no longer need with buyers who want to purchase additional capacity. Reserved Instances bought and sold through the Reserved Instance Marketplace work like any other Reserved Instances.
If you want to sell your Reserved Instances, you must first register as a Seller in the Reserved Instance Marketplace. After completing the registration process, you can create a Reserved Instance Marketplace listing of some or all of your Reserved Instances, and specify the upfront price you want to receive for them. Your Reserved Instance listings then become available for purchase.
Parameters: |
|
---|---|
Return type: | list |
Returns: |
Create a new security group for your account. This will create the security group within the region you are currently connected to.
Parameters: | |
---|---|
Return type: | |
Returns: | The newly created boto.ec2.securitygroup.SecurityGroup. |
Create a snapshot of an existing EBS Volume.
Parameters: | |
---|---|
Return type: | |
Returns: | The created Snapshot object |
Create a spot instance datafeed subscription for this account.
Parameters: |
|
---|---|
Return type: | boto.ec2.spotdatafeedsubscription.SpotDatafeedSubscription |
Returns: | The datafeed subscription object or None |
Create new metadata tags for the specified resource ids.
Parameters: |
---|
Create a new EBS Volume.
Parameters: |
|
---|
Delete a key pair from your account.
Parameters: |
---|
Delete the specified network interface.
Parameters: |
---|
Delete a placement group from your account.
Parameters: |
---|
Delete a security group from your account.
Parameters: | |
---|---|
Return type: | bool |
Returns: | True if successful. |
Parameters: | dry_run (bool) – Set to True if the operation should not actually run. |
---|
Delete the current spot instance data feed subscription associated with this account
Parameters: | dry_run (bool) – Set to True if the operation should not actually run. |
---|---|
Return type: | bool |
Returns: | True if successful |
Delete metadata tags for the specified resource ids.
Parameters: |
|
---|
Delete an EBS volume.
Parameters: | |
---|---|
Return type: | bool |
Returns: | True if successful |
Unregister an AMI.
Parameters: | |
---|---|
Return type: | bool |
Returns: | True if successful |
Parameters: | dry_run (bool) – Set to True if the operation should not actually run. |
---|
A request to describe the modifications made to Reserved Instances in your account.
Parameters: |
|
---|---|
Return type: | list |
Returns: |
Parameters: | dry_run (bool) – Set to True if the operation should not actually run. |
---|
Detaches a network interface from an instance.
Parameters: |
---|
Detach an EBS volume from an EC2 instance.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | True if successful |
Disassociate an Elastic IP address from a currently running instance.
Parameters: | |
---|---|
Return type: | bool |
Returns: | True if successful |
Enables I/O operations for a volume that had I/O operations disabled because the data on the volume was potentially inconsistent.
Parameters: | |
---|---|
Return type: | bool |
Returns: | True if successful |
Get all EIP’s associated with the current credentials.
Parameters: |
|
---|---|
Return type: | list of boto.ec2.address.Address |
Returns: | The requested Address objects |
Retrieve current bundling tasks. If no bundle id is specified, all tasks are retrieved.
Parameters: |
|
---|
Retrieve all the EC2 images available on your account.
Parameters: |
|
---|---|
Return type: | list |
Returns: | A list of boto.ec2.image.Image |
Retrieve all the instances in your account scheduled for maintenance.
Parameters: |
|
---|---|
Return type: | list |
Returns: | A list of instances that have maintenance scheduled. |
Get all instance_types available on this cloud (eucalyptus specific)
Return type: | list of boto.ec2.instancetype.InstanceType |
---|---|
Returns: | The requested InstanceType objects |
Retrieve all the instance reservations associated with your account.
This method’s current behavior is deprecated in favor of get_all_reservations(). A future major release will change get_all_instances() to return a list of boto.ec2.instance.Instance objects as its name suggests. To obtain that behavior today, use get_only_instances().
Parameters: |
|
---|---|
Return type: | list |
Returns: | A list of boto.ec2.instance.Reservation |
Retrieve all the EC2 kernels available on your account. Constructs a filter to allow the processing to happen server side.
Parameters: | |
---|---|
Return type: | list |
Returns: | A list of boto.ec2.image.Image |
Get all key pairs associated with your account.
Parameters: |
|
---|---|
Return type: | list |
Returns: | A list of boto.ec2.keypair.KeyPair |
Retrieve all of the Elastic Network Interfaces (ENI’s) associated with your account.
Parameters: |
|
---|---|
Return type: | list |
Returns: |
Get all placement groups associated with your account in a region.
Parameters: |
|
---|---|
Return type: | list |
Returns: | A list of boto.ec2.placementgroup.PlacementGroup |
Retrieve all the EC2 ramdisks available on your account. Constructs a filter to allow the processing to happen server side.
Parameters: | |
---|---|
Return type: | list |
Returns: | A list of boto.ec2.image.Image |
Get all available regions for the EC2 service.
Parameters: |
|
---|---|
Return type: | list |
Returns: | A list of boto.ec2.regioninfo.RegionInfo |
Retrieve all the instance reservations associated with your account.
Parameters: |
|
---|---|
Return type: | list |
Returns: | A list of boto.ec2.instance.Reservation |
Describes one or more of the Reserved Instances that you purchased.
Parameters: |
|
---|---|
Return type: | list |
Returns: |
Describes Reserved Instance offerings that are available for purchase.
Parameters: |
|
---|---|
Return type: | list |
Returns: | A list of boto.ec2.reservedinstance.ReservedInstancesOffering. |
Get all security groups associated with your account in a region.
Parameters: |
|
---|---|
Return type: | list |
Returns: | A list of boto.ec2.securitygroup.SecurityGroup |
Get all EBS Snapshots associated with the current credentials.
Parameters: |
|
---|---|
Return type: | list of boto.ec2.snapshot.Snapshot |
Returns: | The requested Snapshot objects |
Retrieve all the spot instances requests associated with your account.
Parameters: |
|
---|---|
Return type: | list |
Returns: |
Retrieve all the metadata tags associated with your account.
Parameters: |
|
---|---|
Return type: | list |
Returns: | A list of boto.ec2.tag.Tag objects |
Retrieve the status of one or more volumes.
Parameters: |
|
---|---|
Return type: | list |
Returns: | A list of volume status. |
Get all Volumes associated with the current credentials.
Parameters: |
|
---|---|
Return type: | list of boto.ec2.volume.Volume |
Returns: | The requested Volume objects |
Get all Availability Zones associated with the current region.
Parameters: |
|
---|---|
Return type: | list of boto.ec2.zone.Zone |
Returns: | The requested Zone objects |
Retrieves the console output for the specified instance.
Parameters: | |
---|---|
Return type: | |
Returns: | The console output as a ConsoleOutput object |
Shortcut method to retrieve a specific image (AMI).
Parameters: | |
---|---|
Return type: | |
Returns: | The EC2 Image specified or None if the image is not found |
Gets an attribute from an image.
Parameters: | |
---|---|
Return type: | |
Returns: | An ImageAttribute object representing the value of the attribute requested |
Gets an attribute from an instance.
Parameters: |
|
---|---|
Return type: | boto.ec2.image.InstanceAttribute |
Returns: | An InstanceAttribute object representing the value of the attribute requested |
Convenience method to retrieve a specific keypair (KeyPair).
Parameters: | |
---|---|
Return type: | |
Returns: | The KeyPair specified or None if it is not found |
Retrieve all the instances associated with your account.
Parameters: |
|
---|---|
Return type: | list |
Returns: | A list of boto.ec2.instance.Instance |
Returns a dictionary containing the value of all of the keyword arguments passed when constructing this connection.
Get encrypted administrator password for a Windows instance.
Parameters: |
---|
Get information about an attribute of a snapshot. Only one attribute can be specified per call.
Parameters: | |
---|---|
Return type: | list of boto.ec2.snapshotattribute.SnapshotAttribute |
Returns: | The requested Snapshot attribute |
Return the current spot instance data feed subscription associated with this account, if any.
Parameters: | dry_run (bool) – Set to True if the operation should not actually run. |
---|---|
Return type: | boto.ec2.spotdatafeedsubscription.SpotDatafeedSubscription |
Returns: | The datafeed subscription object or None |
Retrieve the recent history of spot instances pricing.
Parameters: |
|
---|---|
Return type: | list |
Returns: | A list tuples containing price and timestamp. |
Describes attribute of the volume.
Parameters: | |
---|---|
Return type: | list of boto.ec2.volume.VolumeAttribute |
Returns: | The requested Volume attribute |
imports the public key from an RSA key pair that you created with a third-party tool.
Supported formats:
DSA keys are not supported. Make sure your key generator is set up to create RSA keys.
Supported lengths: 1024, 2048, and 4096.
Parameters: | |
---|---|
Return type: | |
Returns: | A boto.ec2.keypair.KeyPair object representing the newly imported key pair. This object will contain only the key name and the fingerprint. |
Changes an attribute of an image.
Parameters: |
|
---|
Changes an attribute of an instance
Parameters: |
|
---|---|
Return type: | bool |
Returns: | Whether the operation succeeded or not |
Changes an attribute of a network interface.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | Whether the operation succeeded or not |
Modifies the specified Reserved Instances.
Parameters: |
|
---|---|
Return type: | string |
Returns: | The unique ID for the submitted modification request. |
Changes an attribute of an image.
Parameters: |
|
---|
Changes an attribute of an Volume.
Parameters: |
---|
Parameters: | dry_run (bool) – Set to True if the operation should not actually run. |
---|
Deprecated Version, maintained for backward compatibility. Enable detailed CloudWatch monitoring for the supplied instance.
Parameters: | |
---|---|
Return type: | list |
Returns: | A list of boto.ec2.instanceinfo.InstanceInfo |
Enable detailed CloudWatch monitoring for the supplied instances.
Parameters: |
|
---|---|
Return type: | list |
Returns: | A list of boto.ec2.instanceinfo.InstanceInfo |
Purchase a Reserved Instance for use with your account. ** CAUTION ** This request can result in large amounts of money being charged to your AWS account. Use with caution!
Parameters: |
|
---|---|
Return type: | |
Returns: | The newly created Reserved Instance |
Reboot the specified instances.
Parameters: |
---|
Register an image.
Parameters: |
|
---|---|
Return type: | string |
Returns: | The new image id |
Free up an Elastic IP address. Pass a public IP address to release an EC2 Elastic IP address and an AllocationId to release a VPC Elastic IP address. You should only pass one value.
This requires one of public_ip or allocation_id depending on if you’re associating a VPC address or a plain EC2 address.
When using an Allocation ID, make sure to pass None for public_ip as EC2 expects a single parameter and if public_ip is passed boto will preference that instead of allocation_id.
Parameters: | |
---|---|
Return type: | bool |
Returns: | True if successful |
Request instances on the spot market at a particular price.
Parameters: |
|
---|---|
Return type: | Reservation |
Returns: | The boto.ec2.spotinstancerequest.SpotInstanceRequest associated with the request for machines |
Resets an attribute of an AMI to its default value.
Parameters: | |
---|---|
Return type: | bool |
Returns: | Whether the operation succeeded or not |
Resets an attribute of an instance to its default value.
Parameters: | |
---|---|
Return type: | bool |
Returns: | Whether the operation succeeded or not |
Resets an attribute of a snapshot to its default value.
Parameters: | |
---|---|
Return type: | bool |
Returns: | Whether the operation succeeded or not |
Remove an existing rule from an existing security group. You need to pass in either src_security_group_name and src_security_group_owner_id OR ip_protocol, from_port, to_port, and cidr_ip. In other words, either you are revoking another group or you are revoking some ip-based rule.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | True if successful. |
Remove an existing rule from an existing security group. You need to pass in either src_security_group_name and src_security_group_owner_id OR ip_protocol, from_port, to_port, and cidr_ip. In other words, either you are revoking another group or you are revoking some ip-based rule.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | True if successful. |
Remove an existing egress rule from an existing VPC security group. You need to pass in an ip_protocol, from_port and to_port range only if the protocol you are using is port-based. You also need to pass in either a src_group_id or cidr_ip.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | True if successful. |
Runs an image on EC2.
Parameters: |
|
---|---|
Return type: | Reservation |
Returns: | The boto.ec2.instance.Reservation associated with the request for machines |
Start the instances specified
Parameters: | |
---|---|
Return type: | list |
Returns: | A list of the instances started |
Stop the instances specified
Parameters: | |
---|---|
Return type: | list |
Returns: | A list of the instances stopped |
Terminate the instances specified
Parameters: | |
---|---|
Return type: | list |
Returns: | A list of the instances terminated |
Trim excess snapshots, based on when they were taken. More current snapshots are retained, with the number retained decreasing as you move back in time.
If ebs volumes have a ‘Name’ tag with a value, their snapshots will be assigned the same tag when they are created. The values of the ‘Name’ tags for snapshots are used by this function to group snapshots taken from the same volume (or from a series of like-named volumes over time) for trimming.
For every group of like-named snapshots, this function retains the newest and oldest snapshots, as well as, by default, the first snapshots taken in each of the last eight hours, the first snapshots taken in each of the last seven days, the first snapshots taken in the last 4 weeks (counting Midnight Sunday morning as the start of the week), and the first snapshot from the first day of each month forever.
Parameters: |
---|
Unassigns one or more secondary private IP addresses from a network interface in Amazon VPC.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | True if successful |
Deprecated Version, maintained for backward compatibility. Disable detailed CloudWatch monitoring for the supplied instance.
Parameters: | |
---|---|
Return type: | list |
Returns: | A list of boto.ec2.instanceinfo.InstanceInfo |
Disable CloudWatch monitoring for the supplied instance.
Parameters: |
|
---|---|
Return type: | list |
Returns: | A list of boto.ec2.instanceinfo.InstanceInfo |
Represents an EC2 Object
Any EC2 resource that can be tagged should be represented by a Python object that subclasses this class. This class has the mechanism in place to handle the tagSet element in the Describe* responses. If tags are found, it will create a TagSet object and allow it to parse and collect the tags into a dict that is stored in the “tags” attribute of the object.
Add a tag to this object. Tags are stored by AWS and can be used to organize and filter resources. Adding a tag involves a round-trip to the EC2 service.
Parameters: |
---|
Add tags to this object. Tags are stored by AWS and can be used to organize and filter resources. Adding tags involves a round-trip to the EC2 service.
Parameters: | tags (dict) – A dictionary of key-value pairs for the tags being stored. If for some tags you want only the name and no value, the corresponding value for that tag name should be an empty string. |
---|
Remove a tag from this object. Removing a tag involves a round-trip to the EC2 service.
Parameters: |
|
---|
Removes tags from this object. Removing tags involves a round-trip to the EC2 service.
Parameters: | tags (dict) – A dictionary of key-value pairs for the tags being removed. For each key, the provided value must match the value currently stored in EC2. If not, that particular tag will not be removed. However, if a value of None is provided, the tag will be unconditionally deleted. NOTE: There is an important distinction between a value of ‘’ and a value of None. |
---|
See the ELB Reference.
Represents an EC2 Image
Runs this instance.
Parameters: |
|
||
---|---|---|---|
Return type: | Reservation |
||
Returns: | The boto.ec2.instance.Reservation associated with the request for machines |
Update the image’s state information by making a call to fetch the current image attributes from the service.
Parameters: | validate (bool) – By default, if EC2 returns no data about the image the update method returns quietly. If the validate param is True, however, it will raise a ValueError exception if no data is returned from EC2. |
---|
Represents an EC2 Instance
Represents an instance.
Variables: |
|
---|
Will create an AMI from the instance in the running or stopped state.
Parameters: |
|
---|---|
Return type: | string |
Returns: | The new image id |
Gets an attribute from this instance.
Parameters: | attribute (string) – The attribute you need information about Valid choices are:
|
---|---|
Return type: | boto.ec2.image.InstanceAttribute |
Returns: | An InstanceAttribute object representing the value of the attribute requested |
Retrieves the console output for the instance.
Return type: | boto.ec2.instance.ConsoleOutput |
---|---|
Returns: | The console output as a ConsoleOutput object |
Changes an attribute of this instance
Parameters: |
|
---|---|
Return type: | bool |
Returns: | Whether the operation succeeded or not |
Resets an attribute of this instance to its default value.
Parameters: | attribute (string) – The attribute to reset. Valid values are: kernel|ramdisk |
---|---|
Return type: | bool |
Returns: | Whether the operation succeeded or not |
Start the instance.
Stop the instance
Parameters: | force (bool) – Forces the instance to stop |
---|---|
Return type: | list |
Returns: | A list of the instances stopped |
Terminate the instance
Update the instance’s state information by making a call to fetch the current instance attributes from the service.
Parameters: | validate (bool) – By default, if EC2 returns no data about the instance the update method returns quietly. If the validate param is True, however, it will raise a ValueError exception if no data is returned from EC2. |
---|
Associates an Elastic IP to the instance.
Parameters: | ip_address (Either an instance of boto.ec2.address.Address or a string.) – The IP address to associate with the instance. |
---|---|
Return type: | bool |
Returns: | True if successful |
The location where the instance launched.
Variables: |
|
---|
The state of the instance.
Variables: |
|
---|
Represents a Reservation response object.
Variables: |
|
---|
A dict object that contains name/value pairs which provide more detailed information about the status of the system or the instance.
A status event for an instance.
Variables: |
|
---|
Represents an EC2 Instance status as reported by DescribeInstanceStatus request.
Variables: |
|
---|
A list object that contains the results of a call to DescribeInstanceStatus request. Each element of the list will be an InstanceStatus object.
Variables: | next_token – If the response was truncated by the EC2 service, the next_token attribute of the object will contain the string that needs to be passed in to the next request to retrieve the next set of results. |
---|
A generic Status object used for system status and instance status.
Variables: |
|
---|
Represents an EC2 Keypair
Create a new key pair of the same new in another region. Note that the new key pair will use a different ssh cert than the this key pair. After doing the copy, you will need to save the material associated with the new key pair (use the save method) to a local file.
Parameters: | region (boto.ec2.regioninfo.RegionInfo) – The region to which this security group will be copied. |
---|---|
Return type: | boto.ec2.keypair.KeyPair |
Returns: | The new key pair |
Delete the KeyPair.
Return type: | bool |
---|---|
Returns: | True if successful, otherwise False. |
Save the material (the unencrypted PEM encoded RSA private key) of a newly created KeyPair to a local file.
Parameters: | directory_path (string) – The fully qualified path to the directory in which the keypair will be saved. The keypair file will be named using the name of the keypair as the base name and .pem for the file extension. If a file of that name already exists in the directory, an exception will be raised and the old file will not be overwritten. |
---|---|
Return type: | bool |
Returns: | True if successful. |
Represents a launch specification for Spot instances.
Represents an EC2 Elastic Network Interface
Variables: |
|
---|
An Elastic Network Interface.
Variables: |
|
---|
Attach this ENI to an EC2 instance.
Parameters: | |
---|---|
Return type: | bool |
Returns: | True if successful |
Detach this ENI from an EC2 instance.
Parameters: | force (bool) – Forces detachment if the previous detachment attempt did not occur cleanly. |
---|---|
Return type: | bool |
Returns: | True if successful |
Update the data associated with this ENI by querying EC2.
Parameters: | validate (bool) – By default, if EC2 returns no data about the ENI the update method returns quietly. If the validate param is True, however, it will raise a ValueError exception if no data is returned from EC2. |
---|
Represents an EC2 Placement Group
Represents an EC2 Region
Represents an EC2 Security Group
Add a rule to the SecurityGroup object. Note that this method only changes the local version of the object. No information is sent to EC2.
Add a new rule to this security group. You need to pass in either src_group_name OR ip_protocol, from_port, to_port, and cidr_ip. In other words, either you are authorizing another group or you are authorizing some ip-based rule.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | True if successful. |
Create a copy of this security group in another region. Note that the new security group will be a separate entity and will not stay in sync automatically after the copy operation.
Parameters: |
|
---|---|
Return type: | |
Returns: | The new security group. |
Find all of the current instances that are running within this security group.
Return type: | list of boto.ec2.instance.Instance |
---|---|
Returns: | A list of Instance objects |
Remove a rule to the SecurityGroup object. Note that this method only changes the local version of the object. No information is sent to EC2.
Represents an EC2 Elastic Block Store Snapshot
Create a new EBS Volume from this Snapshot
Parameters: |
|
---|
Update the data associated with this snapshot by querying EC2.
Parameters: | validate (bool) – By default, if EC2 returns no data about the snapshot the update method returns quietly. If the validate param is True, however, it will raise a ValueError exception if no data is returned from EC2. |
---|
Represents an EC2 Spot Instance Request
Variables: |
|
---|
The fault codes for the Spot Instance request, if any.
Variables: |
|
---|
Contains the status of a Spot Instance Request.
Variables: |
|
---|
A Tag is used when creating or listing all tags related to an AWS account. It records not only the key and value but also the ID of the resource to which the tag is attached as well as the type of the resource.
A TagSet is used to collect the tags associated with a particular EC2 resource. Not all resources can be tagged but for those that can, this dict object will be used to collect those values. See boto.ec2.ec2object.TaggedEC2Object for more details.
Represents an EC2 Elastic Block Storage Volume
Represents an EBS attachmentset.
Variables: |
|
---|
Represents an EBS volume.
Variables: |
|
---|
Attach this EBS volume to an EC2 instance.
Parameters: | |
---|---|
Return type: | bool |
Returns: | True if successful |
Get the attachment state.
Create a snapshot of this EBS Volume.
Parameters: | description (str) – A description of the snapshot. Limited to 256 characters. |
---|---|
Return type: | boto.ec2.snapshot.Snapshot |
Returns: | The created Snapshot object |
Delete this EBS volume.
Return type: | bool |
---|---|
Returns: | True if successful |
Detach this EBS volume from an EC2 instance.
Parameters: | force (bool) – Forces detachment if the previous detachment attempt did not occur cleanly. This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance will not have an opportunity to flush file system caches nor file system meta data. If you use this option, you must perform file system check and repair procedures. |
---|---|
Return type: | bool |
Returns: | True if successful |
Get all snapshots related to this volume. Note that this requires that all available snapshots for the account be retrieved from EC2 first and then the list is filtered client-side to contain only those for this volume.
Parameters: | |
---|---|
Return type: | list of L{boto.ec2.snapshot.Snapshot} |
Returns: | The requested Snapshot objects |
Update the data associated with this volume by querying EC2.
Parameters: | validate (bool) – By default, if EC2 returns no data about the volume the update method returns quietly. If the validate param is True, however, it will raise a ValueError exception if no data is returned from EC2. |
---|
Returns the state of the volume. Same value as the status attribute.
An action for an instance.
Variables: |
---|
A status event for an instance.
Variables: |
---|
Represents an EC2 Volume status as reported by DescribeVolumeStatus request.
Variables: |
|
---|
A list object that contains the results of a call to DescribeVolumeStatus request. Each element of the list will be an VolumeStatus object.
Variables: | next_token – If the response was truncated by the EC2 service, the next_token attribute of the object will contain the string that needs to be passed in to the next request to retrieve the next set of results. |
---|
Represents an EC2 Availability Zone
A list object that contains messages associated with an availability zone.
Represents an Availability Zone.
Variables: |
|
---|