全部產品
Search
文件中心

:ALIYUN::Flink::Instance

更新時間:Aug 08, 2025

ALIYUN::Flink::Instance類型用於建立一個訂用帳戶或隨用隨付的Flink執行個體。

文法

{
  "Type": "ALIYUN::Flink::Instance",
  "Properties": {
    "InstanceName": String,
    "VpcId": String,
    "ZoneId": String,
    "Bucket": String,
    "VSwitchIds": List,
    "PricingCycle": String,
    "ChargeType": String,
    "AutoRenew": Boolean,
    "PromotionCode": String,
    "ResourceSpec": Map,
    "Duration": Integer,
    "UsePromotionCode": Boolean
  }
}

屬性

屬性名稱

類型

必須

允許更新

描述

約束

InstanceName

String

執行個體名稱。

VpcId

String

專用網路ID。

ZoneId

String

執行個體所屬的可用性區域ID。

Bucket

String

儲存空間名稱。

VSwitchIds

List

虛擬交換器ID。

PricingCycle

String

訂購周期。

取值:

  • 年(Year)

  • 月(Month)

ChargeType

String

付費類型。

取值:

  • POST:隨用隨付。

  • PRE:訂用帳戶。

AutoRenew

Boolean

續約方式。

取值:

  • true:自動續約。

  • false:手動續約。

PromotionCode

String

優惠碼。

ResourceSpec

Map

資源規格。

更多資訊,請參考ResourceSpec屬性

Duration

Integer

訂購周期數量。

說明

當ChargeType配置為PRE時,本參數必填。

UsePromotionCode

Boolean

是否使用優惠券。

取值:

  • true:使用。

  • false:不使用。

ResourceSpec文法

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

ResourceSpec屬性

屬性名稱

類型

必須

允許更新

描述

約束

Cpu

Integer

CPU數量。

MemoryGB

Integer

記憶體大小。

單位為GB。

說明

記憶體數量必須為CPU數量的4倍。

傳回值

Fn::GetAtt

  • InstanceId:執行個體ID。

  • OrderId:訂單ID。

  • WorkspaceId:工作空間ID。

樣本

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  InstanceName:
    Type: String
    Description: The name of instance.
    AllowedPattern: ^[a-z][a-z0-9-]{1,60}
  VpcId:
    Type: String
    Description: VPC ID.
  ZoneId:
    Type: String
    Description: The available area ID of the instance.
  Bucket:
    Type: String
    Description: OSS bucket name.
  VSwitchIds:
    Type: CommaDelimitedList
    Description: Virtual switch ID.
  ChargeType:
    Type: String
    Description: |-
      The payment type, the value of the value is as follows:
      POST: pay as you go.
      PRE: subscription.
    AllowedValues:
      - PayAsYouGo
      - PostPaid
      - PayOnDemand
      - Postpaid
      - PostPay
      - POST
      - Subscription
      - PrePaid
      - PrePay
      - Prepaid
      - PRE
Resources:
  Instance:
    Type: ALIYUN::Flink::Instance
    Properties:
      InstanceName:
        Ref: InstanceName
      VpcId:
        Ref: VpcId
      ZoneId:
        Ref: ZoneId
      Bucket:
        Ref: Bucket
      VSwitchIds:
        Ref: VSwitchIds
      ChargeType:
        Ref: ChargeType
Outputs:
  InstanceId:
    Description: Instance ID.
    Value:
      Fn::GetAtt:
        - Instance
        - InstanceId
  OrderId:
    Description: Order information.
    Value:
      Fn::GetAtt:
        - Instance
        - OrderId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InstanceName": {
      "Type": "String",
      "Description": "The name of instance.",
      "AllowedPattern": "^[a-z][a-z0-9-]{1,60}"
    },
    "VpcId": {
      "Type": "String",
      "Description": "VPC ID."
    },
    "ZoneId": {
      "Type": "String",
      "Description": "The available area ID of the instance."
    },
    "Bucket": {
      "Type": "String",
      "Description": "OSS bucket name."
    },
    "VSwitchIds": {
      "Type": "CommaDelimitedList",
      "Description": "Virtual switch ID."
    },
    "ChargeType": {
      "Type": "String",
      "Description": "The payment type, the value of the value is as follows:\nPOST: pay as you go.\nPRE: subscription.",
      "AllowedValues": [
        "PayAsYouGo",
        "PostPaid",
        "PayOnDemand",
        "Postpaid",
        "PostPay",
        "POST",
        "Subscription",
        "PrePaid",
        "PrePay",
        "Prepaid",
        "PRE"
      ]
    }
  },
  "Resources": {
    "Instance": {
      "Type": "ALIYUN::Flink::Instance",
      "Properties": {
        "InstanceName": {
          "Ref": "InstanceName"
        },
        "VpcId": {
          "Ref": "VpcId"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "Bucket": {
          "Ref": "Bucket"
        },
        "VSwitchIds": {
          "Ref": "VSwitchIds"
        },
        "ChargeType": {
          "Ref": "ChargeType"
        }
      }
    }
  },
  "Outputs": {
    "InstanceId": {
      "Description": "Instance ID.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "InstanceId"
        ]
      }
    },
    "OrderId": {
      "Description": "Order information.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "OrderId"
        ]
      }
    }
  }
}