Interface InitServiceOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
InitServiceOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:39.384Z")
@Stability(Stable)
public interface InitServiceOptions
extends software.amazon.jsii.JsiiSerializable
Options for an InitService.
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()));
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forInitServiceOptions
static final class
An implementation forInitServiceOptions
-
Method Summary
Modifier and TypeMethodDescriptionstatic InitServiceOptions.Builder
builder()
default Boolean
Enable or disable this service.default Boolean
Make sure this service is running or not running after cfn-init finishes.default InitServiceRestartHandle
Restart service when the actions registered into the restartHandle have been performed.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getEnabled
Enable or disable this service.Set to true to ensure that the service will be started automatically upon boot.
Set to false to ensure that the service will not be started automatically upon boot.
Default: - true if used in `InitService.enable()`, no change to service state if used in `InitService.fromOptions()`.
-
getEnsureRunning
Make sure this service is running or not running after cfn-init finishes.Set to true to ensure that the service is running after cfn-init finishes.
Set to false to ensure that the service is not running after cfn-init finishes.
Default: - same value as `enabled`.
-
getServiceRestartHandle
Restart service when the actions registered into the restartHandle have been performed.Register actions into the restartHandle by passing it to
InitFile
,InitCommand
,InitPackage
andInitSource
objects.Default: - No files trigger restart
-
builder
- Returns:
- a
InitServiceOptions.Builder
ofInitServiceOptions
-