@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.443Z") @Stability(value=Stable) public class InitCommand extends InitElement
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 | Constructor and Description |
|---|---|
protected |
InitCommand(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
InitCommand(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static InitCommand |
argvCommand(List<String> argv)
Run a command from an argv array.
|
static InitCommand |
argvCommand(List<String> argv,
InitCommandOptions options)
Run a command from an argv array.
|
String |
getElementType()
Returns the init element type for this element.
|
static InitCommand |
shellCommand(String shellCommand)
Run a shell command.
|
static InitCommand |
shellCommand(String shellCommand,
InitCommandOptions options)
Run a shell command.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected InitCommand(software.amazon.jsii.JsiiObjectRef objRef)
protected InitCommand(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) @NotNull public static InitCommand argvCommand(@NotNull List<String> argv, @Nullable InitCommandOptions options)
You do not need to escape space characters or enclose command parameters in quotes.
argv - This parameter is required.options - @Stability(value=Stable) @NotNull public static InitCommand argvCommand(@NotNull List<String> argv)
You do not need to escape space characters or enclose command parameters in quotes.
argv - This parameter is required.@Stability(value=Stable) @NotNull public static InitCommand shellCommand(@NotNull String shellCommand, @Nullable InitCommandOptions options)
Remember that some characters like &, |, ;, > etc. have special meaning in a shell and
need to be preceded by a \ if you want to treat them as part of a filename.
shellCommand - This parameter is required.options - @Stability(value=Stable) @NotNull public static InitCommand shellCommand(@NotNull String shellCommand)
Remember that some characters like &, |, ;, > etc. have special meaning in a shell and
need to be preceded by a \ if you want to treat them as part of a filename.
shellCommand - This parameter is required.@Stability(value=Stable) @NotNull public String getElementType()
getElementType in class InitElementCopyright © 2022. All rights reserved.