全部产品
Search
文档中心

资源编排:ALIYUN::PAI::Quota

更新时间:Jul 07, 2026

ALIYUN::PAI::Quota类型用于创建资源配额。

语法

{
  "Type": "ALIYUN::PAI::Quota",
  "Properties": {
    "QuotaName": String,
    "AllocateStrategy": String,
    "ClusterSpec": Map,
    "Description": String,
    "Labels": List,
    "Min": Map,
    "ParentQuotaId": String,
    "QuotaConfig": Map,
    "QueueStrategy": String,
    "ResourceGroupIds": List,
    "ResourceType": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

QuotaName

String

是

是

配额名称。

无

AllocateStrategy

String

否

是

分配策略。

取值:

  • ByNodeSpecs

ClusterSpec

Map

否

是

集群规格。

无

Description

String

否

是

配额描述。

无

Labels

List

否

是

与配额关联的标签。

更多信息,请参考Labels属性。

Min

Map

否

是

最小资源分配配置。

更多信息,请参考Min属性。

ParentQuotaId

String

否

否

父配额 ID。

无

QueueStrategy

String

否

是

队列策略。

无

QuotaConfig

Map

否

是

配额配置。

无

ResourceGroupIds

List

否

是

资源组 ID 列表。

无

ResourceType

String

否

否

资源类型。

取值:

  • Lingjun

  • ECS

  • ACS

Min语法

"Min": {
  "ResourceAmount": Map,
  "NodeSpecs": List
}

Min属性

属性名称

类型

必须

允许更新

描述

约束

NodeSpecs

List

否

否

节点规格。

无

ResourceAmount

Map

否

否

资源数量。

无

Labels语法

"Labels": [
  {
    "Value": String,
    "Key": String
  }
]

Labels属性

属性名称

类型

必须

允许更新

描述

约束

Key

String

是

否

标签键。

无

Value

String

是

否

标签值。

无

返回值

Fn::GetAtt

QuotaId:资源配额 ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  AllocateStrategy:
    AllowedValues:
      - ByNodeSpecs
    Description:
      en: The allocation strategy.
    Required: false
    Type: String
  ClusterSpec:
    Description:
      en: The cluster specification.
    Required: false
    Type: Json
  Description:
    AssociationProperty: TextArea
    Description:
      en: The description of the quota.
    Required: false
    Type: String
  Labels:
    AssociationProperty: List[Parameters]
    AssociationPropertyMetadata:
      Parameters:
        Key:
          Required: true
          Type: String
        Value:
          Required: true
          Type: String
    Description:
      en: The labels associated with the quota.
    Required: false
    Type: Json
  Min:
    AssociationPropertyMetadata:
      Parameters:
        NodeSpecs:
          AssociationProperty: List[Parameter]
          AssociationPropertyMetadata:
            Parameter:
              Required: false
              Type: Json
          Description:
            en: The node specification.
          Required: false
          Type: Json
        ResourceAmount:
          Description:
            en: The resource amount.
          Required: false
          Type: Json
    Description:
      en: The minimum resource allocation configuration.
    Required: false
    Type: Json
  ParentQuotaId:
    Description:
      en: The ID of the parent quota.
    Required: false
    Type: String
  QueueStrategy:
    Description:
      en: The queue strategy.
    Required: false
    Type: String
  QuotaConfig:
    Description:
      en: The quota configuration.
    Required: false
    Type: Json
  QuotaName:
    Description:
      en: The name of the quota.
    Required: true
    Type: String
  ResourceGroupIds:
    AssociationProperty: List[Parameter]
    AssociationPropertyMetadata:
      Parameter:
        AssociationProperty: ALIYUN::ECS::ResourceGroup::ResourceGroupId
        Required: false
        Type: String
    Description:
      en: The list of resource group IDs.
    Required: false
    Type: Json
  ResourceType:
    AllowedValues:
      - Lingjun
      - ECS
      - ACS
    Description:
      en: The type of the resource.
    Required: false
    Type: String
Resources:
  Quota:
    Properties:
      AllocateStrategy:
        Ref: AllocateStrategy
      ClusterSpec:
        Ref: ClusterSpec
      Description:
        Ref: Description
      Labels:
        Ref: Labels
      Min:
        Ref: Min
      ParentQuotaId:
        Ref: ParentQuotaId
      QueueStrategy:
        Ref: QueueStrategy
      QuotaConfig:
        Ref: QuotaConfig
      QuotaName:
        Ref: QuotaName
      ResourceGroupIds:
        Ref: ResourceGroupIds
      ResourceType:
        Ref: ResourceType
    Type: ALIYUN::PAI::Quota
Outputs:
  QuotaId:
    Description: The ID of the quota.
    Value:
      Fn::GetAtt:
        - Quota
        - QuotaId
                        
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "QuotaName": {
      "Type": "String",
      "Description": {
        "en": "The name of the quota."
      },
      "Required": true
    },
    "Min": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "ResourceAmount": {
            "Type": "Json",
            "Description": {
              "en": "The resource amount."
            },
            "Required": false
          },
          "NodeSpecs": {
            "AssociationPropertyMetadata": {
              "Parameter": {
                "Type": "Json",
                "Required": false
              }
            },
            "Type": "Json",
            "AssociationProperty": "List[Parameter]",
            "Description": {
              "en": "The node specification."
            },
            "Required": false
          }
        }
      },
      "Type": "Json",
      "Description": {
        "en": "The minimum resource allocation configuration."
      },
      "Required": false
    },
    "Description": {
      "Type": "String",
      "AssociationProperty": "TextArea",
      "Description": {
        "en": "The description of the quota."
      },
      "Required": false
    },
    "ResourceGroupIds": {
      "AssociationPropertyMetadata": {
        "Parameter": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::ResourceGroup::ResourceGroupId",
          "Required": false
        }
      },
      "Type": "Json",
      "AssociationProperty": "List[Parameter]",
      "Description": {
        "en": "The list of resource group IDs."
      },
      "Required": false
    },
    "AllocateStrategy": {
      "Type": "String",
      "Description": {
        "en": "The allocation strategy."
      },
      "AllowedValues": [
        "ByNodeSpecs"
      ],
      "Required": false
    },
    "QuotaConfig": {
      "Type": "Json",
      "Description": {
        "en": "The quota configuration."
      },
      "Required": false
    },
    "ResourceType": {
      "Type": "String",
      "Description": {
        "en": "The type of the resource."
      },
      "AllowedValues": [
        "Lingjun",
        "ECS",
        "ACS"
      ],
      "Required": false
    },
    "Labels": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "Value": {
            "Type": "String",
            "Required": true
          },
          "Key": {
            "Type": "String",
            "Required": true
          }
        }
      },
      "Type": "Json",
      "AssociationProperty": "List[Parameters]",
      "Description": {
        "en": "The labels associated with the quota."
      },
      "Required": false
    },
    "ClusterSpec": {
      "Type": "Json",
      "Description": {
        "en": "The cluster specification."
      },
      "Required": false
    },
    "ParentQuotaId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the parent quota."
      },
      "Required": false
    },
    "QueueStrategy": {
      "Type": "String",
      "Description": {
        "en": "The queue strategy."
      },
      "Required": false
    }
  },
  "Resources": {
    "Quota": {
      "Type": "ALIYUN::PAI::Quota",
      "Properties": {
        "QuotaName": {
          "Ref": "QuotaName"
        },
        "Min": {
          "Ref": "Min"
        },
        "Description": {
          "Ref": "Description"
        },
        "ResourceGroupIds": {
          "Ref": "ResourceGroupIds"
        },
        "AllocateStrategy": {
          "Ref": "AllocateStrategy"
        },
        "QuotaConfig": {
          "Ref": "QuotaConfig"
        },
        "ResourceType": {
          "Ref": "ResourceType"
        },
        "Labels": {
          "Ref": "Labels"
        },
        "ClusterSpec": {
          "Ref": "ClusterSpec"
        },
        "ParentQuotaId": {
          "Ref": "ParentQuotaId"
        },
        "QueueStrategy": {
          "Ref": "QueueStrategy"
        }
      }
    }
  },
  "Outputs": {
    "QuotaId": {
      "Description": "The ID of the quota.",
      "Value": {
        "Fn::GetAtt": [
          "Quota",
          "QuotaId"
        ]
      }
    }
  }
}