ALIYUN::Flink::NamespaceV2

ALIYUN::Flink::NamespaceV2类型用于创建新版项目空间。

语法

{
  "Type": "ALIYUN::Flink::NamespaceV2",
  "Properties": {
    "InstanceId": String,
    "Namespace": String,
    "ResourceSpec": Map
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

InstanceId

String

Flink实例 ID。

Namespace

String

项目Namespace 名称。

ResourceSpec

Map

资源规格。

更多信息,请参考ResourceSpec属性

ResourceSpec语法

"ResourceSpec": {
  "Cpu": Integer,
  "MemoryGB": Integer
}

ResourceSpec属性

属性名称

类型

必须

允许更新

描述

约束

Cpu

Integer

CPU 数量。

MemoryGB

Integer

内存大小。

单位为 GB。

说明

内存数量必须为 CPU 数量的 4 倍。

返回值

Fn::GetAtt

  • InstanceId:Flink实例 ID。

  • Namespace:项目Namespace 名称。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  InstanceId:
    Type: String
    Description:
      en: Instance ID.
    Required: true
  ResourceSpec:
    AssociationPropertyMetadata:
      Parameters:
        Cpu:
          Type: Number
          Description:
            en: |-
              CPU number.
              In the working space of the annual package, the number of CPUs must be filled.Under the working space of paying in volume, you can not fill in the number of CPUs.
              The number of CPUs created by the target project space is less than the number of CPU remaining in the working space (the total number of CPU purchased by the work space minus the number of other project spaces that has been assigned the number of CPUs), otherwise an error will be reported.
          Required: false
        MemoryGB:
          Type: Number
          Description:
            en: |-
              Memory.
              In the working space of the annual package, the amount of memory must be filled, and the amount of memory must be 4 times.Under the working space of paying in volume, you can fill in the amount of memory without filling in the amount of memory.
              The amount of memory in the target project space is less than the remaining memory of the working space (the total amount of memory purchased by the work space minus the number of other project spaces that have been assigned the amount of memory), otherwise an error will be reported.
          Required: false
    Type: Json
    Description:
      en: Resource specifications.
    Required: false
  Namespace:
    Type: String
    Description:
      en: Project space name.
    AllowedPattern: ^[a-z][a-z0-9-]{1,60}
    Required: true
Resources:
  NamespaceV2:
    Type: ALIYUN::Flink::NamespaceV2
    Properties:
      InstanceId:
        Ref: InstanceId
      ResourceSpec:
        Ref: ResourceSpec
      Namespace:
        Ref: Namespace
Outputs:
  InstanceId:
    Description: Instance ID.
    Value:
      Fn::GetAtt:
        - NamespaceV2
        - InstanceId
  Namespace:
    Description: Project space name.
    Value:
      Fn::GetAtt:
        - NamespaceV2
        - Namespace
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InstanceId": {
      "Type": "String",
      "Description": {
        "en": "Instance ID."
      },
      "Required": true
    },
    "ResourceSpec": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "Cpu": {
            "Type": "Number",
            "Description": {
              "en": "CPU number.\nIn the working space of the annual package, the number of CPUs must be filled.Under the working space of paying in volume, you can not fill in the number of CPUs.\nThe number of CPUs created by the target project space is less than the number of CPU remaining in the working space (the total number of CPU purchased by the work space minus the number of other project spaces that has been assigned the number of CPUs), otherwise an error will be reported."
            },
            "Required": false
          },
          "MemoryGB": {
            "Type": "Number",
            "Description": {
              "en": "Memory.\nIn the working space of the annual package, the amount of memory must be filled, and the amount of memory must be 4 times.Under the working space of paying in volume, you can fill in the amount of memory without filling in the amount of memory.\nThe amount of memory in the target project space is less than the remaining memory of the working space (the total amount of memory purchased by the work space minus the number of other project spaces that have been assigned the amount of memory), otherwise an error will be reported."
            },
            "Required": false
          }
        }
      },
      "Type": "Json",
      "Description": {
        "en": "Resource specifications."
      },
      "Required": false
    },
    "Namespace": {
      "Type": "String",
      "Description": {
        "en": "Project space name."
      },
      "AllowedPattern": "^[a-z][a-z0-9-]{1,60}",
      "Required": true
    }
  },
  "Resources": {
    "NamespaceV2": {
      "Type": "ALIYUN::Flink::NamespaceV2",
      "Properties": {
        "InstanceId": {
          "Ref": "InstanceId"
        },
        "ResourceSpec": {
          "Ref": "ResourceSpec"
        },
        "Namespace": {
          "Ref": "Namespace"
        }
      }
    }
  },
  "Outputs": {
    "InstanceId": {
      "Description": "Instance ID.",
      "Value": {
        "Fn::GetAtt": [
          "NamespaceV2",
          "InstanceId"
        ]
      }
    },
    "Namespace": {
      "Description": "Project space name.",
      "Value": {
        "Fn::GetAtt": [
          "NamespaceV2",
          "Namespace"
        ]
      }
    }
  }
}