HostAccountArgs

data class HostAccountArgs(val hostAccountName: Output<String>? = null, val hostId: Output<String>? = null, val instanceId: Output<String>? = null, val passPhrase: Output<String>? = null, val password: Output<String>? = null, val privateKey: Output<String>? = null, val protocolName: Output<String>? = null) : ConvertibleToJava<HostAccountArgs>

Provides a Bastion Host Host Account resource. For information about Bastion Host Host Account and how to use it, see What is Host Account.

NOTE: Available in v1.135.0+.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.bastionhost.HostAccount;
import com.pulumi.alicloud.bastionhost.HostAccountArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new HostAccount("example", HostAccountArgs.builder()
.hostAccountName("example_value")
.hostId("15")
.instanceId("bastionhost-cn-tl32bh0no30")
.password("YourPassword12345")
.protocolName("SSH")
.build());
}
}

Import

Bastion Host Host Account can be imported using the id, e.g.

$ pulumi import alicloud:bastionhost/hostAccount:HostAccount example <instance_id>:<host_account_id>

Constructors

Link copied to clipboard
fun HostAccountArgs(hostAccountName: Output<String>? = null, hostId: Output<String>? = null, instanceId: Output<String>? = null, passPhrase: Output<String>? = null, password: Output<String>? = null, privateKey: Output<String>? = null, protocolName: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): HostAccountArgs

Properties

Link copied to clipboard
val hostAccountName: Output<String>? = null

The name of the host account. The name can be up to 128 characters in length.

Link copied to clipboard
val hostId: Output<String>? = null

The ID of the host for which you want to create an account.

Link copied to clipboard
val instanceId: Output<String>? = null

The ID of the Bastionhost instance where you want to create an account for the host.

Link copied to clipboard
val passPhrase: Output<String>? = null

The passphrase of the private key for the host account. NOTE: It is valid when the attribute protocol_name is SSH.

Link copied to clipboard
val password: Output<String>? = null

The password of the host account.

Link copied to clipboard
val privateKey: Output<String>? = null

The private key of the host account. The value is a Base64-encoded string. NOTE: It is valid when the attribute protocol_name is SSH

Link copied to clipboard
val protocolName: Output<String>? = null

The protocol used by the host account. Valid values: SSH,RDP