ALIYUN::PAI::Quota

更新时间:
复制 MD 格式

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"
        ]
      }
    }
  }
}