全部產品
Search
文件中心

Resource Orchestration Service:CS資源

更新時間:Mar 17, 2026

AssociationProperty取值

說明

對應的AssociationPropertyMetadata

ALIYUN::CS::Cluster::ClusterId

容器叢集ID。

  • RegionId:地區ID(預設為資源棧所屬地區)。

  • ClusterState: 叢集狀態。

    • running:運行中。

    • initial:初始化中。

    • unavailable:不可用。

    • all:任意狀態。

樣本如下:

  • 範例程式碼

    JSON樣本:

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "RegionId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::RegionId"
        },
        "ClusterId":{
          "AssociationProperty":"ALIYUN::CS::Cluster::ClusterId",
          "Type":"String",
          "AssociationPropertyMetadata": {
            "RegionId": "${RegionId}"
          }
        }
      }
    }

    YAML樣本:

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      RegionId:
        Type: String
        AssociationProperty: ALIYUN::ECS::RegionId
      ClusterId:
        AssociationProperty: ALIYUN::CS::Cluster::ClusterId
        Type: String
        AssociationPropertyMetadata:
          RegionId: ${RegionId}
  • 樣本說明

    樣本中通過指定參數ClusterId的AssociationProperty屬性為ALIYUN::CS::Cluster::ClusterId,擷取容器叢集ID。

ALIYUN::CS::Cluster::ClusterNodePool

容器叢集內的節點池。

  • RegionId:地區ID(預設為資源棧所屬地區)。

  • ClusterId:容器叢集ID。

樣本如下:

  • 範例程式碼

    JSON樣本:

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "ClusterId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::CS::Cluster::ClusterId"
        },
        "ClusterNodePool":{
          "AssociationProperty":"ALIYUN::CS::Cluster::ClusterId",
          "Type":"String",
          "AssociationPropertyMetadata": {
            "ClusterId": "${ClusterId}"
          }
        }
      }
    }

    YAML樣本:

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      ClusterId:
        Type: String
        AssociationProperty: ALIYUN::CS::Cluster::ClusterId
      ClusterNodePool:
        AssociationProperty: ALIYUN::CS::Cluster::ClusterId
        Type: String
        AssociationPropertyMetadata:
          ClusterId: ${ClusterId}
  • 樣本說明

    樣本中通過指定參數ClusterNodePool的AssociationProperty屬性為ALIYUN::CS::Cluster::ClusterNodePool,擷取容器叢集內的節點池。

ALIYUN::CS::Cluster::KubernetesVersion

查詢Kubernetes版本資訊。

  • ClusterType:叢集類型。

    • Kubernetes: ACK 專有版叢集。

    • ManagedKubernetes:ACK 託管版叢集,包括 ACK Pro 版叢集、ACK 基礎版叢集、ACK Serverless Pro 版叢集、ACK Serverless 基礎版叢集、ACK Edge Pro 版叢集、ACK Edge 基礎版。

    • ExternalKubernetes:ACK 註冊叢集。

  • Profile:面向情境時的叢集類型。

    • Default:非邊緣情境叢集。

    • Edge:邊緣情境叢集。

    • Serverless:ASK 叢集。

  • Runtime:運行時類型。

    • docker:docker 運行時。

    • containerd:containerd 運行時。

    • Sandboxed-Container.runv:安全沙箱。

  • KubernetesVersionPrefix:版本首碼。

  • AutoSelectLastest:自動選擇最新版。

範例程式碼

JSON樣本:

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "CSManagedKubernetesClusterServiceCidr": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::CS::Cluster::KubernetesVersion",
      "AssociationPropertyMetadata": {
        "AutoSelectLastest": true
      }
    }
  }
}

YAML樣本:

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  CSManagedKubernetesClusterServiceCidr:
    Type: String
    AssociationProperty: ALIYUN::CS::Cluster::KubernetesVersion
    AssociationPropertyMetadata:
      AutoSelectLastest: true

ALIYUN::CS::ManagedKubernetesCluster::ServiceCidr

查詢Kubernetes託管版叢集Service CIDR資訊。

  • RegionId:地區ID(預設為資源棧所屬地區)。

  • ClusterType:叢集類型。

  • VpcId:專用網路ID。

  • NodeCidrMask:節點的最大IP地址數量。

  • ContainerCidr:容器網段。

範例程式碼

JSON樣本:

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "RegionId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::RegionId"
    },
    "VpcId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
      "AssociationPropertyMetadata": {
        "RegionId": "${RegionId}"
      }
    },
    "CSManagedKubernetesClusterServiceCidr": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::CS::ManagedKubernetesCluster::ServiceCidr",
      "AssociationPropertyMetadata": {
        "RegionId": "${RegionId}",
        "VpcId": "${VpcId}"
      }
    }
  }
}

YAML樣本:

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  RegionId:
    Type: String
    AssociationProperty: ALIYUN::ECS::RegionId
  VpcId:
    Type: String
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
    AssociationPropertyMetadata:
      RegionId: ${RegionId}
  CSManagedKubernetesClusterServiceCidr:
    Type: String
    AssociationProperty: ALIYUN::CS::ManagedKubernetesCluster::ServiceCidr
    AssociationPropertyMetadata:
      RegionId: ${RegionId}
      VpcId: ${VpcId}