public interface InstanceApi
Modifier and Type | Method and Description |
---|---|
Set<? extends Reservation<? extends RunningInstance>> |
describeInstancesInRegion(String region,
String... instanceIds)
Returns information about instances that you own.
|
Set<? extends Reservation<? extends RunningInstance>> |
describeInstancesInRegionWithFilter(String region,
com.google.common.collect.Multimap<String,String> filter)
Returns information about instances that you own.
|
Map<String,BlockDevice> |
getBlockDeviceMappingForInstanceInRegion(String region,
String instanceId) |
String |
getConsoleOutputForInstanceInRegion(String region,
String instanceId)
Retrieves console output for the specified instance.
|
Volume.InstanceInitiatedShutdownBehavior |
getInstanceInitiatedShutdownBehaviorForInstanceInRegion(String region,
String instanceId) |
String |
getInstanceTypeForInstanceInRegion(String region,
String instanceId) |
String |
getKernelForInstanceInRegion(String region,
String instanceId) |
String |
getRamdiskForInstanceInRegion(String region,
String instanceId) |
String |
getRootDeviceNameForInstanceInRegion(String region,
String instanceId) |
String |
getUserDataForInstanceInRegion(String region,
String instanceId) |
boolean |
isApiTerminationDisabledForInstanceInRegion(String region,
String instanceId) |
void |
rebootInstancesInRegion(String region,
String... instanceIds)
Requests a reboot of one or more instances.
|
void |
resetKernelForInstanceInRegion(String region,
String instanceId)
Resets an attribute of an instance to its default value.
|
void |
resetRamdiskForInstanceInRegion(String region,
String instanceId)
Resets an attribute of an instance to its default value.
|
Reservation<? extends RunningInstance> |
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.
|
void |
setApiTerminationDisabledForInstanceInRegion(String region,
String instanceId,
boolean apiTerminationDisabled)
This command works while the instance is running and controls whether or
not the api can be used to terminate the instance.
|
void |
setBlockDeviceMappingForInstanceInRegion(String region,
String instanceId,
Map<String,BlockDevice> blockDeviceMapping)
Sets the blockDeviceMapping used for an instance.
|
void |
setInstanceInitiatedShutdownBehaviorForInstanceInRegion(String region,
String instanceId,
Volume.InstanceInitiatedShutdownBehavior instanceInitiatedShutdownBehavior)
Specifies whether the instance's Amazon EBS volumes are stopped or
terminated when the instance is shut down.
|
void |
setInstanceTypeForInstanceInRegion(String region,
String instanceId,
String instanceType)
Sets the instanceType used for starting the instance.
|
void |
setKernelForInstanceInRegion(String region,
String instanceId,
String kernel)
Sets the kernelId used for starting the instance.
|
void |
setRamdiskForInstanceInRegion(String region,
String instanceId,
String ramdisk)
Sets the ramdisk used for starting the instance.
|
void |
setUserDataForInstanceInRegion(String region,
String instanceId,
byte[] unencodedData)
Sets the userData used for starting the instance.
|
Set<? extends InstanceStateChange> |
startInstancesInRegion(String region,
String... instanceIds)
Starts an instance that uses an Amazon EBS volume as its root device.
|
Set<? extends InstanceStateChange> |
stopInstancesInRegion(String region,
boolean force,
String... instanceIds)
Stops an instance that uses an Amazon EBS volume as its root device.
|
Set<? extends InstanceStateChange> |
terminateInstancesInRegion(String region,
String... instanceIds)
Shuts down one or more instances.
|
@Named(value="DescribeInstances") Set<? extends Reservation<? extends RunningInstance>> describeInstancesInRegion(@Nullable String region, String... instanceIds)
region
- Instances are tied to Availability Zones. However, the instance
ID is tied to the Region.runInstancesInRegion(java.lang.String, java.lang.String, java.lang.String, int, int, org.jclouds.ec2.options.RunInstancesOptions...)
,
terminateInstancesInRegion(java.lang.String, java.lang.String...)
,
@Named(value="DescribeInstances") Set<? extends Reservation<? extends RunningInstance>> describeInstancesInRegionWithFilter(@Nullable String region, com.google.common.collect.Multimap<String,String> filter)
region
- Instances are tied to Availability Zones. However, the instance
ID is tied to the Region.filter
- runInstancesInRegion(java.lang.String, java.lang.String, java.lang.String, int, int, org.jclouds.ec2.options.RunInstancesOptions...)
,
terminateInstancesInRegion(java.lang.String, java.lang.String...)
,
@Named(value="RunInstances") Reservation<? extends RunningInstance> runInstancesInRegion(@Nullable String region, @Nullable String nullableAvailabilityZone, String imageId, int minCount, int maxCount, RunInstancesOptions... options)
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).describeInstancesInRegion(java.lang.String, java.lang.String...)
,
terminateInstancesInRegion(java.lang.String, java.lang.String...)
,
#authorizeSecurityGroupIngressInRegion
,
#revokeSecurityGroupIngressInRegion
,
#describeSecurityGroupsInRegion
,
#createSecurityGroupInRegion
,
#createKeyPairInRegion
,
,
RunInstancesOptions
@Named(value="RebootInstances") void rebootInstancesInRegion(@Nullable String region, String... instanceIds)
region
- Instances are tied to Availability Zones. However, the instance
ID is tied to the Region.instanceIds
- Instance ID to reboot.startInstancesInRegion(java.lang.String, java.lang.String...)
,
runInstancesInRegion(java.lang.String, java.lang.String, java.lang.String, int, int, org.jclouds.ec2.options.RunInstancesOptions...)
,
describeInstancesInRegion(java.lang.String, java.lang.String...)
,
terminateInstancesInRegion(java.lang.String, java.lang.String...)
,
@Named(value="TerminateInstances") Set<? extends InstanceStateChange> terminateInstancesInRegion(@Nullable String region, String... instanceIds)
region
- Instances are tied to Availability Zones. However, the instance
ID is tied to the Region.instanceIds
- Instance ID to terminate.describeInstancesInRegion(java.lang.String, java.lang.String...)
,
@Named(value="StopInstances") Set<? extends InstanceStateChange> stopInstancesInRegion(@Nullable String region, boolean force, String... instanceIds)
region
- Instances are tied to Availability Zones. However, the instance
ID is tied to the Region.force
- Forces the instance to stop. 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. This option is not recommended for
Windows instances.instanceIds
- Instance ID to stop.startInstancesInRegion(java.lang.String, java.lang.String...)
,
runInstancesInRegion(java.lang.String, java.lang.String, java.lang.String, int, int, org.jclouds.ec2.options.RunInstancesOptions...)
,
describeInstancesInRegion(java.lang.String, java.lang.String...)
,
terminateInstancesInRegion(java.lang.String, java.lang.String...)
,
@Named(value="StartInstances") Set<? extends InstanceStateChange> startInstancesInRegion(@Nullable String region, String... instanceIds)
region
- Instances are tied to Availability Zones. However, the instance
ID is tied to the Region.instanceIds
- Instance ID to start.stopInstancesInRegion(java.lang.String, boolean, java.lang.String...)
,
runInstancesInRegion(java.lang.String, java.lang.String, java.lang.String, int, int, org.jclouds.ec2.options.RunInstancesOptions...)
,
describeInstancesInRegion(java.lang.String, java.lang.String...)
,
terminateInstancesInRegion(java.lang.String, java.lang.String...)
,
@Named(value="DescribeInstanceAttribute") String getUserDataForInstanceInRegion(@Nullable String region, String instanceId)
region
- Instances are tied to Availability Zones. However, the instance
ID is tied to the Region.instanceId
- which instance to describe the attribute of@Named(value="DescribeInstanceAttribute") String getRootDeviceNameForInstanceInRegion(@Nullable String region, String instanceId)
region
- Instances are tied to Availability Zones. However, the instance
ID is tied to the Region.instanceId
- which instance to describe the attribute of@Named(value="DescribeInstanceAttribute") String getRamdiskForInstanceInRegion(@Nullable String region, String instanceId)
region
- Instances are tied to Availability Zones. However, the instance
ID is tied to the Region.instanceId
- which instance to describe the attribute of@Named(value="DescribeInstanceAttribute") String getKernelForInstanceInRegion(@Nullable String region, String instanceId)
region
- Instances are tied to Availability Zones. However, the instance
ID is tied to the Region.instanceId
- which instance to describe the attribute of@Named(value="DescribeInstanceAttribute") boolean isApiTerminationDisabledForInstanceInRegion(@Nullable String region, String instanceId)
region
- Instances are tied to Availability Zones. However, the instance
ID is tied to the Region.instanceId
- which instance to describe the attribute of@Named(value="DescribeInstanceAttribute") String getInstanceTypeForInstanceInRegion(@Nullable String region, String instanceId)
region
- Instances are tied to Availability Zones. However, the instance
ID is tied to the Region.instanceId
- which instance to describe the attribute of@Named(value="DescribeInstanceAttribute") Volume.InstanceInitiatedShutdownBehavior getInstanceInitiatedShutdownBehaviorForInstanceInRegion(@Nullable String region, String instanceId)
region
- Instances are tied to Availability Zones. However, the instance
ID is tied to the Region.instanceId
- which instance to describe the attribute of@Named(value="DescribeInstanceAttribute") Map<String,BlockDevice> getBlockDeviceMappingForInstanceInRegion(@Nullable String region, String instanceId)
region
- Instances are tied to Availability Zones. However, the instance
ID is tied to the Region.instanceId
- which instance to describe the attribute of@Named(value="ResetInstanceAttribute") void resetRamdiskForInstanceInRegion(@Nullable String region, String instanceId)
region
- Instances are tied to Availability Zones. However, the instance
ID is tied to the Region.instanceId
- which instance to reset the attribute of@Named(value="ResetInstanceAttribute") void resetKernelForInstanceInRegion(@Nullable String region, String instanceId)
region
- Instances are tied to Availability Zones. However, the instance
ID is tied to the Region.instanceId
- which instance to reset the attribute of@Named(value="ModifyInstanceAttribute") void setUserDataForInstanceInRegion(@Nullable String region, String instanceId, byte[] unencodedData)
InstanceState#STOPPED
state, which
implies two things:
InstanceState#STOPPING
to InstanceState#STOPPED
@Named(value="ModifyInstanceAttribute") void setRamdiskForInstanceInRegion(@Nullable String region, String instanceId, String ramdisk)
InstanceState#STOPPED
state, which
implies two things:
InstanceState#STOPPING
to InstanceState#STOPPED
@Named(value="ModifyInstanceAttribute") void setKernelForInstanceInRegion(@Nullable String region, String instanceId, String kernel)
InstanceState#STOPPED
state, which
implies two things:
InstanceState#STOPPING
to InstanceState#STOPPED
@Named(value="ModifyInstanceAttribute") void setApiTerminationDisabledForInstanceInRegion(@Nullable String region, String instanceId, boolean apiTerminationDisabled)
@Named(value="ModifyInstanceAttribute") void setInstanceTypeForInstanceInRegion(@Nullable String region, String instanceId, String instanceType)
InstanceState#STOPPED
state, which
implies two things:
InstanceState#STOPPING
to InstanceState#STOPPED
@Named(value="ModifyInstanceAttribute") void setInstanceInitiatedShutdownBehaviorForInstanceInRegion(@Nullable String region, String instanceId, Volume.InstanceInitiatedShutdownBehavior instanceInitiatedShutdownBehavior)
InstanceState#STOPPED
state, which
implies two things:
InstanceState#STOPPING
to InstanceState#STOPPED
region
- Instances are tied to Availability Zones. However, the instance
ID is tied to the Region.instanceId
- which instance to change the attribute ofinstanceInitiatedShutdownBehavior
- whether the instance's Amazon EBS volumes are stopped or
terminated when the instance is shut down.@Named(value="ModifyInstanceAttribute") void setBlockDeviceMappingForInstanceInRegion(@Nullable String region, String instanceId, Map<String,BlockDevice> blockDeviceMapping)
InstanceState#STOPPED
state, which
implies two things:
InstanceState#STOPPING
to InstanceState#STOPPED
BlockDevice
, the
constructor can be used with the following parameters:
BlockDevice#EbsBlockDevice(String, String, boolean)
, that are:
@Named(value="GetConsoleOutput") String getConsoleOutputForInstanceInRegion(@Nullable String region, String instanceId)
region
- Instances are tied to Availability Zones. However, the instance
ID is tied to the Region.instanceId
- which instance to retrieve console output forCopyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.