Package org.jclouds.ec2.options
Class RunInstancesOptions
java.lang.Object
org.jclouds.http.options.BaseHttpRequestOptions
org.jclouds.ec2.options.internal.BaseEC2RequestOptions
org.jclouds.ec2.options.RunInstancesOptions
- All Implemented Interfaces:
HttpRequestOptions
- Direct Known Subclasses:
AWSRunInstancesOptions
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));
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class org.jclouds.http.options.BaseHttpRequestOptions
formParameters, headers, pathSuffix, payload, queryParameters
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSpecifies the instance type.withBlockDeviceMappings
(Set<? extends BlockDeviceMapping> mappings) Specifies the Block Device Mapping for the instancewithClientToken
(String clientToken) Specifies the optional ClientToken field, which triggers idempotent RunInstances calls.withKernelId
(String kernelId) The ID of the kernel with which to launch the instance.withKeyName
(String keyName) The name of the key pair.withRamdisk
(String ramDiskId) The ID of the RAM disk with which to launch the instance.withSecurityGroup
(String securityGroup) Attaches a single security group.withSecurityGroups
(Iterable<String> securityGroups) Attach multiple security groupswithSecurityGroups
(String... securityGroups) Attach multiple security groupswithUserData
(byte[] unencodedData) Unencoded dataMethods 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 Details
-
NONE
-
-
Constructor Details
-
RunInstancesOptions
public RunInstancesOptions()
-
-
Method Details
-
withKeyName
The name of the key pair. -
withSecurityGroups
Attach multiple security groups -
withSecurityGroups
Attach multiple security groups -
withSecurityGroup
Attaches a single security group. Multiple calls to this method won't add more groups.- Parameters:
securityGroup
- name of an existing security group
-
withUserData
Unencoded data -
asType
Specifies the instance type. default small; -
withKernelId
The ID of the kernel with which to launch the instance. -
withRamdisk
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. -
withBlockDeviceMappings
Specifies the Block Device Mapping for the instance -
withClientToken
Specifies the optional ClientToken field, which triggers idempotent RunInstances calls. See here for more details.
-