Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::Flink::NamespaceV2

Última atualização: Jun 27, 2026

O recurso ALIYUN::Flink::NamespaceV2 cria um projeto do Realtime Compute for Apache Flink.

Sintaxe

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

Propriedades

Nome da propriedade

Tipo

Obrigatória

Atualização permitida

Descrição

Restrições

InstanceId

String

Sim

Não

ID da instância do Flink.

Nenhuma

Namespace

String

Sim

Não

Nome do projeto.

Nenhuma

ResourceSpec

Map

Não

Não

Especificações de recursos.

Para mais informações, consulte Propriedades de ResourceSpec.

Sintaxe de ResourceSpec

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

Propriedades de ResourceSpec

Nome da propriedade

Tipo

Obrigatória

Atualização permitida

Descrição

Restrições

Cpu

Integer

Não

Não

Número de núcleos de CPU.

Nenhuma

MemoryGB

Integer

Não

Não

Tamanho da memória.

Unidade: GB.

Nota

O tamanho da memória deve ser quatro vezes o número de núcleos de CPU.

Valores de retorno

Fn::GetAtt

  • InstanceId: ID da instância do Flink.

  • Namespace: nome do projeto.

Exemplos

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  InstanceId:
    Type: String
    Description: The ID of the Flink instance.
    Required: true
  ResourceSpec:
    AssociationPropertyMetadata:
      Parameters:
        Cpu:
          Type: Number
          Description: |-
            The number of CPU cores. This parameter is required for subscription projects but optional for pay-as-you-go projects.
            The number of CPU cores that you specify for the project cannot exceed the remaining CPU cores in the workspace. The remaining CPU cores are calculated by subtracting the cores allocated to other projects from the total purchased cores. An error is returned if the value of this parameter exceeds the remaining CPU cores.
          Required: false
        MemoryGB:
          Type: Number
          Description: |-
            The memory size in GB. This parameter is required for subscription projects but optional for pay-as-you-go projects.
            For subscription projects, the memory size must be four times the number of CPU cores.
            The memory size that you specify for the project cannot exceed the remaining memory in the workspace. The remaining memory is calculated by subtracting the memory allocated to other projects from the total purchased memory. An error is returned if the value of this parameter exceeds the remaining memory.
          Required: false
    Type: Json
    Description: The resource specifications.
    Required: false
  Namespace:
    Type: String
    Description: The name of the project.
    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: The ID of the Flink instance.
    Value:
      Fn::GetAtt:
        - NamespaceV2
        - InstanceId
  Namespace:
    Description: The name of the project.
    Value:
      Fn::GetAtt:
        - NamespaceV2
        - Namespace
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InstanceId": {
      "Type": "String",
      "Description": "The ID of the Flink instance.",
      "Required": true
    },
    "ResourceSpec": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "Cpu": {
            "Type": "Number",
            "Description": "The number of CPU cores. This parameter is required for subscription projects but optional for pay-as-you-go projects.\nThe number of CPU cores that you specify for the project cannot exceed the remaining CPU cores in the workspace. The remaining CPU cores are calculated by subtracting the cores allocated to other projects from the total purchased cores. An error is returned if the value of this parameter exceeds the remaining CPU cores.",
            "Required": false
          },
          "MemoryGB": {
            "Type": "Number",
            "Description": "The memory size in GB. This parameter is required for subscription projects but optional for pay-as-you-go projects.\nFor subscription projects, the memory size must be four times the number of CPU cores.\nThe memory size that you specify for the project cannot exceed the remaining memory in the workspace. The remaining memory is calculated by subtracting the memory allocated to other projects from the total purchased memory. An error is returned if the value of this parameter exceeds the remaining memory.",
            "Required": false
          }
        }
      },
      "Type": "Json",
      "Description": "The resource specifications.",
      "Required": false
    },
    "Namespace": {
      "Type": "String",
      "Description": "The name of the project.",
      "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": "The ID of the Flink instance.",
      "Value": {
        "Fn::GetAtt": [
          "NamespaceV2",
          "InstanceId"
        ]
      }
    },
    "Namespace": {
      "Description": "The name of the project.",
      "Value": {
        "Fn::GetAtt": [
          "NamespaceV2",
          "Namespace"
        ]
      }
    }
  }
}