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:
- Host
Account stringName The name of the host account. The name can be up to 128 characters in length.
- Host
Id string The ID of the host for which you want to create an account.
- Instance
Id string The ID of the Bastionhost instance where you want to create an account for the host.
- Protocol
Name string The protocol used by the host account. Valid values: SSH,RDP
- Pass
Phrase string The passphrase of the private key for the host account. NOTE: It is valid when the attribute
protocol_name
isSSH
.- Password string
The password of the host account.
- Private
Key string The private key of the host account. The value is a Base64-encoded string. NOTE: It is valid when the attribute
protocol_name
isSSH
- Host
Account stringName The name of the host account. The name can be up to 128 characters in length.
- Host
Id string The ID of the host for which you want to create an account.
- Instance
Id string The ID of the Bastionhost instance where you want to create an account for the host.
- Protocol
Name string The protocol used by the host account. Valid values: SSH,RDP
- Pass
Phrase string The passphrase of the private key for the host account. NOTE: It is valid when the attribute
protocol_name
isSSH
.- Password string
The password of the host account.
- Private
Key string The private key of the host account. The value is a Base64-encoded string. NOTE: It is valid when the attribute
protocol_name
isSSH
- host
Account StringName The name of the host account. The name can be up to 128 characters in length.
- host
Id String The ID of the host for which you want to create an account.
- instance
Id String The ID of the Bastionhost instance where you want to create an account for the host.
- protocol
Name String The protocol used by the host account. Valid values: SSH,RDP
- pass
Phrase String The passphrase of the private key for the host account. NOTE: It is valid when the attribute
protocol_name
isSSH
.- password String
The password of the host account.
- private
Key String The private key of the host account. The value is a Base64-encoded string. NOTE: It is valid when the attribute
protocol_name
isSSH
- host
Account stringName The name of the host account. The name can be up to 128 characters in length.
- host
Id string The ID of the host for which you want to create an account.
- instance
Id string The ID of the Bastionhost instance where you want to create an account for the host.
- protocol
Name string The protocol used by the host account. Valid values: SSH,RDP
- pass
Phrase string The passphrase of the private key for the host account. NOTE: It is valid when the attribute
protocol_name
isSSH
.- password string
The password of the host account.
- private
Key string The private key of the host account. The value is a Base64-encoded string. NOTE: It is valid when the attribute
protocol_name
isSSH
- host_
account_ strname 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
isSSH
.- 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
isSSH
- host
Account StringName The name of the host account. The name can be up to 128 characters in length.
- host
Id String The ID of the host for which you want to create an account.
- instance
Id String The ID of the Bastionhost instance where you want to create an account for the host.
- protocol
Name String The protocol used by the host account. Valid values: SSH,RDP
- pass
Phrase String The passphrase of the private key for the host account. NOTE: It is valid when the attribute
protocol_name
isSSH
.- password String
The password of the host account.
- private
Key String The private key of the host account. The value is a Base64-encoded string. NOTE: It is valid when the attribute
protocol_name
isSSH
Outputs
All input properties are implicitly available as output properties. Additionally, the HostAccount resource produces the following output properties:
- Host
Account stringId Hosting account ID.
- Id string
The provider-assigned unique ID for this managed resource.
- Host
Account stringId Hosting account ID.
- Id string
The provider-assigned unique ID for this managed resource.
- host
Account StringId Hosting account ID.
- id String
The provider-assigned unique ID for this managed resource.
- host
Account stringId Hosting account ID.
- id string
The provider-assigned unique ID for this managed resource.
- host_
account_ strid Hosting account ID.
- id str
The provider-assigned unique ID for this managed resource.
- host
Account StringId 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.
- Host
Account stringId Hosting account ID.
- Host
Account stringName The name of the host account. The name can be up to 128 characters in length.
- Host
Id string The ID of the host for which you want to create an account.
- Instance
Id string The ID of the Bastionhost instance where you want to create an account for the host.
- Pass
Phrase string The passphrase of the private key for the host account. NOTE: It is valid when the attribute
protocol_name
isSSH
.- Password string
The password of the host account.
- Private
Key string The private key of the host account. The value is a Base64-encoded string. NOTE: It is valid when the attribute
protocol_name
isSSH
- Protocol
Name string The protocol used by the host account. Valid values: SSH,RDP
- Host
Account stringId Hosting account ID.
- Host
Account stringName The name of the host account. The name can be up to 128 characters in length.
- Host
Id string The ID of the host for which you want to create an account.
- Instance
Id string The ID of the Bastionhost instance where you want to create an account for the host.
- Pass
Phrase string The passphrase of the private key for the host account. NOTE: It is valid when the attribute
protocol_name
isSSH
.- Password string
The password of the host account.
- Private
Key string The private key of the host account. The value is a Base64-encoded string. NOTE: It is valid when the attribute
protocol_name
isSSH
- Protocol
Name string The protocol used by the host account. Valid values: SSH,RDP
- host
Account StringId Hosting account ID.
- host
Account StringName The name of the host account. The name can be up to 128 characters in length.
- host
Id String The ID of the host for which you want to create an account.
- instance
Id String The ID of the Bastionhost instance where you want to create an account for the host.
- pass
Phrase String The passphrase of the private key for the host account. NOTE: It is valid when the attribute
protocol_name
isSSH
.- password String
The password of the host account.
- private
Key String The private key of the host account. The value is a Base64-encoded string. NOTE: It is valid when the attribute
protocol_name
isSSH
- protocol
Name String The protocol used by the host account. Valid values: SSH,RDP
- host
Account stringId Hosting account ID.
- host
Account stringName The name of the host account. The name can be up to 128 characters in length.
- host
Id string The ID of the host for which you want to create an account.
- instance
Id string The ID of the Bastionhost instance where you want to create an account for the host.
- pass
Phrase string The passphrase of the private key for the host account. NOTE: It is valid when the attribute
protocol_name
isSSH
.- password string
The password of the host account.
- private
Key string The private key of the host account. The value is a Base64-encoded string. NOTE: It is valid when the attribute
protocol_name
isSSH
- protocol
Name string The protocol used by the host account. Valid values: SSH,RDP
- host_
account_ strid Hosting account ID.
- host_
account_ strname 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
isSSH
.- 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
isSSH
- protocol_
name str The protocol used by the host account. Valid values: SSH,RDP
- host
Account StringId Hosting account ID.
- host
Account StringName The name of the host account. The name can be up to 128 characters in length.
- host
Id String The ID of the host for which you want to create an account.
- instance
Id String The ID of the Bastionhost instance where you want to create an account for the host.
- pass
Phrase String The passphrase of the private key for the host account. NOTE: It is valid when the attribute
protocol_name
isSSH
.- password String
The password of the host account.
- private
Key String The private key of the host account. The value is a Base64-encoded string. NOTE: It is valid when the attribute
protocol_name
isSSH
- protocol
Name 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.