public class AWSEC2TemplateOptions extends EC2TemplateOptions implements Cloneable
ComputeService#runNode
operation on
the "ec2" provider.
import static org.jclouds.aws.ec2.compute.options.AWSEC2TemplateOptions.Builder.*;
ComputeService client = // get connection
templateBuilder.options(inboundPorts(22, 80, 8080, 443));
Set extends NodeMetadata> set = client.createNodesInGroup(tag, 2, templateBuilder.build());
Modifier and Type | Class and Description |
---|---|
static class |
AWSEC2TemplateOptions.Builder |
TemplateOptions.ImmutableTemplateOptions
RunScriptOptions.ImmutableRunScriptOptions
Modifier and Type | Field and Description |
---|---|
static AWSEC2TemplateOptions |
NONE |
blockUntilRunning, inboundPorts, privateKey, publicKey, script, tags, userMetadata
authenticateSudo, blockOnComplete, loginPassword, loginPrivateKey, loginUser, port, runAsRoot, seconds, taskName, wrapInInitScript
Constructor and Description |
---|
AWSEC2TemplateOptions() |
getBlockDeviceMappings, getGroups, getKeyPair, getUserData, shouldAutomaticallyCreateKeyPair
as, blockOnComplete, getInboundPorts, getPrivateKey, getPublicKey, getRunScript, getTags, getUserMetadata, runScript, shouldBlockUntilRunning, tags, wrapInInitScript
getLoginPassword, getLoginPrivateKey, getLoginUser, getOverridingCredentials, getPort, getSeconds, getTaskName, hasLoginPassword, hasLoginPasswordOption, hasLoginPrivateKey, hasLoginPrivateKeyOption, shouldAuthenticateSudo, shouldBlockOnComplete, shouldRunAsRoot, shouldWrapInInitScript
public static final AWSEC2TemplateOptions NONE
public AWSEC2TemplateOptions clone()
clone
in class EC2TemplateOptions
public void copyTo(TemplateOptions to)
copyTo
in class EC2TemplateOptions
public AWSEC2TemplateOptions enableMonitoring()
CloudWatchClient
public AWSEC2TemplateOptions placementGroup(String placementGroup)
public AWSEC2TemplateOptions noPlacementGroup()
public AWSEC2TemplateOptions subnetId(String subnetId)
public AWSEC2TemplateOptions spotPrice(Float spotPrice)
public AWSEC2TemplateOptions spotOptions(RequestSpotInstancesOptions spotOptions)
public AWSEC2TemplateOptions securityGroupIds(String... groupIds)
AWSEC2TemplateOptions#securityGroupIds(Iterable)
public AWSEC2TemplateOptions securityGroupIds(Iterable<String> groupIds)
public AWSEC2TemplateOptions blockDeviceMappings(Iterable<? extends BlockDeviceMapping> blockDeviceMappings)
blockDeviceMappings
in class EC2TemplateOptions
public AWSEC2TemplateOptions userMetadata(Map<String,String> userMetadata)
userMetadata
in class EC2TemplateOptions
userMetadata
- user-defined metadata to assign to this serverpublic AWSEC2TemplateOptions userMetadata(String key, String value)
userMetadata
in class EC2TemplateOptions
key
- key to place into the metadata mapvalue
- value to associate with that keypublic AWSEC2TemplateOptions keyPair(String keyPair)
keyPair
in class EC2TemplateOptions
public AWSEC2TemplateOptions mapEBSSnapshotToDeviceName(String deviceName, String snapshotId, Integer sizeInGib, boolean deleteOnTermination)
mapEBSSnapshotToDeviceName
in class EC2TemplateOptions
public AWSEC2TemplateOptions mapEphemeralDeviceToDeviceName(String deviceName, String virtualName)
mapEphemeralDeviceToDeviceName
in class EC2TemplateOptions
public AWSEC2TemplateOptions mapNewVolumeToDeviceName(String deviceName, int sizeInGib, boolean deleteOnTermination)
mapNewVolumeToDeviceName
in class EC2TemplateOptions
public AWSEC2TemplateOptions noKeyPair()
noKeyPair
in class EC2TemplateOptions
public AWSEC2TemplateOptions securityGroups(Iterable<String> groupIds)
securityGroups
in class EC2TemplateOptions
public AWSEC2TemplateOptions securityGroups(String... groupIds)
securityGroups
in class EC2TemplateOptions
EC2TemplateOptions#securityGroups(Iterable)
public AWSEC2TemplateOptions unmapDeviceNamed(String deviceName)
unmapDeviceNamed
in class EC2TemplateOptions
public AWSEC2TemplateOptions userData(byte[] unencodedData)
userData
in class EC2TemplateOptions
public AWSEC2TemplateOptions blockOnPort(int port, int seconds)
blockOnPort
in class EC2TemplateOptions
public AWSEC2TemplateOptions inboundPorts(int... ports)
inboundPorts
in class EC2TemplateOptions
public AWSEC2TemplateOptions authorizePublicKey(String publicKey)
authorizePublicKey
in class EC2TemplateOptions
public AWSEC2TemplateOptions installPrivateKey(String privateKey)
installPrivateKey
in class EC2TemplateOptions
@Deprecated public AWSEC2TemplateOptions runScript(Payload script)
runScript
in class EC2TemplateOptions
TemplateOptions.ImmutableTemplateOptions.runScript(Statement)
,
Payloads
public AWSEC2TemplateOptions blockUntilRunning(boolean blockUntilRunning)
TemplateOptions.ImmutableTemplateOptions.runScript(Statement)
and
RunScriptOptions.blockOnComplete(boolean)
, as all current
implementations utilize ssh in order to execute scripts.blockUntilRunning
in class EC2TemplateOptions
blockUntilRunning
- (default true) whether to block until the nodes in this template
are in NodeState.RUNNING
statepublic AWSEC2TemplateOptions dontAuthorizePublicKey()
dontAuthorizePublicKey
in class EC2TemplateOptions
public AWSEC2TemplateOptions nameTask(String name)
nameTask
in class EC2TemplateOptions
jclouds-script-timestamp
where timestamp is millis since
epochpublic AWSEC2TemplateOptions runAsRoot(boolean runAsRoot)
runAsRoot
in class EC2TemplateOptions
public AWSEC2TemplateOptions runScript(Statement script)
runScript
in class EC2TemplateOptions
@Deprecated public AWSEC2TemplateOptions overrideCredentialsWith(Credentials overridingCredentials)
overrideCredentialsWith
in class EC2TemplateOptions
RunScriptOptions.overrideLoginCredentials(org.jclouds.domain.LoginCredentials)
@Deprecated public AWSEC2TemplateOptions overrideLoginUserWith(String loginUser)
overrideLoginUserWith
in class EC2TemplateOptions
RunScriptOptions.overrideLoginCredentials(org.jclouds.domain.LoginCredentials)
@Deprecated public AWSEC2TemplateOptions overrideLoginCredentialWith(String loginCredential)
overrideLoginCredentialWith
in class EC2TemplateOptions
RunScriptOptions.overrideLoginCredentials(org.jclouds.domain.LoginCredentials)
public AWSEC2TemplateOptions overrideLoginCredentials(LoginCredentials overridingCredentials)
overrideLoginCredentials
in class EC2TemplateOptions
public AWSEC2TemplateOptions overrideLoginPassword(String password)
overrideLoginPassword
in class EC2TemplateOptions
public AWSEC2TemplateOptions overrideLoginPrivateKey(String privateKey)
overrideLoginPrivateKey
in class EC2TemplateOptions
public AWSEC2TemplateOptions overrideLoginUser(String loginUser)
overrideLoginUser
in class EC2TemplateOptions
public AWSEC2TemplateOptions overrideAuthenticateSudo(boolean authenticateSudo)
overrideAuthenticateSudo
in class EC2TemplateOptions
public String getPlacementGroup()
public boolean shouldAutomaticallyCreatePlacementGroup()
public boolean isMonitoringEnabled()
public String getSubnetId()
public Float getSpotPrice()
public RequestSpotInstancesOptions getSpotOptions()
public int hashCode()
hashCode
in class EC2TemplateOptions
public boolean equals(Object obj)
equals
in class EC2TemplateOptions
public String toString()
toString
in class EC2TemplateOptions
Copyright © 2009-2012 jclouds. All Rights Reserved.