@Stability(value=Experimental) public static final class SSHProvisionerConnection.Builder extends Object implements software.amazon.jsii.Builder<SSHProvisionerConnection>
SSHProvisionerConnection
Constructor and Description |
---|
Builder() |
@Stability(value=Experimental) public SSHProvisionerConnection.Builder host(String host)
SSHProvisionerConnection.getHost()
host
- The address of the resource to connect to. This parameter is required.this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder type(String type)
SSHProvisionerConnection.getType()
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.this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder agent(String agent)
SSHProvisionerConnection.getAgent()
agent
- Set to false to disable using ssh-agent to authenticate.
On Windows the only supported SSH authentication agent is Pageant.this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder agentIdentity(String agentIdentity)
SSHProvisionerConnection.getAgentIdentity()
agentIdentity
- The preferred identity from the ssh agent for authentication.this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder bastionCertificate(String bastionCertificate)
SSHProvisionerConnection.getBastionCertificate()
bastionCertificate
- The contents of a signed CA Certificate.
The certificate argument must be used in conjunction with a bastion_private_key.
These can be loaded from a file on disk using the the file function.this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder bastionHost(String bastionHost)
SSHProvisionerConnection.getBastionHost()
bastionHost
- Setting this enables the bastion Host connection.
The provisioner will connect to bastion_host first, and then connect from there to host.this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder bastionHostKey(String bastionHostKey)
SSHProvisionerConnection.getBastionHostKey()
bastionHostKey
- The public key from the remote host or the signing CA, used to verify the host connection.this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder bastionPassword(String bastionPassword)
SSHProvisionerConnection.getBastionPassword()
bastionPassword
- The password to use for the bastion host.this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder bastionPort(Number bastionPort)
SSHProvisionerConnection.getBastionPort()
bastionPort
- The port to use connect to the bastion host.this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder bastionPrivateKey(String bastionPrivateKey)
SSHProvisionerConnection.getBastionPrivateKey()
bastionPrivateKey
- The contents of an SSH key file to use for the bastion host.
These can be loaded from a file on disk using the file function.this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder bastionUser(String bastionUser)
SSHProvisionerConnection.getBastionUser()
bastionUser
- The user for the connection to the bastion host.this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder certificate(String certificate)
SSHProvisionerConnection.getCertificate()
certificate
- The contents of a signed CA Certificate.
The certificate argument must be used in conjunction with a private_key.
These can be loaded from a file on disk using the the file function.this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder hostKey(String hostKey)
SSHProvisionerConnection.getHostKey()
hostKey
- The public key from the remote host or the signing CA, used to verify the connection.this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder password(String password)
SSHProvisionerConnection.getPassword()
password
- The password to use for the connection.this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder port(Number port)
SSHProvisionerConnection.getPort()
port
- The port to connect to.this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder privateKey(String privateKey)
SSHProvisionerConnection.getPrivateKey()
privateKey
- The contents of an SSH key to use for the connection.
These can be loaded from a file on disk using the file function.
This takes preference over password if provided.this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder proxyHost(String proxyHost)
SSHProvisionerConnection.getProxyHost()
proxyHost
- Setting this enables the SSH over HTTP connection.
This host will be connected to first, and then the host or bastion_host connection will be made from there.this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder proxyPort(Number proxyPort)
SSHProvisionerConnection.getProxyPort()
proxyPort
- The port to use connect to the proxy host.this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder proxyScheme(String proxyScheme)
SSHProvisionerConnection.getProxyScheme()
proxyScheme
- The ssh connection also supports the following fields to facilitate connections by SSH over HTTP proxy.this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder proxyUserName(String proxyUserName)
SSHProvisionerConnection.getProxyUserName()
proxyUserName
- The username to use connect to the private proxy host.
This argument should be specified only if authentication is required for the HTTP Proxy server.this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder proxyUserPassword(String proxyUserPassword)
SSHProvisionerConnection.getProxyUserPassword()
proxyUserPassword
- The password to use connect to the private proxy host.
This argument should be specified only if authentication is required for the HTTP Proxy server.this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder scriptPath(String scriptPath)
SSHProvisionerConnection.getScriptPath()
scriptPath
- The path used to copy scripts meant for remote execution.
Refer to {@link https://www.terraform.io/language/resources/provisioners/connection#how-provisioners-execute-remote-scripts How Provisioners Execute Remote Scripts below for more details}this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder targetPlatform(String targetPlatform)
SSHProvisionerConnection.getTargetPlatform()
targetPlatform
- The target platform to connect to.
Valid values are "windows" and "unix".
If the platform is set to windows, the default script_path is c:\windows\temp\terraform_%RAND%.cmd, assuming the SSH default shell is cmd.exe.
If the SSH default shell is PowerShell, set script_path to "c:/windows/temp/terraform_%RAND%.ps1"this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder timeout(String timeout)
SSHProvisionerConnection.getTimeout()
timeout
- The timeout to wait for the connection to become available.
Should be provided as a string (e.g., "30s" or "5m".)this
@Stability(value=Experimental) public SSHProvisionerConnection.Builder user(String user)
SSHProvisionerConnection.getUser()
user
- The user to use for the connection.this
@Stability(value=Experimental) public SSHProvisionerConnection build()
build
in interface software.amazon.jsii.Builder<SSHProvisionerConnection>
SSHProvisionerConnection
NullPointerException
- if any required attribute was not providedCopyright © 2023. All rights reserved.