1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. mse
  5. getClusters
Alibaba Cloud v3.44.0 published on Thursday, Sep 28, 2023 by Pulumi

alicloud.mse.getClusters

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.44.0 published on Thursday, Sep 28, 2023 by Pulumi

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

    NOTE: Available in v1.94.0+.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = AliCloud.Mse.GetClusters.Invoke(new()
        {
            Ids = new[]
            {
                "mse-cn-0d9xxxx",
            },
            Status = "INIT_SUCCESS",
        });
    
        return new Dictionary<string, object?>
        {
            ["clusterId"] = example.Apply(getClustersResult => getClustersResult.Clusters[0]?.Id),
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/mse"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := mse.GetClusters(ctx, &mse.GetClustersArgs{
    			Ids: []string{
    				"mse-cn-0d9xxxx",
    			},
    			Status: pulumi.StringRef("INIT_SUCCESS"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("clusterId", example.Clusters[0].Id)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.mse.MseFunctions;
    import com.pulumi.alicloud.mse.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 example = MseFunctions.getClusters(GetClustersArgs.builder()
                .ids("mse-cn-0d9xxxx")
                .status("INIT_SUCCESS")
                .build());
    
            ctx.export("clusterId", example.applyValue(getClustersResult -> getClustersResult.clusters()[0].id()));
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.mse.get_clusters(ids=["mse-cn-0d9xxxx"],
        status="INIT_SUCCESS")
    pulumi.export("clusterId", example.clusters[0].id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = alicloud.mse.getClusters({
        ids: ["mse-cn-0d9xxxx"],
        status: "INIT_SUCCESS",
    });
    export const clusterId = example.then(example => example.clusters?.[0]?.id);
    
    variables:
      example:
        fn::invoke:
          Function: alicloud:mse:getClusters
          Arguments:
            ids:
              - mse-cn-0d9xxxx
            status: INIT_SUCCESS
    outputs:
      clusterId: ${example.clusters[0].id}
    

    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(cluster_alias_name: Optional[str] = None,
                     enable_details: Optional[bool] = None,
                     ids: Optional[Sequence[str]] = None,
                     name_regex: Optional[str] = None,
                     output_file: Optional[str] = None,
                     request_pars: Optional[str] = None,
                     status: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetClustersResult
    def get_clusters_output(cluster_alias_name: Optional[pulumi.Input[str]] = None,
                     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,
                     request_pars: Optional[pulumi.Input[str]] = None,
                     status: 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:mse/getClusters:getClusters
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClusterAliasName string

    The alias name of MSE Cluster.

    EnableDetails bool
    Ids List<string>

    A list of MSE Cluster ids.

    NameRegex string

    A regex string to filter the results by the cluster alias name.

    OutputFile string

    File name where to save data source results (after running pulumi preview).

    RequestPars string
    Status string

    The status of MSE Cluster. Valid: DESTROY_FAILED, DESTROY_ING, DESTROY_SUCCESS, INIT_FAILED, INIT_ING, INIT_SUCCESS, INIT_TIME_OUT, RESTART_FAILED, RESTART_ING, RESTART_SUCCESS, SCALE_FAILED, SCALE_ING, SCALE_SUCCESS

    ClusterAliasName string

    The alias name of MSE Cluster.

    EnableDetails bool
    Ids []string

    A list of MSE Cluster ids.

    NameRegex string

    A regex string to filter the results by the cluster alias name.

    OutputFile string

    File name where to save data source results (after running pulumi preview).

    RequestPars string
    Status string

    The status of MSE Cluster. Valid: DESTROY_FAILED, DESTROY_ING, DESTROY_SUCCESS, INIT_FAILED, INIT_ING, INIT_SUCCESS, INIT_TIME_OUT, RESTART_FAILED, RESTART_ING, RESTART_SUCCESS, SCALE_FAILED, SCALE_ING, SCALE_SUCCESS

    clusterAliasName String

    The alias name of MSE Cluster.

    enableDetails Boolean
    ids List<String>

    A list of MSE Cluster ids.

    nameRegex String

    A regex string to filter the results by the cluster alias name.

    outputFile String

    File name where to save data source results (after running pulumi preview).

    requestPars String
    status String

    The status of MSE Cluster. Valid: DESTROY_FAILED, DESTROY_ING, DESTROY_SUCCESS, INIT_FAILED, INIT_ING, INIT_SUCCESS, INIT_TIME_OUT, RESTART_FAILED, RESTART_ING, RESTART_SUCCESS, SCALE_FAILED, SCALE_ING, SCALE_SUCCESS

    clusterAliasName string

    The alias name of MSE Cluster.

    enableDetails boolean
    ids string[]

    A list of MSE Cluster ids.

    nameRegex string

    A regex string to filter the results by the cluster alias name.

    outputFile string

    File name where to save data source results (after running pulumi preview).

    requestPars string
    status string

    The status of MSE Cluster. Valid: DESTROY_FAILED, DESTROY_ING, DESTROY_SUCCESS, INIT_FAILED, INIT_ING, INIT_SUCCESS, INIT_TIME_OUT, RESTART_FAILED, RESTART_ING, RESTART_SUCCESS, SCALE_FAILED, SCALE_ING, SCALE_SUCCESS

    cluster_alias_name str

    The alias name of MSE Cluster.

    enable_details bool
    ids Sequence[str]

    A list of MSE Cluster ids.

    name_regex str

    A regex string to filter the results by the cluster alias name.

    output_file str

    File name where to save data source results (after running pulumi preview).

    request_pars str
    status str

    The status of MSE Cluster. Valid: DESTROY_FAILED, DESTROY_ING, DESTROY_SUCCESS, INIT_FAILED, INIT_ING, INIT_SUCCESS, INIT_TIME_OUT, RESTART_FAILED, RESTART_ING, RESTART_SUCCESS, SCALE_FAILED, SCALE_ING, SCALE_SUCCESS

    clusterAliasName String

    The alias name of MSE Cluster.

    enableDetails Boolean
    ids List<String>

    A list of MSE Cluster ids.

    nameRegex String

    A regex string to filter the results by the cluster alias name.

    outputFile String

    File name where to save data source results (after running pulumi preview).

    requestPars String
    status String

    The status of MSE Cluster. Valid: DESTROY_FAILED, DESTROY_ING, DESTROY_SUCCESS, INIT_FAILED, INIT_ING, INIT_SUCCESS, INIT_TIME_OUT, RESTART_FAILED, RESTART_ING, RESTART_SUCCESS, SCALE_FAILED, SCALE_ING, SCALE_SUCCESS

    getClusters Result

    The following output properties are available:

    Clusters List<Pulumi.AliCloud.Mse.Outputs.GetClustersCluster>

    A list of MSE Clusters. Each element contains the following attributes:

    Id string

    The provider-assigned unique ID for this managed resource.

    Ids List<string>

    A list of MSE Cluster ids.

    Names List<string>

    A list of MSE Cluster names.

    ClusterAliasName string
    EnableDetails bool
    NameRegex string
    OutputFile string
    RequestPars string
    Status string

    The status of MSE Cluster.

    Clusters []GetClustersCluster

    A list of MSE Clusters. Each element contains the following attributes:

    Id string

    The provider-assigned unique ID for this managed resource.

    Ids []string

    A list of MSE Cluster ids.

    Names []string

    A list of MSE Cluster names.

    ClusterAliasName string
    EnableDetails bool
    NameRegex string
    OutputFile string
    RequestPars string
    Status string

    The status of MSE Cluster.

    clusters List<GetClustersCluster>

    A list of MSE Clusters. Each element contains the following attributes:

    id String

    The provider-assigned unique ID for this managed resource.

    ids List<String>

    A list of MSE Cluster ids.

    names List<String>

    A list of MSE Cluster names.

    clusterAliasName String
    enableDetails Boolean
    nameRegex String
    outputFile String
    requestPars String
    status String

    The status of MSE Cluster.

    clusters GetClustersCluster[]

    A list of MSE Clusters. Each element contains the following attributes:

    id string

    The provider-assigned unique ID for this managed resource.

    ids string[]

    A list of MSE Cluster ids.

    names string[]

    A list of MSE Cluster names.

    clusterAliasName string
    enableDetails boolean
    nameRegex string
    outputFile string
    requestPars string
    status string

    The status of MSE Cluster.

    clusters Sequence[GetClustersCluster]

    A list of MSE Clusters. Each element contains the following attributes:

    id str

    The provider-assigned unique ID for this managed resource.

    ids Sequence[str]

    A list of MSE Cluster ids.

    names Sequence[str]

    A list of MSE Cluster names.

    cluster_alias_name str
    enable_details bool
    name_regex str
    output_file str
    request_pars str
    status str

    The status of MSE Cluster.

    clusters List<Property Map>

    A list of MSE Clusters. Each element contains the following attributes:

    id String

    The provider-assigned unique ID for this managed resource.

    ids List<String>

    A list of MSE Cluster ids.

    names List<String>

    A list of MSE Cluster names.

    clusterAliasName String
    enableDetails Boolean
    nameRegex String
    outputFile String
    requestPars String
    status String

    The status of MSE Cluster.

    Supporting Types

    GetClustersCluster

    AclId string

    The id of acl.

    AppVersion string

    The version of app.

    ClusterId string

    ID of the MSE Cluster.

    ClusterName string

    ID of the OOS Executions.

    ClusterType string

    The type of MSE Cluster.

    Cpu int

    The num of cpu.

    HealthStatus string

    The health status of MSE Cluster.

    Id string

    ID of the MSE Cluster.

    InitCostTime int

    Time-consuming to create.

    InstanceCount int

    The count of instance.

    InstanceId string

    ID of the MSE Cluster.

    InstanceModels List<Pulumi.AliCloud.Mse.Inputs.GetClustersClusterInstanceModel>

    The list of instances.

    InternetAddress string

    The address of public network.

    InternetDomain string

    The domain of public network.

    InternetPort string

    The port of public network.

    IntranetAddress string

    The address of private network.

    IntranetDomain string

    The domain of private network.

    IntranetPort string

    The port of private network.

    MemoryCapacity int

    The memory size.

    PayInfo string

    The type of payment.

    PubNetworkFlow string

    The public network bandwidth.

    Status string

    The status of MSE Cluster. Valid: DESTROY_FAILED, DESTROY_ING, DESTROY_SUCCESS, INIT_FAILED, INIT_ING, INIT_SUCCESS, INIT_TIME_OUT, RESTART_FAILED, RESTART_ING, RESTART_SUCCESS, SCALE_FAILED, SCALE_ING, SCALE_SUCCESS

    AclId string

    The id of acl.

    AppVersion string

    The version of app.

    ClusterId string

    ID of the MSE Cluster.

    ClusterName string

    ID of the OOS Executions.

    ClusterType string

    The type of MSE Cluster.

    Cpu int

    The num of cpu.

    HealthStatus string

    The health status of MSE Cluster.

    Id string

    ID of the MSE Cluster.

    InitCostTime int

    Time-consuming to create.

    InstanceCount int

    The count of instance.

    InstanceId string

    ID of the MSE Cluster.

    InstanceModels []GetClustersClusterInstanceModel

    The list of instances.

    InternetAddress string

    The address of public network.

    InternetDomain string

    The domain of public network.

    InternetPort string

    The port of public network.

    IntranetAddress string

    The address of private network.

    IntranetDomain string

    The domain of private network.

    IntranetPort string

    The port of private network.

    MemoryCapacity int

    The memory size.

    PayInfo string

    The type of payment.

    PubNetworkFlow string

    The public network bandwidth.

    Status string

    The status of MSE Cluster. Valid: DESTROY_FAILED, DESTROY_ING, DESTROY_SUCCESS, INIT_FAILED, INIT_ING, INIT_SUCCESS, INIT_TIME_OUT, RESTART_FAILED, RESTART_ING, RESTART_SUCCESS, SCALE_FAILED, SCALE_ING, SCALE_SUCCESS

    aclId String

    The id of acl.

    appVersion String

    The version of app.

    clusterId String

    ID of the MSE Cluster.

    clusterName String

    ID of the OOS Executions.

    clusterType String

    The type of MSE Cluster.

    cpu Integer

    The num of cpu.

    healthStatus String

    The health status of MSE Cluster.

    id String

    ID of the MSE Cluster.

    initCostTime Integer

    Time-consuming to create.

    instanceCount Integer

    The count of instance.

    instanceId String

    ID of the MSE Cluster.

    instanceModels List<GetClustersClusterInstanceModel>

    The list of instances.

    internetAddress String

    The address of public network.

    internetDomain String

    The domain of public network.

    internetPort String

    The port of public network.

    intranetAddress String

    The address of private network.

    intranetDomain String

    The domain of private network.

    intranetPort String

    The port of private network.

    memoryCapacity Integer

    The memory size.

    payInfo String

    The type of payment.

    pubNetworkFlow String

    The public network bandwidth.

    status String

    The status of MSE Cluster. Valid: DESTROY_FAILED, DESTROY_ING, DESTROY_SUCCESS, INIT_FAILED, INIT_ING, INIT_SUCCESS, INIT_TIME_OUT, RESTART_FAILED, RESTART_ING, RESTART_SUCCESS, SCALE_FAILED, SCALE_ING, SCALE_SUCCESS

    aclId string

    The id of acl.

    appVersion string

    The version of app.

    clusterId string

    ID of the MSE Cluster.

    clusterName string

    ID of the OOS Executions.

    clusterType string

    The type of MSE Cluster.

    cpu number

    The num of cpu.

    healthStatus string

    The health status of MSE Cluster.

    id string

    ID of the MSE Cluster.

    initCostTime number

    Time-consuming to create.

    instanceCount number

    The count of instance.

    instanceId string

    ID of the MSE Cluster.

    instanceModels GetClustersClusterInstanceModel[]

    The list of instances.

    internetAddress string

    The address of public network.

    internetDomain string

    The domain of public network.

    internetPort string

    The port of public network.

    intranetAddress string

    The address of private network.

    intranetDomain string

    The domain of private network.

    intranetPort string

    The port of private network.

    memoryCapacity number

    The memory size.

    payInfo string

    The type of payment.

    pubNetworkFlow string

    The public network bandwidth.

    status string

    The status of MSE Cluster. Valid: DESTROY_FAILED, DESTROY_ING, DESTROY_SUCCESS, INIT_FAILED, INIT_ING, INIT_SUCCESS, INIT_TIME_OUT, RESTART_FAILED, RESTART_ING, RESTART_SUCCESS, SCALE_FAILED, SCALE_ING, SCALE_SUCCESS

    acl_id str

    The id of acl.

    app_version str

    The version of app.

    cluster_id str

    ID of the MSE Cluster.

    cluster_name str

    ID of the OOS Executions.

    cluster_type str

    The type of MSE Cluster.

    cpu int

    The num of cpu.

    health_status str

    The health status of MSE Cluster.

    id str

    ID of the MSE Cluster.

    init_cost_time int

    Time-consuming to create.

    instance_count int

    The count of instance.

    instance_id str

    ID of the MSE Cluster.

    instance_models Sequence[GetClustersClusterInstanceModel]

    The list of instances.

    internet_address str

    The address of public network.

    internet_domain str

    The domain of public network.

    internet_port str

    The port of public network.

    intranet_address str

    The address of private network.

    intranet_domain str

    The domain of private network.

    intranet_port str

    The port of private network.

    memory_capacity int

    The memory size.

    pay_info str

    The type of payment.

    pub_network_flow str

    The public network bandwidth.

    status str

    The status of MSE Cluster. Valid: DESTROY_FAILED, DESTROY_ING, DESTROY_SUCCESS, INIT_FAILED, INIT_ING, INIT_SUCCESS, INIT_TIME_OUT, RESTART_FAILED, RESTART_ING, RESTART_SUCCESS, SCALE_FAILED, SCALE_ING, SCALE_SUCCESS

    aclId String

    The id of acl.

    appVersion String

    The version of app.

    clusterId String

    ID of the MSE Cluster.

    clusterName String

    ID of the OOS Executions.

    clusterType String

    The type of MSE Cluster.

    cpu Number

    The num of cpu.

    healthStatus String

    The health status of MSE Cluster.

    id String

    ID of the MSE Cluster.

    initCostTime Number

    Time-consuming to create.

    instanceCount Number

    The count of instance.

    instanceId String

    ID of the MSE Cluster.

    instanceModels List<Property Map>

    The list of instances.

    internetAddress String

    The address of public network.

    internetDomain String

    The domain of public network.

    internetPort String

    The port of public network.

    intranetAddress String

    The address of private network.

    intranetDomain String

    The domain of private network.

    intranetPort String

    The port of private network.

    memoryCapacity Number

    The memory size.

    payInfo String

    The type of payment.

    pubNetworkFlow String

    The public network bandwidth.

    status String

    The status of MSE Cluster. Valid: DESTROY_FAILED, DESTROY_ING, DESTROY_SUCCESS, INIT_FAILED, INIT_ING, INIT_SUCCESS, INIT_TIME_OUT, RESTART_FAILED, RESTART_ING, RESTART_SUCCESS, SCALE_FAILED, SCALE_ING, SCALE_SUCCESS

    GetClustersClusterInstanceModel

    HealthStatus string

    The health status of MSE Cluster.

    InstanceType string
    InternetIp string
    Ip string
    PodName string
    Role string
    SingleTunnelVip string
    Vip string
    HealthStatus string

    The health status of MSE Cluster.

    InstanceType string
    InternetIp string
    Ip string
    PodName string
    Role string
    SingleTunnelVip string
    Vip string
    healthStatus String

    The health status of MSE Cluster.

    instanceType String
    internetIp String
    ip String
    podName String
    role String
    singleTunnelVip String
    vip String
    healthStatus string

    The health status of MSE Cluster.

    instanceType string
    internetIp string
    ip string
    podName string
    role string
    singleTunnelVip string
    vip string
    health_status str

    The health status of MSE Cluster.

    instance_type str
    internet_ip str
    ip str
    pod_name str
    role str
    single_tunnel_vip str
    vip str
    healthStatus String

    The health status of MSE Cluster.

    instanceType String
    internetIp String
    ip String
    podName String
    role String
    singleTunnelVip String
    vip String

    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.44.0 published on Thursday, Sep 28, 2023 by Pulumi