1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. bastionhost
  5. HostAccount
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

alicloud.bastionhost.HostAccount

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

    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 since v1.135.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tf_example";
    const defaultZones = alicloud.getZones({
        availableResourceCreation: "VSwitch",
    });
    const defaultNetworks = alicloud.vpc.getNetworks({
        nameRegex: "^default-NODELETING$",
        cidrBlock: "10.4.0.0/16",
    });
    const defaultSwitches = Promise.all([defaultNetworks, defaultZones]).then(([defaultNetworks, defaultZones]) => alicloud.vpc.getSwitches({
        cidrBlock: "10.4.0.0/24",
        vpcId: defaultNetworks.ids?.[0],
        zoneId: defaultZones.zones?.[0]?.id,
    }));
    const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("defaultSecurityGroup", {vpcId: defaultNetworks.then(defaultNetworks => defaultNetworks.ids?.[0])});
    const defaultInstance = new alicloud.bastionhost.Instance("defaultInstance", {
        description: name,
        licenseCode: "bhah_ent_50_asset",
        planCode: "cloudbastion",
        storage: "5",
        bandwidth: "5",
        period: 1,
        vswitchId: defaultSwitches.then(defaultSwitches => defaultSwitches.ids?.[0]),
        securityGroupIds: [defaultSecurityGroup.id],
    });
    const defaultHost = new alicloud.bastionhost.Host("defaultHost", {
        instanceId: defaultInstance.id,
        hostName: name,
        activeAddressType: "Private",
        hostPrivateAddress: "172.16.0.10",
        osType: "Linux",
        source: "Local",
    });
    const defaultHostAccount = new alicloud.bastionhost.HostAccount("defaultHostAccount", {
        hostAccountName: name,
        hostId: defaultHost.hostId,
        instanceId: defaultHost.instanceId,
        protocolName: "SSH",
        password: "YourPassword12345",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf_example"
    default_zones = alicloud.get_zones(available_resource_creation="VSwitch")
    default_networks = alicloud.vpc.get_networks(name_regex="^default-NODELETING$",
        cidr_block="10.4.0.0/16")
    default_switches = alicloud.vpc.get_switches(cidr_block="10.4.0.0/24",
        vpc_id=default_networks.ids[0],
        zone_id=default_zones.zones[0].id)
    default_security_group = alicloud.ecs.SecurityGroup("defaultSecurityGroup", vpc_id=default_networks.ids[0])
    default_instance = alicloud.bastionhost.Instance("defaultInstance",
        description=name,
        license_code="bhah_ent_50_asset",
        plan_code="cloudbastion",
        storage="5",
        bandwidth="5",
        period=1,
        vswitch_id=default_switches.ids[0],
        security_group_ids=[default_security_group.id])
    default_host = alicloud.bastionhost.Host("defaultHost",
        instance_id=default_instance.id,
        host_name=name,
        active_address_type="Private",
        host_private_address="172.16.0.10",
        os_type="Linux",
        source="Local")
    default_host_account = alicloud.bastionhost.HostAccount("defaultHostAccount",
        host_account_name=name,
        host_id=default_host.host_id,
        instance_id=default_host.instance_id,
        protocol_name="SSH",
        password="YourPassword12345")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/bastionhost"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "tf_example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		defaultZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetworks, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
    			NameRegex: pulumi.StringRef("^default-NODELETING$"),
    			CidrBlock: pulumi.StringRef("10.4.0.0/16"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
    			CidrBlock: pulumi.StringRef("10.4.0.0/24"),
    			VpcId:     pulumi.StringRef(defaultNetworks.Ids[0]),
    			ZoneId:    pulumi.StringRef(defaultZones.Zones[0].Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "defaultSecurityGroup", &ecs.SecurityGroupArgs{
    			VpcId: pulumi.String(defaultNetworks.Ids[0]),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := bastionhost.NewInstance(ctx, "defaultInstance", &bastionhost.InstanceArgs{
    			Description: pulumi.String(name),
    			LicenseCode: pulumi.String("bhah_ent_50_asset"),
    			PlanCode:    pulumi.String("cloudbastion"),
    			Storage:     pulumi.String("5"),
    			Bandwidth:   pulumi.String("5"),
    			Period:      pulumi.Int(1),
    			VswitchId:   pulumi.String(defaultSwitches.Ids[0]),
    			SecurityGroupIds: pulumi.StringArray{
    				defaultSecurityGroup.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		defaultHost, err := bastionhost.NewHost(ctx, "defaultHost", &bastionhost.HostArgs{
    			InstanceId:         defaultInstance.ID(),
    			HostName:           pulumi.String(name),
    			ActiveAddressType:  pulumi.String("Private"),
    			HostPrivateAddress: pulumi.String("172.16.0.10"),
    			OsType:             pulumi.String("Linux"),
    			Source:             pulumi.String("Local"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = bastionhost.NewHostAccount(ctx, "defaultHostAccount", &bastionhost.HostAccountArgs{
    			HostAccountName: pulumi.String(name),
    			HostId:          defaultHost.HostId,
    			InstanceId:      defaultHost.InstanceId,
    			ProtocolName:    pulumi.String("SSH"),
    			Password:        pulumi.String("YourPassword12345"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tf_example";
        var defaultZones = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "VSwitch",
        });
    
        var defaultNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
        {
            NameRegex = "^default-NODELETING$",
            CidrBlock = "10.4.0.0/16",
        });
    
        var defaultSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
        {
            CidrBlock = "10.4.0.0/24",
            VpcId = defaultNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
            ZoneId = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        });
    
        var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("defaultSecurityGroup", new()
        {
            VpcId = defaultNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
        });
    
        var defaultInstance = new AliCloud.BastionHost.Instance("defaultInstance", new()
        {
            Description = name,
            LicenseCode = "bhah_ent_50_asset",
            PlanCode = "cloudbastion",
            Storage = "5",
            Bandwidth = "5",
            Period = 1,
            VswitchId = defaultSwitches.Apply(getSwitchesResult => getSwitchesResult.Ids[0]),
            SecurityGroupIds = new[]
            {
                defaultSecurityGroup.Id,
            },
        });
    
        var defaultHost = new AliCloud.BastionHost.Host("defaultHost", new()
        {
            InstanceId = defaultInstance.Id,
            HostName = name,
            ActiveAddressType = "Private",
            HostPrivateAddress = "172.16.0.10",
            OsType = "Linux",
            Source = "Local",
        });
    
        var defaultHostAccount = new AliCloud.BastionHost.HostAccount("defaultHostAccount", new()
        {
            HostAccountName = name,
            HostId = defaultHost.HostId,
            InstanceId = defaultHost.InstanceId,
            ProtocolName = "SSH",
            Password = "YourPassword12345",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.AlicloudFunctions;
    import com.pulumi.alicloud.inputs.GetZonesArgs;
    import com.pulumi.alicloud.vpc.VpcFunctions;
    import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
    import com.pulumi.alicloud.vpc.inputs.GetSwitchesArgs;
    import com.pulumi.alicloud.ecs.SecurityGroup;
    import com.pulumi.alicloud.ecs.SecurityGroupArgs;
    import com.pulumi.alicloud.bastionhost.Instance;
    import com.pulumi.alicloud.bastionhost.InstanceArgs;
    import com.pulumi.alicloud.bastionhost.Host;
    import com.pulumi.alicloud.bastionhost.HostArgs;
    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) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("tf_example");
            final var defaultZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("VSwitch")
                .build());
    
            final var defaultNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
                .nameRegex("^default-NODELETING$")
                .cidrBlock("10.4.0.0/16")
                .build());
    
            final var defaultSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
                .cidrBlock("10.4.0.0/24")
                .vpcId(defaultNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
                .zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .build());
    
            var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()        
                .vpcId(defaultNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()        
                .description(name)
                .licenseCode("bhah_ent_50_asset")
                .planCode("cloudbastion")
                .storage("5")
                .bandwidth("5")
                .period("1")
                .vswitchId(defaultSwitches.applyValue(getSwitchesResult -> getSwitchesResult.ids()[0]))
                .securityGroupIds(defaultSecurityGroup.id())
                .build());
    
            var defaultHost = new Host("defaultHost", HostArgs.builder()        
                .instanceId(defaultInstance.id())
                .hostName(name)
                .activeAddressType("Private")
                .hostPrivateAddress("172.16.0.10")
                .osType("Linux")
                .source("Local")
                .build());
    
            var defaultHostAccount = new HostAccount("defaultHostAccount", HostAccountArgs.builder()        
                .hostAccountName(name)
                .hostId(defaultHost.hostId())
                .instanceId(defaultHost.instanceId())
                .protocolName("SSH")
                .password("YourPassword12345")
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf_example
    resources:
      defaultSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        properties:
          vpcId: ${defaultNetworks.ids[0]}
      defaultInstance:
        type: alicloud:bastionhost:Instance
        properties:
          description: ${name}
          licenseCode: bhah_ent_50_asset
          planCode: cloudbastion
          storage: '5'
          bandwidth: '5'
          period: '1'
          vswitchId: ${defaultSwitches.ids[0]}
          securityGroupIds:
            - ${defaultSecurityGroup.id}
      defaultHost:
        type: alicloud:bastionhost:Host
        properties:
          instanceId: ${defaultInstance.id}
          hostName: ${name}
          activeAddressType: Private
          hostPrivateAddress: 172.16.0.10
          osType: Linux
          source: Local
      defaultHostAccount:
        type: alicloud:bastionhost:HostAccount
        properties:
          hostAccountName: ${name}
          hostId: ${defaultHost.hostId}
          instanceId: ${defaultHost.instanceId}
          protocolName: SSH
          password: YourPassword12345
    variables:
      defaultZones:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: VSwitch
      defaultNetworks:
        fn::invoke:
          Function: alicloud:vpc:getNetworks
          Arguments:
            nameRegex: ^default-NODELETING$
            cidrBlock: 10.4.0.0/16
      defaultSwitches:
        fn::invoke:
          Function: alicloud:vpc:getSwitches
          Arguments:
            cidrBlock: 10.4.0.0/24
            vpcId: ${defaultNetworks.ids[0]}
            zoneId: ${defaultZones.zones[0].id}
    

    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.
    alicloud logo
    Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi