Package com.hashicorp.cdktf
Class RemoteExecProvisioner.Builder
java.lang.Object
com.hashicorp.cdktf.RemoteExecProvisioner.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<RemoteExecProvisioner>
- Enclosing interface:
RemoteExecProvisioner
@Stability(Experimental)
public static final class RemoteExecProvisioner.Builder
extends Object
implements software.amazon.jsii.Builder<RemoteExecProvisioner>
A builder for
RemoteExecProvisioner
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.connection
(SSHProvisionerConnection connection) Sets the value ofRemoteExecProvisioner.getConnection()
connection
(WinrmProvisionerConnection connection) Sets the value ofRemoteExecProvisioner.getConnection()
Sets the value ofRemoteExecProvisioner.getInline()
Sets the value ofRemoteExecProvisioner.getScript()
Sets the value ofRemoteExecProvisioner.getScripts()
Sets the value ofRemoteExecProvisioner.getType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
type
Sets the value ofRemoteExecProvisioner.getType()
- Parameters:
type
- the value to be set. This parameter is required.- Returns:
this
-
connection
@Stability(Experimental) public RemoteExecProvisioner.Builder connection(SSHProvisionerConnection connection) Sets the value ofRemoteExecProvisioner.getConnection()
- Parameters:
connection
- Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect. A connection must be provided here or in the parent resource.- Returns:
this
-
connection
@Stability(Experimental) public RemoteExecProvisioner.Builder connection(WinrmProvisionerConnection connection) Sets the value ofRemoteExecProvisioner.getConnection()
- Parameters:
connection
- Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect. A connection must be provided here or in the parent resource.- Returns:
this
-
inline
Sets the value ofRemoteExecProvisioner.getInline()
- Parameters:
inline
- This is a list of command strings. They are executed in the order they are provided. This cannot be provided with script or scripts.- Returns:
this
-
script
Sets the value ofRemoteExecProvisioner.getScript()
- Parameters:
script
- This is a path (relative or absolute) to a local script that will be copied to the remote resource and then executed. This cannot be provided with inline or scripts.- Returns:
this
-
scripts
Sets the value ofRemoteExecProvisioner.getScripts()
- Parameters:
scripts
- This is a list of paths (relative or absolute) to local scripts that will be copied to the remote resource and then executed. They are executed in the order they are provided. This cannot be provided with inline or script.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<RemoteExecProvisioner>
- Returns:
- a new instance of
RemoteExecProvisioner
- Throws:
NullPointerException
- if any required attribute was not provided
-