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

using Io.Cdktn;

new WinrmProvisionerConnection {
    string Host,
    string Type,
    string Cacert = null,
    bool Https = null,
    bool Insecure = null,
    string Password = null,
    double Port = null,
    string ScriptPath = null,
    string Timeout = null,
    bool UseNtlm = null,
    string User = null
};

Properties

NameTypeDescription
HoststringThe address of the resource to connect to.
TypestringThe connection type.
CacertstringThe CA certificate to validate against.
HttpsboolSet to true to connect using HTTPS instead of HTTP.
InsecureboolSet to true to skip validating the HTTPS certificate chain.
PasswordstringThe password to use for the connection.
PortdoubleThe port to connect to.
ScriptPathstringThe path used to copy scripts meant for remote execution.
TimeoutstringThe timeout to wait for the connection to become available.
UseNtlmboolSet to true to use NTLM authentication rather than default (basic authentication), removing the requirement for basic authentication to be enabled within the target guest.
UserstringThe user to use for the connection.

HostRequired

public string Host { get; set; }
  • Type: string
The address of the resource to connect to.

TypeRequired

public string Type { get; set; }
  • Type: 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 string Cacert { get; set; }
  • Type: string
The CA certificate to validate against.

HttpsOptional

public bool Https { get; set; }
  • Type: bool
Set to true to connect using HTTPS instead of HTTP.

InsecureOptional

public bool Insecure { get; set; }
  • Type: bool
Set to true to skip validating the HTTPS certificate chain.

PasswordOptional

public string Password { get; set; }
  • Type: string
The password to use for the connection.

PortOptional

public double Port { get; set; }
  • Type: double
  • Default: 22
The port to connect to.

ScriptPathOptional

public string ScriptPath { get; set; }
  • Type: string
The path used to copy scripts meant for remote execution. Refer to How Provisioners Execute Remote Scripts below for more details

TimeoutOptional

public string Timeout { get; set; }
  • Type: 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 bool UseNtlm { get; set; }
  • Type: bool
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 string User { get; set; }
  • Type: string
  • Default: root
The user to use for the connection.