1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. edas
  5. getClusters
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.edas.getClusters

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides a list of EDAS clusters in an Alibaba Cloud account according to the specified filters.

    NOTE: Available in 1.82.0+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const clusters = alicloud.edas.getClusters({
        logicalRegionId: "cn-shenzhen:xxx",
        ids: ["addfs-dfsasd"],
        outputFile: "clusters.txt",
    });
    export const firstClusterName = clustersAlicloudAlikafkaConsumerGroups.clusters[0].clusterName;
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    clusters = alicloud.edas.get_clusters(logical_region_id="cn-shenzhen:xxx",
        ids=["addfs-dfsasd"],
        output_file="clusters.txt")
    pulumi.export("firstClusterName", clusters_alicloud_alikafka_consumer_groups["clusters"][0]["clusterName"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/edas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := edas.GetClusters(ctx, &edas.GetClustersArgs{
    			LogicalRegionId: "cn-shenzhen:xxx",
    			Ids: []string{
    				"addfs-dfsasd",
    			},
    			OutputFile: pulumi.StringRef("clusters.txt"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstClusterName", clustersAlicloudAlikafkaConsumerGroups.Clusters[0].ClusterName)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var clusters = AliCloud.Edas.GetClusters.Invoke(new()
        {
            LogicalRegionId = "cn-shenzhen:xxx",
            Ids = new[]
            {
                "addfs-dfsasd",
            },
            OutputFile = "clusters.txt",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstClusterName"] = clustersAlicloudAlikafkaConsumerGroups.Clusters[0].ClusterName,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.edas.EdasFunctions;
    import com.pulumi.alicloud.edas.inputs.GetClustersArgs;
    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 clusters = EdasFunctions.getClusters(GetClustersArgs.builder()
                .logicalRegionId("cn-shenzhen:xxx")
                .ids("addfs-dfsasd")
                .outputFile("clusters.txt")
                .build());
    
            ctx.export("firstClusterName", clustersAlicloudAlikafkaConsumerGroups.clusters()[0].clusterName());
        }
    }
    
    variables:
      clusters:
        fn::invoke:
          Function: alicloud:edas:getClusters
          Arguments:
            logicalRegionId: cn-shenzhen:xxx
            ids:
              - addfs-dfsasd
            outputFile: clusters.txt
    outputs:
      firstClusterName: ${clustersAlicloudAlikafkaConsumerGroups.clusters[0].clusterName}
    

    Using getClusters

    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 getClusters(args: GetClustersArgs, opts?: InvokeOptions): Promise<GetClustersResult>
    function getClustersOutput(args: GetClustersOutputArgs, opts?: InvokeOptions): Output<GetClustersResult>
    def get_clusters(ids: Optional[Sequence[str]] = None,
                     logical_region_id: Optional[str] = None,
                     name_regex: Optional[str] = None,
                     output_file: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetClustersResult
    def get_clusters_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                     logical_region_id: Optional[pulumi.Input[str]] = None,
                     name_regex: Optional[pulumi.Input[str]] = None,
                     output_file: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetClustersResult]
    func GetClusters(ctx *Context, args *GetClustersArgs, opts ...InvokeOption) (*GetClustersResult, error)
    func GetClustersOutput(ctx *Context, args *GetClustersOutputArgs, opts ...InvokeOption) GetClustersResultOutput

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

    public static class GetClusters 
    {
        public static Task<GetClustersResult> InvokeAsync(GetClustersArgs args, InvokeOptions? opts = null)
        public static Output<GetClustersResult> Invoke(GetClustersInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetClustersResult> getClusters(GetClustersArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:edas/getClusters:getClusters
      arguments:
        # arguments dictionary

    The following arguments are supported:

    LogicalRegionId string
    ID of the namespace in EDAS.
    Ids List<string>
    An ids string to filter results by the cluster id.
    NameRegex string
    A regex string to filter results by the cluster name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    LogicalRegionId string
    ID of the namespace in EDAS.
    Ids []string
    An ids string to filter results by the cluster id.
    NameRegex string
    A regex string to filter results by the cluster name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    logicalRegionId String
    ID of the namespace in EDAS.
    ids List<String>
    An ids string to filter results by the cluster id.
    nameRegex String
    A regex string to filter results by the cluster name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    logicalRegionId string
    ID of the namespace in EDAS.
    ids string[]
    An ids string to filter results by the cluster id.
    nameRegex string
    A regex string to filter results by the cluster name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    logical_region_id str
    ID of the namespace in EDAS.
    ids Sequence[str]
    An ids string to filter results by the cluster id.
    name_regex str
    A regex string to filter results by the cluster name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    logicalRegionId String
    ID of the namespace in EDAS.
    ids List<String>
    An ids string to filter results by the cluster id.
    nameRegex String
    A regex string to filter results by the cluster name.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getClusters Result

    The following output properties are available:

    Clusters List<Pulumi.AliCloud.Edas.Outputs.GetClustersCluster>
    A list of clusters.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of cluster IDs.
    LogicalRegionId string
    Names List<string>
    A list of cluster names.
    NameRegex string
    OutputFile string
    Clusters []GetClustersCluster
    A list of clusters.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of cluster IDs.
    LogicalRegionId string
    Names []string
    A list of cluster names.
    NameRegex string
    OutputFile string
    clusters List<GetClustersCluster>
    A list of clusters.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of cluster IDs.
    logicalRegionId String
    names List<String>
    A list of cluster names.
    nameRegex String
    outputFile String
    clusters GetClustersCluster[]
    A list of clusters.
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of cluster IDs.
    logicalRegionId string
    names string[]
    A list of cluster names.
    nameRegex string
    outputFile string
    clusters Sequence[GetClustersCluster]
    A list of clusters.
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of cluster IDs.
    logical_region_id str
    names Sequence[str]
    A list of cluster names.
    name_regex str
    output_file str
    clusters List<Property Map>
    A list of clusters.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of cluster IDs.
    logicalRegionId String
    names List<String>
    A list of cluster names.
    nameRegex String
    outputFile String

    Supporting Types

    GetClustersCluster

    ClusterId string
    The ID of the cluster that you want to create the application.
    ClusterName string
    The name of the cluster.
    ClusterType int
    The type of the cluster, Valid values: 1: Swarm cluster. 2: ECS cluster. 3: Kubernetes cluster.
    Cpu int
    The total number of CPUs in the cluster.
    CpuUsed int
    The number of used CPUs in the cluster.
    CreateTime int
    Cluster's creation time.
    Mem int
    The total amount of memory in the cluser. Unit: MB.
    MemUsed int
    The amount of used memory in the cluser. Unit: MB.
    NetworkMode int
    The network type of the cluster. Valid values: 1: classic network. 2: VPC.
    NodeNum int
    The number of the Elastic Compute Service (ECS) instances that are deployed to the cluster.
    RegionId string
    The ID of the namespace the application belongs to.
    UpdateTime int
    The time when the cluster was last updated.
    VpcId string
    The ID of the Virtual Private Cloud (VPC) for the cluster.
    ClusterId string
    The ID of the cluster that you want to create the application.
    ClusterName string
    The name of the cluster.
    ClusterType int
    The type of the cluster, Valid values: 1: Swarm cluster. 2: ECS cluster. 3: Kubernetes cluster.
    Cpu int
    The total number of CPUs in the cluster.
    CpuUsed int
    The number of used CPUs in the cluster.
    CreateTime int
    Cluster's creation time.
    Mem int
    The total amount of memory in the cluser. Unit: MB.
    MemUsed int
    The amount of used memory in the cluser. Unit: MB.
    NetworkMode int
    The network type of the cluster. Valid values: 1: classic network. 2: VPC.
    NodeNum int
    The number of the Elastic Compute Service (ECS) instances that are deployed to the cluster.
    RegionId string
    The ID of the namespace the application belongs to.
    UpdateTime int
    The time when the cluster was last updated.
    VpcId string
    The ID of the Virtual Private Cloud (VPC) for the cluster.
    clusterId String
    The ID of the cluster that you want to create the application.
    clusterName String
    The name of the cluster.
    clusterType Integer
    The type of the cluster, Valid values: 1: Swarm cluster. 2: ECS cluster. 3: Kubernetes cluster.
    cpu Integer
    The total number of CPUs in the cluster.
    cpuUsed Integer
    The number of used CPUs in the cluster.
    createTime Integer
    Cluster's creation time.
    mem Integer
    The total amount of memory in the cluser. Unit: MB.
    memUsed Integer
    The amount of used memory in the cluser. Unit: MB.
    networkMode Integer
    The network type of the cluster. Valid values: 1: classic network. 2: VPC.
    nodeNum Integer
    The number of the Elastic Compute Service (ECS) instances that are deployed to the cluster.
    regionId String
    The ID of the namespace the application belongs to.
    updateTime Integer
    The time when the cluster was last updated.
    vpcId String
    The ID of the Virtual Private Cloud (VPC) for the cluster.
    clusterId string
    The ID of the cluster that you want to create the application.
    clusterName string
    The name of the cluster.
    clusterType number
    The type of the cluster, Valid values: 1: Swarm cluster. 2: ECS cluster. 3: Kubernetes cluster.
    cpu number
    The total number of CPUs in the cluster.
    cpuUsed number
    The number of used CPUs in the cluster.
    createTime number
    Cluster's creation time.
    mem number
    The total amount of memory in the cluser. Unit: MB.
    memUsed number
    The amount of used memory in the cluser. Unit: MB.
    networkMode number
    The network type of the cluster. Valid values: 1: classic network. 2: VPC.
    nodeNum number
    The number of the Elastic Compute Service (ECS) instances that are deployed to the cluster.
    regionId string
    The ID of the namespace the application belongs to.
    updateTime number
    The time when the cluster was last updated.
    vpcId string
    The ID of the Virtual Private Cloud (VPC) for the cluster.
    cluster_id str
    The ID of the cluster that you want to create the application.
    cluster_name str
    The name of the cluster.
    cluster_type int
    The type of the cluster, Valid values: 1: Swarm cluster. 2: ECS cluster. 3: Kubernetes cluster.
    cpu int
    The total number of CPUs in the cluster.
    cpu_used int
    The number of used CPUs in the cluster.
    create_time int
    Cluster's creation time.
    mem int
    The total amount of memory in the cluser. Unit: MB.
    mem_used int
    The amount of used memory in the cluser. Unit: MB.
    network_mode int
    The network type of the cluster. Valid values: 1: classic network. 2: VPC.
    node_num int
    The number of the Elastic Compute Service (ECS) instances that are deployed to the cluster.
    region_id str
    The ID of the namespace the application belongs to.
    update_time int
    The time when the cluster was last updated.
    vpc_id str
    The ID of the Virtual Private Cloud (VPC) for the cluster.
    clusterId String
    The ID of the cluster that you want to create the application.
    clusterName String
    The name of the cluster.
    clusterType Number
    The type of the cluster, Valid values: 1: Swarm cluster. 2: ECS cluster. 3: Kubernetes cluster.
    cpu Number
    The total number of CPUs in the cluster.
    cpuUsed Number
    The number of used CPUs in the cluster.
    createTime Number
    Cluster's creation time.
    mem Number
    The total amount of memory in the cluser. Unit: MB.
    memUsed Number
    The amount of used memory in the cluser. Unit: MB.
    networkMode Number
    The network type of the cluster. Valid values: 1: classic network. 2: VPC.
    nodeNum Number
    The number of the Elastic Compute Service (ECS) instances that are deployed to the cluster.
    regionId String
    The ID of the namespace the application belongs to.
    updateTime Number
    The time when the cluster was last updated.
    vpcId String
    The ID of the Virtual Private Cloud (VPC) for the cluster.

    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.66.0 published on Friday, Nov 15, 2024 by Pulumi