@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)",
date="2022-05-20T22:19:59.454Z")
public interface InitCommandOptions
Example:
InitServiceRestartHandle handle = new InitServiceRestartHandle(); CloudFormationInit.fromElements(InitCommand.shellCommand("/usr/bin/custom-nginx-install.sh", InitCommandOptions.builder().serviceRestartHandles(List.of(handle)).build()), InitService.enable("nginx", InitServiceOptions.builder().serviceRestartHandle(handle).build()));
Modifier and Type | Interface and Description |
---|---|
static class |
InitCommandOptions.Builder
A builder for
InitCommandOptions |
static class |
InitCommandOptions.Jsii$Proxy
An implementation for
InitCommandOptions |
Modifier and Type | Method and Description |
---|---|
static InitCommandOptions.Builder |
builder() |
default java.lang.String |
getCwd()
The working directory.
|
default java.util.Map<java.lang.String,java.lang.String> |
getEnv()
Sets environment variables for the command.
|
default java.lang.Boolean |
getIgnoreErrors()
Continue running if this command fails.
|
default java.lang.String |
getKey()
Identifier key for this command.
|
default java.util.List<InitServiceRestartHandle> |
getServiceRestartHandles()
Restart the given service(s) after this command has run.
|
default java.lang.String |
getTestCmd()
Command to determine whether this command should be run.
|
default InitCommandWaitDuration |
getWaitAfterCompletion()
The duration to wait after a command has finished in case the command causes a reboot.
|
default java.lang.String getCwd()
Default: - Use default working directory
default java.util.Map<java.lang.String,java.lang.String> getEnv()
This property overwrites, rather than appends, the existing environment.
Default: - Use current environment
default java.lang.Boolean getIgnoreErrors()
Default: false
default java.lang.String getKey()
Commands are executed in lexicographical order of their key names.
Default: - Automatically generated based on index
default java.util.List<InitServiceRestartHandle> getServiceRestartHandles()
Default: - Do not restart any service
default java.lang.String getTestCmd()
If the test passes (exits with error code of 0), the command is run.
Default: - Always run the command
default InitCommandWaitDuration getWaitAfterCompletion()
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.
Default: - 60 seconds
static InitCommandOptions.Builder builder()
InitCommandOptions.Builder
of InitCommandOptions