@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.448Z") @Stability(value=Stable) public class InitService extends InitElement
Example:
// Example automatically generated from non-compiling source. May contain errors.
Bucket myBucket;
InitServiceRestartHandle handle = new InitServiceRestartHandle();
CloudFormationInit.fromElements(InitFile.fromString("/etc/nginx/nginx.conf", "...", InitFileOptions.builder().serviceRestartHandles(List.of(handle)).build()), InitSource.fromS3Object("/var/www/html", myBucket, "html.zip", InitSourceOptions.builder().serviceRestartHandles(List.of(handle)).build()), InitService.enable("nginx", InitServiceOptions.builder()
.serviceRestartHandle(handle)
.build()));
| Modifier | Constructor and Description |
|---|---|
protected |
InitService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
InitService(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static InitService |
disable(String serviceName)
Disable and stop the given service.
|
static InitService |
enable(String serviceName)
Enable and start the given service, optionally restarting it.
|
static InitService |
enable(String serviceName,
InitServiceOptions options)
Enable and start the given service, optionally restarting it.
|
String |
getElementType()
Returns the init element type for this element.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected InitService(software.amazon.jsii.JsiiObjectRef objRef)
protected InitService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) @NotNull public static InitService disable(@NotNull String serviceName)
serviceName - This parameter is required.@Stability(value=Stable) @NotNull public static InitService enable(@NotNull String serviceName, @Nullable InitServiceOptions options)
serviceName - This parameter is required.options - @Stability(value=Stable) @NotNull public static InitService enable(@NotNull String serviceName)
serviceName - This parameter is required.@Stability(value=Stable) @NotNull public String getElementType()
getElementType in class InitElementCopyright © 2022. All rights reserved.