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()));
 
  • Method Details

    • getEnabled

      @Stability(Stable) @Nullable default Boolean 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

      @Stability(Stable) @Nullable default Boolean 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

      @Stability(Stable) @Nullable default InitServiceRestartHandle 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 and InitSource objects.

      Default: - No files trigger restart

    • builder

      @Stability(Stable) static InitServiceOptions.Builder builder()
      Returns:
      a InitServiceOptions.Builder of InitServiceOptions