@Stability(value=Experimental) public static final class InitCommandOptions.Builder extends Object implements software.amazon.jsii.Builder<InitCommandOptions>
InitCommandOptions| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
InitCommandOptions |
build()
Builds the configured instance.
|
InitCommandOptions.Builder |
cwd(String cwd)
Sets the value of
InitCommandOptions.getCwd() |
InitCommandOptions.Builder |
env(Map<String,String> env)
Sets the value of
InitCommandOptions.getEnv() |
InitCommandOptions.Builder |
ignoreErrors(Boolean ignoreErrors)
Sets the value of
InitCommandOptions.getIgnoreErrors() |
InitCommandOptions.Builder |
key(String key)
Sets the value of
InitCommandOptions.getKey() |
InitCommandOptions.Builder |
serviceRestartHandles(List<? extends InitServiceRestartHandle> serviceRestartHandles)
Sets the value of
InitCommandOptions.getServiceRestartHandles() |
InitCommandOptions.Builder |
testCmd(String testCmd)
Sets the value of
InitCommandOptions.getTestCmd() |
InitCommandOptions.Builder |
waitAfterCompletion(InitCommandWaitDuration waitAfterCompletion)
Sets the value of
InitCommandOptions.getWaitAfterCompletion() |
@Stability(value=Experimental) public InitCommandOptions.Builder cwd(String cwd)
InitCommandOptions.getCwd()cwd - The working directory.this@Stability(value=Experimental) public InitCommandOptions.Builder env(Map<String,String> env)
InitCommandOptions.getEnv()env - Sets environment variables for the command.
This property overwrites, rather than appends, the existing environment.this@Stability(value=Experimental) public InitCommandOptions.Builder ignoreErrors(Boolean ignoreErrors)
InitCommandOptions.getIgnoreErrors()ignoreErrors - Continue running if this command fails.this@Stability(value=Experimental) public InitCommandOptions.Builder key(String key)
InitCommandOptions.getKey()key - Identifier key for this command.
Commands are executed in lexicographical order of their key names.this@Stability(value=Experimental) public InitCommandOptions.Builder serviceRestartHandles(List<? extends InitServiceRestartHandle> serviceRestartHandles)
InitCommandOptions.getServiceRestartHandles()serviceRestartHandles - Restart the given service(s) after this command has run.this@Stability(value=Experimental) public InitCommandOptions.Builder testCmd(String testCmd)
InitCommandOptions.getTestCmd()testCmd - Command to determine whether this command should be run.
If the test passes (exits with error code of 0), the command is run.this@Stability(value=Experimental) public InitCommandOptions.Builder waitAfterCompletion(InitCommandWaitDuration waitAfterCompletion)
InitCommandOptions.getWaitAfterCompletion()waitAfterCompletion - The duration to wait after a command has finished in case the command causes a reboot.
Set this value to InitCommandWaitDuration.none() if you do not want to wait for every command;
InitCommandWaitDuration.forever() directs cfn-init to exit and resume only after the reboot is complete.
For Windows systems only.
this@Stability(value=Experimental) public InitCommandOptions build()
build in interface software.amazon.jsii.Builder<InitCommandOptions>InitCommandOptionsNullPointerException - if any required attribute was not providedCopyright © 2021. All rights reserved.