Class RunInstancesOptions

  • All Implemented Interfaces:
    HttpRequestOptions
    Direct Known Subclasses:
    AWSRunInstancesOptions

    public class RunInstancesOptions
    extends BaseEC2RequestOptions
    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:
    • Constructor Detail

      • RunInstancesOptions

        public RunInstancesOptions()
    • Method Detail

      • withSecurityGroups

        public RunInstancesOptions withSecurityGroups​(String... securityGroups)
        Attach multiple security groups
      • withSecurityGroup

        public RunInstancesOptions withSecurityGroup​(String securityGroup)
        Attaches a single security group. Multiple calls to this method won't add more groups.
        Parameters:
        securityGroup - name of an existing security group
      • withUserData

        public RunInstancesOptions withUserData​(byte[] unencodedData)
        Unencoded data
      • withKernelId

        public RunInstancesOptions withKernelId​(String kernelId)
        The ID of the kernel with which to launch the instance.
      • withRamdisk

        public RunInstancesOptions withRamdisk​(String ramDiskId)
        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.
      • withClientToken

        public RunInstancesOptions withClientToken​(String clientToken)
        Specifies the optional ClientToken field, which triggers idempotent RunInstances calls. See here for more details.