Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi
alicloud.bastionhost.getInstances
Explore with Pulumi AI
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 since v1.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: [instance].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]])
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 {
instance, err := bastionhost.GetInstances(ctx, &bastionhost.GetInstancesArgs{
DescriptionRegex: pulumi.StringRef("^bastionhost"),
}, nil);
if err != nil {
return err
}
ctx.Export("instance", pulumi.StringArray(%!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:5,11-25)))
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"] = new[]
        {
            instance,
        }.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", instance.applyValue(getInstancesResult -> getInstancesResult).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, str]] = 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, pulumi.Input[str]]]] = 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)
public static Output<GetInstancesResult> getInstances(GetInstancesArgs args, InvokeOptions options)
fn::invoke:
  function: alicloud:bastionhost/getInstances:getInstances
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Description
Regex string - A regex string to filter results by the instance description.
 - Ids List<string>
 - Matched instance IDs to filter data source result.
 - Output
File string - File name to persist data source output.
 - Dictionary<string, string>
 - A map of tags assigned to the bastionhost instance.
 
- Description
Regex string - A regex string to filter results by the instance description.
 - Ids []string
 - Matched instance IDs to filter data source result.
 - Output
File string - File name to persist data source output.
 - map[string]string
 - A map of tags assigned to the bastionhost instance.
 
- description
Regex String - A regex string to filter results by the instance description.
 - ids List<String>
 - Matched instance IDs to filter data source result.
 - output
File String - File name to persist data source output.
 - Map<String,String>
 - A map of tags assigned to the bastionhost instance.
 
- description
Regex string - A regex string to filter results by the instance description.
 - ids string[]
 - Matched instance IDs to filter data source result.
 - output
File string - File name to persist data source output.
 - {[key: string]: string}
 - A map of tags assigned to the bastionhost instance.
 
- 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.
 - Mapping[str, str]
 - A map of tags assigned to the bastionhost instance.
 
- description
Regex String - A regex string to filter results by the instance description.
 - ids List<String>
 - Matched instance IDs to filter data source result.
 - output
File String - File name to persist data source output.
 - Map<String>
 - A map of tags assigned to the bastionhost instance.
 
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.
Ali Cloud. Bastion Host. Outputs. Get Instances Instance>  - A list of apis. Each element contains the following attributes:
 - Description
Regex string - Output
File string - Dictionary<string, string>
 - 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
[]Get
Instances Instance  - A list of apis. Each element contains the following attributes:
 - Description
Regex string - Output
File string - map[string]string
 - 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<Get
Instances Instance>  - A list of apis. Each element contains the following attributes:
 - description
Regex String - output
File String - Map<String,String>
 - 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
Get
Instances Instance[]  - A list of apis. Each element contains the following attributes:
 - description
Regex string - output
File string - {[key: string]: string}
 - 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[Get
Instances Instance]  - A list of apis. Each element contains the following attributes:
 - description_
regex str - output_
file str - Mapping[str, str]
 - 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:
 - description
Regex String - output
File String - Map<String>
 - A map of tags assigned to the bastionhost instance.
 
Supporting Types
GetInstancesInstance  
- Bandwidth string
 - The bandwidth of Cloud Bastionhost instance.
 - Description string
 - The instance's remark.
 - Id string
 - The instance's id.
 - Instance
Status string - The instance's status.
 - License
Code string - The instance's license code.
 - Private
Domain string - The instance's private domain name.
 - Public
Domain string - The instance's public domain name.
 - Public
Network boolAccess  - The instance's public network access configuration.
 - Security
Group List<string>Ids  - The instance's security group configuration.
 - Storage string
 - The storage of Cloud Bastionhost instance in TB.
 - Dictionary<string, string>
 - A map of tags assigned to the bastionhost instance.
 - User
Vswitch stringId  - The instance's vSwitch ID.
 
- Bandwidth string
 - The bandwidth of Cloud Bastionhost instance.
 - Description string
 - The instance's remark.
 - Id string
 - The instance's id.
 - Instance
Status string - The instance's status.
 - License
Code string - The instance's license code.
 - Private
Domain string - The instance's private domain name.
 - Public
Domain string - The instance's public domain name.
 - Public
Network boolAccess  - The instance's public network access configuration.
 - Security
Group []stringIds  - The instance's security group configuration.
 - Storage string
 - The storage of Cloud Bastionhost instance in TB.
 - map[string]string
 - A map of tags assigned to the bastionhost instance.
 - User
Vswitch stringId  - The instance's vSwitch ID.
 
- bandwidth String
 - The bandwidth of Cloud Bastionhost instance.
 - description String
 - The instance's remark.
 - id String
 - The instance's id.
 - instance
Status String - The instance's status.
 - license
Code String - The instance's license code.
 - private
Domain String - The instance's private domain name.
 - public
Domain String - The instance's public domain name.
 - public
Network BooleanAccess  - The instance's public network access configuration.
 - security
Group List<String>Ids  - The instance's security group configuration.
 - storage String
 - The storage of Cloud Bastionhost instance in TB.
 - Map<String,String>
 - A map of tags assigned to the bastionhost instance.
 - user
Vswitch StringId  - The instance's vSwitch ID.
 
- bandwidth string
 - The bandwidth of Cloud Bastionhost instance.
 - description string
 - The instance's remark.
 - id string
 - The instance's id.
 - instance
Status string - The instance's status.
 - license
Code string - The instance's license code.
 - private
Domain string - The instance's private domain name.
 - public
Domain string - The instance's public domain name.
 - public
Network booleanAccess  - The instance's public network access configuration.
 - security
Group string[]Ids  - The instance's security group configuration.
 - storage string
 - The storage of Cloud Bastionhost instance in TB.
 - {[key: string]: string}
 - A map of tags assigned to the bastionhost instance.
 - user
Vswitch stringId  - The instance's vSwitch ID.
 
- bandwidth str
 - The bandwidth of Cloud Bastionhost instance.
 - description str
 - The instance's remark.
 - id str
 - The instance's id.
 - instance_
status str - The instance's status.
 - license_
code str - The instance's license code.
 - private_
domain str - The instance's private domain name.
 - public_
domain str - The instance's public domain name.
 - public_
network_ boolaccess  - The instance's public network access configuration.
 - security_
group_ Sequence[str]ids  - The instance's security group configuration.
 - storage str
 - The storage of Cloud Bastionhost instance in TB.
 - Mapping[str, str]
 - A map of tags assigned to the bastionhost instance.
 - user_
vswitch_ strid  - The instance's vSwitch ID.
 
- bandwidth String
 - The bandwidth of Cloud Bastionhost instance.
 - description String
 - The instance's remark.
 - id String
 - The instance's id.
 - instance
Status String - The instance's status.
 - license
Code String - The instance's license code.
 - private
Domain String - The instance's private domain name.
 - public
Domain String - The instance's public domain name.
 - public
Network BooleanAccess  - The instance's public network access configuration.
 - security
Group List<String>Ids  - The instance's security group configuration.
 - storage String
 - The storage of Cloud Bastionhost instance in TB.
 - Map<String>
 - A map of tags assigned to the bastionhost instance.
 - user
Vswitch StringId  - The instance's vSwitch ID.
 
Package Details
- Repository
 - Alibaba Cloud pulumi/pulumi-alicloud
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
alicloudTerraform Provider.