Class SystemdConfigFileOptions.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.SystemdConfigFileOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<SystemdConfigFileOptions>
- Enclosing interface:
SystemdConfigFileOptions
@Stability(Stable)
public static final class SystemdConfigFileOptions.Builder
extends Object
implements software.amazon.jsii.Builder<SystemdConfigFileOptions>
A builder for
SystemdConfigFileOptions-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionafterNetwork(Boolean afterNetwork) Sets the value ofSystemdConfigFileOptions.getAfterNetwork()build()Builds the configured instance.Sets the value ofSystemdConfigFileOptions.getCommand()Sets the value ofSystemdConfigFileOptions.getCwd()description(String description) Sets the value ofSystemdConfigFileOptions.getDescription()environmentFiles(List<String> environmentFiles) Sets the value ofSystemdConfigFileOptions.getEnvironmentFiles()environmentVariables(Map<String, String> environmentVariables) Sets the value ofSystemdConfigFileOptions.getEnvironmentVariables()Sets the value ofSystemdConfigFileOptions.getGroup()keepRunning(Boolean keepRunning) Sets the value ofSystemdConfigFileOptions.getKeepRunning()Sets the value ofSystemdConfigFileOptions.getUser()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
command
Sets the value ofSystemdConfigFileOptions.getCommand()- Parameters:
command- The command to run to start this service. This parameter is required.- Returns:
this
-
afterNetwork
Sets the value ofSystemdConfigFileOptions.getAfterNetwork()- Parameters:
afterNetwork- Start the service after the networking part of the OS comes up.- Returns:
this
-
cwd
Sets the value ofSystemdConfigFileOptions.getCwd()- Parameters:
cwd- The working directory for the command.- Returns:
this
-
description
Sets the value ofSystemdConfigFileOptions.getDescription()- Parameters:
description- A description of this service.- Returns:
this
-
environmentFiles
@Stability(Stable) public SystemdConfigFileOptions.Builder environmentFiles(List<String> environmentFiles) Sets the value ofSystemdConfigFileOptions.getEnvironmentFiles()- Parameters:
environmentFiles- Loads environment variables from files when the process is running. Must use absolute paths.- Returns:
this
-
environmentVariables
@Stability(Stable) public SystemdConfigFileOptions.Builder environmentVariables(Map<String, String> environmentVariables) Sets the value ofSystemdConfigFileOptions.getEnvironmentVariables()- Parameters:
environmentVariables- Environment variables to load when the process is running.- Returns:
this
-
group
Sets the value ofSystemdConfigFileOptions.getGroup()- Parameters:
group- The group to execute the process under.- Returns:
this
-
keepRunning
Sets the value ofSystemdConfigFileOptions.getKeepRunning()- Parameters:
keepRunning- Keep the process running all the time. Restarts the process when it exits for any reason other than the machine shutting down.- Returns:
this
-
user
Sets the value ofSystemdConfigFileOptions.getUser()- Parameters:
user- The user to execute the process under.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<SystemdConfigFileOptions>- Returns:
- a new instance of
SystemdConfigFileOptions - Throws:
NullPointerException- if any required attribute was not provided
-