全部产品
Search
文档中心

资源编排:CS资源

更新时间:Mar 16, 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}