> ## Documentation Index
> Fetch the complete documentation index at: https://cdktn.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Python: WinrmProvisionerConnection

> CDKTN Core API Reference for WinrmProvisionerConnection in Python.

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](https://developer.hashicorp.com/terraform/language/resources/provisioners/connection)

## Initializer <a name="Initializer" id="cdktn.WinrmProvisionerConnection.Initializer" />

```python theme={null}
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 <a name="Properties" id="Properties" />

| **Name**                                                                                      | **Type**                               | **Description**                                                                                                                                                             |
| --------------------------------------------------------------------------------------------- | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.host">host</a></code>               | <code>str</code>                       | The address of the resource to connect to.                                                                                                                                  |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.type">type</a></code>               | <code>str</code>                       | The connection type.                                                                                                                                                        |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.cacert">cacert</a></code>           | <code>str</code>                       | The CA certificate to validate against.                                                                                                                                     |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.https">https</a></code>             | <code>bool</code>                      | Set to true to connect using HTTPS instead of HTTP.                                                                                                                         |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.insecure">insecure</a></code>       | <code>bool</code>                      | Set to true to skip validating the HTTPS certificate chain.                                                                                                                 |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.password">password</a></code>       | <code>str</code>                       | The password to use for the connection.                                                                                                                                     |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.port">port</a></code>               | <code>typing.Union\[int, float]</code> | The port to connect to.                                                                                                                                                     |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.scriptPath">script\_path</a></code> | <code>str</code>                       | The path used to copy scripts meant for remote execution.                                                                                                                   |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.timeout">timeout</a></code>         | <code>str</code>                       | The timeout to wait for the connection to become available.                                                                                                                 |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.useNtlm">use\_ntlm</a></code>       | <code>bool</code>                      | 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. |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.user">user</a></code>               | <code>str</code>                       | The user to use for the connection.                                                                                                                                         |

***

### `host`<sup>Required</sup> <a name="host" id="cdktn.WinrmProvisionerConnection.property.host" />

```python theme={null}
host: str
```

* *Type:* str

The address of the resource to connect to.

***

### `type`<sup>Required</sup> <a name="type" id="cdktn.WinrmProvisionerConnection.property.type" />

```python theme={null}
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.

***

### `cacert`<sup>Optional</sup> <a name="cacert" id="cdktn.WinrmProvisionerConnection.property.cacert" />

```python theme={null}
cacert: str
```

* *Type:* str

The CA certificate to validate against.

***

### `https`<sup>Optional</sup> <a name="https" id="cdktn.WinrmProvisionerConnection.property.https" />

```python theme={null}
https: bool
```

* *Type:* bool

Set to true to connect using HTTPS instead of HTTP.

***

### `insecure`<sup>Optional</sup> <a name="insecure" id="cdktn.WinrmProvisionerConnection.property.insecure" />

```python theme={null}
insecure: bool
```

* *Type:* bool

Set to true to skip validating the HTTPS certificate chain.

***

### `password`<sup>Optional</sup> <a name="password" id="cdktn.WinrmProvisionerConnection.property.password" />

```python theme={null}
password: str
```

* *Type:* str

The password to use for the connection.

***

### `port`<sup>Optional</sup> <a name="port" id="cdktn.WinrmProvisionerConnection.property.port" />

```python theme={null}
port: typing.Union[int, float]
```

* *Type:* typing.Union\[int, float]
* *Default:* 22

The port to connect to.

***

### `script_path`<sup>Optional</sup> <a name="script_path" id="cdktn.WinrmProvisionerConnection.property.scriptPath" />

```python theme={null}
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](https://developer.hashicorp.com/terraform/language/resources/provisioners/connection#how-provisioners-execute-remote-scripts)

***

### `timeout`<sup>Optional</sup> <a name="timeout" id="cdktn.WinrmProvisionerConnection.property.timeout" />

```python theme={null}
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_ntlm`<sup>Optional</sup> <a name="use_ntlm" id="cdktn.WinrmProvisionerConnection.property.useNtlm" />

```python theme={null}
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.

***

### `user`<sup>Optional</sup> <a name="user" id="cdktn.WinrmProvisionerConnection.property.user" />

```python theme={null}
user: str
```

* *Type:* str
* *Default:* root

The user to use for the connection.

***
