Skip to main content
Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect. See connection

Initializer

import io.cdktn.cdktn.WinrmProvisionerConnection;

WinrmProvisionerConnection.builder()
    .host(java.lang.String)
    .type(java.lang.String)
//  .cacert(java.lang.String)
//  .https(java.lang.Boolean)
//  .insecure(java.lang.Boolean)
//  .password(java.lang.String)
//  .port(java.lang.Number)
//  .scriptPath(java.lang.String)
//  .timeout(java.lang.String)
//  .useNtlm(java.lang.Boolean)
//  .user(java.lang.String)
    .build();

Properties

NameTypeDescription
hostjava.lang.StringThe address of the resource to connect to.
typejava.lang.StringThe connection type.
cacertjava.lang.StringThe CA certificate to validate against.
httpsjava.lang.BooleanSet to true to connect using HTTPS instead of HTTP.
insecurejava.lang.BooleanSet to true to skip validating the HTTPS certificate chain.
passwordjava.lang.StringThe password to use for the connection.
portjava.lang.NumberThe port to connect to.
scriptPathjava.lang.StringThe path used to copy scripts meant for remote execution.
timeoutjava.lang.StringThe timeout to wait for the connection to become available.
useNtlmjava.lang.BooleanSet to true to use NTLM authentication rather than default (basic authentication), removing the requirement for basic authentication to be enabled within the target guest.
userjava.lang.StringThe user to use for the connection.

hostRequired

public java.lang.String getHost();
  • Type: java.lang.String
The address of the resource to connect to.

typeRequired

public java.lang.String getType();
  • Type: java.lang.String
The connection type. 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.

cacertOptional

public java.lang.String getCacert();
  • Type: java.lang.String
The CA certificate to validate against.

httpsOptional

public java.lang.Boolean getHttps();
  • Type: java.lang.Boolean
Set to true to connect using HTTPS instead of HTTP.

insecureOptional

public java.lang.Boolean getInsecure();
  • Type: java.lang.Boolean
Set to true to skip validating the HTTPS certificate chain.

passwordOptional

public java.lang.String getPassword();
  • Type: java.lang.String
The password to use for the connection.

portOptional

public java.lang.Number getPort();
  • Type: java.lang.Number
  • Default: 22
The port to connect to.

scriptPathOptional

public java.lang.String getScriptPath();
  • Type: java.lang.String
The path used to copy scripts meant for remote execution. Refer to How Provisioners Execute Remote Scripts below for more details

timeoutOptional

public java.lang.String getTimeout();
  • Type: java.lang.String
  • Default: 5m
The timeout to wait for the connection to become available. Should be provided as a string (e.g., ”30s” or “5m”.)

useNtlmOptional

public java.lang.Boolean getUseNtlm();
  • Type: java.lang.Boolean
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.

userOptional

public java.lang.String getUser();
  • Type: java.lang.String
  • Default: root
The user to use for the connection.