Package com.hashicorp.cdktf
Class WinrmProvisionerConnection.Builder
java.lang.Object
com.hashicorp.cdktf.WinrmProvisionerConnection.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<WinrmProvisionerConnection>
- Enclosing interface:
WinrmProvisionerConnection
@Stability(Experimental)
public static final class WinrmProvisionerConnection.Builder
extends Object
implements software.amazon.jsii.Builder<WinrmProvisionerConnection>
A builder for
WinrmProvisionerConnection
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofWinrmProvisionerConnection.getCacert()
Sets the value ofWinrmProvisionerConnection.getHost()
Sets the value ofWinrmProvisionerConnection.getHttps()
Sets the value ofWinrmProvisionerConnection.getInsecure()
Sets the value ofWinrmProvisionerConnection.getPassword()
Sets the value ofWinrmProvisionerConnection.getPort()
scriptPath
(String scriptPath) Sets the value ofWinrmProvisionerConnection.getScriptPath()
Sets the value ofWinrmProvisionerConnection.getTimeout()
Sets the value ofWinrmProvisionerConnection.getType()
Sets the value ofWinrmProvisionerConnection.getUseNtlm()
Sets the value ofWinrmProvisionerConnection.getUser()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
host
Sets the value ofWinrmProvisionerConnection.getHost()
- Parameters:
host
- The address of the resource to connect to. This parameter is required.- Returns:
this
-
type
Sets the value ofWinrmProvisionerConnection.getType()
- Parameters:
type
- The connection type. This parameter is required. Valid values are "ssh" and "winrm". Provisioners typically assume that the remote system runs Microsoft Windows when using WinRM. Behaviors based on the SSH target_platform will force Windows-specific behavior for WinRM, unless otherwise specified.- Returns:
this
-
cacert
Sets the value ofWinrmProvisionerConnection.getCacert()
- Parameters:
cacert
- The CA certificate to validate against.- Returns:
this
-
https
Sets the value ofWinrmProvisionerConnection.getHttps()
- Parameters:
https
- Set to true to connect using HTTPS instead of HTTP.- Returns:
this
-
insecure
Sets the value ofWinrmProvisionerConnection.getInsecure()
- Parameters:
insecure
- Set to true to skip validating the HTTPS certificate chain.- Returns:
this
-
password
Sets the value ofWinrmProvisionerConnection.getPassword()
- Parameters:
password
- The password to use for the connection.- Returns:
this
-
port
Sets the value ofWinrmProvisionerConnection.getPort()
- Parameters:
port
- The port to connect to.- Returns:
this
-
scriptPath
Sets the value ofWinrmProvisionerConnection.getScriptPath()
- Parameters:
scriptPath
- The path used to copy scripts meant for remote execution. Refer toinvalid @link
{@link https://developer.hashicorp.com/terraform/language/resources/provisioners/connection#how-provisioners-execute-remote-scripts
- Returns:
this
-
timeout
Sets the value ofWinrmProvisionerConnection.getTimeout()
- Parameters:
timeout
- The timeout to wait for the connection to become available. Should be provided as a string (e.g., "30s" or "5m".)- Returns:
this
-
useNtlm
Sets the value ofWinrmProvisionerConnection.getUseNtlm()
- Parameters:
useNtlm
- Set to true to use NTLM authentication rather than default (basic authentication), removing the requirement for basic authentication to be enabled within the target guest. Refer to Authentication for Remote Connections in the Windows App Development documentation for more details.- Returns:
this
-
user
Sets the value ofWinrmProvisionerConnection.getUser()
- Parameters:
user
- The user to use for the connection.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<WinrmProvisionerConnection>
- Returns:
- a new instance of
WinrmProvisionerConnection
- Throws:
NullPointerException
- if any required attribute was not provided
-