Interface SystemdConfigFileOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
SystemdConfigFileOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.89.0 (build 2f74b3e)",
date="2023-11-02T10:21:17.106Z")
@Stability(Stable)
public interface SystemdConfigFileOptions
extends software.amazon.jsii.JsiiSerializable
Options for creating a SystemD configuration file.
Example:
Vpc vpc; InstanceType instanceType; Instance.Builder.create(this, "Instance") .vpc(vpc) .instanceType(instanceType) .machineImage(MachineImage.latestAmazonLinux2023()) .init(CloudFormationInit.fromElements(InitService.systemdConfigFile("simpleserver", SystemdConfigFileOptions.builder() .command("/usr/bin/python3 -m http.server 8080") .cwd("/var/www/html") .build()), InitService.enable("simpleserver", InitServiceOptions.builder() .serviceManager(ServiceManager.SYSTEMD) .build()), InitFile.fromString("/var/www/html/index.html", "Hello! It's working!"))) .build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forSystemdConfigFileOptions
static final class
An implementation forSystemdConfigFileOptions
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default Boolean
Start the service after the networking part of the OS comes up.The command to run to start this service.default String
getCwd()
The working directory for the command.default String
A description of this service.default String
getGroup()
The group to execute the process under.default Boolean
Keep the process running all the time.default String
getUser()
The user to execute the process under.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCommand
The command to run to start this service. -
getAfterNetwork
Start the service after the networking part of the OS comes up.Default: true
-
getCwd
The working directory for the command.Default: Root directory or home directory of specified user
-
getDescription
A description of this service.Default: - No description
-
getGroup
The group to execute the process under.Default: root
-
getKeepRunning
Keep the process running all the time.Restarts the process when it exits for any reason other than the machine shutting down.
Default: true
-
getUser
The user to execute the process under.Default: root
-
builder
- Returns:
- a
SystemdConfigFileOptions.Builder
ofSystemdConfigFileOptions
-