@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.443Z") @Stability(value=Stable) public interface InitCommandOptions extends software.amazon.jsii.JsiiSerializable
Example:
// Example automatically generated from non-compiling source. May contain errors.
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 String |
getCwd()
The working directory.
|
default Map<String,String> |
getEnv()
Sets environment variables for the command.
|
default Boolean |
getIgnoreErrors()
Continue running if this command fails.
|
default String |
getKey()
Identifier key for this command.
|
default List<InitServiceRestartHandle> |
getServiceRestartHandles()
Restart the given service(s) after this command has run.
|
default 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.
|
@Stability(value=Stable) @Nullable default String getCwd()
Default: - Use default working directory
@Stability(value=Stable) @Nullable default Map<String,String> getEnv()
This property overwrites, rather than appends, the existing environment.
Default: - Use current environment
@Stability(value=Stable) @Nullable default Boolean getIgnoreErrors()
Default: false
@Stability(value=Stable) @Nullable default String getKey()
Commands are executed in lexicographical order of their key names.
Default: - Automatically generated based on index
@Stability(value=Stable) @Nullable default List<InitServiceRestartHandle> getServiceRestartHandles()
Default: - Do not restart any service
@Stability(value=Stable) @Nullable default String getTestCmd()
If the test passes (exits with error code of 0), the command is run.
Default: - Always run the command
@Stability(value=Stable) @Nullable 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
@Stability(value=Stable) static InitCommandOptions.Builder builder()
InitCommandOptions.Builder of InitCommandOptionsCopyright © 2022. All rights reserved.