1. Packages
  2. Packages
  3. Alibaba Cloud Provider
  4. API Docs
  5. drds
  6. getPolardbxInstances
Viewing docs for Alibaba Cloud v3.105.0
published on Thursday, Jul 16, 2026 by Pulumi
alicloud logo
Viewing docs for Alibaba Cloud v3.105.0
published on Thursday, Jul 16, 2026 by Pulumi

    This data source provides the Distributed Relational Database Service (DRDS) PolarDB-X Instances of the current Alibaba Cloud user.

    NOTE: Available since v1.285.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.drds.getPolardbxInstances({
        ids: ["pxc-xxxxxxxx"],
    });
    export const firstPolardbxInstanceId = ids.then(ids => ids.instances?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.drds.get_polardbx_instances(ids=["pxc-xxxxxxxx"])
    pulumi.export("firstPolardbxInstanceId", ids.instances[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/drds"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ids, err := drds.GetPolardbxInstances(ctx, &drds.GetPolardbxInstancesArgs{
    			Ids: []string{
    				"pxc-xxxxxxxx",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstPolardbxInstanceId", ids.Instances[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.Drds.GetPolardbxInstances.Invoke(new()
        {
            Ids = new[]
            {
                "pxc-xxxxxxxx",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["firstPolardbxInstanceId"] = ids.Apply(getPolardbxInstancesResult => getPolardbxInstancesResult.Instances[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.drds.DrdsFunctions;
    import com.pulumi.alicloud.drds.inputs.GetPolardbxInstancesArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 ids = DrdsFunctions.getPolardbxInstances(GetPolardbxInstancesArgs.builder()
                .ids("pxc-xxxxxxxx")
                .build());
    
            ctx.export("firstPolardbxInstanceId", ids.instances()[0].id());
        }
    }
    
    variables:
      ids:
        fn::invoke:
          function: alicloud:drds:getPolardbxInstances
          arguments:
            ids:
              - pxc-xxxxxxxx
    outputs:
      firstPolardbxInstanceId: ${ids.instances[0].id}
    
    pulumi {
      required_providers {
        alicloud = {
          source = "pulumi/alicloud"
        }
      }
    }
    
    data "alicloud_drds_getpolardbxinstances" "ids" {
      ids = ["pxc-xxxxxxxx"]
    }
    
    output "firstPolardbxInstanceId" {
      value = data.alicloud_drds_getpolardbxinstances.ids.instances[0].id
    }
    

    Using getPolardbxInstances

    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 getPolardbxInstances(args: GetPolardbxInstancesArgs, opts?: InvokeOptions): Promise<GetPolardbxInstancesResult>
    function getPolardbxInstancesOutput(args: GetPolardbxInstancesOutputArgs, opts?: InvokeOptions): Output<GetPolardbxInstancesResult>
    def get_polardbx_instances(description_regex: Optional[str] = None,
                               ids: Optional[Sequence[str]] = None,
                               output_file: Optional[str] = None,
                               page_number: Optional[int] = None,
                               page_size: Optional[int] = None,
                               resource_group_id: Optional[str] = None,
                               status: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetPolardbxInstancesResult
    def get_polardbx_instances_output(description_regex: pulumi.Input[Optional[str]] = None,
                               ids: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
                               output_file: pulumi.Input[Optional[str]] = None,
                               page_number: pulumi.Input[Optional[int]] = None,
                               page_size: pulumi.Input[Optional[int]] = None,
                               resource_group_id: pulumi.Input[Optional[str]] = None,
                               status: pulumi.Input[Optional[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetPolardbxInstancesResult]
    func GetPolardbxInstances(ctx *Context, args *GetPolardbxInstancesArgs, opts ...InvokeOption) (*GetPolardbxInstancesResult, error)
    func GetPolardbxInstancesOutput(ctx *Context, args *GetPolardbxInstancesOutputArgs, opts ...InvokeOption) GetPolardbxInstancesResultOutput

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

    public static class GetPolardbxInstances 
    {
        public static Task<GetPolardbxInstancesResult> InvokeAsync(GetPolardbxInstancesArgs args, InvokeOptions? opts = null)
        public static Output<GetPolardbxInstancesResult> Invoke(GetPolardbxInstancesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPolardbxInstancesResult> getPolardbxInstances(GetPolardbxInstancesArgs args, InvokeOptions options)
    public static Output<GetPolardbxInstancesResult> getPolardbxInstances(GetPolardbxInstancesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: alicloud:drds/getPolardbxInstances:getPolardbxInstances
      arguments:
        # arguments dictionary
    data "alicloud_drds_get_polardbx_instances" "name" {
        # arguments
    }

    The following arguments are supported:

    DescriptionRegex string
    A regex string to filter results by instance description.
    Ids List<string>
    A list of PolarDB-X Instance IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    Number of the returned page. Valid values: 1 to 10000. Default: 1.
    PageSize int
    Number of entries per page. Valid values: 1 to 1000. Default: 100.
    ResourceGroupId string
    The ID of the resource group used to filter instances.
    Status string
    Filter results by instance status. Valid values: Creating, Running, MinorVersionUpgrading, ClassChanging, NodeCreating, NodeDeleting, Deleting.
    DescriptionRegex string
    A regex string to filter results by instance description.
    Ids []string
    A list of PolarDB-X Instance IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    Number of the returned page. Valid values: 1 to 10000. Default: 1.
    PageSize int
    Number of entries per page. Valid values: 1 to 1000. Default: 100.
    ResourceGroupId string
    The ID of the resource group used to filter instances.
    Status string
    Filter results by instance status. Valid values: Creating, Running, MinorVersionUpgrading, ClassChanging, NodeCreating, NodeDeleting, Deleting.
    description_regex string
    A regex string to filter results by instance description.
    ids list(string)
    A list of PolarDB-X Instance IDs.
    output_file string
    File name where to save data source results (after running pulumi preview).
    page_number number
    Number of the returned page. Valid values: 1 to 10000. Default: 1.
    page_size number
    Number of entries per page. Valid values: 1 to 1000. Default: 100.
    resource_group_id string
    The ID of the resource group used to filter instances.
    status string
    Filter results by instance status. Valid values: Creating, Running, MinorVersionUpgrading, ClassChanging, NodeCreating, NodeDeleting, Deleting.
    descriptionRegex String
    A regex string to filter results by instance description.
    ids List<String>
    A list of PolarDB-X Instance IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Integer
    Number of the returned page. Valid values: 1 to 10000. Default: 1.
    pageSize Integer
    Number of entries per page. Valid values: 1 to 1000. Default: 100.
    resourceGroupId String
    The ID of the resource group used to filter instances.
    status String
    Filter results by instance status. Valid values: Creating, Running, MinorVersionUpgrading, ClassChanging, NodeCreating, NodeDeleting, Deleting.
    descriptionRegex string
    A regex string to filter results by instance description.
    ids string[]
    A list of PolarDB-X Instance IDs.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    pageNumber number
    Number of the returned page. Valid values: 1 to 10000. Default: 1.
    pageSize number
    Number of entries per page. Valid values: 1 to 1000. Default: 100.
    resourceGroupId string
    The ID of the resource group used to filter instances.
    status string
    Filter results by instance status. Valid values: Creating, Running, MinorVersionUpgrading, ClassChanging, NodeCreating, NodeDeleting, Deleting.
    description_regex str
    A regex string to filter results by instance description.
    ids Sequence[str]
    A list of PolarDB-X Instance IDs.
    output_file str
    File name where to save data source results (after running pulumi preview).
    page_number int
    Number of the returned page. Valid values: 1 to 10000. Default: 1.
    page_size int
    Number of entries per page. Valid values: 1 to 1000. Default: 100.
    resource_group_id str
    The ID of the resource group used to filter instances.
    status str
    Filter results by instance status. Valid values: Creating, Running, MinorVersionUpgrading, ClassChanging, NodeCreating, NodeDeleting, Deleting.
    descriptionRegex String
    A regex string to filter results by instance description.
    ids List<String>
    A list of PolarDB-X Instance IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Number
    Number of the returned page. Valid values: 1 to 10000. Default: 1.
    pageSize Number
    Number of entries per page. Valid values: 1 to 1000. Default: 100.
    resourceGroupId String
    The ID of the resource group used to filter instances.
    status String
    Filter results by instance status. Valid values: Creating, Running, MinorVersionUpgrading, ClassChanging, NodeCreating, NodeDeleting, Deleting.

    getPolardbxInstances Result

    The following output properties are available:

    Descriptions List<string>
    A list of PolarDB-X instance descriptions.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Instances List<Pulumi.AliCloud.Drds.Outputs.GetPolardbxInstancesInstance>
    A list of PolarDB-X instances. Each element contains the following attributes:
    TotalCount int
    Total number of PolarDB-X instances returned by the API.
    DescriptionRegex string
    OutputFile string
    PageNumber int
    PageSize int
    ResourceGroupId string
    The ID of the resource group the instance belongs to.
    Status string
    Status of the instance.
    Descriptions []string
    A list of PolarDB-X instance descriptions.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Instances []GetPolardbxInstancesInstance
    A list of PolarDB-X instances. Each element contains the following attributes:
    TotalCount int
    Total number of PolarDB-X instances returned by the API.
    DescriptionRegex string
    OutputFile string
    PageNumber int
    PageSize int
    ResourceGroupId string
    The ID of the resource group the instance belongs to.
    Status string
    Status of the instance.
    descriptions list(string)
    A list of PolarDB-X instance descriptions.
    id string
    The provider-assigned unique ID for this managed resource.
    ids list(string)
    instances list(object)
    A list of PolarDB-X instances. Each element contains the following attributes:
    total_count number
    Total number of PolarDB-X instances returned by the API.
    description_regex string
    output_file string
    page_number number
    page_size number
    resource_group_id string
    The ID of the resource group the instance belongs to.
    status string
    Status of the instance.
    descriptions List<String>
    A list of PolarDB-X instance descriptions.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    instances List<GetPolardbxInstancesInstance>
    A list of PolarDB-X instances. Each element contains the following attributes:
    totalCount Integer
    Total number of PolarDB-X instances returned by the API.
    descriptionRegex String
    outputFile String
    pageNumber Integer
    pageSize Integer
    resourceGroupId String
    The ID of the resource group the instance belongs to.
    status String
    Status of the instance.
    descriptions string[]
    A list of PolarDB-X instance descriptions.
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    instances GetPolardbxInstancesInstance[]
    A list of PolarDB-X instances. Each element contains the following attributes:
    totalCount number
    Total number of PolarDB-X instances returned by the API.
    descriptionRegex string
    outputFile string
    pageNumber number
    pageSize number
    resourceGroupId string
    The ID of the resource group the instance belongs to.
    status string
    Status of the instance.
    descriptions Sequence[str]
    A list of PolarDB-X instance descriptions.
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    instances Sequence[GetPolardbxInstancesInstance]
    A list of PolarDB-X instances. Each element contains the following attributes:
    total_count int
    Total number of PolarDB-X instances returned by the API.
    description_regex str
    output_file str
    page_number int
    page_size int
    resource_group_id str
    The ID of the resource group the instance belongs to.
    status str
    Status of the instance.
    descriptions List<String>
    A list of PolarDB-X instance descriptions.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    instances List<Property Map>
    A list of PolarDB-X instances. Each element contains the following attributes:
    totalCount Number
    Total number of PolarDB-X instances returned by the API.
    descriptionRegex String
    outputFile String
    pageNumber Number
    pageSize Number
    resourceGroupId String
    The ID of the resource group the instance belongs to.
    status String
    Status of the instance.

    Supporting Types

    GetPolardbxInstancesInstance

    CnClass string
    Compute node specifications of the instance.
    CnNodeCount int
    The number of compute nodes.
    CreateTime string
    The creation time of the instance.
    Description string
    Instance remarks.
    DnClass string
    Storage node specifications of the instance.
    DnNodeCount int
    The number of storage nodes.
    EngineVersion string
    Engine version of the instance.
    Id string
    The ID of the PolarDB-X instance.
    NetworkType string
    The network type of the instance.
    PaymentType string
    The billing method of the instance. Valid values: Postpaid, Prepaid.
    PolardbxInstanceId string
    The ID of the PolarDB-X instance. Same as id.
    PrimaryZone string
    Primary availability zone.
    RegionId string
    Region ID of the instance.
    ResourceGroupId string
    The ID of the resource group used to filter instances.
    SecondaryZone string
    Secondary availability zone.
    Status string
    Filter results by instance status. Valid values: Creating, Running, MinorVersionUpgrading, ClassChanging, NodeCreating, NodeDeleting, Deleting.
    StorageType string
    Storage type of the instance. Valid values: customLocalSsd, cloudAuto.
    TertiaryZone string
    Third availability zone.
    TopologyType string
    Topology type of the instance. Valid values: 1azone, 3azones.
    VpcId string
    VPC ID of the instance.
    ZoneId string
    Availability zone of the instance.
    CnClass string
    Compute node specifications of the instance.
    CnNodeCount int
    The number of compute nodes.
    CreateTime string
    The creation time of the instance.
    Description string
    Instance remarks.
    DnClass string
    Storage node specifications of the instance.
    DnNodeCount int
    The number of storage nodes.
    EngineVersion string
    Engine version of the instance.
    Id string
    The ID of the PolarDB-X instance.
    NetworkType string
    The network type of the instance.
    PaymentType string
    The billing method of the instance. Valid values: Postpaid, Prepaid.
    PolardbxInstanceId string
    The ID of the PolarDB-X instance. Same as id.
    PrimaryZone string
    Primary availability zone.
    RegionId string
    Region ID of the instance.
    ResourceGroupId string
    The ID of the resource group used to filter instances.
    SecondaryZone string
    Secondary availability zone.
    Status string
    Filter results by instance status. Valid values: Creating, Running, MinorVersionUpgrading, ClassChanging, NodeCreating, NodeDeleting, Deleting.
    StorageType string
    Storage type of the instance. Valid values: customLocalSsd, cloudAuto.
    TertiaryZone string
    Third availability zone.
    TopologyType string
    Topology type of the instance. Valid values: 1azone, 3azones.
    VpcId string
    VPC ID of the instance.
    ZoneId string
    Availability zone of the instance.
    cn_class string
    Compute node specifications of the instance.
    cn_node_count number
    The number of compute nodes.
    create_time string
    The creation time of the instance.
    description string
    Instance remarks.
    dn_class string
    Storage node specifications of the instance.
    dn_node_count number
    The number of storage nodes.
    engine_version string
    Engine version of the instance.
    id string
    The ID of the PolarDB-X instance.
    network_type string
    The network type of the instance.
    payment_type string
    The billing method of the instance. Valid values: Postpaid, Prepaid.
    polardbx_instance_id string
    The ID of the PolarDB-X instance. Same as id.
    primary_zone string
    Primary availability zone.
    region_id string
    Region ID of the instance.
    resource_group_id string
    The ID of the resource group used to filter instances.
    secondary_zone string
    Secondary availability zone.
    status string
    Filter results by instance status. Valid values: Creating, Running, MinorVersionUpgrading, ClassChanging, NodeCreating, NodeDeleting, Deleting.
    storage_type string
    Storage type of the instance. Valid values: customLocalSsd, cloudAuto.
    tertiary_zone string
    Third availability zone.
    topology_type string
    Topology type of the instance. Valid values: 1azone, 3azones.
    vpc_id string
    VPC ID of the instance.
    zone_id string
    Availability zone of the instance.
    cnClass String
    Compute node specifications of the instance.
    cnNodeCount Integer
    The number of compute nodes.
    createTime String
    The creation time of the instance.
    description String
    Instance remarks.
    dnClass String
    Storage node specifications of the instance.
    dnNodeCount Integer
    The number of storage nodes.
    engineVersion String
    Engine version of the instance.
    id String
    The ID of the PolarDB-X instance.
    networkType String
    The network type of the instance.
    paymentType String
    The billing method of the instance. Valid values: Postpaid, Prepaid.
    polardbxInstanceId String
    The ID of the PolarDB-X instance. Same as id.
    primaryZone String
    Primary availability zone.
    regionId String
    Region ID of the instance.
    resourceGroupId String
    The ID of the resource group used to filter instances.
    secondaryZone String
    Secondary availability zone.
    status String
    Filter results by instance status. Valid values: Creating, Running, MinorVersionUpgrading, ClassChanging, NodeCreating, NodeDeleting, Deleting.
    storageType String
    Storage type of the instance. Valid values: customLocalSsd, cloudAuto.
    tertiaryZone String
    Third availability zone.
    topologyType String
    Topology type of the instance. Valid values: 1azone, 3azones.
    vpcId String
    VPC ID of the instance.
    zoneId String
    Availability zone of the instance.
    cnClass string
    Compute node specifications of the instance.
    cnNodeCount number
    The number of compute nodes.
    createTime string
    The creation time of the instance.
    description string
    Instance remarks.
    dnClass string
    Storage node specifications of the instance.
    dnNodeCount number
    The number of storage nodes.
    engineVersion string
    Engine version of the instance.
    id string
    The ID of the PolarDB-X instance.
    networkType string
    The network type of the instance.
    paymentType string
    The billing method of the instance. Valid values: Postpaid, Prepaid.
    polardbxInstanceId string
    The ID of the PolarDB-X instance. Same as id.
    primaryZone string
    Primary availability zone.
    regionId string
    Region ID of the instance.
    resourceGroupId string
    The ID of the resource group used to filter instances.
    secondaryZone string
    Secondary availability zone.
    status string
    Filter results by instance status. Valid values: Creating, Running, MinorVersionUpgrading, ClassChanging, NodeCreating, NodeDeleting, Deleting.
    storageType string
    Storage type of the instance. Valid values: customLocalSsd, cloudAuto.
    tertiaryZone string
    Third availability zone.
    topologyType string
    Topology type of the instance. Valid values: 1azone, 3azones.
    vpcId string
    VPC ID of the instance.
    zoneId string
    Availability zone of the instance.
    cn_class str
    Compute node specifications of the instance.
    cn_node_count int
    The number of compute nodes.
    create_time str
    The creation time of the instance.
    description str
    Instance remarks.
    dn_class str
    Storage node specifications of the instance.
    dn_node_count int
    The number of storage nodes.
    engine_version str
    Engine version of the instance.
    id str
    The ID of the PolarDB-X instance.
    network_type str
    The network type of the instance.
    payment_type str
    The billing method of the instance. Valid values: Postpaid, Prepaid.
    polardbx_instance_id str
    The ID of the PolarDB-X instance. Same as id.
    primary_zone str
    Primary availability zone.
    region_id str
    Region ID of the instance.
    resource_group_id str
    The ID of the resource group used to filter instances.
    secondary_zone str
    Secondary availability zone.
    status str
    Filter results by instance status. Valid values: Creating, Running, MinorVersionUpgrading, ClassChanging, NodeCreating, NodeDeleting, Deleting.
    storage_type str
    Storage type of the instance. Valid values: customLocalSsd, cloudAuto.
    tertiary_zone str
    Third availability zone.
    topology_type str
    Topology type of the instance. Valid values: 1azone, 3azones.
    vpc_id str
    VPC ID of the instance.
    zone_id str
    Availability zone of the instance.
    cnClass String
    Compute node specifications of the instance.
    cnNodeCount Number
    The number of compute nodes.
    createTime String
    The creation time of the instance.
    description String
    Instance remarks.
    dnClass String
    Storage node specifications of the instance.
    dnNodeCount Number
    The number of storage nodes.
    engineVersion String
    Engine version of the instance.
    id String
    The ID of the PolarDB-X instance.
    networkType String
    The network type of the instance.
    paymentType String
    The billing method of the instance. Valid values: Postpaid, Prepaid.
    polardbxInstanceId String
    The ID of the PolarDB-X instance. Same as id.
    primaryZone String
    Primary availability zone.
    regionId String
    Region ID of the instance.
    resourceGroupId String
    The ID of the resource group used to filter instances.
    secondaryZone String
    Secondary availability zone.
    status String
    Filter results by instance status. Valid values: Creating, Running, MinorVersionUpgrading, ClassChanging, NodeCreating, NodeDeleting, Deleting.
    storageType String
    Storage type of the instance. Valid values: customLocalSsd, cloudAuto.
    tertiaryZone String
    Third availability zone.
    topologyType String
    Topology type of the instance. Valid values: 1azone, 3azones.
    vpcId String
    VPC ID of the instance.
    zoneId String
    Availability zone 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
    Viewing docs for Alibaba Cloud v3.105.0
    published on Thursday, Jul 16, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial