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
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forInitServiceOptionsstatic final classAn implementation forInitServiceOptions -
Method Summary
Modifier and TypeMethodDescriptionstatic InitServiceOptions.Builderbuilder()default BooleanEnable or disable this service.default BooleanMake sure this service is running or not running after cfn-init finishes.default InitServiceRestartHandleRestart 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,InitPackageandInitSourceobjects.Default: - No files trigger restart
-
builder
- Returns:
- a
InitServiceOptions.BuilderofInitServiceOptions
-