1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. tsdb
  5. getInstances
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.tsdb.getInstances

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    This data source provides the Time Series Database (TSDB) Instances of the current Alibaba Cloud user.

    NOTE: Available in v1.112.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = alicloud.tsdb.getInstances({
        ids: ["example_value"],
    });
    export const firstTsdbInstanceId = example.then(example => example.instances?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.tsdb.get_instances(ids=["example_value"])
    pulumi.export("firstTsdbInstanceId", example.instances[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/tsdb"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := tsdb.GetInstances(ctx, &tsdb.GetInstancesArgs{
    			Ids: []string{
    				"example_value",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstTsdbInstanceId", example.Instances[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = AliCloud.Tsdb.GetInstances.Invoke(new()
        {
            Ids = new[]
            {
                "example_value",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["firstTsdbInstanceId"] = example.Apply(getInstancesResult => getInstancesResult.Instances[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.tsdb.TsdbFunctions;
    import com.pulumi.alicloud.tsdb.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 example = TsdbFunctions.getInstances(GetInstancesArgs.builder()
                .ids("example_value")
                .build());
    
            ctx.export("firstTsdbInstanceId", example.applyValue(getInstancesResult -> getInstancesResult.instances()[0].id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: alicloud:tsdb:getInstances
          Arguments:
            ids:
              - example_value
    outputs:
      firstTsdbInstanceId: ${example.instances[0].id}
    

    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(app_key: Optional[str] = None,
                      enable_details: Optional[bool] = None,
                      engine_type: Optional[str] = None,
                      ids: Optional[Sequence[str]] = None,
                      output_file: Optional[str] = None,
                      query_str: Optional[str] = None,
                      status: Optional[str] = None,
                      status_list: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetInstancesResult
    def get_instances_output(app_key: Optional[pulumi.Input[str]] = None,
                      enable_details: Optional[pulumi.Input[bool]] = None,
                      engine_type: Optional[pulumi.Input[str]] = None,
                      ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                      output_file: Optional[pulumi.Input[str]] = None,
                      query_str: Optional[pulumi.Input[str]] = None,
                      status: Optional[pulumi.Input[str]] = None,
                      status_list: Optional[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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:tsdb/getInstances:getInstances
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AppKey string
    The app key.
    EnableDetails bool
    Default to false. Set it to true can output more details about resource attributes.
    EngineType string
    The engine type of instance. Enumerative: tsdb_tsdb refers to TSDB, tsdb_influxdb refers to TSDB for InfluxDB️.
    Ids List<string>
    A list of Instance IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    QueryStr string
    The query str.
    Status string
    Instance status, enumerative: ACTIVATION,DELETED, CREATING,CLASS_CHANGING,LOCKED.
    StatusList string
    The status list.
    AppKey string
    The app key.
    EnableDetails bool
    Default to false. Set it to true can output more details about resource attributes.
    EngineType string
    The engine type of instance. Enumerative: tsdb_tsdb refers to TSDB, tsdb_influxdb refers to TSDB for InfluxDB️.
    Ids []string
    A list of Instance IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    QueryStr string
    The query str.
    Status string
    Instance status, enumerative: ACTIVATION,DELETED, CREATING,CLASS_CHANGING,LOCKED.
    StatusList string
    The status list.
    appKey String
    The app key.
    enableDetails Boolean
    Default to false. Set it to true can output more details about resource attributes.
    engineType String
    The engine type of instance. Enumerative: tsdb_tsdb refers to TSDB, tsdb_influxdb refers to TSDB for InfluxDB️.
    ids List<String>
    A list of Instance IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    queryStr String
    The query str.
    status String
    Instance status, enumerative: ACTIVATION,DELETED, CREATING,CLASS_CHANGING,LOCKED.
    statusList String
    The status list.
    appKey string
    The app key.
    enableDetails boolean
    Default to false. Set it to true can output more details about resource attributes.
    engineType string
    The engine type of instance. Enumerative: tsdb_tsdb refers to TSDB, tsdb_influxdb refers to TSDB for InfluxDB️.
    ids string[]
    A list of Instance IDs.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    queryStr string
    The query str.
    status string
    Instance status, enumerative: ACTIVATION,DELETED, CREATING,CLASS_CHANGING,LOCKED.
    statusList string
    The status list.
    app_key str
    The app key.
    enable_details bool
    Default to false. Set it to true can output more details about resource attributes.
    engine_type str
    The engine type of instance. Enumerative: tsdb_tsdb refers to TSDB, tsdb_influxdb refers to TSDB for InfluxDB️.
    ids Sequence[str]
    A list of Instance IDs.
    output_file str
    File name where to save data source results (after running pulumi preview).
    query_str str
    The query str.
    status str
    Instance status, enumerative: ACTIVATION,DELETED, CREATING,CLASS_CHANGING,LOCKED.
    status_list str
    The status list.
    appKey String
    The app key.
    enableDetails Boolean
    Default to false. Set it to true can output more details about resource attributes.
    engineType String
    The engine type of instance. Enumerative: tsdb_tsdb refers to TSDB, tsdb_influxdb refers to TSDB for InfluxDB️.
    ids List<String>
    A list of Instance IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    queryStr String
    The query str.
    status String
    Instance status, enumerative: ACTIVATION,DELETED, CREATING,CLASS_CHANGING,LOCKED.
    statusList String
    The status list.

    getInstances Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Instances List<Pulumi.AliCloud.Tsdb.Outputs.GetInstancesInstance>
    AppKey string
    EnableDetails bool
    EngineType string
    OutputFile string
    QueryStr string
    Status string
    StatusList string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Instances []GetInstancesInstance
    AppKey string
    EnableDetails bool
    EngineType string
    OutputFile string
    QueryStr string
    Status string
    StatusList string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    instances List<GetInstancesInstance>
    appKey String
    enableDetails Boolean
    engineType String
    outputFile String
    queryStr String
    status String
    statusList String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    instances GetInstancesInstance[]
    appKey string
    enableDetails boolean
    engineType string
    outputFile string
    queryStr string
    status string
    statusList string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    instances Sequence[GetInstancesInstance]
    app_key str
    enable_details bool
    engine_type str
    output_file str
    query_str str
    status str
    status_list str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    instances List<Property Map>
    appKey String
    enableDetails Boolean
    engineType String
    outputFile String
    queryStr String
    status String
    statusList String

    Supporting Types

    GetInstancesInstance

    AutoRenew string
    Auto renew.
    CpuNumber string
    The cpu core number of instance.
    DiskCategory string
    The disk type of instance. cloud_ssd refers to SSD disk, cloud_efficiency refers to efficiency disk,cloud_essd refers to ESSD PL1 disk.
    EngineType string
    The engine type of instance. Enumerative: tsdb_tsdb refers to TSDB, tsdb_influxdb refers to TSDB for InfluxDB️.
    ExpiredTime int
    Instance expiration time.
    Id string
    The ID of the Instance.
    InstanceAlias string
    The alias of the instance.
    InstanceClass string
    The specification of the instance.
    InstanceId string
    The ID of the instance.
    InstanceStorage string
    The storage capacity of the instance. Unit: GB. For example, the value 50 indicates 50 GB.
    MemorySize string
    The memory size of instance.
    NetworkType string
    Instance network type.
    PaymentType string
    The billing method. Valid values: PayAsYouGo and Subscription. The PayAsYouGo value indicates the pay-as-you-go method, and the Subscription value indicates the subscription method.
    Status string
    Instance status, enumerative: ACTIVATION,DELETED, CREATING,CLASS_CHANGING,LOCKED.
    VpcConnectionAddress string
    The vpc connection address of instance.
    VpcId string
    The ID of the virtual private cloud (VPC) that is connected to the instance.
    VswitchId string
    The vswitch id.
    ZoneId string
    The zone ID of the instance.
    AutoRenew string
    Auto renew.
    CpuNumber string
    The cpu core number of instance.
    DiskCategory string
    The disk type of instance. cloud_ssd refers to SSD disk, cloud_efficiency refers to efficiency disk,cloud_essd refers to ESSD PL1 disk.
    EngineType string
    The engine type of instance. Enumerative: tsdb_tsdb refers to TSDB, tsdb_influxdb refers to TSDB for InfluxDB️.
    ExpiredTime int
    Instance expiration time.
    Id string
    The ID of the Instance.
    InstanceAlias string
    The alias of the instance.
    InstanceClass string
    The specification of the instance.
    InstanceId string
    The ID of the instance.
    InstanceStorage string
    The storage capacity of the instance. Unit: GB. For example, the value 50 indicates 50 GB.
    MemorySize string
    The memory size of instance.
    NetworkType string
    Instance network type.
    PaymentType string
    The billing method. Valid values: PayAsYouGo and Subscription. The PayAsYouGo value indicates the pay-as-you-go method, and the Subscription value indicates the subscription method.
    Status string
    Instance status, enumerative: ACTIVATION,DELETED, CREATING,CLASS_CHANGING,LOCKED.
    VpcConnectionAddress string
    The vpc connection address of instance.
    VpcId string
    The ID of the virtual private cloud (VPC) that is connected to the instance.
    VswitchId string
    The vswitch id.
    ZoneId string
    The zone ID of the instance.
    autoRenew String
    Auto renew.
    cpuNumber String
    The cpu core number of instance.
    diskCategory String
    The disk type of instance. cloud_ssd refers to SSD disk, cloud_efficiency refers to efficiency disk,cloud_essd refers to ESSD PL1 disk.
    engineType String
    The engine type of instance. Enumerative: tsdb_tsdb refers to TSDB, tsdb_influxdb refers to TSDB for InfluxDB️.
    expiredTime Integer
    Instance expiration time.
    id String
    The ID of the Instance.
    instanceAlias String
    The alias of the instance.
    instanceClass String
    The specification of the instance.
    instanceId String
    The ID of the instance.
    instanceStorage String
    The storage capacity of the instance. Unit: GB. For example, the value 50 indicates 50 GB.
    memorySize String
    The memory size of instance.
    networkType String
    Instance network type.
    paymentType String
    The billing method. Valid values: PayAsYouGo and Subscription. The PayAsYouGo value indicates the pay-as-you-go method, and the Subscription value indicates the subscription method.
    status String
    Instance status, enumerative: ACTIVATION,DELETED, CREATING,CLASS_CHANGING,LOCKED.
    vpcConnectionAddress String
    The vpc connection address of instance.
    vpcId String
    The ID of the virtual private cloud (VPC) that is connected to the instance.
    vswitchId String
    The vswitch id.
    zoneId String
    The zone ID of the instance.
    autoRenew string
    Auto renew.
    cpuNumber string
    The cpu core number of instance.
    diskCategory string
    The disk type of instance. cloud_ssd refers to SSD disk, cloud_efficiency refers to efficiency disk,cloud_essd refers to ESSD PL1 disk.
    engineType string
    The engine type of instance. Enumerative: tsdb_tsdb refers to TSDB, tsdb_influxdb refers to TSDB for InfluxDB️.
    expiredTime number
    Instance expiration time.
    id string
    The ID of the Instance.
    instanceAlias string
    The alias of the instance.
    instanceClass string
    The specification of the instance.
    instanceId string
    The ID of the instance.
    instanceStorage string
    The storage capacity of the instance. Unit: GB. For example, the value 50 indicates 50 GB.
    memorySize string
    The memory size of instance.
    networkType string
    Instance network type.
    paymentType string
    The billing method. Valid values: PayAsYouGo and Subscription. The PayAsYouGo value indicates the pay-as-you-go method, and the Subscription value indicates the subscription method.
    status string
    Instance status, enumerative: ACTIVATION,DELETED, CREATING,CLASS_CHANGING,LOCKED.
    vpcConnectionAddress string
    The vpc connection address of instance.
    vpcId string
    The ID of the virtual private cloud (VPC) that is connected to the instance.
    vswitchId string
    The vswitch id.
    zoneId string
    The zone ID of the instance.
    auto_renew str
    Auto renew.
    cpu_number str
    The cpu core number of instance.
    disk_category str
    The disk type of instance. cloud_ssd refers to SSD disk, cloud_efficiency refers to efficiency disk,cloud_essd refers to ESSD PL1 disk.
    engine_type str
    The engine type of instance. Enumerative: tsdb_tsdb refers to TSDB, tsdb_influxdb refers to TSDB for InfluxDB️.
    expired_time int
    Instance expiration time.
    id str
    The ID of the Instance.
    instance_alias str
    The alias of the instance.
    instance_class str
    The specification of the instance.
    instance_id str
    The ID of the instance.
    instance_storage str
    The storage capacity of the instance. Unit: GB. For example, the value 50 indicates 50 GB.
    memory_size str
    The memory size of instance.
    network_type str
    Instance network type.
    payment_type str
    The billing method. Valid values: PayAsYouGo and Subscription. The PayAsYouGo value indicates the pay-as-you-go method, and the Subscription value indicates the subscription method.
    status str
    Instance status, enumerative: ACTIVATION,DELETED, CREATING,CLASS_CHANGING,LOCKED.
    vpc_connection_address str
    The vpc connection address of instance.
    vpc_id str
    The ID of the virtual private cloud (VPC) that is connected to the instance.
    vswitch_id str
    The vswitch id.
    zone_id str
    The zone ID of the instance.
    autoRenew String
    Auto renew.
    cpuNumber String
    The cpu core number of instance.
    diskCategory String
    The disk type of instance. cloud_ssd refers to SSD disk, cloud_efficiency refers to efficiency disk,cloud_essd refers to ESSD PL1 disk.
    engineType String
    The engine type of instance. Enumerative: tsdb_tsdb refers to TSDB, tsdb_influxdb refers to TSDB for InfluxDB️.
    expiredTime Number
    Instance expiration time.
    id String
    The ID of the Instance.
    instanceAlias String
    The alias of the instance.
    instanceClass String
    The specification of the instance.
    instanceId String
    The ID of the instance.
    instanceStorage String
    The storage capacity of the instance. Unit: GB. For example, the value 50 indicates 50 GB.
    memorySize String
    The memory size of instance.
    networkType String
    Instance network type.
    paymentType String
    The billing method. Valid values: PayAsYouGo and Subscription. The PayAsYouGo value indicates the pay-as-you-go method, and the Subscription value indicates the subscription method.
    status String
    Instance status, enumerative: ACTIVATION,DELETED, CREATING,CLASS_CHANGING,LOCKED.
    vpcConnectionAddress String
    The vpc connection address of instance.
    vpcId String
    The ID of the virtual private cloud (VPC) that is connected to the instance.
    vswitchId String
    The vswitch id.
    zoneId String
    The zone ID of the instance.

    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.53.0 published on Wednesday, Apr 17, 2024 by Pulumi