Package org.jclouds.aws.ec2.features
Interface AWSInstanceApi
-
- All Superinterfaces:
InstanceApi
public interface AWSInstanceApi extends InstanceApi
Provides access to EC2 Instance Services via their REST API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<? extends Reservation<? extends AWSRunningInstance>>
describeInstancesInRegion(String region, String... instanceIds)
Returns information about instances that you own.Set<? extends Reservation<? extends AWSRunningInstance>>
describeInstancesInRegionWithFilter(String region, com.google.common.collect.Multimap<String,String> filter)
Returns information about instances that you own.Reservation<? extends AWSRunningInstance>
runInstancesInRegion(String region, String nullableAvailabilityZone, String imageId, int minCount, int maxCount, RunInstancesOptions... options)
Launches a specified number of instances of an AMI for which you have permissions.-
Methods inherited from interface org.jclouds.ec2.features.InstanceApi
getBlockDeviceMappingForInstanceInRegion, getConsoleOutputForInstanceInRegion, getInstanceInitiatedShutdownBehaviorForInstanceInRegion, getInstanceTypeForInstanceInRegion, getKernelForInstanceInRegion, getRamdiskForInstanceInRegion, getRootDeviceNameForInstanceInRegion, getUserDataForInstanceInRegion, isApiTerminationDisabledForInstanceInRegion, rebootInstancesInRegion, resetKernelForInstanceInRegion, resetRamdiskForInstanceInRegion, setApiTerminationDisabledForInstanceInRegion, setBlockDeviceMappingForInstanceInRegion, setInstanceInitiatedShutdownBehaviorForInstanceInRegion, setInstanceTypeForInstanceInRegion, setKernelForInstanceInRegion, setRamdiskForInstanceInRegion, setUserDataForInstanceInRegion, startInstancesInRegion, stopInstancesInRegion, terminateInstancesInRegion
-
-
-
-
Method Detail
-
describeInstancesInRegion
@Named("DescribeInstances") @POST @Path("/") Set<? extends Reservation<? extends AWSRunningInstance>> describeInstancesInRegion(@Nullable String region, String... instanceIds)
Description copied from interface:InstanceApi
Returns information about instances that you own. If you specify one or more instance IDs, Amazon EC2 returns information for those instances. If you do not specify instance IDs, Amazon EC2 returns information for all relevant instances. If you specify an invalid instance ID, a fault is returned. If you specify an instance that you do not own, it will not be included in the returned results. Recently terminated instances might appear in the returned results.This interval is usually less than one hour.- Specified by:
describeInstancesInRegion
in interfaceInstanceApi
- Parameters:
region
- Instances are tied to Availability Zones. However, the instance ID is tied to the Region.- See Also:
InstanceApi.runInstancesInRegion(java.lang.String, java.lang.String, java.lang.String, int, int, org.jclouds.ec2.options.RunInstancesOptions...)
,InstanceApi.terminateInstancesInRegion(java.lang.String, java.lang.String...)
,
-
describeInstancesInRegionWithFilter
@Named("DescribeInstances") @POST @Path("/") Set<? extends Reservation<? extends AWSRunningInstance>> describeInstancesInRegionWithFilter(@Nullable String region, com.google.common.collect.Multimap<String,String> filter)
Description copied from interface:InstanceApi
Returns information about instances that you own. If you specify one or filters, Amazon EC2 returns information for instances matching those filters. If you do not specify any filters, Amazon EC2 returns information for all relevant instances. If you specify an invalid filter, a fault is returned. Only instances you own will be included in the results. Recently terminated instances might appear in the returned results. This interval is usually less than one hour.- Specified by:
describeInstancesInRegionWithFilter
in interfaceInstanceApi
- Parameters:
region
- Instances are tied to Availability Zones. However, the instance ID is tied to the Region.- See Also:
InstanceApi.runInstancesInRegion(java.lang.String, java.lang.String, java.lang.String, int, int, org.jclouds.ec2.options.RunInstancesOptions...)
,InstanceApi.terminateInstancesInRegion(java.lang.String, java.lang.String...)
,
-
runInstancesInRegion
@Named("RunInstances") @POST @Path("/") Reservation<? extends AWSRunningInstance> runInstancesInRegion(@Nullable String region, @Nullable String nullableAvailabilityZone, @FormParam("ImageId") String imageId, @FormParam("MinCount") int minCount, @FormParam("MaxCount") int maxCount, RunInstancesOptions... options)
Description copied from interface:InstanceApi
Launches a specified number of instances of an AMI for which you have permissions. If Amazon EC2 cannot launch the minimum number AMIs you request, no instances will be launched. If there is insufficient capacity to launch the maximum number of AMIs you request, Amazon EC2 launches the minimum number specified for each AMI and allocate the remaining available instances using round robin.Security Groups
Note: Every instance is launched in a security group (created using the CreateSecurityGroup operation.Key Pair
You can provide an optional key pair ID for each image in the launch request (created using the CreateKeyPair operation). All instances that are created from images that use this key pair will have access to the associated public key at boot. You can use this key to provide secure access to an instance of an image on a per-instance basis. Amazon EC2 public images use this feature to provide secure access without passwords. Note: Launching public images without a key pair ID will leave them inaccessible. The public key material is made available to the instance at boot time by placing it in the openssh_id.pub file on a logical device that is exposed to the instance as /dev/sda2 (the instance store). The format of this file is suitable for use as an entry within ~/.ssh/authorized_keys (the OpenSSH format). This can be done at boot (e.g., as part of rc.local) allowing for secure access without passwords.User Data
Optional user data can be provided in the launch request. All instances that collectively comprise the launch request have access to this data. For more information, go the Amazon Elastic Compute Cloud Developer Guide.Product Codes
Note: If any of the AMIs have a product code attached for which the user has not subscribed, the RunInstances call will fail.Kernel
Important: We strongly recommend using the 2.6.18 Xen stock kernel with High-CPU and High-Memory instances. Although the default Amazon EC2 kernels will work, the new kernels provide greater stability and performance for these instance types. For more information about kernels, go the Amazon Elastic Compute Cloud Developer Guide.- Specified by:
runInstancesInRegion
in interfaceInstanceApi
- Parameters:
region
- Instances are tied to Availability Zones. However, the instance ID is tied to the Region.nullableAvailabilityZone
- Specifies the placement constraints (Availability Zones) for launching the instances. If null, Amazon will determine the best availability zone to place the instance.imageId
- Unique ID of a machine image, returned by a call tominCount
- Minimum number of instances to launch. If the value is more than Amazon EC2 can launch, no instances a re launched at all. Constraints: Between 1 and the maximum number allowed for your account (default: 20).maxCount
- Maximum number of instances to launch. If the value is more than Amazon EC2 can launch, the largest possible number above minCount will be launched instead. Constraints: Between 1 and the maximum number allowed for your account (default: 20).- See Also:
InstanceApi.describeInstancesInRegion(java.lang.String, java.lang.String...)
,InstanceApi.terminateInstancesInRegion(java.lang.String, java.lang.String...)
,#authorizeSecurityGroupIngressInRegion
,#revokeSecurityGroupIngressInRegion
,#describeSecurityGroupsInRegion
,#createSecurityGroupInRegion
,#createKeyPairInRegion
, ,RunInstancesOptions
-
-