public static class TemplateOptions.ImmutableTemplateOptions extends TemplateOptions
TemplateOptions.Builder, TemplateOptions.ImmutableTemplateOptions
RunScriptOptions.ImmutableRunScriptOptions
blockUntilRunning, inboundPorts, networks, nodeNames, NONE, privateKey, publicKey, script, securityGroups, tags, userMetadata
authenticateSudo, blockOnComplete, loginPassword, loginPrivateKey, loginUser, port, runAsRoot, seconds, taskName, wrapInInitScript
Constructor and Description |
---|
TemplateOptions.ImmutableTemplateOptions(TemplateOptions delegate) |
Modifier and Type | Method and Description |
---|---|
<T extends TemplateOptions> |
as(Class<T> clazz) |
TemplateOptions |
authorizePublicKey(String publicKey)
authorize an rsa ssh key.
|
TemplateOptions |
blockOnComplete(boolean blockOnComplete)
As of version 1.1.0, we cannot kick off a script unless a node is in
RUNNING state.
|
TemplateOptions |
blockOnPort(int port,
int seconds)
When the node is started, wait until the following port is active
|
TemplateOptions |
blockUntilRunning(boolean blockUntilRunning)
unsupported as objects of this class are immutable
|
TemplateOptions |
clone() |
void |
copyTo(TemplateOptions to) |
TemplateOptions |
dontAuthorizePublicKey() |
Set<String> |
getGroups() |
int[] |
getInboundPorts() |
String |
getLoginPassword() |
String |
getLoginPrivateKey() |
String |
getLoginUser() |
Set<String> |
getNodeNames() |
int |
getPort() |
String |
getPrivateKey() |
String |
getPublicKey() |
Statement |
getRunScript() |
int |
getSeconds() |
Set<String> |
getTags() |
String |
getTaskName() |
Map<String,String> |
getUserMetadata() |
TemplateOptions |
inboundPorts(int... ports)
Opens the set of ports to public access.
|
TemplateOptions |
installPrivateKey(String privateKey)
replaces the rsa ssh key used at login.
|
TemplateOptions |
nameTask(String name) |
TemplateOptions |
networks(Iterable<String> networks)
Assigns the created nodes to these networks
|
TemplateOptions |
networks(String... networks) |
TemplateOptions |
nodeNames(Iterable<String> nodeNames)
specifies names to be used for the created nodes.
|
TemplateOptions |
overrideAuthenticateSudo(boolean authenticateSudo) |
TemplateOptions |
overrideLoginCredentials(LoginCredentials overridingCredentials) |
TemplateOptions |
overrideLoginPassword(String password) |
TemplateOptions |
overrideLoginPrivateKey(String privateKey) |
TemplateOptions |
overrideLoginUser(String loginUser) |
TemplateOptions |
runAsRoot(boolean runAsRoot) |
TemplateOptions |
runScript(Statement script)
unsupported as objects of this class are immutable
|
TemplateOptions |
securityGroups(Iterable<String> securityGroups)
assigns the created nodes to these security groups
|
TemplateOptions |
securityGroups(String... securityGroups) |
Boolean |
shouldAuthenticateSudo() |
boolean |
shouldBlockOnComplete() |
boolean |
shouldBlockUntilRunning() |
boolean |
shouldRunAsRoot()
Whether to run the script as root (or run with current privileges).
|
boolean |
shouldWrapInInitScript()
Whether to wait until the script has completed.
|
TemplateOptions |
tags(Iterable<String> tags)
assigns tags to the created nodes
|
String |
toString() |
TemplateOptions |
userMetadata(Map<String,String> userMetadata) |
TemplateOptions |
userMetadata(String key,
String value) |
TemplateOptions |
wrapInInitScript(boolean wrapInInitScript)
default true
|
equals, getNetworks, hashCode, runScript, string
copyTo, hasLoginPassword, hasLoginPasswordOption, hasLoginPrivateKey, hasLoginPrivateKeyOption, overrideLoginPassword, overrideLoginPrivateKey
public TemplateOptions.ImmutableTemplateOptions(TemplateOptions delegate)
public TemplateOptions clone()
clone
in class TemplateOptions
public String getTaskName()
getTaskName
in class RunScriptOptions
public int getPort()
getPort
in class RunScriptOptions
public int getSeconds()
getSeconds
in class RunScriptOptions
public boolean shouldRunAsRoot()
RunScriptOptions
shouldRunAsRoot
in class RunScriptOptions
public boolean shouldBlockOnComplete()
shouldBlockOnComplete
in class RunScriptOptions
RunScriptOptions.blockOnComplete(boolean)
public boolean shouldWrapInInitScript()
RunScriptOptions
shouldWrapInInitScript
in class RunScriptOptions
public void copyTo(TemplateOptions to)
copyTo
in class TemplateOptions
public String toString()
toString
in class RunScriptOptions
public TemplateOptions runScript(Statement script)
runScript
in class TemplateOptions
public TemplateOptions dontAuthorizePublicKey()
dontAuthorizePublicKey
in class TemplateOptions
public TemplateOptions blockOnPort(int port, int seconds)
RunScriptOptions
blockOnPort
in class TemplateOptions
public TemplateOptions nameTask(String name)
nameTask
in class TemplateOptions
jclouds-script-timestamp
where timestamp is millis since
epochpublic TemplateOptions runAsRoot(boolean runAsRoot)
runAsRoot
in class TemplateOptions
public TemplateOptions wrapInInitScript(boolean wrapInInitScript)
RunScriptOptions
wrapInInitScript
in class TemplateOptions
wrapInInitScript
- if the command is long-running, use this option to ensure it is
wrapInInitScripted properly. (ex. have jclouds wrap it an init
script, nohup, etc)public TemplateOptions blockOnComplete(boolean blockOnComplete)
RunScriptOptions
blockOnComplete
in class TemplateOptions
blockOnComplete
- (default true) false means kick off the script in the
background, but don't wait for it to finish. (as of version
1.1.0, implemented as nohup)public TemplateOptions overrideLoginCredentials(LoginCredentials overridingCredentials)
overrideLoginCredentials
in class TemplateOptions
public TemplateOptions overrideLoginPassword(String password)
overrideLoginPassword
in class TemplateOptions
public TemplateOptions overrideLoginPrivateKey(String privateKey)
overrideLoginPrivateKey
in class TemplateOptions
public TemplateOptions overrideAuthenticateSudo(boolean authenticateSudo)
overrideAuthenticateSudo
in class TemplateOptions
public String getLoginUser()
getLoginUser
in class RunScriptOptions
ComputeService.runScriptOnNode(java.lang.String, org.jclouds.scriptbuilder.domain.Statement, org.jclouds.compute.options.RunScriptOptions)
. By
default, null.public Boolean shouldAuthenticateSudo()
shouldAuthenticateSudo
in class RunScriptOptions
ComputeService.runScriptOnNode(java.lang.String, org.jclouds.scriptbuilder.domain.Statement, org.jclouds.compute.options.RunScriptOptions)
. By
default, null.public String getLoginPassword()
getLoginPassword
in class RunScriptOptions
ComputeService.runScriptOnNode(java.lang.String, org.jclouds.scriptbuilder.domain.Statement, org.jclouds.compute.options.RunScriptOptions)
. By
default, null.public String getLoginPrivateKey()
getLoginPrivateKey
in class RunScriptOptions
ComputeService.runScriptOnNode(java.lang.String, org.jclouds.scriptbuilder.domain.Statement, org.jclouds.compute.options.RunScriptOptions)
. By
default, null.public TemplateOptions overrideLoginUser(String loginUser)
overrideLoginUser
in class TemplateOptions
public <T extends TemplateOptions> T as(Class<T> clazz)
as
in class TemplateOptions
public TemplateOptions authorizePublicKey(String publicKey)
TemplateOptions
authorizePublicKey
in class TemplateOptions
public TemplateOptions blockUntilRunning(boolean blockUntilRunning)
blockUntilRunning
in class TemplateOptions
blockUntilRunning
- (default true) whether to block until the nodes in this template
are in Status#RUNNING
statepublic int[] getInboundPorts()
getInboundPorts
in class TemplateOptions
public String getPrivateKey()
getPrivateKey
in class TemplateOptions
public String getPublicKey()
getPublicKey
in class TemplateOptions
public Statement getRunScript()
getRunScript
in class TemplateOptions
public boolean shouldBlockUntilRunning()
shouldBlockUntilRunning
in class TemplateOptions
TemplateOptions.blockUntilRunning(boolean)
public TemplateOptions inboundPorts(int... ports)
TemplateOptions
inboundPorts
in class TemplateOptions
public TemplateOptions installPrivateKey(String privateKey)
TemplateOptions
installPrivateKey
in class TemplateOptions
public Set<String> getTags()
getTags
in class TemplateOptions
public TemplateOptions tags(Iterable<String> tags)
TemplateOptions
tags
in class TemplateOptions
public Set<String> getNodeNames()
getNodeNames
in class TemplateOptions
public TemplateOptions nodeNames(Iterable<String> nodeNames)
TemplateOptions
nodeNames
in class TemplateOptions
public Set<String> getGroups()
getGroups
in class TemplateOptions
public TemplateOptions securityGroups(Iterable<String> securityGroups)
TemplateOptions
securityGroups
in class TemplateOptions
public TemplateOptions securityGroups(String... securityGroups)
securityGroups
in class TemplateOptions
TemplateOptions#securityGroups(Iterable)
public TemplateOptions networks(Iterable<String> networks)
TemplateOptions
networks
in class TemplateOptions
public TemplateOptions networks(String... networks)
networks
in class TemplateOptions
TemplateOptions.networks(Iterable)
public TemplateOptions userMetadata(Map<String,String> userMetadata)
userMetadata
in class TemplateOptions
userMetadata
- user-defined metadata to assign to this serverpublic TemplateOptions userMetadata(String key, String value)
userMetadata
in class TemplateOptions
key
- key to place into the metadata mapvalue
- value to associate with that keypublic Map<String,String> getUserMetadata()
getUserMetadata
in class TemplateOptions
TemplateOptions.userMetadata(Map)
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.