1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. bastionhost
  5. Instance
Viewing docs for Alibaba Cloud v3.97.0
published on Saturday, Mar 14, 2026 by Pulumi
alicloud logo
Viewing docs for Alibaba Cloud v3.97.0
published on Saturday, Mar 14, 2026 by Pulumi

    NOTE: Since the version 1.132.0, the resource alicloud.yundun.BastionHostInstance has been renamed to alicloud.bastionhost.Instance.

    Cloud Bastion Host instance resource (“Yundun_bastionhost” is the short term of this product). For information about Resource Manager Resource Directory and how to use it, see What is Bastionhost.

    NOTE: The endpoint of bssopenapi used only support “business.aliyuncs.com” at present.

    NOTE: Available since v1.132.0.

    NOTE: In order to destroy Cloud Bastionhost instance , users are required to apply for white list first

    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 _default = alicloud.getZones({
        availableResourceCreation: "VSwitch",
    });
    const defaultGetNetworks = alicloud.vpc.getNetworks({
        nameRegex: "^default-NODELETING$",
        cidrBlock: "10.4.0.0/16",
    });
    const defaultGetSwitches = Promise.all([defaultGetNetworks, _default]).then(([defaultGetNetworks, _default]) => alicloud.vpc.getSwitches({
        cidrBlock: "10.4.0.0/24",
        vpcId: defaultGetNetworks.ids?.[0],
        zoneId: _default.zones?.[0]?.id,
    }));
    const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {vpcId: defaultGetNetworks.then(defaultGetNetworks => defaultGetNetworks.ids?.[0])});
    const defaultInstance = new alicloud.bastionhost.Instance("default", {
        description: name,
        licenseCode: "bhah_ent_50_asset",
        planCode: "cloudbastion",
        storage: "5",
        bandwidth: "5",
        period: 1,
        vswitchId: defaultGetSwitches.then(defaultGetSwitches => defaultGetSwitches.ids?.[0]),
        securityGroupIds: [defaultSecurityGroup.id],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf_example"
    default = alicloud.get_zones(available_resource_creation="VSwitch")
    default_get_networks = alicloud.vpc.get_networks(name_regex="^default-NODELETING$",
        cidr_block="10.4.0.0/16")
    default_get_switches = alicloud.vpc.get_switches(cidr_block="10.4.0.0/24",
        vpc_id=default_get_networks.ids[0],
        zone_id=default.zones[0].id)
    default_security_group = alicloud.ecs.SecurityGroup("default", vpc_id=default_get_networks.ids[0])
    default_instance = alicloud.bastionhost.Instance("default",
        description=name,
        license_code="bhah_ent_50_asset",
        plan_code="cloudbastion",
        storage="5",
        bandwidth="5",
        period=1,
        vswitch_id=default_get_switches.ids[0],
        security_group_ids=[default_security_group.id])
    
    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
    		}
    		_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetNetworks, 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
    		}
    		defaultGetSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
    			CidrBlock: pulumi.StringRef("10.4.0.0/24"),
    			VpcId:     pulumi.StringRef(defaultGetNetworks.Ids[0]),
    			ZoneId:    pulumi.StringRef(_default.Zones[0].Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
    			VpcId: pulumi.String(defaultGetNetworks.Ids[0]),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = bastionhost.NewInstance(ctx, "default", &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(defaultGetSwitches.Ids[0]),
    			SecurityGroupIds: pulumi.StringArray{
    				defaultSecurityGroup.ID(),
    			},
    		})
    		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 @default = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "VSwitch",
        });
    
        var defaultGetNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
        {
            NameRegex = "^default-NODELETING$",
            CidrBlock = "10.4.0.0/16",
        });
    
        var defaultGetSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
        {
            CidrBlock = "10.4.0.0/24",
            VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
            ZoneId = @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        });
    
        var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
        {
            VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
        });
    
        var defaultInstance = new AliCloud.BastionHost.Instance("default", new()
        {
            Description = name,
            LicenseCode = "bhah_ent_50_asset",
            PlanCode = "cloudbastion",
            Storage = "5",
            Bandwidth = "5",
            Period = 1,
            VswitchId = defaultGetSwitches.Apply(getSwitchesResult => getSwitchesResult.Ids[0]),
            SecurityGroupIds = new[]
            {
                defaultSecurityGroup.Id,
            },
        });
    
    });
    
    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 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 default = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("VSwitch")
                .build());
    
            final var defaultGetNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
                .nameRegex("^default-NODELETING$")
                .cidrBlock("10.4.0.0/16")
                .build());
    
            final var defaultGetSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
                .cidrBlock("10.4.0.0/24")
                .vpcId(defaultGetNetworks.ids()[0])
                .zoneId(default_.zones()[0].id())
                .build());
    
            var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
                .vpcId(defaultGetNetworks.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(defaultGetSwitches.ids()[0])
                .securityGroupIds(defaultSecurityGroup.id())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf_example
    resources:
      defaultSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        name: default
        properties:
          vpcId: ${defaultGetNetworks.ids[0]}
      defaultInstance:
        type: alicloud:bastionhost:Instance
        name: default
        properties:
          description: ${name}
          licenseCode: bhah_ent_50_asset
          planCode: cloudbastion
          storage: '5'
          bandwidth: '5'
          period: '1'
          vswitchId: ${defaultGetSwitches.ids[0]}
          securityGroupIds:
            - ${defaultSecurityGroup.id}
    variables:
      default:
        fn::invoke:
          function: alicloud:getZones
          arguments:
            availableResourceCreation: VSwitch
      defaultGetNetworks:
        fn::invoke:
          function: alicloud:vpc:getNetworks
          arguments:
            nameRegex: ^default-NODELETING$
            cidrBlock: 10.4.0.0/16
      defaultGetSwitches:
        fn::invoke:
          function: alicloud:vpc:getSwitches
          arguments:
            cidrBlock: 10.4.0.0/24
            vpcId: ${defaultGetNetworks.ids[0]}
            zoneId: ${default.zones[0].id}
    
    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 _default = alicloud.getZones({
        availableResourceCreation: "VSwitch",
    });
    const defaultGetNetworks = alicloud.vpc.getNetworks({
        nameRegex: "^default-NODELETING$",
        cidrBlock: "10.4.0.0/16",
    });
    const defaultGetSwitches = Promise.all([defaultGetNetworks, _default]).then(([defaultGetNetworks, _default]) => alicloud.vpc.getSwitches({
        cidrBlock: "10.4.0.0/24",
        vpcId: defaultGetNetworks.ids?.[0],
        zoneId: _default.zones?.[0]?.id,
    }));
    const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {vpcId: defaultGetNetworks.then(defaultGetNetworks => defaultGetNetworks.ids?.[0])});
    const defaultInstance = new alicloud.bastionhost.Instance("default", {
        description: name,
        licenseCode: "bhah_ent_50_asset",
        planCode: "cloudbastion",
        storage: "5",
        bandwidth: "5",
        period: 1,
        securityGroupIds: [defaultSecurityGroup.id],
        vswitchId: defaultGetSwitches.then(defaultGetSwitches => defaultGetSwitches.ids?.[0]),
        adAuthServers: [{
            server: "192.168.1.1",
            standbyServer: "192.168.1.3",
            port: 80,
            domain: "domain",
            account: "cn=Manager,dc=test,dc=com",
            password: "YouPassword123",
            filter: "objectClass=person",
            nameMapping: "nameAttr",
            emailMapping: "emailAttr",
            mobileMapping: "mobileAttr",
            isSsl: false,
            baseDn: "dc=test,dc=com",
        }],
        ldapAuthServers: [{
            server: "192.168.1.1",
            standbyServer: "192.168.1.3",
            port: 80,
            loginNameMapping: "uid",
            account: "cn=Manager,dc=test,dc=com",
            password: "YouPassword123",
            filter: "objectClass=person",
            nameMapping: "nameAttr",
            emailMapping: "emailAttr",
            mobileMapping: "mobileAttr",
            isSsl: false,
            baseDn: "dc=test,dc=com",
        }],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf_example"
    default = alicloud.get_zones(available_resource_creation="VSwitch")
    default_get_networks = alicloud.vpc.get_networks(name_regex="^default-NODELETING$",
        cidr_block="10.4.0.0/16")
    default_get_switches = alicloud.vpc.get_switches(cidr_block="10.4.0.0/24",
        vpc_id=default_get_networks.ids[0],
        zone_id=default.zones[0].id)
    default_security_group = alicloud.ecs.SecurityGroup("default", vpc_id=default_get_networks.ids[0])
    default_instance = alicloud.bastionhost.Instance("default",
        description=name,
        license_code="bhah_ent_50_asset",
        plan_code="cloudbastion",
        storage="5",
        bandwidth="5",
        period=1,
        security_group_ids=[default_security_group.id],
        vswitch_id=default_get_switches.ids[0],
        ad_auth_servers=[{
            "server": "192.168.1.1",
            "standby_server": "192.168.1.3",
            "port": 80,
            "domain": "domain",
            "account": "cn=Manager,dc=test,dc=com",
            "password": "YouPassword123",
            "filter": "objectClass=person",
            "name_mapping": "nameAttr",
            "email_mapping": "emailAttr",
            "mobile_mapping": "mobileAttr",
            "is_ssl": False,
            "base_dn": "dc=test,dc=com",
        }],
        ldap_auth_servers=[{
            "server": "192.168.1.1",
            "standby_server": "192.168.1.3",
            "port": 80,
            "login_name_mapping": "uid",
            "account": "cn=Manager,dc=test,dc=com",
            "password": "YouPassword123",
            "filter": "objectClass=person",
            "name_mapping": "nameAttr",
            "email_mapping": "emailAttr",
            "mobile_mapping": "mobileAttr",
            "is_ssl": False,
            "base_dn": "dc=test,dc=com",
        }])
    
    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
    		}
    		_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetNetworks, 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
    		}
    		defaultGetSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
    			CidrBlock: pulumi.StringRef("10.4.0.0/24"),
    			VpcId:     pulumi.StringRef(defaultGetNetworks.Ids[0]),
    			ZoneId:    pulumi.StringRef(_default.Zones[0].Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
    			VpcId: pulumi.String(defaultGetNetworks.Ids[0]),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = bastionhost.NewInstance(ctx, "default", &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),
    			SecurityGroupIds: pulumi.StringArray{
    				defaultSecurityGroup.ID(),
    			},
    			VswitchId: pulumi.String(defaultGetSwitches.Ids[0]),
    			AdAuthServers: bastionhost.InstanceAdAuthServerArray{
    				&bastionhost.InstanceAdAuthServerArgs{
    					Server:        pulumi.String("192.168.1.1"),
    					StandbyServer: pulumi.String("192.168.1.3"),
    					Port:          pulumi.Int(80),
    					Domain:        pulumi.String("domain"),
    					Account:       pulumi.String("cn=Manager,dc=test,dc=com"),
    					Password:      pulumi.String("YouPassword123"),
    					Filter:        pulumi.String("objectClass=person"),
    					NameMapping:   pulumi.String("nameAttr"),
    					EmailMapping:  pulumi.String("emailAttr"),
    					MobileMapping: pulumi.String("mobileAttr"),
    					IsSsl:         pulumi.Bool(false),
    					BaseDn:        pulumi.String("dc=test,dc=com"),
    				},
    			},
    			LdapAuthServers: bastionhost.InstanceLdapAuthServerArray{
    				&bastionhost.InstanceLdapAuthServerArgs{
    					Server:           pulumi.String("192.168.1.1"),
    					StandbyServer:    pulumi.String("192.168.1.3"),
    					Port:             pulumi.Int(80),
    					LoginNameMapping: pulumi.String("uid"),
    					Account:          pulumi.String("cn=Manager,dc=test,dc=com"),
    					Password:         pulumi.String("YouPassword123"),
    					Filter:           pulumi.String("objectClass=person"),
    					NameMapping:      pulumi.String("nameAttr"),
    					EmailMapping:     pulumi.String("emailAttr"),
    					MobileMapping:    pulumi.String("mobileAttr"),
    					IsSsl:            pulumi.Bool(false),
    					BaseDn:           pulumi.String("dc=test,dc=com"),
    				},
    			},
    		})
    		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 @default = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "VSwitch",
        });
    
        var defaultGetNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
        {
            NameRegex = "^default-NODELETING$",
            CidrBlock = "10.4.0.0/16",
        });
    
        var defaultGetSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
        {
            CidrBlock = "10.4.0.0/24",
            VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
            ZoneId = @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        });
    
        var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
        {
            VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
        });
    
        var defaultInstance = new AliCloud.BastionHost.Instance("default", new()
        {
            Description = name,
            LicenseCode = "bhah_ent_50_asset",
            PlanCode = "cloudbastion",
            Storage = "5",
            Bandwidth = "5",
            Period = 1,
            SecurityGroupIds = new[]
            {
                defaultSecurityGroup.Id,
            },
            VswitchId = defaultGetSwitches.Apply(getSwitchesResult => getSwitchesResult.Ids[0]),
            AdAuthServers = new[]
            {
                new AliCloud.BastionHost.Inputs.InstanceAdAuthServerArgs
                {
                    Server = "192.168.1.1",
                    StandbyServer = "192.168.1.3",
                    Port = 80,
                    Domain = "domain",
                    Account = "cn=Manager,dc=test,dc=com",
                    Password = "YouPassword123",
                    Filter = "objectClass=person",
                    NameMapping = "nameAttr",
                    EmailMapping = "emailAttr",
                    MobileMapping = "mobileAttr",
                    IsSsl = false,
                    BaseDn = "dc=test,dc=com",
                },
            },
            LdapAuthServers = new[]
            {
                new AliCloud.BastionHost.Inputs.InstanceLdapAuthServerArgs
                {
                    Server = "192.168.1.1",
                    StandbyServer = "192.168.1.3",
                    Port = 80,
                    LoginNameMapping = "uid",
                    Account = "cn=Manager,dc=test,dc=com",
                    Password = "YouPassword123",
                    Filter = "objectClass=person",
                    NameMapping = "nameAttr",
                    EmailMapping = "emailAttr",
                    MobileMapping = "mobileAttr",
                    IsSsl = false,
                    BaseDn = "dc=test,dc=com",
                },
            },
        });
    
    });
    
    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.inputs.InstanceAdAuthServerArgs;
    import com.pulumi.alicloud.bastionhost.inputs.InstanceLdapAuthServerArgs;
    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 default = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("VSwitch")
                .build());
    
            final var defaultGetNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
                .nameRegex("^default-NODELETING$")
                .cidrBlock("10.4.0.0/16")
                .build());
    
            final var defaultGetSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
                .cidrBlock("10.4.0.0/24")
                .vpcId(defaultGetNetworks.ids()[0])
                .zoneId(default_.zones()[0].id())
                .build());
    
            var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
                .vpcId(defaultGetNetworks.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)
                .securityGroupIds(defaultSecurityGroup.id())
                .vswitchId(defaultGetSwitches.ids()[0])
                .adAuthServers(InstanceAdAuthServerArgs.builder()
                    .server("192.168.1.1")
                    .standbyServer("192.168.1.3")
                    .port(80)
                    .domain("domain")
                    .account("cn=Manager,dc=test,dc=com")
                    .password("YouPassword123")
                    .filter("objectClass=person")
                    .nameMapping("nameAttr")
                    .emailMapping("emailAttr")
                    .mobileMapping("mobileAttr")
                    .isSsl(false)
                    .baseDn("dc=test,dc=com")
                    .build())
                .ldapAuthServers(InstanceLdapAuthServerArgs.builder()
                    .server("192.168.1.1")
                    .standbyServer("192.168.1.3")
                    .port(80)
                    .loginNameMapping("uid")
                    .account("cn=Manager,dc=test,dc=com")
                    .password("YouPassword123")
                    .filter("objectClass=person")
                    .nameMapping("nameAttr")
                    .emailMapping("emailAttr")
                    .mobileMapping("mobileAttr")
                    .isSsl(false)
                    .baseDn("dc=test,dc=com")
                    .build())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf_example
    resources:
      defaultSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        name: default
        properties:
          vpcId: ${defaultGetNetworks.ids[0]}
      defaultInstance:
        type: alicloud:bastionhost:Instance
        name: default
        properties:
          description: ${name}
          licenseCode: bhah_ent_50_asset
          planCode: cloudbastion
          storage: '5'
          bandwidth: '5'
          period: 1
          securityGroupIds:
            - ${defaultSecurityGroup.id}
          vswitchId: ${defaultGetSwitches.ids[0]}
          adAuthServers:
            - server: 192.168.1.1
              standbyServer: 192.168.1.3
              port: '80'
              domain: domain
              account: cn=Manager,dc=test,dc=com
              password: YouPassword123
              filter: objectClass=person
              nameMapping: nameAttr
              emailMapping: emailAttr
              mobileMapping: mobileAttr
              isSsl: false
              baseDn: dc=test,dc=com
          ldapAuthServers:
            - server: 192.168.1.1
              standbyServer: 192.168.1.3
              port: '80'
              loginNameMapping: uid
              account: cn=Manager,dc=test,dc=com
              password: YouPassword123
              filter: objectClass=person
              nameMapping: nameAttr
              emailMapping: emailAttr
              mobileMapping: mobileAttr
              isSsl: false
              baseDn: dc=test,dc=com
    variables:
      default:
        fn::invoke:
          function: alicloud:getZones
          arguments:
            availableResourceCreation: VSwitch
      defaultGetNetworks:
        fn::invoke:
          function: alicloud:vpc:getNetworks
          arguments:
            nameRegex: ^default-NODELETING$
            cidrBlock: 10.4.0.0/16
      defaultGetSwitches:
        fn::invoke:
          function: alicloud:vpc:getSwitches
          arguments:
            cidrBlock: 10.4.0.0/24
            vpcId: ${defaultGetNetworks.ids[0]}
            zoneId: ${default.zones[0].id}
    

    Deleting alicloud.bastionhost.Instance or removing it from your configuration

    The alicloud.bastionhost.Instance resource allows you to manage bastionhost instance, but Terraform cannot destroy it. Deleting the subscription resource or removing it from your configuration will remove it from your state file and management, but will not destroy the bastionhost instance. You can resume managing the subscription bastionhost instance via the AlibabaCloud Console.

    📚 Need more examples? VIEW MORE EXAMPLES

    Create Instance Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Instance(name: string, args: InstanceArgs, opts?: CustomResourceOptions);
    @overload
    def Instance(resource_name: str,
                 args: InstanceArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Instance(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 plan_code: Optional[str] = None,
                 bandwidth: Optional[str] = None,
                 description: Optional[str] = None,
                 vswitch_id: Optional[str] = None,
                 storage: Optional[str] = None,
                 license_code: Optional[str] = None,
                 security_group_ids: Optional[Sequence[str]] = None,
                 public_white_lists: Optional[Sequence[str]] = None,
                 ad_auth_servers: Optional[Sequence[InstanceAdAuthServerArgs]] = None,
                 renew_period: Optional[int] = None,
                 renewal_period_unit: Optional[str] = None,
                 renewal_status: Optional[str] = None,
                 resource_group_id: Optional[str] = None,
                 period: Optional[int] = None,
                 slave_vswitch_id: Optional[str] = None,
                 ldap_auth_servers: Optional[Sequence[InstanceLdapAuthServerArgs]] = None,
                 tags: Optional[Mapping[str, str]] = None,
                 enable_public_access: Optional[bool] = None)
    func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)
    public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
    public Instance(String name, InstanceArgs args)
    public Instance(String name, InstanceArgs args, CustomResourceOptions options)
    
    type: alicloud:bastionhost:Instance
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

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

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var exampleinstanceResourceResourceFromBastionhostinstance = new AliCloud.BastionHost.Instance("exampleinstanceResourceResourceFromBastionhostinstance", new()
    {
        PlanCode = "string",
        Bandwidth = "string",
        Description = "string",
        VswitchId = "string",
        Storage = "string",
        LicenseCode = "string",
        SecurityGroupIds = new[]
        {
            "string",
        },
        PublicWhiteLists = new[]
        {
            "string",
        },
        AdAuthServers = new[]
        {
            new AliCloud.BastionHost.Inputs.InstanceAdAuthServerArgs
            {
                Account = "string",
                BaseDn = "string",
                Domain = "string",
                IsSsl = false,
                Port = 0,
                Server = "string",
                EmailMapping = "string",
                Filter = "string",
                MobileMapping = "string",
                NameMapping = "string",
                Password = "string",
                StandbyServer = "string",
            },
        },
        RenewPeriod = 0,
        RenewalPeriodUnit = "string",
        RenewalStatus = "string",
        ResourceGroupId = "string",
        Period = 0,
        SlaveVswitchId = "string",
        LdapAuthServers = new[]
        {
            new AliCloud.BastionHost.Inputs.InstanceLdapAuthServerArgs
            {
                Account = "string",
                BaseDn = "string",
                Port = 0,
                Server = "string",
                EmailMapping = "string",
                Filter = "string",
                IsSsl = false,
                LoginNameMapping = "string",
                MobileMapping = "string",
                NameMapping = "string",
                Password = "string",
                StandbyServer = "string",
            },
        },
        Tags = 
        {
            { "string", "string" },
        },
        EnablePublicAccess = false,
    });
    
    example, err := bastionhost.NewInstance(ctx, "exampleinstanceResourceResourceFromBastionhostinstance", &bastionhost.InstanceArgs{
    	PlanCode:    pulumi.String("string"),
    	Bandwidth:   pulumi.String("string"),
    	Description: pulumi.String("string"),
    	VswitchId:   pulumi.String("string"),
    	Storage:     pulumi.String("string"),
    	LicenseCode: pulumi.String("string"),
    	SecurityGroupIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	PublicWhiteLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	AdAuthServers: bastionhost.InstanceAdAuthServerArray{
    		&bastionhost.InstanceAdAuthServerArgs{
    			Account:       pulumi.String("string"),
    			BaseDn:        pulumi.String("string"),
    			Domain:        pulumi.String("string"),
    			IsSsl:         pulumi.Bool(false),
    			Port:          pulumi.Int(0),
    			Server:        pulumi.String("string"),
    			EmailMapping:  pulumi.String("string"),
    			Filter:        pulumi.String("string"),
    			MobileMapping: pulumi.String("string"),
    			NameMapping:   pulumi.String("string"),
    			Password:      pulumi.String("string"),
    			StandbyServer: pulumi.String("string"),
    		},
    	},
    	RenewPeriod:       pulumi.Int(0),
    	RenewalPeriodUnit: pulumi.String("string"),
    	RenewalStatus:     pulumi.String("string"),
    	ResourceGroupId:   pulumi.String("string"),
    	Period:            pulumi.Int(0),
    	SlaveVswitchId:    pulumi.String("string"),
    	LdapAuthServers: bastionhost.InstanceLdapAuthServerArray{
    		&bastionhost.InstanceLdapAuthServerArgs{
    			Account:          pulumi.String("string"),
    			BaseDn:           pulumi.String("string"),
    			Port:             pulumi.Int(0),
    			Server:           pulumi.String("string"),
    			EmailMapping:     pulumi.String("string"),
    			Filter:           pulumi.String("string"),
    			IsSsl:            pulumi.Bool(false),
    			LoginNameMapping: pulumi.String("string"),
    			MobileMapping:    pulumi.String("string"),
    			NameMapping:      pulumi.String("string"),
    			Password:         pulumi.String("string"),
    			StandbyServer:    pulumi.String("string"),
    		},
    	},
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	EnablePublicAccess: pulumi.Bool(false),
    })
    
    var exampleinstanceResourceResourceFromBastionhostinstance = new com.pulumi.alicloud.bastionhost.Instance("exampleinstanceResourceResourceFromBastionhostinstance", com.pulumi.alicloud.bastionhost.InstanceArgs.builder()
        .planCode("string")
        .bandwidth("string")
        .description("string")
        .vswitchId("string")
        .storage("string")
        .licenseCode("string")
        .securityGroupIds("string")
        .publicWhiteLists("string")
        .adAuthServers(InstanceAdAuthServerArgs.builder()
            .account("string")
            .baseDn("string")
            .domain("string")
            .isSsl(false)
            .port(0)
            .server("string")
            .emailMapping("string")
            .filter("string")
            .mobileMapping("string")
            .nameMapping("string")
            .password("string")
            .standbyServer("string")
            .build())
        .renewPeriod(0)
        .renewalPeriodUnit("string")
        .renewalStatus("string")
        .resourceGroupId("string")
        .period(0)
        .slaveVswitchId("string")
        .ldapAuthServers(InstanceLdapAuthServerArgs.builder()
            .account("string")
            .baseDn("string")
            .port(0)
            .server("string")
            .emailMapping("string")
            .filter("string")
            .isSsl(false)
            .loginNameMapping("string")
            .mobileMapping("string")
            .nameMapping("string")
            .password("string")
            .standbyServer("string")
            .build())
        .tags(Map.of("string", "string"))
        .enablePublicAccess(false)
        .build());
    
    exampleinstance_resource_resource_from_bastionhostinstance = alicloud.bastionhost.Instance("exampleinstanceResourceResourceFromBastionhostinstance",
        plan_code="string",
        bandwidth="string",
        description="string",
        vswitch_id="string",
        storage="string",
        license_code="string",
        security_group_ids=["string"],
        public_white_lists=["string"],
        ad_auth_servers=[{
            "account": "string",
            "base_dn": "string",
            "domain": "string",
            "is_ssl": False,
            "port": 0,
            "server": "string",
            "email_mapping": "string",
            "filter": "string",
            "mobile_mapping": "string",
            "name_mapping": "string",
            "password": "string",
            "standby_server": "string",
        }],
        renew_period=0,
        renewal_period_unit="string",
        renewal_status="string",
        resource_group_id="string",
        period=0,
        slave_vswitch_id="string",
        ldap_auth_servers=[{
            "account": "string",
            "base_dn": "string",
            "port": 0,
            "server": "string",
            "email_mapping": "string",
            "filter": "string",
            "is_ssl": False,
            "login_name_mapping": "string",
            "mobile_mapping": "string",
            "name_mapping": "string",
            "password": "string",
            "standby_server": "string",
        }],
        tags={
            "string": "string",
        },
        enable_public_access=False)
    
    const exampleinstanceResourceResourceFromBastionhostinstance = new alicloud.bastionhost.Instance("exampleinstanceResourceResourceFromBastionhostinstance", {
        planCode: "string",
        bandwidth: "string",
        description: "string",
        vswitchId: "string",
        storage: "string",
        licenseCode: "string",
        securityGroupIds: ["string"],
        publicWhiteLists: ["string"],
        adAuthServers: [{
            account: "string",
            baseDn: "string",
            domain: "string",
            isSsl: false,
            port: 0,
            server: "string",
            emailMapping: "string",
            filter: "string",
            mobileMapping: "string",
            nameMapping: "string",
            password: "string",
            standbyServer: "string",
        }],
        renewPeriod: 0,
        renewalPeriodUnit: "string",
        renewalStatus: "string",
        resourceGroupId: "string",
        period: 0,
        slaveVswitchId: "string",
        ldapAuthServers: [{
            account: "string",
            baseDn: "string",
            port: 0,
            server: "string",
            emailMapping: "string",
            filter: "string",
            isSsl: false,
            loginNameMapping: "string",
            mobileMapping: "string",
            nameMapping: "string",
            password: "string",
            standbyServer: "string",
        }],
        tags: {
            string: "string",
        },
        enablePublicAccess: false,
    });
    
    type: alicloud:bastionhost:Instance
    properties:
        adAuthServers:
            - account: string
              baseDn: string
              domain: string
              emailMapping: string
              filter: string
              isSsl: false
              mobileMapping: string
              nameMapping: string
              password: string
              port: 0
              server: string
              standbyServer: string
        bandwidth: string
        description: string
        enablePublicAccess: false
        ldapAuthServers:
            - account: string
              baseDn: string
              emailMapping: string
              filter: string
              isSsl: false
              loginNameMapping: string
              mobileMapping: string
              nameMapping: string
              password: string
              port: 0
              server: string
              standbyServer: string
        licenseCode: string
        period: 0
        planCode: string
        publicWhiteLists:
            - string
        renewPeriod: 0
        renewalPeriodUnit: string
        renewalStatus: string
        resourceGroupId: string
        securityGroupIds:
            - string
        slaveVswitchId: string
        storage: string
        tags:
            string: string
        vswitchId: string
    

    Instance Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Instance resource accepts the following input properties:

    Bandwidth string
    The bandwidth of Cloud Bastionhost instance. NOTE: From version 1.263.0, bandwidth can be modified. If China-Site Account, its valid values: 0 to 150. Unit: Mbit/s. The value must be a multiple of 5. If International-Site Account, its valid values: 0 to 200. Unit: Mbit/s. The value must be a multiple of 10.
    Description string
    Description of the instance. This name can have a string of 1 to 63 characters.
    LicenseCode string
    The package type of Cloud Bastionhost instance. You can query more supported types through the DescribePricingModule.
    PlanCode string
    The plan code of Cloud Bastionhost instance. Valid values:
    SecurityGroupIds List<string>
    security group IDs configured to Bastionhost. NOTE: There is a potential diff error because of the order of security_group_ids values indefinite. So, from version 1.160.0, security_group_ids type has been updated as set from list, and you can use tolist to convert it to a list.
    Storage string
    The storage of Cloud Bastionhost instance. Valid values: 0 to 500. Unit: TB. NOTE: From version 1.251.0, storage can be modified.
    VswitchId string
    VSwitch ID configured to Bastionhost.
    AdAuthServers List<Pulumi.AliCloud.BastionHost.Inputs.InstanceAdAuthServer>
    The AD auth server of the Instance. See ad_auth_server below.
    EnablePublicAccess bool
    Whether to Enable the public internet access to a specified Bastionhost instance. The valid values: true, false.
    LdapAuthServers List<Pulumi.AliCloud.BastionHost.Inputs.InstanceLdapAuthServer>
    The LDAP auth server of the Instance. See ldap_auth_server below.
    Period int

    Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".

    NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

    PublicWhiteLists List<string>

    The public IP address that you want to add to the whitelist.

    NOTE: You can utilize the generic Terraform resource lifecycle configuration block with ad_auth_server or ldap_auth_server to configure auth server, then ignore any changes to that password caused externally (e.g. Application Autoscaling).

    # ... ignore the change about ad_auth_server.0.password and ldap_auth_server.0.password in alicloud_bastionhost_instance
    lifecycle {
    ignore_changes = [ad_auth_server.0.password,ldap_auth_server.0.password]
    }
    
    RenewPeriod int
    Automatic renewal period. Valid values: 1 to 9, 12, 24, 36. NOTE: The renew_period is required under the condition that renewal_status is AutoRenewal. From version 1.193.0, renew_period can be modified.
    RenewalPeriodUnit string
    The unit of the auto-renewal period. Valid values: NOTE: The renewal_period_unit is required under the condition that renewal_status is AutoRenewal.

    • M: months.
    • Y: years.
    RenewalStatus string
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, NotRenewal. From version 1.193.0, renewal_status can be modified.
    ResourceGroupId string
    The Id of resource group which the Bastionhost Instance belongs. If not set, the resource is created in the default resource group.
    SlaveVswitchId string
    Slave VSwitch ID configured to Bastionhost.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    Bandwidth string
    The bandwidth of Cloud Bastionhost instance. NOTE: From version 1.263.0, bandwidth can be modified. If China-Site Account, its valid values: 0 to 150. Unit: Mbit/s. The value must be a multiple of 5. If International-Site Account, its valid values: 0 to 200. Unit: Mbit/s. The value must be a multiple of 10.
    Description string
    Description of the instance. This name can have a string of 1 to 63 characters.
    LicenseCode string
    The package type of Cloud Bastionhost instance. You can query more supported types through the DescribePricingModule.
    PlanCode string
    The plan code of Cloud Bastionhost instance. Valid values:
    SecurityGroupIds []string
    security group IDs configured to Bastionhost. NOTE: There is a potential diff error because of the order of security_group_ids values indefinite. So, from version 1.160.0, security_group_ids type has been updated as set from list, and you can use tolist to convert it to a list.
    Storage string
    The storage of Cloud Bastionhost instance. Valid values: 0 to 500. Unit: TB. NOTE: From version 1.251.0, storage can be modified.
    VswitchId string
    VSwitch ID configured to Bastionhost.
    AdAuthServers []InstanceAdAuthServerArgs
    The AD auth server of the Instance. See ad_auth_server below.
    EnablePublicAccess bool
    Whether to Enable the public internet access to a specified Bastionhost instance. The valid values: true, false.
    LdapAuthServers []InstanceLdapAuthServerArgs
    The LDAP auth server of the Instance. See ldap_auth_server below.
    Period int

    Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".

    NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

    PublicWhiteLists []string

    The public IP address that you want to add to the whitelist.

    NOTE: You can utilize the generic Terraform resource lifecycle configuration block with ad_auth_server or ldap_auth_server to configure auth server, then ignore any changes to that password caused externally (e.g. Application Autoscaling).

    # ... ignore the change about ad_auth_server.0.password and ldap_auth_server.0.password in alicloud_bastionhost_instance
    lifecycle {
    ignore_changes = [ad_auth_server.0.password,ldap_auth_server.0.password]
    }
    
    RenewPeriod int
    Automatic renewal period. Valid values: 1 to 9, 12, 24, 36. NOTE: The renew_period is required under the condition that renewal_status is AutoRenewal. From version 1.193.0, renew_period can be modified.
    RenewalPeriodUnit string
    The unit of the auto-renewal period. Valid values: NOTE: The renewal_period_unit is required under the condition that renewal_status is AutoRenewal.

    • M: months.
    • Y: years.
    RenewalStatus string
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, NotRenewal. From version 1.193.0, renewal_status can be modified.
    ResourceGroupId string
    The Id of resource group which the Bastionhost Instance belongs. If not set, the resource is created in the default resource group.
    SlaveVswitchId string
    Slave VSwitch ID configured to Bastionhost.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    bandwidth String
    The bandwidth of Cloud Bastionhost instance. NOTE: From version 1.263.0, bandwidth can be modified. If China-Site Account, its valid values: 0 to 150. Unit: Mbit/s. The value must be a multiple of 5. If International-Site Account, its valid values: 0 to 200. Unit: Mbit/s. The value must be a multiple of 10.
    description String
    Description of the instance. This name can have a string of 1 to 63 characters.
    licenseCode String
    The package type of Cloud Bastionhost instance. You can query more supported types through the DescribePricingModule.
    planCode String
    The plan code of Cloud Bastionhost instance. Valid values:
    securityGroupIds List<String>
    security group IDs configured to Bastionhost. NOTE: There is a potential diff error because of the order of security_group_ids values indefinite. So, from version 1.160.0, security_group_ids type has been updated as set from list, and you can use tolist to convert it to a list.
    storage String
    The storage of Cloud Bastionhost instance. Valid values: 0 to 500. Unit: TB. NOTE: From version 1.251.0, storage can be modified.
    vswitchId String
    VSwitch ID configured to Bastionhost.
    adAuthServers List<InstanceAdAuthServer>
    The AD auth server of the Instance. See ad_auth_server below.
    enablePublicAccess Boolean
    Whether to Enable the public internet access to a specified Bastionhost instance. The valid values: true, false.
    ldapAuthServers List<InstanceLdapAuthServer>
    The LDAP auth server of the Instance. See ldap_auth_server below.
    period Integer

    Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".

    NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

    publicWhiteLists List<String>

    The public IP address that you want to add to the whitelist.

    NOTE: You can utilize the generic Terraform resource lifecycle configuration block with ad_auth_server or ldap_auth_server to configure auth server, then ignore any changes to that password caused externally (e.g. Application Autoscaling).

    # ... ignore the change about ad_auth_server.0.password and ldap_auth_server.0.password in alicloud_bastionhost_instance
    lifecycle {
    ignore_changes = [ad_auth_server.0.password,ldap_auth_server.0.password]
    }
    
    renewPeriod Integer
    Automatic renewal period. Valid values: 1 to 9, 12, 24, 36. NOTE: The renew_period is required under the condition that renewal_status is AutoRenewal. From version 1.193.0, renew_period can be modified.
    renewalPeriodUnit String
    The unit of the auto-renewal period. Valid values: NOTE: The renewal_period_unit is required under the condition that renewal_status is AutoRenewal.

    • M: months.
    • Y: years.
    renewalStatus String
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, NotRenewal. From version 1.193.0, renewal_status can be modified.
    resourceGroupId String
    The Id of resource group which the Bastionhost Instance belongs. If not set, the resource is created in the default resource group.
    slaveVswitchId String
    Slave VSwitch ID configured to Bastionhost.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    bandwidth string
    The bandwidth of Cloud Bastionhost instance. NOTE: From version 1.263.0, bandwidth can be modified. If China-Site Account, its valid values: 0 to 150. Unit: Mbit/s. The value must be a multiple of 5. If International-Site Account, its valid values: 0 to 200. Unit: Mbit/s. The value must be a multiple of 10.
    description string
    Description of the instance. This name can have a string of 1 to 63 characters.
    licenseCode string
    The package type of Cloud Bastionhost instance. You can query more supported types through the DescribePricingModule.
    planCode string
    The plan code of Cloud Bastionhost instance. Valid values:
    securityGroupIds string[]
    security group IDs configured to Bastionhost. NOTE: There is a potential diff error because of the order of security_group_ids values indefinite. So, from version 1.160.0, security_group_ids type has been updated as set from list, and you can use tolist to convert it to a list.
    storage string
    The storage of Cloud Bastionhost instance. Valid values: 0 to 500. Unit: TB. NOTE: From version 1.251.0, storage can be modified.
    vswitchId string
    VSwitch ID configured to Bastionhost.
    adAuthServers InstanceAdAuthServer[]
    The AD auth server of the Instance. See ad_auth_server below.
    enablePublicAccess boolean
    Whether to Enable the public internet access to a specified Bastionhost instance. The valid values: true, false.
    ldapAuthServers InstanceLdapAuthServer[]
    The LDAP auth server of the Instance. See ldap_auth_server below.
    period number

    Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".

    NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

    publicWhiteLists string[]

    The public IP address that you want to add to the whitelist.

    NOTE: You can utilize the generic Terraform resource lifecycle configuration block with ad_auth_server or ldap_auth_server to configure auth server, then ignore any changes to that password caused externally (e.g. Application Autoscaling).

    # ... ignore the change about ad_auth_server.0.password and ldap_auth_server.0.password in alicloud_bastionhost_instance
    lifecycle {
    ignore_changes = [ad_auth_server.0.password,ldap_auth_server.0.password]
    }
    
    renewPeriod number
    Automatic renewal period. Valid values: 1 to 9, 12, 24, 36. NOTE: The renew_period is required under the condition that renewal_status is AutoRenewal. From version 1.193.0, renew_period can be modified.
    renewalPeriodUnit string
    The unit of the auto-renewal period. Valid values: NOTE: The renewal_period_unit is required under the condition that renewal_status is AutoRenewal.

    • M: months.
    • Y: years.
    renewalStatus string
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, NotRenewal. From version 1.193.0, renewal_status can be modified.
    resourceGroupId string
    The Id of resource group which the Bastionhost Instance belongs. If not set, the resource is created in the default resource group.
    slaveVswitchId string
    Slave VSwitch ID configured to Bastionhost.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    bandwidth str
    The bandwidth of Cloud Bastionhost instance. NOTE: From version 1.263.0, bandwidth can be modified. If China-Site Account, its valid values: 0 to 150. Unit: Mbit/s. The value must be a multiple of 5. If International-Site Account, its valid values: 0 to 200. Unit: Mbit/s. The value must be a multiple of 10.
    description str
    Description of the instance. This name can have a string of 1 to 63 characters.
    license_code str
    The package type of Cloud Bastionhost instance. You can query more supported types through the DescribePricingModule.
    plan_code str
    The plan code of Cloud Bastionhost instance. Valid values:
    security_group_ids Sequence[str]
    security group IDs configured to Bastionhost. NOTE: There is a potential diff error because of the order of security_group_ids values indefinite. So, from version 1.160.0, security_group_ids type has been updated as set from list, and you can use tolist to convert it to a list.
    storage str
    The storage of Cloud Bastionhost instance. Valid values: 0 to 500. Unit: TB. NOTE: From version 1.251.0, storage can be modified.
    vswitch_id str
    VSwitch ID configured to Bastionhost.
    ad_auth_servers Sequence[InstanceAdAuthServerArgs]
    The AD auth server of the Instance. See ad_auth_server below.
    enable_public_access bool
    Whether to Enable the public internet access to a specified Bastionhost instance. The valid values: true, false.
    ldap_auth_servers Sequence[InstanceLdapAuthServerArgs]
    The LDAP auth server of the Instance. See ldap_auth_server below.
    period int

    Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".

    NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

    public_white_lists Sequence[str]

    The public IP address that you want to add to the whitelist.

    NOTE: You can utilize the generic Terraform resource lifecycle configuration block with ad_auth_server or ldap_auth_server to configure auth server, then ignore any changes to that password caused externally (e.g. Application Autoscaling).

    # ... ignore the change about ad_auth_server.0.password and ldap_auth_server.0.password in alicloud_bastionhost_instance
    lifecycle {
    ignore_changes = [ad_auth_server.0.password,ldap_auth_server.0.password]
    }
    
    renew_period int
    Automatic renewal period. Valid values: 1 to 9, 12, 24, 36. NOTE: The renew_period is required under the condition that renewal_status is AutoRenewal. From version 1.193.0, renew_period can be modified.
    renewal_period_unit str
    The unit of the auto-renewal period. Valid values: NOTE: The renewal_period_unit is required under the condition that renewal_status is AutoRenewal.

    • M: months.
    • Y: years.
    renewal_status str
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, NotRenewal. From version 1.193.0, renewal_status can be modified.
    resource_group_id str
    The Id of resource group which the Bastionhost Instance belongs. If not set, the resource is created in the default resource group.
    slave_vswitch_id str
    Slave VSwitch ID configured to Bastionhost.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    bandwidth String
    The bandwidth of Cloud Bastionhost instance. NOTE: From version 1.263.0, bandwidth can be modified. If China-Site Account, its valid values: 0 to 150. Unit: Mbit/s. The value must be a multiple of 5. If International-Site Account, its valid values: 0 to 200. Unit: Mbit/s. The value must be a multiple of 10.
    description String
    Description of the instance. This name can have a string of 1 to 63 characters.
    licenseCode String
    The package type of Cloud Bastionhost instance. You can query more supported types through the DescribePricingModule.
    planCode String
    The plan code of Cloud Bastionhost instance. Valid values:
    securityGroupIds List<String>
    security group IDs configured to Bastionhost. NOTE: There is a potential diff error because of the order of security_group_ids values indefinite. So, from version 1.160.0, security_group_ids type has been updated as set from list, and you can use tolist to convert it to a list.
    storage String
    The storage of Cloud Bastionhost instance. Valid values: 0 to 500. Unit: TB. NOTE: From version 1.251.0, storage can be modified.
    vswitchId String
    VSwitch ID configured to Bastionhost.
    adAuthServers List<Property Map>
    The AD auth server of the Instance. See ad_auth_server below.
    enablePublicAccess Boolean
    Whether to Enable the public internet access to a specified Bastionhost instance. The valid values: true, false.
    ldapAuthServers List<Property Map>
    The LDAP auth server of the Instance. See ldap_auth_server below.
    period Number

    Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".

    NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

    publicWhiteLists List<String>

    The public IP address that you want to add to the whitelist.

    NOTE: You can utilize the generic Terraform resource lifecycle configuration block with ad_auth_server or ldap_auth_server to configure auth server, then ignore any changes to that password caused externally (e.g. Application Autoscaling).

    # ... ignore the change about ad_auth_server.0.password and ldap_auth_server.0.password in alicloud_bastionhost_instance
    lifecycle {
    ignore_changes = [ad_auth_server.0.password,ldap_auth_server.0.password]
    }
    
    renewPeriod Number
    Automatic renewal period. Valid values: 1 to 9, 12, 24, 36. NOTE: The renew_period is required under the condition that renewal_status is AutoRenewal. From version 1.193.0, renew_period can be modified.
    renewalPeriodUnit String
    The unit of the auto-renewal period. Valid values: NOTE: The renewal_period_unit is required under the condition that renewal_status is AutoRenewal.

    • M: months.
    • Y: years.
    renewalStatus String
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, NotRenewal. From version 1.193.0, renewal_status can be modified.
    resourceGroupId String
    The Id of resource group which the Bastionhost Instance belongs. If not set, the resource is created in the default resource group.
    slaveVswitchId String
    Slave VSwitch ID configured to Bastionhost.
    tags Map<String>
    A mapping of tags to assign to the resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Instance Resource

    Get an existing Instance 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?: InstanceState, opts?: CustomResourceOptions): Instance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ad_auth_servers: Optional[Sequence[InstanceAdAuthServerArgs]] = None,
            bandwidth: Optional[str] = None,
            description: Optional[str] = None,
            enable_public_access: Optional[bool] = None,
            ldap_auth_servers: Optional[Sequence[InstanceLdapAuthServerArgs]] = None,
            license_code: Optional[str] = None,
            period: Optional[int] = None,
            plan_code: Optional[str] = None,
            public_white_lists: Optional[Sequence[str]] = None,
            renew_period: Optional[int] = None,
            renewal_period_unit: Optional[str] = None,
            renewal_status: Optional[str] = None,
            resource_group_id: Optional[str] = None,
            security_group_ids: Optional[Sequence[str]] = None,
            slave_vswitch_id: Optional[str] = None,
            storage: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            vswitch_id: Optional[str] = None) -> Instance
    func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
    public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
    public static Instance get(String name, Output<String> id, InstanceState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:bastionhost:Instance    get:      id: ${id}
    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:
    AdAuthServers List<Pulumi.AliCloud.BastionHost.Inputs.InstanceAdAuthServer>
    The AD auth server of the Instance. See ad_auth_server below.
    Bandwidth string
    The bandwidth of Cloud Bastionhost instance. NOTE: From version 1.263.0, bandwidth can be modified. If China-Site Account, its valid values: 0 to 150. Unit: Mbit/s. The value must be a multiple of 5. If International-Site Account, its valid values: 0 to 200. Unit: Mbit/s. The value must be a multiple of 10.
    Description string
    Description of the instance. This name can have a string of 1 to 63 characters.
    EnablePublicAccess bool
    Whether to Enable the public internet access to a specified Bastionhost instance. The valid values: true, false.
    LdapAuthServers List<Pulumi.AliCloud.BastionHost.Inputs.InstanceLdapAuthServer>
    The LDAP auth server of the Instance. See ldap_auth_server below.
    LicenseCode string
    The package type of Cloud Bastionhost instance. You can query more supported types through the DescribePricingModule.
    Period int

    Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".

    NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

    PlanCode string
    The plan code of Cloud Bastionhost instance. Valid values:
    PublicWhiteLists List<string>

    The public IP address that you want to add to the whitelist.

    NOTE: You can utilize the generic Terraform resource lifecycle configuration block with ad_auth_server or ldap_auth_server to configure auth server, then ignore any changes to that password caused externally (e.g. Application Autoscaling).

    # ... ignore the change about ad_auth_server.0.password and ldap_auth_server.0.password in alicloud_bastionhost_instance
    lifecycle {
    ignore_changes = [ad_auth_server.0.password,ldap_auth_server.0.password]
    }
    
    RenewPeriod int
    Automatic renewal period. Valid values: 1 to 9, 12, 24, 36. NOTE: The renew_period is required under the condition that renewal_status is AutoRenewal. From version 1.193.0, renew_period can be modified.
    RenewalPeriodUnit string
    The unit of the auto-renewal period. Valid values: NOTE: The renewal_period_unit is required under the condition that renewal_status is AutoRenewal.

    • M: months.
    • Y: years.
    RenewalStatus string
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, NotRenewal. From version 1.193.0, renewal_status can be modified.
    ResourceGroupId string
    The Id of resource group which the Bastionhost Instance belongs. If not set, the resource is created in the default resource group.
    SecurityGroupIds List<string>
    security group IDs configured to Bastionhost. NOTE: There is a potential diff error because of the order of security_group_ids values indefinite. So, from version 1.160.0, security_group_ids type has been updated as set from list, and you can use tolist to convert it to a list.
    SlaveVswitchId string
    Slave VSwitch ID configured to Bastionhost.
    Storage string
    The storage of Cloud Bastionhost instance. Valid values: 0 to 500. Unit: TB. NOTE: From version 1.251.0, storage can be modified.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    VswitchId string
    VSwitch ID configured to Bastionhost.
    AdAuthServers []InstanceAdAuthServerArgs
    The AD auth server of the Instance. See ad_auth_server below.
    Bandwidth string
    The bandwidth of Cloud Bastionhost instance. NOTE: From version 1.263.0, bandwidth can be modified. If China-Site Account, its valid values: 0 to 150. Unit: Mbit/s. The value must be a multiple of 5. If International-Site Account, its valid values: 0 to 200. Unit: Mbit/s. The value must be a multiple of 10.
    Description string
    Description of the instance. This name can have a string of 1 to 63 characters.
    EnablePublicAccess bool
    Whether to Enable the public internet access to a specified Bastionhost instance. The valid values: true, false.
    LdapAuthServers []InstanceLdapAuthServerArgs
    The LDAP auth server of the Instance. See ldap_auth_server below.
    LicenseCode string
    The package type of Cloud Bastionhost instance. You can query more supported types through the DescribePricingModule.
    Period int

    Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".

    NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

    PlanCode string
    The plan code of Cloud Bastionhost instance. Valid values:
    PublicWhiteLists []string

    The public IP address that you want to add to the whitelist.

    NOTE: You can utilize the generic Terraform resource lifecycle configuration block with ad_auth_server or ldap_auth_server to configure auth server, then ignore any changes to that password caused externally (e.g. Application Autoscaling).

    # ... ignore the change about ad_auth_server.0.password and ldap_auth_server.0.password in alicloud_bastionhost_instance
    lifecycle {
    ignore_changes = [ad_auth_server.0.password,ldap_auth_server.0.password]
    }
    
    RenewPeriod int
    Automatic renewal period. Valid values: 1 to 9, 12, 24, 36. NOTE: The renew_period is required under the condition that renewal_status is AutoRenewal. From version 1.193.0, renew_period can be modified.
    RenewalPeriodUnit string
    The unit of the auto-renewal period. Valid values: NOTE: The renewal_period_unit is required under the condition that renewal_status is AutoRenewal.

    • M: months.
    • Y: years.
    RenewalStatus string
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, NotRenewal. From version 1.193.0, renewal_status can be modified.
    ResourceGroupId string
    The Id of resource group which the Bastionhost Instance belongs. If not set, the resource is created in the default resource group.
    SecurityGroupIds []string
    security group IDs configured to Bastionhost. NOTE: There is a potential diff error because of the order of security_group_ids values indefinite. So, from version 1.160.0, security_group_ids type has been updated as set from list, and you can use tolist to convert it to a list.
    SlaveVswitchId string
    Slave VSwitch ID configured to Bastionhost.
    Storage string
    The storage of Cloud Bastionhost instance. Valid values: 0 to 500. Unit: TB. NOTE: From version 1.251.0, storage can be modified.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    VswitchId string
    VSwitch ID configured to Bastionhost.
    adAuthServers List<InstanceAdAuthServer>
    The AD auth server of the Instance. See ad_auth_server below.
    bandwidth String
    The bandwidth of Cloud Bastionhost instance. NOTE: From version 1.263.0, bandwidth can be modified. If China-Site Account, its valid values: 0 to 150. Unit: Mbit/s. The value must be a multiple of 5. If International-Site Account, its valid values: 0 to 200. Unit: Mbit/s. The value must be a multiple of 10.
    description String
    Description of the instance. This name can have a string of 1 to 63 characters.
    enablePublicAccess Boolean
    Whether to Enable the public internet access to a specified Bastionhost instance. The valid values: true, false.
    ldapAuthServers List<InstanceLdapAuthServer>
    The LDAP auth server of the Instance. See ldap_auth_server below.
    licenseCode String
    The package type of Cloud Bastionhost instance. You can query more supported types through the DescribePricingModule.
    period Integer

    Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".

    NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

    planCode String
    The plan code of Cloud Bastionhost instance. Valid values:
    publicWhiteLists List<String>

    The public IP address that you want to add to the whitelist.

    NOTE: You can utilize the generic Terraform resource lifecycle configuration block with ad_auth_server or ldap_auth_server to configure auth server, then ignore any changes to that password caused externally (e.g. Application Autoscaling).

    # ... ignore the change about ad_auth_server.0.password and ldap_auth_server.0.password in alicloud_bastionhost_instance
    lifecycle {
    ignore_changes = [ad_auth_server.0.password,ldap_auth_server.0.password]
    }
    
    renewPeriod Integer
    Automatic renewal period. Valid values: 1 to 9, 12, 24, 36. NOTE: The renew_period is required under the condition that renewal_status is AutoRenewal. From version 1.193.0, renew_period can be modified.
    renewalPeriodUnit String
    The unit of the auto-renewal period. Valid values: NOTE: The renewal_period_unit is required under the condition that renewal_status is AutoRenewal.

    • M: months.
    • Y: years.
    renewalStatus String
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, NotRenewal. From version 1.193.0, renewal_status can be modified.
    resourceGroupId String
    The Id of resource group which the Bastionhost Instance belongs. If not set, the resource is created in the default resource group.
    securityGroupIds List<String>
    security group IDs configured to Bastionhost. NOTE: There is a potential diff error because of the order of security_group_ids values indefinite. So, from version 1.160.0, security_group_ids type has been updated as set from list, and you can use tolist to convert it to a list.
    slaveVswitchId String
    Slave VSwitch ID configured to Bastionhost.
    storage String
    The storage of Cloud Bastionhost instance. Valid values: 0 to 500. Unit: TB. NOTE: From version 1.251.0, storage can be modified.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    vswitchId String
    VSwitch ID configured to Bastionhost.
    adAuthServers InstanceAdAuthServer[]
    The AD auth server of the Instance. See ad_auth_server below.
    bandwidth string
    The bandwidth of Cloud Bastionhost instance. NOTE: From version 1.263.0, bandwidth can be modified. If China-Site Account, its valid values: 0 to 150. Unit: Mbit/s. The value must be a multiple of 5. If International-Site Account, its valid values: 0 to 200. Unit: Mbit/s. The value must be a multiple of 10.
    description string
    Description of the instance. This name can have a string of 1 to 63 characters.
    enablePublicAccess boolean
    Whether to Enable the public internet access to a specified Bastionhost instance. The valid values: true, false.
    ldapAuthServers InstanceLdapAuthServer[]
    The LDAP auth server of the Instance. See ldap_auth_server below.
    licenseCode string
    The package type of Cloud Bastionhost instance. You can query more supported types through the DescribePricingModule.
    period number

    Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".

    NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

    planCode string
    The plan code of Cloud Bastionhost instance. Valid values:
    publicWhiteLists string[]

    The public IP address that you want to add to the whitelist.

    NOTE: You can utilize the generic Terraform resource lifecycle configuration block with ad_auth_server or ldap_auth_server to configure auth server, then ignore any changes to that password caused externally (e.g. Application Autoscaling).

    # ... ignore the change about ad_auth_server.0.password and ldap_auth_server.0.password in alicloud_bastionhost_instance
    lifecycle {
    ignore_changes = [ad_auth_server.0.password,ldap_auth_server.0.password]
    }
    
    renewPeriod number
    Automatic renewal period. Valid values: 1 to 9, 12, 24, 36. NOTE: The renew_period is required under the condition that renewal_status is AutoRenewal. From version 1.193.0, renew_period can be modified.
    renewalPeriodUnit string
    The unit of the auto-renewal period. Valid values: NOTE: The renewal_period_unit is required under the condition that renewal_status is AutoRenewal.

    • M: months.
    • Y: years.
    renewalStatus string
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, NotRenewal. From version 1.193.0, renewal_status can be modified.
    resourceGroupId string
    The Id of resource group which the Bastionhost Instance belongs. If not set, the resource is created in the default resource group.
    securityGroupIds string[]
    security group IDs configured to Bastionhost. NOTE: There is a potential diff error because of the order of security_group_ids values indefinite. So, from version 1.160.0, security_group_ids type has been updated as set from list, and you can use tolist to convert it to a list.
    slaveVswitchId string
    Slave VSwitch ID configured to Bastionhost.
    storage string
    The storage of Cloud Bastionhost instance. Valid values: 0 to 500. Unit: TB. NOTE: From version 1.251.0, storage can be modified.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    vswitchId string
    VSwitch ID configured to Bastionhost.
    ad_auth_servers Sequence[InstanceAdAuthServerArgs]
    The AD auth server of the Instance. See ad_auth_server below.
    bandwidth str
    The bandwidth of Cloud Bastionhost instance. NOTE: From version 1.263.0, bandwidth can be modified. If China-Site Account, its valid values: 0 to 150. Unit: Mbit/s. The value must be a multiple of 5. If International-Site Account, its valid values: 0 to 200. Unit: Mbit/s. The value must be a multiple of 10.
    description str
    Description of the instance. This name can have a string of 1 to 63 characters.
    enable_public_access bool
    Whether to Enable the public internet access to a specified Bastionhost instance. The valid values: true, false.
    ldap_auth_servers Sequence[InstanceLdapAuthServerArgs]
    The LDAP auth server of the Instance. See ldap_auth_server below.
    license_code str
    The package type of Cloud Bastionhost instance. You can query more supported types through the DescribePricingModule.
    period int

    Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".

    NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

    plan_code str
    The plan code of Cloud Bastionhost instance. Valid values:
    public_white_lists Sequence[str]

    The public IP address that you want to add to the whitelist.

    NOTE: You can utilize the generic Terraform resource lifecycle configuration block with ad_auth_server or ldap_auth_server to configure auth server, then ignore any changes to that password caused externally (e.g. Application Autoscaling).

    # ... ignore the change about ad_auth_server.0.password and ldap_auth_server.0.password in alicloud_bastionhost_instance
    lifecycle {
    ignore_changes = [ad_auth_server.0.password,ldap_auth_server.0.password]
    }
    
    renew_period int
    Automatic renewal period. Valid values: 1 to 9, 12, 24, 36. NOTE: The renew_period is required under the condition that renewal_status is AutoRenewal. From version 1.193.0, renew_period can be modified.
    renewal_period_unit str
    The unit of the auto-renewal period. Valid values: NOTE: The renewal_period_unit is required under the condition that renewal_status is AutoRenewal.

    • M: months.
    • Y: years.
    renewal_status str
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, NotRenewal. From version 1.193.0, renewal_status can be modified.
    resource_group_id str
    The Id of resource group which the Bastionhost Instance belongs. If not set, the resource is created in the default resource group.
    security_group_ids Sequence[str]
    security group IDs configured to Bastionhost. NOTE: There is a potential diff error because of the order of security_group_ids values indefinite. So, from version 1.160.0, security_group_ids type has been updated as set from list, and you can use tolist to convert it to a list.
    slave_vswitch_id str
    Slave VSwitch ID configured to Bastionhost.
    storage str
    The storage of Cloud Bastionhost instance. Valid values: 0 to 500. Unit: TB. NOTE: From version 1.251.0, storage can be modified.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    vswitch_id str
    VSwitch ID configured to Bastionhost.
    adAuthServers List<Property Map>
    The AD auth server of the Instance. See ad_auth_server below.
    bandwidth String
    The bandwidth of Cloud Bastionhost instance. NOTE: From version 1.263.0, bandwidth can be modified. If China-Site Account, its valid values: 0 to 150. Unit: Mbit/s. The value must be a multiple of 5. If International-Site Account, its valid values: 0 to 200. Unit: Mbit/s. The value must be a multiple of 10.
    description String
    Description of the instance. This name can have a string of 1 to 63 characters.
    enablePublicAccess Boolean
    Whether to Enable the public internet access to a specified Bastionhost instance. The valid values: true, false.
    ldapAuthServers List<Property Map>
    The LDAP auth server of the Instance. See ldap_auth_server below.
    licenseCode String
    The package type of Cloud Bastionhost instance. You can query more supported types through the DescribePricingModule.
    period Number

    Duration for initially producing the instance. Valid values: [1~9], 12, 24, 36. At present, the provider does not support modify "period".

    NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

    planCode String
    The plan code of Cloud Bastionhost instance. Valid values:
    publicWhiteLists List<String>

    The public IP address that you want to add to the whitelist.

    NOTE: You can utilize the generic Terraform resource lifecycle configuration block with ad_auth_server or ldap_auth_server to configure auth server, then ignore any changes to that password caused externally (e.g. Application Autoscaling).

    # ... ignore the change about ad_auth_server.0.password and ldap_auth_server.0.password in alicloud_bastionhost_instance
    lifecycle {
    ignore_changes = [ad_auth_server.0.password,ldap_auth_server.0.password]
    }
    
    renewPeriod Number
    Automatic renewal period. Valid values: 1 to 9, 12, 24, 36. NOTE: The renew_period is required under the condition that renewal_status is AutoRenewal. From version 1.193.0, renew_period can be modified.
    renewalPeriodUnit String
    The unit of the auto-renewal period. Valid values: NOTE: The renewal_period_unit is required under the condition that renewal_status is AutoRenewal.

    • M: months.
    • Y: years.
    renewalStatus String
    Automatic renewal status. Valid values: AutoRenewal, ManualRenewal, NotRenewal. From version 1.193.0, renewal_status can be modified.
    resourceGroupId String
    The Id of resource group which the Bastionhost Instance belongs. If not set, the resource is created in the default resource group.
    securityGroupIds List<String>
    security group IDs configured to Bastionhost. NOTE: There is a potential diff error because of the order of security_group_ids values indefinite. So, from version 1.160.0, security_group_ids type has been updated as set from list, and you can use tolist to convert it to a list.
    slaveVswitchId String
    Slave VSwitch ID configured to Bastionhost.
    storage String
    The storage of Cloud Bastionhost instance. Valid values: 0 to 500. Unit: TB. NOTE: From version 1.251.0, storage can be modified.
    tags Map<String>
    A mapping of tags to assign to the resource.
    vswitchId String
    VSwitch ID configured to Bastionhost.

    Supporting Types

    InstanceAdAuthServer, InstanceAdAuthServerArgs

    Account string
    The username of the account that is used for the AD server.
    BaseDn string
    The Base distinguished name (DN).
    Domain string
    The domain on the AD server.
    IsSsl bool
    Specifies whether to support SSL.
    Port int
    The port that is used to access the AD server.
    Server string
    The address of the AD server.
    EmailMapping string
    The field that is used to indicate the email address of a user on the AD server.
    Filter string
    The condition that is used to filter users.
    MobileMapping string
    The field that is used to indicate the mobile phone number of a user on the AD server.
    NameMapping string
    The field that is used to indicate the name of a user on the AD server.
    Password string
    The password of the account that is used for the AD server.
    StandbyServer string
    The address of the secondary AD server.
    Account string
    The username of the account that is used for the AD server.
    BaseDn string
    The Base distinguished name (DN).
    Domain string
    The domain on the AD server.
    IsSsl bool
    Specifies whether to support SSL.
    Port int
    The port that is used to access the AD server.
    Server string
    The address of the AD server.
    EmailMapping string
    The field that is used to indicate the email address of a user on the AD server.
    Filter string
    The condition that is used to filter users.
    MobileMapping string
    The field that is used to indicate the mobile phone number of a user on the AD server.
    NameMapping string
    The field that is used to indicate the name of a user on the AD server.
    Password string
    The password of the account that is used for the AD server.
    StandbyServer string
    The address of the secondary AD server.
    account String
    The username of the account that is used for the AD server.
    baseDn String
    The Base distinguished name (DN).
    domain String
    The domain on the AD server.
    isSsl Boolean
    Specifies whether to support SSL.
    port Integer
    The port that is used to access the AD server.
    server String
    The address of the AD server.
    emailMapping String
    The field that is used to indicate the email address of a user on the AD server.
    filter String
    The condition that is used to filter users.
    mobileMapping String
    The field that is used to indicate the mobile phone number of a user on the AD server.
    nameMapping String
    The field that is used to indicate the name of a user on the AD server.
    password String
    The password of the account that is used for the AD server.
    standbyServer String
    The address of the secondary AD server.
    account string
    The username of the account that is used for the AD server.
    baseDn string
    The Base distinguished name (DN).
    domain string
    The domain on the AD server.
    isSsl boolean
    Specifies whether to support SSL.
    port number
    The port that is used to access the AD server.
    server string
    The address of the AD server.
    emailMapping string
    The field that is used to indicate the email address of a user on the AD server.
    filter string
    The condition that is used to filter users.
    mobileMapping string
    The field that is used to indicate the mobile phone number of a user on the AD server.
    nameMapping string
    The field that is used to indicate the name of a user on the AD server.
    password string
    The password of the account that is used for the AD server.
    standbyServer string
    The address of the secondary AD server.
    account str
    The username of the account that is used for the AD server.
    base_dn str
    The Base distinguished name (DN).
    domain str
    The domain on the AD server.
    is_ssl bool
    Specifies whether to support SSL.
    port int
    The port that is used to access the AD server.
    server str
    The address of the AD server.
    email_mapping str
    The field that is used to indicate the email address of a user on the AD server.
    filter str
    The condition that is used to filter users.
    mobile_mapping str
    The field that is used to indicate the mobile phone number of a user on the AD server.
    name_mapping str
    The field that is used to indicate the name of a user on the AD server.
    password str
    The password of the account that is used for the AD server.
    standby_server str
    The address of the secondary AD server.
    account String
    The username of the account that is used for the AD server.
    baseDn String
    The Base distinguished name (DN).
    domain String
    The domain on the AD server.
    isSsl Boolean
    Specifies whether to support SSL.
    port Number
    The port that is used to access the AD server.
    server String
    The address of the AD server.
    emailMapping String
    The field that is used to indicate the email address of a user on the AD server.
    filter String
    The condition that is used to filter users.
    mobileMapping String
    The field that is used to indicate the mobile phone number of a user on the AD server.
    nameMapping String
    The field that is used to indicate the name of a user on the AD server.
    password String
    The password of the account that is used for the AD server.
    standbyServer String
    The address of the secondary AD server.

    InstanceLdapAuthServer, InstanceLdapAuthServerArgs

    Account string
    The username of the account that is used for the LDAP server.
    BaseDn string
    The Base distinguished name (DN).
    Port int
    The port that is used to access the LDAP server.
    Server string
    The address of the LDAP server.
    EmailMapping string
    The field that is used to indicate the email address of a user on the LDAP server.
    Filter string
    The condition that is used to filter users.
    IsSsl bool
    Specifies whether to support SSL.
    LoginNameMapping string
    The field that is used to indicate the logon name of a user on the LDAP server.
    MobileMapping string
    The field that is used to indicate the mobile phone number of a user on the LDAP server.
    NameMapping string
    The field that is used to indicate the name of a user on the LDAP server.
    Password string
    The password of the account that is used for the LDAP server.
    StandbyServer string
    The address of the secondary LDAP server.
    Account string
    The username of the account that is used for the LDAP server.
    BaseDn string
    The Base distinguished name (DN).
    Port int
    The port that is used to access the LDAP server.
    Server string
    The address of the LDAP server.
    EmailMapping string
    The field that is used to indicate the email address of a user on the LDAP server.
    Filter string
    The condition that is used to filter users.
    IsSsl bool
    Specifies whether to support SSL.
    LoginNameMapping string
    The field that is used to indicate the logon name of a user on the LDAP server.
    MobileMapping string
    The field that is used to indicate the mobile phone number of a user on the LDAP server.
    NameMapping string
    The field that is used to indicate the name of a user on the LDAP server.
    Password string
    The password of the account that is used for the LDAP server.
    StandbyServer string
    The address of the secondary LDAP server.
    account String
    The username of the account that is used for the LDAP server.
    baseDn String
    The Base distinguished name (DN).
    port Integer
    The port that is used to access the LDAP server.
    server String
    The address of the LDAP server.
    emailMapping String
    The field that is used to indicate the email address of a user on the LDAP server.
    filter String
    The condition that is used to filter users.
    isSsl Boolean
    Specifies whether to support SSL.
    loginNameMapping String
    The field that is used to indicate the logon name of a user on the LDAP server.
    mobileMapping String
    The field that is used to indicate the mobile phone number of a user on the LDAP server.
    nameMapping String
    The field that is used to indicate the name of a user on the LDAP server.
    password String
    The password of the account that is used for the LDAP server.
    standbyServer String
    The address of the secondary LDAP server.
    account string
    The username of the account that is used for the LDAP server.
    baseDn string
    The Base distinguished name (DN).
    port number
    The port that is used to access the LDAP server.
    server string
    The address of the LDAP server.
    emailMapping string
    The field that is used to indicate the email address of a user on the LDAP server.
    filter string
    The condition that is used to filter users.
    isSsl boolean
    Specifies whether to support SSL.
    loginNameMapping string
    The field that is used to indicate the logon name of a user on the LDAP server.
    mobileMapping string
    The field that is used to indicate the mobile phone number of a user on the LDAP server.
    nameMapping string
    The field that is used to indicate the name of a user on the LDAP server.
    password string
    The password of the account that is used for the LDAP server.
    standbyServer string
    The address of the secondary LDAP server.
    account str
    The username of the account that is used for the LDAP server.
    base_dn str
    The Base distinguished name (DN).
    port int
    The port that is used to access the LDAP server.
    server str
    The address of the LDAP server.
    email_mapping str
    The field that is used to indicate the email address of a user on the LDAP server.
    filter str
    The condition that is used to filter users.
    is_ssl bool
    Specifies whether to support SSL.
    login_name_mapping str
    The field that is used to indicate the logon name of a user on the LDAP server.
    mobile_mapping str
    The field that is used to indicate the mobile phone number of a user on the LDAP server.
    name_mapping str
    The field that is used to indicate the name of a user on the LDAP server.
    password str
    The password of the account that is used for the LDAP server.
    standby_server str
    The address of the secondary LDAP server.
    account String
    The username of the account that is used for the LDAP server.
    baseDn String
    The Base distinguished name (DN).
    port Number
    The port that is used to access the LDAP server.
    server String
    The address of the LDAP server.
    emailMapping String
    The field that is used to indicate the email address of a user on the LDAP server.
    filter String
    The condition that is used to filter users.
    isSsl Boolean
    Specifies whether to support SSL.
    loginNameMapping String
    The field that is used to indicate the logon name of a user on the LDAP server.
    mobileMapping String
    The field that is used to indicate the mobile phone number of a user on the LDAP server.
    nameMapping String
    The field that is used to indicate the name of a user on the LDAP server.
    password String
    The password of the account that is used for the LDAP server.
    standbyServer String
    The address of the secondary LDAP server.

    Import

    Yundun_bastionhost instance can be imported using the id, e.g.

    $ pulumi import alicloud:bastionhost/instance:Instance example bastionhost-exampe123456
    

    To learn more about importing existing cloud resources, see Importing resources.

    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
    Viewing docs for Alibaba Cloud v3.97.0
    published on Saturday, Mar 14, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.