1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. bastionhost
  5. getInstances
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.bastionhost.getInstances

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    NOTE: From the version 1.132.0, the data source has been renamed to alicloud.bastionhost.getInstances.

    This data source provides a list of cloud Bastionhost instances in an Alibaba Cloud account according to the specified filters.

    NOTE: Available in 1.63.0+ .

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    export = async () => {
        const instance = await alicloud.bastionhost.getInstances({
            descriptionRegex: "^bastionhost",
        });
        return {
            instance: instanceAlicloudBastionhostInstances.map(__item => __item.id),
        };
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    instance = alicloud.bastionhost.get_instances(description_regex="^bastionhost")
    pulumi.export("instance", [__item["id"] for __item in instance_alicloud_bastionhost_instances])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/bastionhost"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bastionhost.GetInstances(ctx, &bastionhost.GetInstancesArgs{
    			DescriptionRegex: pulumi.StringRef("^bastionhost"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		var splat0 []interface{}
    		for _, val0 := range instanceAlicloudBastionhostInstances {
    			splat0 = append(splat0, val0.Id)
    		}
    		ctx.Export("instance", splat0)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instance = AliCloud.BastionHost.GetInstances.Invoke(new()
        {
            DescriptionRegex = "^bastionhost",
        });
    
        return new Dictionary<string, object?>
        {
            ["instance"] = instanceAlicloudBastionhostInstances.Select(__item => __item.Id).ToList(),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.bastionhost.BastionhostFunctions;
    import com.pulumi.alicloud.bastionhost.inputs.GetInstancesArgs;
    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 instance = BastionhostFunctions.getInstances(GetInstancesArgs.builder()
                .descriptionRegex("^bastionhost")
                .build());
    
            ctx.export("instance", instanceAlicloudBastionhostInstances.stream().map(element -> element.id()).collect(toList()));
        }
    }
    
    Coming soon!
    

    Using getInstances

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getInstances(args: GetInstancesArgs, opts?: InvokeOptions): Promise<GetInstancesResult>
    function getInstancesOutput(args: GetInstancesOutputArgs, opts?: InvokeOptions): Output<GetInstancesResult>
    def get_instances(description_regex: Optional[str] = None,
                      ids: Optional[Sequence[str]] = None,
                      output_file: Optional[str] = None,
                      tags: Optional[Mapping[str, Any]] = None,
                      opts: Optional[InvokeOptions] = None) -> GetInstancesResult
    def get_instances_output(description_regex: Optional[pulumi.Input[str]] = None,
                      ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                      output_file: Optional[pulumi.Input[str]] = None,
                      tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetInstancesResult]
    func GetInstances(ctx *Context, args *GetInstancesArgs, opts ...InvokeOption) (*GetInstancesResult, error)
    func GetInstancesOutput(ctx *Context, args *GetInstancesOutputArgs, opts ...InvokeOption) GetInstancesResultOutput

    > Note: This function is named GetInstances in the Go SDK.

    public static class GetInstances 
    {
        public static Task<GetInstancesResult> InvokeAsync(GetInstancesArgs args, InvokeOptions? opts = null)
        public static Output<GetInstancesResult> Invoke(GetInstancesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetInstancesResult> getInstances(GetInstancesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:bastionhost/getInstances:getInstances
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DescriptionRegex string
    A regex string to filter results by the instance description.
    Ids List<string>
    Matched instance IDs to filter data source result.
    OutputFile string
    File name to persist data source output.
    Tags Dictionary<string, object>
    A map of tags assigned to the bastionhost instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instance = alicloud.bastionhost.getInstances({ tags: { tagKey1: "tagValue1", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instance = alicloud.bastionhost.get_instances(tags={
        "tagKey1": "tagValue1",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instance = AliCloud.BastionHost.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/bastionhost"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bastionhost.GetInstances(ctx, &bastionhost.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.bastionhost.BastionhostFunctions;
    import com.pulumi.alicloud.bastionhost.inputs.GetInstancesArgs;
    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 instance = BastionhostFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.of("tagKey1", "tagValue1"))
                .build());
    
        }
    }
    
    variables:
      instance:
        fn::invoke:
          Function: alicloud:bastionhost:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
    
    DescriptionRegex string
    A regex string to filter results by the instance description.
    Ids []string
    Matched instance IDs to filter data source result.
    OutputFile string
    File name to persist data source output.
    Tags map[string]interface{}
    A map of tags assigned to the bastionhost instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instance = alicloud.bastionhost.getInstances({ tags: { tagKey1: "tagValue1", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instance = alicloud.bastionhost.get_instances(tags={
        "tagKey1": "tagValue1",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instance = AliCloud.BastionHost.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/bastionhost"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bastionhost.GetInstances(ctx, &bastionhost.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.bastionhost.BastionhostFunctions;
    import com.pulumi.alicloud.bastionhost.inputs.GetInstancesArgs;
    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 instance = BastionhostFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.of("tagKey1", "tagValue1"))
                .build());
    
        }
    }
    
    variables:
      instance:
        fn::invoke:
          Function: alicloud:bastionhost:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
    
    descriptionRegex String
    A regex string to filter results by the instance description.
    ids List<String>
    Matched instance IDs to filter data source result.
    outputFile String
    File name to persist data source output.
    tags Map<String,Object>
    A map of tags assigned to the bastionhost instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instance = alicloud.bastionhost.getInstances({ tags: { tagKey1: "tagValue1", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instance = alicloud.bastionhost.get_instances(tags={
        "tagKey1": "tagValue1",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instance = AliCloud.BastionHost.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/bastionhost"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bastionhost.GetInstances(ctx, &bastionhost.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.bastionhost.BastionhostFunctions;
    import com.pulumi.alicloud.bastionhost.inputs.GetInstancesArgs;
    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 instance = BastionhostFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.of("tagKey1", "tagValue1"))
                .build());
    
        }
    }
    
    variables:
      instance:
        fn::invoke:
          Function: alicloud:bastionhost:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
    
    descriptionRegex string
    A regex string to filter results by the instance description.
    ids string[]
    Matched instance IDs to filter data source result.
    outputFile string
    File name to persist data source output.
    tags {[key: string]: any}
    A map of tags assigned to the bastionhost instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instance = alicloud.bastionhost.getInstances({ tags: { tagKey1: "tagValue1", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instance = alicloud.bastionhost.get_instances(tags={
        "tagKey1": "tagValue1",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instance = AliCloud.BastionHost.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/bastionhost"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bastionhost.GetInstances(ctx, &bastionhost.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.bastionhost.BastionhostFunctions;
    import com.pulumi.alicloud.bastionhost.inputs.GetInstancesArgs;
    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 instance = BastionhostFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.of("tagKey1", "tagValue1"))
                .build());
    
        }
    }
    
    variables:
      instance:
        fn::invoke:
          Function: alicloud:bastionhost:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
    
    description_regex str
    A regex string to filter results by the instance description.
    ids Sequence[str]
    Matched instance IDs to filter data source result.
    output_file str
    File name to persist data source output.
    tags Mapping[str, Any]
    A map of tags assigned to the bastionhost instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instance = alicloud.bastionhost.getInstances({ tags: { tagKey1: "tagValue1", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instance = alicloud.bastionhost.get_instances(tags={
        "tagKey1": "tagValue1",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instance = AliCloud.BastionHost.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/bastionhost"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bastionhost.GetInstances(ctx, &bastionhost.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.bastionhost.BastionhostFunctions;
    import com.pulumi.alicloud.bastionhost.inputs.GetInstancesArgs;
    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 instance = BastionhostFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.of("tagKey1", "tagValue1"))
                .build());
    
        }
    }
    
    variables:
      instance:
        fn::invoke:
          Function: alicloud:bastionhost:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
    
    descriptionRegex String
    A regex string to filter results by the instance description.
    ids List<String>
    Matched instance IDs to filter data source result.
    outputFile String
    File name to persist data source output.
    tags Map<Any>
    A map of tags assigned to the bastionhost instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instance = alicloud.bastionhost.getInstances({ tags: { tagKey1: "tagValue1", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instance = alicloud.bastionhost.get_instances(tags={
        "tagKey1": "tagValue1",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instance = AliCloud.BastionHost.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/bastionhost"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bastionhost.GetInstances(ctx, &bastionhost.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.bastionhost.BastionhostFunctions;
    import com.pulumi.alicloud.bastionhost.inputs.GetInstancesArgs;
    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 instance = BastionhostFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.of("tagKey1", "tagValue1"))
                .build());
    
        }
    }
    
    variables:
      instance:
        fn::invoke:
          Function: alicloud:bastionhost:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
    

    getInstances Result

    The following output properties are available:

    Descriptions List<string>
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Instances List<Pulumi.AliCloud.BastionHost.Outputs.GetInstancesInstance>
    A list of apis. Each element contains the following attributes:
    DescriptionRegex string
    OutputFile string
    Tags Dictionary<string, object>
    A map of tags assigned to the bastionhost instance.
    Descriptions []string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Instances []GetInstancesInstance
    A list of apis. Each element contains the following attributes:
    DescriptionRegex string
    OutputFile string
    Tags map[string]interface{}
    A map of tags assigned to the bastionhost instance.
    descriptions List<String>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    instances List<GetInstancesInstance>
    A list of apis. Each element contains the following attributes:
    descriptionRegex String
    outputFile String
    tags Map<String,Object>
    A map of tags assigned to the bastionhost instance.
    descriptions string[]
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    instances GetInstancesInstance[]
    A list of apis. Each element contains the following attributes:
    descriptionRegex string
    outputFile string
    tags {[key: string]: any}
    A map of tags assigned to the bastionhost instance.
    descriptions Sequence[str]
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    instances Sequence[GetInstancesInstance]
    A list of apis. Each element contains the following attributes:
    description_regex str
    output_file str
    tags Mapping[str, Any]
    A map of tags assigned to the bastionhost instance.
    descriptions List<String>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    instances List<Property Map>
    A list of apis. Each element contains the following attributes:
    descriptionRegex String
    outputFile String
    tags Map<Any>
    A map of tags assigned to the bastionhost instance.

    Supporting Types

    GetInstancesInstance

    Description string
    The instance's remark.
    Id string
    The instance's id.
    InstanceStatus string
    The instance's status.
    LicenseCode string
    PrivateDomain string
    The instance's private domain name.
    PublicDomain string
    The instance's public domain name.
    PublicNetworkAccess bool
    The instance's public network access configuration.
    SecurityGroupIds List<string>
    The instance's security group configuration.
    UserVswitchId string
    The instance's vSwitch ID.
    Tags Dictionary<string, object>
    A map of tags assigned to the bastionhost instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instance = alicloud.bastionhost.getInstances({ tags: { tagKey1: "tagValue1", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instance = alicloud.bastionhost.get_instances(tags={
        "tagKey1": "tagValue1",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instance = AliCloud.BastionHost.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/bastionhost"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bastionhost.GetInstances(ctx, &bastionhost.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.bastionhost.BastionhostFunctions;
    import com.pulumi.alicloud.bastionhost.inputs.GetInstancesArgs;
    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 instance = BastionhostFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.of("tagKey1", "tagValue1"))
                .build());
    
        }
    }
    
    variables:
      instance:
        fn::invoke:
          Function: alicloud:bastionhost:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
    
    Description string
    The instance's remark.
    Id string
    The instance's id.
    InstanceStatus string
    The instance's status.
    LicenseCode string
    PrivateDomain string
    The instance's private domain name.
    PublicDomain string
    The instance's public domain name.
    PublicNetworkAccess bool
    The instance's public network access configuration.
    SecurityGroupIds []string
    The instance's security group configuration.
    UserVswitchId string
    The instance's vSwitch ID.
    Tags map[string]interface{}
    A map of tags assigned to the bastionhost instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instance = alicloud.bastionhost.getInstances({ tags: { tagKey1: "tagValue1", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instance = alicloud.bastionhost.get_instances(tags={
        "tagKey1": "tagValue1",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instance = AliCloud.BastionHost.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/bastionhost"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bastionhost.GetInstances(ctx, &bastionhost.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.bastionhost.BastionhostFunctions;
    import com.pulumi.alicloud.bastionhost.inputs.GetInstancesArgs;
    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 instance = BastionhostFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.of("tagKey1", "tagValue1"))
                .build());
    
        }
    }
    
    variables:
      instance:
        fn::invoke:
          Function: alicloud:bastionhost:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
    
    description String
    The instance's remark.
    id String
    The instance's id.
    instanceStatus String
    The instance's status.
    licenseCode String
    privateDomain String
    The instance's private domain name.
    publicDomain String
    The instance's public domain name.
    publicNetworkAccess Boolean
    The instance's public network access configuration.
    securityGroupIds List<String>
    The instance's security group configuration.
    userVswitchId String
    The instance's vSwitch ID.
    tags Map<String,Object>
    A map of tags assigned to the bastionhost instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instance = alicloud.bastionhost.getInstances({ tags: { tagKey1: "tagValue1", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instance = alicloud.bastionhost.get_instances(tags={
        "tagKey1": "tagValue1",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instance = AliCloud.BastionHost.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/bastionhost"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bastionhost.GetInstances(ctx, &bastionhost.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.bastionhost.BastionhostFunctions;
    import com.pulumi.alicloud.bastionhost.inputs.GetInstancesArgs;
    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 instance = BastionhostFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.of("tagKey1", "tagValue1"))
                .build());
    
        }
    }
    
    variables:
      instance:
        fn::invoke:
          Function: alicloud:bastionhost:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
    
    description string
    The instance's remark.
    id string
    The instance's id.
    instanceStatus string
    The instance's status.
    licenseCode string
    privateDomain string
    The instance's private domain name.
    publicDomain string
    The instance's public domain name.
    publicNetworkAccess boolean
    The instance's public network access configuration.
    securityGroupIds string[]
    The instance's security group configuration.
    userVswitchId string
    The instance's vSwitch ID.
    tags {[key: string]: any}
    A map of tags assigned to the bastionhost instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instance = alicloud.bastionhost.getInstances({ tags: { tagKey1: "tagValue1", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instance = alicloud.bastionhost.get_instances(tags={
        "tagKey1": "tagValue1",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instance = AliCloud.BastionHost.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/bastionhost"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bastionhost.GetInstances(ctx, &bastionhost.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.bastionhost.BastionhostFunctions;
    import com.pulumi.alicloud.bastionhost.inputs.GetInstancesArgs;
    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 instance = BastionhostFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.of("tagKey1", "tagValue1"))
                .build());
    
        }
    }
    
    variables:
      instance:
        fn::invoke:
          Function: alicloud:bastionhost:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
    
    description str
    The instance's remark.
    id str
    The instance's id.
    instance_status str
    The instance's status.
    license_code str
    private_domain str
    The instance's private domain name.
    public_domain str
    The instance's public domain name.
    public_network_access bool
    The instance's public network access configuration.
    security_group_ids Sequence[str]
    The instance's security group configuration.
    user_vswitch_id str
    The instance's vSwitch ID.
    tags Mapping[str, Any]
    A map of tags assigned to the bastionhost instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instance = alicloud.bastionhost.getInstances({ tags: { tagKey1: "tagValue1", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instance = alicloud.bastionhost.get_instances(tags={
        "tagKey1": "tagValue1",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instance = AliCloud.BastionHost.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/bastionhost"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bastionhost.GetInstances(ctx, &bastionhost.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.bastionhost.BastionhostFunctions;
    import com.pulumi.alicloud.bastionhost.inputs.GetInstancesArgs;
    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 instance = BastionhostFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.of("tagKey1", "tagValue1"))
                .build());
    
        }
    }
    
    variables:
      instance:
        fn::invoke:
          Function: alicloud:bastionhost:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
    
    description String
    The instance's remark.
    id String
    The instance's id.
    instanceStatus String
    The instance's status.
    licenseCode String
    privateDomain String
    The instance's private domain name.
    publicDomain String
    The instance's public domain name.
    publicNetworkAccess Boolean
    The instance's public network access configuration.
    securityGroupIds List<String>
    The instance's security group configuration.
    userVswitchId String
    The instance's vSwitch ID.
    tags Map<Any>
    A map of tags assigned to the bastionhost instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instance = alicloud.bastionhost.getInstances({ tags: { tagKey1: "tagValue1", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instance = alicloud.bastionhost.get_instances(tags={
        "tagKey1": "tagValue1",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instance = AliCloud.BastionHost.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/bastionhost"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bastionhost.GetInstances(ctx, &bastionhost.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.bastionhost.BastionhostFunctions;
    import com.pulumi.alicloud.bastionhost.inputs.GetInstancesArgs;
    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 instance = BastionhostFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.of("tagKey1", "tagValue1"))
                .build());
    
        }
    }
    
    variables:
      instance:
        fn::invoke:
          Function: alicloud:bastionhost:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
    

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi