alicloud logo
Alibaba Cloud v3.29.0, Jan 20 23

alicloud.bastionhost.HostAccount

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

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var example = new AliCloud.BastionHost.HostAccount("example", new()
    {
        HostAccountName = "example_value",
        HostId = "15",
        InstanceId = "bastionhost-cn-tl32bh0no30",
        Password = "YourPassword12345",
        ProtocolName = "SSH",
    });

});
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/bastionhost"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := bastionhost.NewHostAccount(ctx, "example", &bastionhost.HostAccountArgs{
			HostAccountName: pulumi.String("example_value"),
			HostId:          pulumi.String("15"),
			InstanceId:      pulumi.String("bastionhost-cn-tl32bh0no30"),
			Password:        pulumi.String("YourPassword12345"),
			ProtocolName:    pulumi.String("SSH"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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 pulumi
import pulumi_alicloud as alicloud

example = alicloud.bastionhost.HostAccount("example",
    host_account_name="example_value",
    host_id="15",
    instance_id="bastionhost-cn-tl32bh0no30",
    password="YourPassword12345",
    protocol_name="SSH")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = new alicloud.bastionhost.HostAccount("example", {
    hostAccountName: "example_value",
    hostId: "15",
    instanceId: "bastionhost-cn-tl32bh0no30",
    password: "YourPassword12345",
    protocolName: "SSH",
});
resources:
  example:
    type: alicloud:bastionhost:HostAccount
    properties:
      hostAccountName: example_value
      hostId: '15'
      instanceId: bastionhost-cn-tl32bh0no30
      password: YourPassword12345
      protocolName: SSH

Create HostAccount Resource

new HostAccount(name: string, args: HostAccountArgs, opts?: CustomResourceOptions);
@overload
def HostAccount(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                host_account_name: Optional[str] = None,
                host_id: Optional[str] = None,
                instance_id: Optional[str] = None,
                pass_phrase: Optional[str] = None,
                password: Optional[str] = None,
                private_key: Optional[str] = None,
                protocol_name: Optional[str] = None)
@overload
def HostAccount(resource_name: str,
                args: HostAccountArgs,
                opts: Optional[ResourceOptions] = None)
func NewHostAccount(ctx *Context, name string, args HostAccountArgs, opts ...ResourceOption) (*HostAccount, error)
public HostAccount(string name, HostAccountArgs args, CustomResourceOptions? opts = null)
public HostAccount(String name, HostAccountArgs args)
public HostAccount(String name, HostAccountArgs args, CustomResourceOptions options)
type: alicloud:bastionhost:HostAccount
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args HostAccountArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args HostAccountArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args HostAccountArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args HostAccountArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args HostAccountArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

HostAccount Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The HostAccount resource accepts the following input properties:

HostAccountName string

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

HostId string

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

InstanceId string

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

ProtocolName string

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

PassPhrase string

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

Password string

The password of the host account.

PrivateKey string

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

HostAccountName string

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

HostId string

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

InstanceId string

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

ProtocolName string

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

PassPhrase string

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

Password string

The password of the host account.

PrivateKey string

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

hostAccountName String

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

hostId String

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

instanceId String

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

protocolName String

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

passPhrase String

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

password String

The password of the host account.

privateKey String

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

hostAccountName string

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

hostId string

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

instanceId string

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

protocolName string

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

passPhrase string

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

password string

The password of the host account.

privateKey string

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

host_account_name str

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

host_id str

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

instance_id str

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

protocol_name str

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

pass_phrase str

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

password str

The password of the host account.

private_key str

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

hostAccountName String

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

hostId String

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

instanceId String

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

protocolName String

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

passPhrase String

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

password String

The password of the host account.

privateKey String

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

Outputs

All input properties are implicitly available as output properties. Additionally, the HostAccount resource produces the following output properties:

HostAccountId string

Hosting account ID.

Id string

The provider-assigned unique ID for this managed resource.

HostAccountId string

Hosting account ID.

Id string

The provider-assigned unique ID for this managed resource.

hostAccountId String

Hosting account ID.

id String

The provider-assigned unique ID for this managed resource.

hostAccountId string

Hosting account ID.

id string

The provider-assigned unique ID for this managed resource.

host_account_id str

Hosting account ID.

id str

The provider-assigned unique ID for this managed resource.

hostAccountId String

Hosting account ID.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing HostAccount Resource

Get an existing HostAccount resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: HostAccountState, opts?: CustomResourceOptions): HostAccount
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        host_account_id: Optional[str] = None,
        host_account_name: Optional[str] = None,
        host_id: Optional[str] = None,
        instance_id: Optional[str] = None,
        pass_phrase: Optional[str] = None,
        password: Optional[str] = None,
        private_key: Optional[str] = None,
        protocol_name: Optional[str] = None) -> HostAccount
func GetHostAccount(ctx *Context, name string, id IDInput, state *HostAccountState, opts ...ResourceOption) (*HostAccount, error)
public static HostAccount Get(string name, Input<string> id, HostAccountState? state, CustomResourceOptions? opts = null)
public static HostAccount get(String name, Output<String> id, HostAccountState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
HostAccountId string

Hosting account ID.

HostAccountName string

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

HostId string

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

InstanceId string

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

PassPhrase string

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

Password string

The password of the host account.

PrivateKey string

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

ProtocolName string

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

HostAccountId string

Hosting account ID.

HostAccountName string

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

HostId string

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

InstanceId string

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

PassPhrase string

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

Password string

The password of the host account.

PrivateKey string

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

ProtocolName string

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

hostAccountId String

Hosting account ID.

hostAccountName String

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

hostId String

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

instanceId String

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

passPhrase String

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

password String

The password of the host account.

privateKey String

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

protocolName String

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

hostAccountId string

Hosting account ID.

hostAccountName string

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

hostId string

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

instanceId string

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

passPhrase string

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

password string

The password of the host account.

privateKey string

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

protocolName string

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

host_account_id str

Hosting account ID.

host_account_name str

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

host_id str

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

instance_id str

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

pass_phrase str

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

password str

The password of the host account.

private_key str

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

protocol_name str

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

hostAccountId String

Hosting account ID.

hostAccountName String

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

hostId String

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

instanceId String

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

passPhrase String

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

password String

The password of the host account.

privateKey String

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

protocolName String

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

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>

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.