Package org.jclouds.aws.ec2.options
Class AWSRunInstancesOptions
- java.lang.Object
-
- org.jclouds.http.options.BaseHttpRequestOptions
-
- org.jclouds.ec2.options.internal.BaseEC2RequestOptions
-
- org.jclouds.ec2.options.RunInstancesOptions
-
- org.jclouds.aws.ec2.options.AWSRunInstancesOptions
-
- All Implemented Interfaces:
HttpRequestOptions
public class AWSRunInstancesOptions extends RunInstancesOptions
Contains options supported in the Form API for the RunInstances operation.Usage
The recommended way to instantiate a RunInstancesOptions object is to statically import RunInstancesOptions.Builder.* and invoke a static creation method followed by an instance mutator (if needed):import static org.jclouds.aws.ec2.options.RunInstancesOptions.Builder.* EC2Api connection = // get connection Future
instances = connection.runInstances(executableBy("123125").imageIds(1000, 1004));
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AWSRunInstancesOptions.Builder
-
Field Summary
Fields Modifier and Type Field Description static AWSRunInstancesOptions
NONE
-
Fields inherited from class org.jclouds.http.options.BaseHttpRequestOptions
formParameters, headers, pathSuffix, payload, queryParameters
-
-
Constructor Summary
Constructors Constructor Description AWSRunInstancesOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AWSRunInstancesOptions
asType(String type)
Specifies the instance type.AWSRunInstancesOptions
enableMonitoring()
Enables monitoring for the instance.LaunchSpecification.Builder
getLaunchSpecificationBuilder()
AWSRunInstancesOptions
inPlacementGroup(String placementGroup)
Specifies the name of an existing placement group you want to launch the instance into (for cluster compute instances).AWSRunInstancesOptions
withBlockDeviceMappings(Set<? extends BlockDeviceMapping> mappings)
Specifies the Block Device Mapping for the instanceAWSRunInstancesOptions
withDedicatedHostId(String hostId)
Specifies the ID of the dedicated host on which the instance should resist.AWSRunInstancesOptions
withIAMInstanceProfileArn(String arn)
Amazon resource name (ARN) of the IAM Instance Profile (IIP) to associate with the instances.AWSRunInstancesOptions
withIAMInstanceProfileName(String name)
The name of the IAM Instance Profile (IIP) to associate with the instances.AWSRunInstancesOptions
withKernelId(String kernelId)
The ID of the kernel with which to launch the instance.AWSRunInstancesOptions
withKeyName(String keyName)
The name of the key pair.AWSRunInstancesOptions
withPrivateIpAddress(String address)
The primary IP address for VPC instance.AWSRunInstancesOptions
withRamdisk(String ramDiskId)
The ID of the RAM disk with which to launch the instance.AWSRunInstancesOptions
withSecurityGroup(String securityGroup)
Attaches a single security group.AWSRunInstancesOptions
withSecurityGroupId(String securityGroup)
AWSRunInstancesOptions
withSecurityGroupIds(Iterable<String> securityGroupIds)
AWSRunInstancesOptions
withSecurityGroupIds(String... securityGroupIds)
AWSRunInstancesOptions
withSecurityGroups(Iterable<String> securityGroups)
Attach multiple security groupsAWSRunInstancesOptions
withSecurityGroups(String... securityGroups)
Attach multiple security groupsAWSRunInstancesOptions
withSubnetId(String subnetId)
Specifies the subnet ID within which to launch the instance(s) for Amazon Virtual Private Cloud.AWSRunInstancesOptions
withTenancy(Tenancy tenancy)
Specifies the tenancy of the instance within which to launch the instance(s).AWSRunInstancesOptions
withUserData(byte[] unencodedData)
Unencoded data-
Methods inherited from class org.jclouds.ec2.options.RunInstancesOptions
withClientToken
-
Methods inherited from class org.jclouds.ec2.options.internal.BaseEC2RequestOptions
getFormValuesWithKeysPrefixedBy, indexFormValuesWithPrefix, indexFormValuesWithPrefix, toString
-
Methods inherited from class org.jclouds.http.options.BaseHttpRequestOptions
buildFormParameters, buildPathSuffix, buildQueryParameters, buildRequestHeaders, buildStringPayload, equals, getFirstFormOrNull, getFirstHeaderOrNull, getFirstQueryOrNull, hashCode, replaceHeader
-
-
-
-
Field Detail
-
NONE
public static final AWSRunInstancesOptions NONE
-
-
Method Detail
-
inPlacementGroup
public AWSRunInstancesOptions inPlacementGroup(String placementGroup)
Specifies the name of an existing placement group you want to launch the instance into (for cluster compute instances).- Parameters:
placementGroup
- name of an existing placement group
-
withTenancy
public AWSRunInstancesOptions withTenancy(Tenancy tenancy)
Specifies the tenancy of the instance within which to launch the instance(s).
-
withDedicatedHostId
public AWSRunInstancesOptions withDedicatedHostId(String hostId)
Specifies the ID of the dedicated host on which the instance should resist.
-
enableMonitoring
public AWSRunInstancesOptions enableMonitoring()
Enables monitoring for the instance.
-
withSubnetId
public AWSRunInstancesOptions withSubnetId(String subnetId)
Specifies the subnet ID within which to launch the instance(s) for Amazon Virtual Private Cloud.
-
withSecurityGroupId
public AWSRunInstancesOptions withSecurityGroupId(String securityGroup)
-
withSecurityGroupIds
public AWSRunInstancesOptions withSecurityGroupIds(Iterable<String> securityGroupIds)
-
withSecurityGroupIds
public AWSRunInstancesOptions withSecurityGroupIds(String... securityGroupIds)
-
withIAMInstanceProfileArn
public AWSRunInstancesOptions withIAMInstanceProfileArn(String arn)
Amazon resource name (ARN) of the IAM Instance Profile (IIP) to associate with the instances.
-
withIAMInstanceProfileName
public AWSRunInstancesOptions withIAMInstanceProfileName(String name)
The name of the IAM Instance Profile (IIP) to associate with the instances.
-
withPrivateIpAddress
public AWSRunInstancesOptions withPrivateIpAddress(String address)
The primary IP address for VPC instance. You must specify a value from the IP address range of the subnet.- See Also:
RunningInstance.getPrivateIpAddress()
-
withBlockDeviceMappings
public AWSRunInstancesOptions withBlockDeviceMappings(Set<? extends BlockDeviceMapping> mappings)
Description copied from class:RunInstancesOptions
Specifies the Block Device Mapping for the instance- Overrides:
withBlockDeviceMappings
in classRunInstancesOptions
-
withKernelId
public AWSRunInstancesOptions withKernelId(String kernelId)
Description copied from class:RunInstancesOptions
The ID of the kernel with which to launch the instance.- Overrides:
withKernelId
in classRunInstancesOptions
-
withKeyName
public AWSRunInstancesOptions withKeyName(String keyName)
Description copied from class:RunInstancesOptions
The name of the key pair.- Overrides:
withKeyName
in classRunInstancesOptions
-
withRamdisk
public AWSRunInstancesOptions withRamdisk(String ramDiskId)
Description copied from class:RunInstancesOptions
The ID of the RAM disk with which to launch the instance. Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk. To find kernel requirements, go to the Resource Center and search for the kernel ID.- Overrides:
withRamdisk
in classRunInstancesOptions
-
withSecurityGroup
public AWSRunInstancesOptions withSecurityGroup(String securityGroup)
Description copied from class:RunInstancesOptions
Attaches a single security group. Multiple calls to this method won't add more groups.- Overrides:
withSecurityGroup
in classRunInstancesOptions
- Parameters:
securityGroup
- name of an existing security group
-
withSecurityGroups
public AWSRunInstancesOptions withSecurityGroups(Iterable<String> securityGroups)
Description copied from class:RunInstancesOptions
Attach multiple security groups- Overrides:
withSecurityGroups
in classRunInstancesOptions
-
withSecurityGroups
public AWSRunInstancesOptions withSecurityGroups(String... securityGroups)
Description copied from class:RunInstancesOptions
Attach multiple security groups- Overrides:
withSecurityGroups
in classRunInstancesOptions
-
withUserData
public AWSRunInstancesOptions withUserData(byte[] unencodedData)
Description copied from class:RunInstancesOptions
Unencoded data- Overrides:
withUserData
in classRunInstancesOptions
-
asType
public AWSRunInstancesOptions asType(String type)
Description copied from class:RunInstancesOptions
Specifies the instance type. default small;- Overrides:
asType
in classRunInstancesOptions
-
getLaunchSpecificationBuilder
public LaunchSpecification.Builder getLaunchSpecificationBuilder()
-
-