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 cdktn

cdktn.WinrmProvisionerConnection(
  host: str,
  type: str,
  cacert: str = None,
  https: bool = None,
  insecure: bool = None,
  password: str = None,
  port: typing.Union[int, float] = None,
  script_path: str = None,
  timeout: str = None,
  use_ntlm: bool = None,
  user: str = None
)

Properties

NameTypeDescription
hoststrThe address of the resource to connect to.
typestrThe connection type.
cacertstrThe 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.
passwordstrThe password to use for the connection.
porttyping.Union[int, float]The port to connect to.
script_pathstrThe path used to copy scripts meant for remote execution.
timeoutstrThe timeout to wait for the connection to become available.
use_ntlmboolSet to true to use NTLM authentication rather than default (basic authentication), removing the requirement for basic authentication to be enabled within the target guest.
userstrThe user to use for the connection.

hostRequired

host: str
  • Type: str
The address of the resource to connect to.

typeRequired

type: str
  • Type: str
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

cacert: str
  • Type: str
The CA certificate to validate against.

httpsOptional

https: bool
  • Type: bool
Set to true to connect using HTTPS instead of HTTP.

insecureOptional

insecure: bool
  • Type: bool
Set to true to skip validating the HTTPS certificate chain.

passwordOptional

password: str
  • Type: str
The password to use for the connection.

portOptional

port: typing.Union[int, float]
  • Type: typing.Union[int, float]
  • Default: 22
The port to connect to.

script_pathOptional

script_path: str
  • Type: str
The path used to copy scripts meant for remote execution. Refer to How Provisioners Execute Remote Scripts below for more details

timeoutOptional

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

use_ntlmOptional

use_ntlm: bool
  • 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

user: str
  • Type: str
  • Default: root
The user to use for the connection.