@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:06.575Z") @Stability(value=Experimental) public class InitService extends InitElement
Example:
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)
(experimental) Disable and stop the given service.
|
static InitService |
enable(String serviceName)
(experimental) Enable and start the given service, optionally restarting it.
|
static InitService |
enable(String serviceName,
InitServiceOptions options)
(experimental) Enable and start the given service, optionally restarting it.
|
String |
getElementType()
(experimental) 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=Experimental) @NotNull public static InitService disable(@NotNull String serviceName)
serviceName - This parameter is required.@Stability(value=Experimental) @NotNull public static InitService enable(@NotNull String serviceName, @Nullable InitServiceOptions options)
serviceName - This parameter is required.options - @Stability(value=Experimental) @NotNull public static InitService enable(@NotNull String serviceName)
serviceName - This parameter is required.@Stability(value=Experimental) @NotNull public String getElementType()
getElementType in class InitElementCopyright © 2022. All rights reserved.