1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cs
  5. getEdgeKubernetesClusters
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.cs.getEdgeKubernetesClusters

Explore with Pulumi AI

This data source provides a list Container Service Edge Kubernetes Clusters on Alibaba Cloud.

NOTE: Available since v1.103.0.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

// Declare the data source
const k8sClusters = alicloud.cs.getEdgeKubernetesClusters({
    nameRegex: "my-first-k8s",
    outputFile: "my-first-k8s-json",
});
export const output = k8sClusters.then(k8sClusters => k8sClusters.clusters);
Copy
import pulumi
import pulumi_alicloud as alicloud

# Declare the data source
k8s_clusters = alicloud.cs.get_edge_kubernetes_clusters(name_regex="my-first-k8s",
    output_file="my-first-k8s-json")
pulumi.export("output", k8s_clusters.clusters)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Declare the data source
		k8sClusters, err := cs.GetEdgeKubernetesClusters(ctx, &cs.GetEdgeKubernetesClustersArgs{
			NameRegex:  pulumi.StringRef("my-first-k8s"),
			OutputFile: pulumi.StringRef("my-first-k8s-json"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("output", k8sClusters.Clusters)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    // Declare the data source
    var k8sClusters = AliCloud.CS.GetEdgeKubernetesClusters.Invoke(new()
    {
        NameRegex = "my-first-k8s",
        OutputFile = "my-first-k8s-json",
    });

    return new Dictionary<string, object?>
    {
        ["output"] = k8sClusters.Apply(getEdgeKubernetesClustersResult => getEdgeKubernetesClustersResult.Clusters),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cs.CsFunctions;
import com.pulumi.alicloud.cs.inputs.GetEdgeKubernetesClustersArgs;
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) {
        // Declare the data source
        final var k8sClusters = CsFunctions.getEdgeKubernetesClusters(GetEdgeKubernetesClustersArgs.builder()
            .nameRegex("my-first-k8s")
            .outputFile("my-first-k8s-json")
            .build());

        ctx.export("output", k8sClusters.applyValue(getEdgeKubernetesClustersResult -> getEdgeKubernetesClustersResult.clusters()));
    }
}
Copy
variables:
  # Declare the data source
  k8sClusters:
    fn::invoke:
      function: alicloud:cs:getEdgeKubernetesClusters
      arguments:
        nameRegex: my-first-k8s
        outputFile: my-first-k8s-json
outputs:
  output: ${k8sClusters.clusters}
Copy

Using getEdgeKubernetesClusters

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 getEdgeKubernetesClusters(args: GetEdgeKubernetesClustersArgs, opts?: InvokeOptions): Promise<GetEdgeKubernetesClustersResult>
function getEdgeKubernetesClustersOutput(args: GetEdgeKubernetesClustersOutputArgs, opts?: InvokeOptions): Output<GetEdgeKubernetesClustersResult>
Copy
def get_edge_kubernetes_clusters(enable_details: Optional[bool] = None,
                                 ids: Optional[Sequence[str]] = None,
                                 name_regex: Optional[str] = None,
                                 output_file: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetEdgeKubernetesClustersResult
def get_edge_kubernetes_clusters_output(enable_details: Optional[pulumi.Input[bool]] = None,
                                 ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                 name_regex: Optional[pulumi.Input[str]] = None,
                                 output_file: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetEdgeKubernetesClustersResult]
Copy
func GetEdgeKubernetesClusters(ctx *Context, args *GetEdgeKubernetesClustersArgs, opts ...InvokeOption) (*GetEdgeKubernetesClustersResult, error)
func GetEdgeKubernetesClustersOutput(ctx *Context, args *GetEdgeKubernetesClustersOutputArgs, opts ...InvokeOption) GetEdgeKubernetesClustersResultOutput
Copy

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

public static class GetEdgeKubernetesClusters 
{
    public static Task<GetEdgeKubernetesClustersResult> InvokeAsync(GetEdgeKubernetesClustersArgs args, InvokeOptions? opts = null)
    public static Output<GetEdgeKubernetesClustersResult> Invoke(GetEdgeKubernetesClustersInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetEdgeKubernetesClustersResult> getEdgeKubernetesClusters(GetEdgeKubernetesClustersArgs args, InvokeOptions options)
public static Output<GetEdgeKubernetesClustersResult> getEdgeKubernetesClusters(GetEdgeKubernetesClustersArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:cs/getEdgeKubernetesClusters:getEdgeKubernetesClusters
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

EnableDetails Changes to this property will trigger replacement. bool
Boolean, false by default, only id and name are exported. Set to true if more details are needed, e.g., master_disk_category, slb_internet_enabled, connections. See full list in attributes.
Ids Changes to this property will trigger replacement. List<string>
Cluster IDs to filter.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by cluster name.
OutputFile string
File name where to save data source results (after running pulumi preview).
EnableDetails Changes to this property will trigger replacement. bool
Boolean, false by default, only id and name are exported. Set to true if more details are needed, e.g., master_disk_category, slb_internet_enabled, connections. See full list in attributes.
Ids Changes to this property will trigger replacement. []string
Cluster IDs to filter.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by cluster name.
OutputFile string
File name where to save data source results (after running pulumi preview).
enableDetails Changes to this property will trigger replacement. Boolean
Boolean, false by default, only id and name are exported. Set to true if more details are needed, e.g., master_disk_category, slb_internet_enabled, connections. See full list in attributes.
ids Changes to this property will trigger replacement. List<String>
Cluster IDs to filter.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by cluster name.
outputFile String
File name where to save data source results (after running pulumi preview).
enableDetails Changes to this property will trigger replacement. boolean
Boolean, false by default, only id and name are exported. Set to true if more details are needed, e.g., master_disk_category, slb_internet_enabled, connections. See full list in attributes.
ids Changes to this property will trigger replacement. string[]
Cluster IDs to filter.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by cluster name.
outputFile string
File name where to save data source results (after running pulumi preview).
enable_details Changes to this property will trigger replacement. bool
Boolean, false by default, only id and name are exported. Set to true if more details are needed, e.g., master_disk_category, slb_internet_enabled, connections. See full list in attributes.
ids Changes to this property will trigger replacement. Sequence[str]
Cluster IDs to filter.
name_regex Changes to this property will trigger replacement. str
A regex string to filter results by cluster name.
output_file str
File name where to save data source results (after running pulumi preview).
enableDetails Changes to this property will trigger replacement. Boolean
Boolean, false by default, only id and name are exported. Set to true if more details are needed, e.g., master_disk_category, slb_internet_enabled, connections. See full list in attributes.
ids Changes to this property will trigger replacement. List<String>
Cluster IDs to filter.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by cluster name.
outputFile String
File name where to save data source results (after running pulumi preview).

getEdgeKubernetesClusters Result

The following output properties are available:

Clusters List<Pulumi.AliCloud.CS.Outputs.GetEdgeKubernetesClustersCluster>
A list of matched Kubernetes clusters. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
A list of matched Kubernetes clusters' ids.
Names List<string>
A list of matched Kubernetes clusters' names.
EnableDetails bool
NameRegex string
OutputFile string
Clusters []GetEdgeKubernetesClustersCluster
A list of matched Kubernetes clusters. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
A list of matched Kubernetes clusters' ids.
Names []string
A list of matched Kubernetes clusters' names.
EnableDetails bool
NameRegex string
OutputFile string
clusters List<GetEdgeKubernetesClustersCluster>
A list of matched Kubernetes clusters. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of matched Kubernetes clusters' ids.
names List<String>
A list of matched Kubernetes clusters' names.
enableDetails Boolean
nameRegex String
outputFile String
clusters GetEdgeKubernetesClustersCluster[]
A list of matched Kubernetes clusters. Each element contains the following attributes:
id string
The provider-assigned unique ID for this managed resource.
ids string[]
A list of matched Kubernetes clusters' ids.
names string[]
A list of matched Kubernetes clusters' names.
enableDetails boolean
nameRegex string
outputFile string
clusters Sequence[GetEdgeKubernetesClustersCluster]
A list of matched Kubernetes clusters. Each element contains the following attributes:
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
A list of matched Kubernetes clusters' ids.
names Sequence[str]
A list of matched Kubernetes clusters' names.
enable_details bool
name_regex str
output_file str
clusters List<Property Map>
A list of matched Kubernetes clusters. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of matched Kubernetes clusters' ids.
names List<String>
A list of matched Kubernetes clusters' names.
enableDetails Boolean
nameRegex String
outputFile String

Supporting Types

GetEdgeKubernetesClustersCluster

AvailabilityZone This property is required. string
The ID of availability zone.
Connections This property is required. Pulumi.AliCloud.CS.Inputs.GetEdgeKubernetesClustersClusterConnections
Map of kubernetes cluster connection information. It contains several attributes to Block Connections.
Id This property is required. string
ID of the node.
Name This property is required. string
Node name.
NatGatewayId This property is required. string
The ID of nat gateway used to launch kubernetes cluster.
SecurityGroupId This property is required. string
The ID of security group where the current cluster worker node is located.
VpcId This property is required. string
The ID of VPC where the current cluster is located.
WorkerNodes This property is required. List<Pulumi.AliCloud.CS.Inputs.GetEdgeKubernetesClustersClusterWorkerNode>
List of cluster worker nodes. It contains several attributes to Block Nodes.
AvailabilityZone This property is required. string
The ID of availability zone.
Connections This property is required. GetEdgeKubernetesClustersClusterConnections
Map of kubernetes cluster connection information. It contains several attributes to Block Connections.
Id This property is required. string
ID of the node.
Name This property is required. string
Node name.
NatGatewayId This property is required. string
The ID of nat gateway used to launch kubernetes cluster.
SecurityGroupId This property is required. string
The ID of security group where the current cluster worker node is located.
VpcId This property is required. string
The ID of VPC where the current cluster is located.
WorkerNodes This property is required. []GetEdgeKubernetesClustersClusterWorkerNode
List of cluster worker nodes. It contains several attributes to Block Nodes.
availabilityZone This property is required. String
The ID of availability zone.
connections This property is required. GetEdgeKubernetesClustersClusterConnections
Map of kubernetes cluster connection information. It contains several attributes to Block Connections.
id This property is required. String
ID of the node.
name This property is required. String
Node name.
natGatewayId This property is required. String
The ID of nat gateway used to launch kubernetes cluster.
securityGroupId This property is required. String
The ID of security group where the current cluster worker node is located.
vpcId This property is required. String
The ID of VPC where the current cluster is located.
workerNodes This property is required. List<GetEdgeKubernetesClustersClusterWorkerNode>
List of cluster worker nodes. It contains several attributes to Block Nodes.
availabilityZone This property is required. string
The ID of availability zone.
connections This property is required. GetEdgeKubernetesClustersClusterConnections
Map of kubernetes cluster connection information. It contains several attributes to Block Connections.
id This property is required. string
ID of the node.
name This property is required. string
Node name.
natGatewayId This property is required. string
The ID of nat gateway used to launch kubernetes cluster.
securityGroupId This property is required. string
The ID of security group where the current cluster worker node is located.
vpcId This property is required. string
The ID of VPC where the current cluster is located.
workerNodes This property is required. GetEdgeKubernetesClustersClusterWorkerNode[]
List of cluster worker nodes. It contains several attributes to Block Nodes.
availability_zone This property is required. str
The ID of availability zone.
connections This property is required. GetEdgeKubernetesClustersClusterConnections
Map of kubernetes cluster connection information. It contains several attributes to Block Connections.
id This property is required. str
ID of the node.
name This property is required. str
Node name.
nat_gateway_id This property is required. str
The ID of nat gateway used to launch kubernetes cluster.
security_group_id This property is required. str
The ID of security group where the current cluster worker node is located.
vpc_id This property is required. str
The ID of VPC where the current cluster is located.
worker_nodes This property is required. Sequence[GetEdgeKubernetesClustersClusterWorkerNode]
List of cluster worker nodes. It contains several attributes to Block Nodes.
availabilityZone This property is required. String
The ID of availability zone.
connections This property is required. Property Map
Map of kubernetes cluster connection information. It contains several attributes to Block Connections.
id This property is required. String
ID of the node.
name This property is required. String
Node name.
natGatewayId This property is required. String
The ID of nat gateway used to launch kubernetes cluster.
securityGroupId This property is required. String
The ID of security group where the current cluster worker node is located.
vpcId This property is required. String
The ID of VPC where the current cluster is located.
workerNodes This property is required. List<Property Map>
List of cluster worker nodes. It contains several attributes to Block Nodes.

GetEdgeKubernetesClustersClusterConnections

ApiServerInternet This property is required. string
API Server Internet endpoint.
ApiServerIntranet This property is required. string
API Server Intranet endpoint.
ApiServerInternet This property is required. string
API Server Internet endpoint.
ApiServerIntranet This property is required. string
API Server Intranet endpoint.
apiServerInternet This property is required. String
API Server Internet endpoint.
apiServerIntranet This property is required. String
API Server Intranet endpoint.
apiServerInternet This property is required. string
API Server Internet endpoint.
apiServerIntranet This property is required. string
API Server Intranet endpoint.
api_server_internet This property is required. str
API Server Internet endpoint.
api_server_intranet This property is required. str
API Server Intranet endpoint.
apiServerInternet This property is required. String
API Server Internet endpoint.
apiServerIntranet This property is required. String
API Server Intranet endpoint.

GetEdgeKubernetesClustersClusterWorkerNode

Id This property is required. string
ID of the node.
Name This property is required. string
Node name.
PrivateIp This property is required. string
The private IP address of node.
Id This property is required. string
ID of the node.
Name This property is required. string
Node name.
PrivateIp This property is required. string
The private IP address of node.
id This property is required. String
ID of the node.
name This property is required. String
Node name.
privateIp This property is required. String
The private IP address of node.
id This property is required. string
ID of the node.
name This property is required. string
Node name.
privateIp This property is required. string
The private IP address of node.
id This property is required. str
ID of the node.
name This property is required. str
Node name.
private_ip This property is required. str
The private IP address of node.
id This property is required. String
ID of the node.
name This property is required. String
Node name.
privateIp This property is required. String
The private IP address of node.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.