alicloud logo
Alibaba Cloud v3.29.0, Jan 20 23

alicloud.bastionhost.Host

Provides a Bastion Host Host resource.

For information about Bastion Host Host and how to use it, see What is Host.

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.Host("example", new()
    {
        ActiveAddressType = "Private",
        HostName = "example_value",
        HostPrivateAddress = "172.16.0.10",
        InstanceId = "bastionhost-cn-tl3xxxxxxx",
        OsType = "Linux",
        Source = "Local",
    });

});
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.NewHost(ctx, "example", &bastionhost.HostArgs{
			ActiveAddressType:  pulumi.String("Private"),
			HostName:           pulumi.String("example_value"),
			HostPrivateAddress: pulumi.String("172.16.0.10"),
			InstanceId:         pulumi.String("bastionhost-cn-tl3xxxxxxx"),
			OsType:             pulumi.String("Linux"),
			Source:             pulumi.String("Local"),
		})
		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.Host;
import com.pulumi.alicloud.bastionhost.HostArgs;
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 Host("example", HostArgs.builder()        
            .activeAddressType("Private")
            .hostName("example_value")
            .hostPrivateAddress("172.16.0.10")
            .instanceId("bastionhost-cn-tl3xxxxxxx")
            .osType("Linux")
            .source("Local")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.bastionhost.Host("example",
    active_address_type="Private",
    host_name="example_value",
    host_private_address="172.16.0.10",
    instance_id="bastionhost-cn-tl3xxxxxxx",
    os_type="Linux",
    source="Local")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = new alicloud.bastionhost.Host("example", {
    activeAddressType: "Private",
    hostName: "example_value",
    hostPrivateAddress: "172.16.0.10",
    instanceId: "bastionhost-cn-tl3xxxxxxx",
    osType: "Linux",
    source: "Local",
});
resources:
  example:
    type: alicloud:bastionhost:Host
    properties:
      activeAddressType: Private
      hostName: example_value
      hostPrivateAddress: 172.16.0.10
      instanceId: bastionhost-cn-tl3xxxxxxx
      osType: Linux
      source: Local

Create Host Resource

new Host(name: string, args: HostArgs, opts?: CustomResourceOptions);
@overload
def Host(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         active_address_type: Optional[str] = None,
         comment: Optional[str] = None,
         host_name: Optional[str] = None,
         host_private_address: Optional[str] = None,
         host_public_address: Optional[str] = None,
         instance_id: Optional[str] = None,
         instance_region_id: Optional[str] = None,
         os_type: Optional[str] = None,
         source: Optional[str] = None,
         source_instance_id: Optional[str] = None)
@overload
def Host(resource_name: str,
         args: HostArgs,
         opts: Optional[ResourceOptions] = None)
func NewHost(ctx *Context, name string, args HostArgs, opts ...ResourceOption) (*Host, error)
public Host(string name, HostArgs args, CustomResourceOptions? opts = null)
public Host(String name, HostArgs args)
public Host(String name, HostArgs args, CustomResourceOptions options)
type: alicloud:bastionhost:Host
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args HostArgs
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 HostArgs
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 HostArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args HostArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args HostArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Host 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 Host resource accepts the following input properties:

ActiveAddressType string

Specify the new create a host of address types. Valid values: Public: the IP address of a Public network. Private: Private network address.

HostName string

Specify the new create a host name of the supports up to 128 characters.

InstanceId string

Specify the new create a host where the Bastion host ID of.

OsType string

Specify the new create the host's operating system. Valid values: Linux,Windows.

Source string

Specify the new create a host of source. Valid values:

Comment string

Specify a host of notes, supports up to 500 characters.

HostPrivateAddress string

Specify the new create a host of the private network address, it is possible to use the domain name or IP ADDRESS. NOTE: This parameter is required if the active_address_type parameter is set to Private.

HostPublicAddress string

Specify the new create a host of the IP address of a public network, it is possible to use the domain name or IP ADDRESS.

InstanceRegionId string

The instance region id.

SourceInstanceId string

Specify the newly created ECS instance ID or dedicated cluster host ID. NOTE: This parameter is required if the source parameter is set to Ecs or Rds.

ActiveAddressType string

Specify the new create a host of address types. Valid values: Public: the IP address of a Public network. Private: Private network address.

HostName string

Specify the new create a host name of the supports up to 128 characters.

InstanceId string

Specify the new create a host where the Bastion host ID of.

OsType string

Specify the new create the host's operating system. Valid values: Linux,Windows.

Source string

Specify the new create a host of source. Valid values:

Comment string

Specify a host of notes, supports up to 500 characters.

HostPrivateAddress string

Specify the new create a host of the private network address, it is possible to use the domain name or IP ADDRESS. NOTE: This parameter is required if the active_address_type parameter is set to Private.

HostPublicAddress string

Specify the new create a host of the IP address of a public network, it is possible to use the domain name or IP ADDRESS.

InstanceRegionId string

The instance region id.

SourceInstanceId string

Specify the newly created ECS instance ID or dedicated cluster host ID. NOTE: This parameter is required if the source parameter is set to Ecs or Rds.

activeAddressType String

Specify the new create a host of address types. Valid values: Public: the IP address of a Public network. Private: Private network address.

hostName String

Specify the new create a host name of the supports up to 128 characters.

instanceId String

Specify the new create a host where the Bastion host ID of.

osType String

Specify the new create the host's operating system. Valid values: Linux,Windows.

source String

Specify the new create a host of source. Valid values:

comment String

Specify a host of notes, supports up to 500 characters.

hostPrivateAddress String

Specify the new create a host of the private network address, it is possible to use the domain name or IP ADDRESS. NOTE: This parameter is required if the active_address_type parameter is set to Private.

hostPublicAddress String

Specify the new create a host of the IP address of a public network, it is possible to use the domain name or IP ADDRESS.

instanceRegionId String

The instance region id.

sourceInstanceId String

Specify the newly created ECS instance ID or dedicated cluster host ID. NOTE: This parameter is required if the source parameter is set to Ecs or Rds.

activeAddressType string

Specify the new create a host of address types. Valid values: Public: the IP address of a Public network. Private: Private network address.

hostName string

Specify the new create a host name of the supports up to 128 characters.

instanceId string

Specify the new create a host where the Bastion host ID of.

osType string

Specify the new create the host's operating system. Valid values: Linux,Windows.

source string

Specify the new create a host of source. Valid values:

comment string

Specify a host of notes, supports up to 500 characters.

hostPrivateAddress string

Specify the new create a host of the private network address, it is possible to use the domain name or IP ADDRESS. NOTE: This parameter is required if the active_address_type parameter is set to Private.

hostPublicAddress string

Specify the new create a host of the IP address of a public network, it is possible to use the domain name or IP ADDRESS.

instanceRegionId string

The instance region id.

sourceInstanceId string

Specify the newly created ECS instance ID or dedicated cluster host ID. NOTE: This parameter is required if the source parameter is set to Ecs or Rds.

active_address_type str

Specify the new create a host of address types. Valid values: Public: the IP address of a Public network. Private: Private network address.

host_name str

Specify the new create a host name of the supports up to 128 characters.

instance_id str

Specify the new create a host where the Bastion host ID of.

os_type str

Specify the new create the host's operating system. Valid values: Linux,Windows.

source str

Specify the new create a host of source. Valid values:

comment str

Specify a host of notes, supports up to 500 characters.

host_private_address str

Specify the new create a host of the private network address, it is possible to use the domain name or IP ADDRESS. NOTE: This parameter is required if the active_address_type parameter is set to Private.

host_public_address str

Specify the new create a host of the IP address of a public network, it is possible to use the domain name or IP ADDRESS.

instance_region_id str

The instance region id.

source_instance_id str

Specify the newly created ECS instance ID or dedicated cluster host ID. NOTE: This parameter is required if the source parameter is set to Ecs or Rds.

activeAddressType String

Specify the new create a host of address types. Valid values: Public: the IP address of a Public network. Private: Private network address.

hostName String

Specify the new create a host name of the supports up to 128 characters.

instanceId String

Specify the new create a host where the Bastion host ID of.

osType String

Specify the new create the host's operating system. Valid values: Linux,Windows.

source String

Specify the new create a host of source. Valid values:

comment String

Specify a host of notes, supports up to 500 characters.

hostPrivateAddress String

Specify the new create a host of the private network address, it is possible to use the domain name or IP ADDRESS. NOTE: This parameter is required if the active_address_type parameter is set to Private.

hostPublicAddress String

Specify the new create a host of the IP address of a public network, it is possible to use the domain name or IP ADDRESS.

instanceRegionId String

The instance region id.

sourceInstanceId String

Specify the newly created ECS instance ID or dedicated cluster host ID. NOTE: This parameter is required if the source parameter is set to Ecs or Rds.

Outputs

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

HostId string

The host ID.

Id string

The provider-assigned unique ID for this managed resource.

HostId string

The host ID.

Id string

The provider-assigned unique ID for this managed resource.

hostId String

The host ID.

id String

The provider-assigned unique ID for this managed resource.

hostId string

The host ID.

id string

The provider-assigned unique ID for this managed resource.

host_id str

The host ID.

id str

The provider-assigned unique ID for this managed resource.

hostId String

The host ID.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing Host Resource

Get an existing Host 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?: HostState, opts?: CustomResourceOptions): Host
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        active_address_type: Optional[str] = None,
        comment: Optional[str] = None,
        host_id: Optional[str] = None,
        host_name: Optional[str] = None,
        host_private_address: Optional[str] = None,
        host_public_address: Optional[str] = None,
        instance_id: Optional[str] = None,
        instance_region_id: Optional[str] = None,
        os_type: Optional[str] = None,
        source: Optional[str] = None,
        source_instance_id: Optional[str] = None) -> Host
func GetHost(ctx *Context, name string, id IDInput, state *HostState, opts ...ResourceOption) (*Host, error)
public static Host Get(string name, Input<string> id, HostState? state, CustomResourceOptions? opts = null)
public static Host get(String name, Output<String> id, HostState 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:
ActiveAddressType string

Specify the new create a host of address types. Valid values: Public: the IP address of a Public network. Private: Private network address.

Comment string

Specify a host of notes, supports up to 500 characters.

HostId string

The host ID.

HostName string

Specify the new create a host name of the supports up to 128 characters.

HostPrivateAddress string

Specify the new create a host of the private network address, it is possible to use the domain name or IP ADDRESS. NOTE: This parameter is required if the active_address_type parameter is set to Private.

HostPublicAddress string

Specify the new create a host of the IP address of a public network, it is possible to use the domain name or IP ADDRESS.

InstanceId string

Specify the new create a host where the Bastion host ID of.

InstanceRegionId string

The instance region id.

OsType string

Specify the new create the host's operating system. Valid values: Linux,Windows.

Source string

Specify the new create a host of source. Valid values:

SourceInstanceId string

Specify the newly created ECS instance ID or dedicated cluster host ID. NOTE: This parameter is required if the source parameter is set to Ecs or Rds.

ActiveAddressType string

Specify the new create a host of address types. Valid values: Public: the IP address of a Public network. Private: Private network address.

Comment string

Specify a host of notes, supports up to 500 characters.

HostId string

The host ID.

HostName string

Specify the new create a host name of the supports up to 128 characters.

HostPrivateAddress string

Specify the new create a host of the private network address, it is possible to use the domain name or IP ADDRESS. NOTE: This parameter is required if the active_address_type parameter is set to Private.

HostPublicAddress string

Specify the new create a host of the IP address of a public network, it is possible to use the domain name or IP ADDRESS.

InstanceId string

Specify the new create a host where the Bastion host ID of.

InstanceRegionId string

The instance region id.

OsType string

Specify the new create the host's operating system. Valid values: Linux,Windows.

Source string

Specify the new create a host of source. Valid values:

SourceInstanceId string

Specify the newly created ECS instance ID or dedicated cluster host ID. NOTE: This parameter is required if the source parameter is set to Ecs or Rds.

activeAddressType String

Specify the new create a host of address types. Valid values: Public: the IP address of a Public network. Private: Private network address.

comment String

Specify a host of notes, supports up to 500 characters.

hostId String

The host ID.

hostName String

Specify the new create a host name of the supports up to 128 characters.

hostPrivateAddress String

Specify the new create a host of the private network address, it is possible to use the domain name or IP ADDRESS. NOTE: This parameter is required if the active_address_type parameter is set to Private.

hostPublicAddress String

Specify the new create a host of the IP address of a public network, it is possible to use the domain name or IP ADDRESS.

instanceId String

Specify the new create a host where the Bastion host ID of.

instanceRegionId String

The instance region id.

osType String

Specify the new create the host's operating system. Valid values: Linux,Windows.

source String

Specify the new create a host of source. Valid values:

sourceInstanceId String

Specify the newly created ECS instance ID or dedicated cluster host ID. NOTE: This parameter is required if the source parameter is set to Ecs or Rds.

activeAddressType string

Specify the new create a host of address types. Valid values: Public: the IP address of a Public network. Private: Private network address.

comment string

Specify a host of notes, supports up to 500 characters.

hostId string

The host ID.

hostName string

Specify the new create a host name of the supports up to 128 characters.

hostPrivateAddress string

Specify the new create a host of the private network address, it is possible to use the domain name or IP ADDRESS. NOTE: This parameter is required if the active_address_type parameter is set to Private.

hostPublicAddress string

Specify the new create a host of the IP address of a public network, it is possible to use the domain name or IP ADDRESS.

instanceId string

Specify the new create a host where the Bastion host ID of.

instanceRegionId string

The instance region id.

osType string

Specify the new create the host's operating system. Valid values: Linux,Windows.

source string

Specify the new create a host of source. Valid values:

sourceInstanceId string

Specify the newly created ECS instance ID or dedicated cluster host ID. NOTE: This parameter is required if the source parameter is set to Ecs or Rds.

active_address_type str

Specify the new create a host of address types. Valid values: Public: the IP address of a Public network. Private: Private network address.

comment str

Specify a host of notes, supports up to 500 characters.

host_id str

The host ID.

host_name str

Specify the new create a host name of the supports up to 128 characters.

host_private_address str

Specify the new create a host of the private network address, it is possible to use the domain name or IP ADDRESS. NOTE: This parameter is required if the active_address_type parameter is set to Private.

host_public_address str

Specify the new create a host of the IP address of a public network, it is possible to use the domain name or IP ADDRESS.

instance_id str

Specify the new create a host where the Bastion host ID of.

instance_region_id str

The instance region id.

os_type str

Specify the new create the host's operating system. Valid values: Linux,Windows.

source str

Specify the new create a host of source. Valid values:

source_instance_id str

Specify the newly created ECS instance ID or dedicated cluster host ID. NOTE: This parameter is required if the source parameter is set to Ecs or Rds.

activeAddressType String

Specify the new create a host of address types. Valid values: Public: the IP address of a Public network. Private: Private network address.

comment String

Specify a host of notes, supports up to 500 characters.

hostId String

The host ID.

hostName String

Specify the new create a host name of the supports up to 128 characters.

hostPrivateAddress String

Specify the new create a host of the private network address, it is possible to use the domain name or IP ADDRESS. NOTE: This parameter is required if the active_address_type parameter is set to Private.

hostPublicAddress String

Specify the new create a host of the IP address of a public network, it is possible to use the domain name or IP ADDRESS.

instanceId String

Specify the new create a host where the Bastion host ID of.

instanceRegionId String

The instance region id.

osType String

Specify the new create the host's operating system. Valid values: Linux,Windows.

source String

Specify the new create a host of source. Valid values:

sourceInstanceId String

Specify the newly created ECS instance ID or dedicated cluster host ID. NOTE: This parameter is required if the source parameter is set to Ecs or Rds.

Import

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

 $ pulumi import alicloud:bastionhost/host:Host example <instance_id>:<host_id>

Package Details

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

This Pulumi package is based on the alicloud Terraform Provider.