All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::EDAS::Clusters

Last Updated:Nov 26, 2024

DATASOURCE::EDAS::Clusters is used to query clusters in Enterprise Distributed Application Service (EDAS).

Syntax

{
  "Type": "DATASOURCE::EDAS::Clusters",
  "Properties": {
    "LogicalRegionId": String,
    "ResourceGroupId": String,
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

LogicalRegionId

String

No

Yes

The namespace ID.

The following rules apply:

  • If you leave this property empty, the clusters in the default namespace are queried.

  • If you specify this property, the clusters in the specified namespace are queried.

ResourceGroupId

String

No

Yes

The ID of the resource group.

The following rules apply:

  • If you leave this property empty, the clusters in the default resource group are queried.

  • If you specify this property, the clusters in the specified resource group are queried.

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack is updated.

Valid values:

  • Never (default): does not refresh data source resources when the stack is updated.

  • Always: refreshes data source resources when the stack is updated.

Return values (Fn::GetAtt)

  • ClusterIds: the IDs of the clusters.

  • Clusters: details of the clusters.

Property

Type

Description

Constraint

ClusterIds

List

The IDs of the clusters.

None.

Clusters

List

Details of the clusters.

None.

ClusterId

String

The cluster ID.

None.

ClusterName

String

The cluster name.

None.

OversoldFactor

Number

The CPU overcommit ratio that is supported by the Docker cluster.

None.

NodeNum

Number

The number of instances.

None.

ResourceGroupId

String

The ID of the resource group.

None.

ClusterType

Number

The cluster type.

Valid values:

  • 0: regular Docker cluster

  • 1: Swarm cluster

  • 2: Elastic Compute Service (ECS) cluster

  • 3: self-managed Kubernetes cluster in EDAS

  • 4: cluster in which Pandora automatically registers applications

  • 5: Container Service for Kubernetes (ACK) cluster

CsClusterId

String

The ID of the ACK cluster.

None.

VpcId

String

The ID of the virtual private cloud (VPC).

None.

RegionId

String

The region ID.

None.

IaasProvider

String

The provider of the cluster.

None.

Cpu

String

The total number of vCPUs.

None.

CpuUsed

Number

The number of used vCPUs.

None.

Mem

Number

The total memory size.

Unit: MB.

MemUsed

Number

The used memory size.

Unit: MB.

CreateTime

Number

The time when the cluster was created.

Unit: milliseconds.

UpdateTime

Number

The most recent time when the cluster was updated.

Unit: milliseconds.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  LogicalRegionId:
    Type: String
    Description: The ID of the namespace.
Resources:
  Clusters:
    Type: DATASOURCE::EDAS::Clusters
    Properties:
      LogicalRegionId:
        Ref: LogicalRegionId
Outputs:
  Clusters:
    Description: The list of clusters.
    Value:
      Fn::GetAtt:
        - Clusters
        - Clusters
  ClusterIds:
    Description: The list of cluster IDs.
    Value:
      Fn::GetAtt:
        - Clusters
        - ClusterIds
                    
JSON format
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "LogicalRegionId": {
      "Type": "String",
      "Description": "The ID of the namespace."
    }
  },
  "Resources": {
    "Clusters": {
      "Type": "DATASOURCE::EDAS::Clusters",
      "Properties": {
        "LogicalRegionId": {
          "Ref": "LogicalRegionId"
        }
      }
    }
  },
  "Outputs": {
    "Clusters": {
      "Description": "The list of clusters.",
      "Value": {
        "Fn::GetAtt": [
          "Clusters",
          "Clusters"
        ]
      }
    },
    "ClusterIds": {
      "Description": "The list of cluster IDs.",
      "Value": {
        "Fn::GetAtt": [
          "Clusters",
          "ClusterIds"
        ]
      }
    }
  }
}