HostShareKeyArgs

data class HostShareKeyArgs(val hostShareKeyName: Output<String>? = null, val instanceId: Output<String>? = null, val passPhrase: Output<String>? = null, val privateKey: Output<String>? = null) : ConvertibleToJava<HostShareKeyArgs>

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

NOTE: Available in v1.165.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.BastionhostFunctions;
import com.pulumi.alicloud.bastionhost.inputs.GetInstancesArgs;
import com.pulumi.alicloud.bastionhost.HostShareKey;
import com.pulumi.alicloud.bastionhost.HostShareKeyArgs;
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) {
final var defaultInstances = BastionhostFunctions.getInstances();
var defaultHostShareKey = new HostShareKey("defaultHostShareKey", HostShareKeyArgs.builder()
.hostShareKeyName("example_name")
.instanceId(defaultInstances.applyValue(getInstancesResult -> getInstancesResult.instances()[0].id()))
.passPhrase("example_value")
.privateKey("example_value")
.build());
}
}

Import

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

$ pulumi import alicloud:bastionhost/hostShareKey:HostShareKey example <instance_id>:<host_share_key_id>

Constructors

Link copied to clipboard
fun HostShareKeyArgs(hostShareKeyName: Output<String>? = null, instanceId: Output<String>? = null, passPhrase: Output<String>? = null, privateKey: Output<String>? = null)

Functions

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

Properties

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

The name of the host shared key to be added. The name can be a maximum of 128 characters in length.

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

The ID of the Bastion instance.

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

The password of the private key. The value is a Base64-encoded string.

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

The private key. The value is a Base64-encoded string.