@Generated(value="jsii-pacmak/1.29.0 (build 41df200)", date="2021-06-02T09:55:17.094Z") @Stability(value=Experimental) public class InitServiceRestartHandle extends software.amazon.jsii.JsiiObject
Pass an instance of this object to the InitFile, InitCommand,
InitSource and InitPackage objects, and finally to an InitService
itself to cause the actions (files, commands, sources, and packages)
to trigger a restart of the service.
For example, the following will run a custom command to install Nginx, and trigger the nginx service to be restarted after the command has run.
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
Object handle = new InitServiceRestartHandle();
ec2.CloudFormationInit.fromElements(ec2.InitCommand.shellCommand("/usr/bin/custom-nginx-install.sh", Map.of("serviceRestartHandles", asList(handle))), ec2.InitService.enable("nginx", Map.of("serviceRestartHandle", handle)));
| Modifier | Constructor and Description |
|---|---|
|
InitServiceRestartHandle() |
protected |
InitServiceRestartHandle(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
InitServiceRestartHandle(software.amazon.jsii.JsiiObjectRef objRef) |
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected InitServiceRestartHandle(software.amazon.jsii.JsiiObjectRef objRef)
protected InitServiceRestartHandle(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental) public InitServiceRestartHandle()
Copyright © 2021. All rights reserved.