Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.edas.getClusters
Explore with Pulumi AI
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:
- Logical
Region stringId - ID of the namespace in EDAS.
- Ids List<string>
- An ids string to filter results by the cluster id.
- Name
Regex string - A regex string to filter results by the cluster name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Logical
Region stringId - ID of the namespace in EDAS.
- Ids []string
- An ids string to filter results by the cluster id.
- Name
Regex string - A regex string to filter results by the cluster name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- logical
Region StringId - ID of the namespace in EDAS.
- ids List<String>
- An ids string to filter results by the cluster id.
- name
Regex String - A regex string to filter results by the cluster name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- logical
Region stringId - ID of the namespace in EDAS.
- ids string[]
- An ids string to filter results by the cluster id.
- name
Regex string - A regex string to filter results by the cluster name.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- logical_
region_ strid - 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
).
- logical
Region StringId - ID of the namespace in EDAS.
- ids List<String>
- An ids string to filter results by the cluster id.
- name
Regex String - A regex string to filter results by the cluster name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getClusters Result
The following output properties are available:
- Clusters
List<Pulumi.
Ali Cloud. Edas. Outputs. Get Clusters Cluster> - A list of clusters.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of cluster IDs.
- Logical
Region stringId - Names List<string>
- A list of cluster names.
- Name
Regex string - Output
File string
- Clusters
[]Get
Clusters Cluster - A list of clusters.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of cluster IDs.
- Logical
Region stringId - Names []string
- A list of cluster names.
- Name
Regex string - Output
File string
- clusters
List<Get
Clusters Cluster> - A list of clusters.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of cluster IDs.
- logical
Region StringId - names List<String>
- A list of cluster names.
- name
Regex String - output
File String
- clusters
Get
Clusters Cluster[] - A list of clusters.
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of cluster IDs.
- logical
Region stringId - names string[]
- A list of cluster names.
- name
Regex string - output
File string
- clusters
Sequence[Get
Clusters Cluster] - 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_ strid - 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.
- logical
Region StringId - names List<String>
- A list of cluster names.
- name
Regex String - output
File String
Supporting Types
GetClustersCluster
- Cluster
Id string - The ID of the cluster that you want to create the application.
- Cluster
Name string - 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 string - The ID of the namespace the application belongs to.
- Update
Time int - The time when the cluster was last updated.
- Vpc
Id string - The ID of the Virtual Private Cloud (VPC) for the cluster.
- Cluster
Id string - The ID of the cluster that you want to create the application.
- Cluster
Name string - 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 string - The ID of the namespace the application belongs to.
- Update
Time int - The time when the cluster was last updated.
- Vpc
Id string - The ID of the Virtual Private Cloud (VPC) for the cluster.
- cluster
Id String - The ID of the cluster that you want to create the application.
- cluster
Name String - The name of the cluster.
- cluster
Type 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.
- cpu
Used Integer - The number of used CPUs in the cluster.
- create
Time Integer - Cluster's creation time.
- mem Integer
- The total amount of memory in the cluser. Unit: MB.
- mem
Used Integer - The amount of used memory in the cluser. Unit: MB.
- network
Mode Integer - The network type of the cluster. Valid values: 1: classic network. 2: VPC.
- node
Num Integer - The number of the Elastic Compute Service (ECS) instances that are deployed to the cluster.
- region
Id String - The ID of the namespace the application belongs to.
- update
Time Integer - The time when the cluster was last updated.
- vpc
Id String - The ID of the Virtual Private Cloud (VPC) for the cluster.
- cluster
Id string - The ID of the cluster that you want to create the application.
- cluster
Name string - The name of the cluster.
- cluster
Type 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.
- cpu
Used number - The number of used CPUs in the cluster.
- create
Time number - Cluster's creation time.
- mem number
- The total amount of memory in the cluser. Unit: MB.
- mem
Used number - The amount of used memory in the cluser. Unit: MB.
- network
Mode number - The network type of the cluster. Valid values: 1: classic network. 2: VPC.
- node
Num number - The number of the Elastic Compute Service (ECS) instances that are deployed to the cluster.
- region
Id string - The ID of the namespace the application belongs to.
- update
Time number - The time when the cluster was last updated.
- vpc
Id 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.
- cluster
Id String - The ID of the cluster that you want to create the application.
- cluster
Name String - The name of the cluster.
- cluster
Type 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.
- cpu
Used Number - The number of used CPUs in the cluster.
- create
Time Number - Cluster's creation time.
- mem Number
- The total amount of memory in the cluser. Unit: MB.
- mem
Used Number - The amount of used memory in the cluser. Unit: MB.
- network
Mode Number - The network type of the cluster. Valid values: 1: classic network. 2: VPC.
- node
Num Number - The number of the Elastic Compute Service (ECS) instances that are deployed to the cluster.
- region
Id String - The ID of the namespace the application belongs to.
- update
Time Number - The time when the cluster was last updated.
- vpc
Id 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.