全部產品
Search
文件中心

:ALIYUN::EAIS::Instance

更新時間:Feb 05, 2024

ALIYUN::EAIS::Instance類型用於建立彈性加速計算執行個體。

文法

{
  "Type": "ALIYUN::EAIS::Instance",
  "Properties": {
    "InstanceName": String,
    "ResourceGroupId": String,
    "SecurityGroupId": String,
    "VSwitchId": String,
    "PaymentType": String,
    "InstanceType": String,
    "EnvironmentVar": List,
    "CreateWithNotebook": Boolean
  }
}

屬性

屬性名稱

類型

必須

允許更新

描述

約束

InstanceName

String

EAIS執行個體的名稱。

長度為2~128個英文或中文字元。必須以大小字母或中文開頭,不能以http://https://開頭。可以包含數字、半形冒號(:)、底線(_)、半形句號(.)或者短劃線(-)。

ResourceGroupId

String

執行個體所屬的資源群組ID。

SecurityGroupId

String

執行個體所屬的安全性群組ID。

VSwitchId

String

執行個體所屬的虛擬交換器ID。

說明

交換器網段內IP的個數決定了該交換器最大可支援建立的EAIS執行個體個數,請務必提前規劃好網段設定。

PaymentType

String

支付類型。

取值:

  • PostPay:隨用隨付。

  • PrePay:訂用帳戶。

InstanceType

String

EAIS執行個體的規格。

取值:

  • eais.ei-a6.4xlarge

  • eais.ei-a6.2xlarge

  • eais.ei-a6.xlarge

  • eais.ei-a6.large

EnvironmentVar

List

初始化時在執行個體中設定環境變數。 

CreateWithNotebook

Boolean

是否部署Notebook的彈性加速計算執行個體。

取值:

  • true:已部署Notebook的彈性加速計算執行個體。

  • false:未部署Notebook的彈性加速計算執行個體。

EnvironmentVar文法

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

EnvironmentVar屬性

屬性名稱

類型

必須

允許更新

描述

約束

Value

String

環境變數的值。

Key

String

環境變數的鍵。

傳回值

Fn::GetAtt

  • InstanceName:EAIS執行個體名稱。

  • ClientInstanceType:與EAIS執行個體綁定的ECS或ECI執行個體規格。

  • ClientInstanceName:與EAIS執行個體綁定的ECS或ECI執行個體名稱。

  • ZoneId:EAIS執行個體所屬可用性區域ID。

  • ResourceGroupId:執行個體所屬的資源群組ID。

  • InstanceId:EAIS執行個體ID。

  • SecurityGroupId:執行個體所屬的安全性群組ID。

  • CreateTime:資源的建立時間。

  • VSwitchId:執行個體所屬的虛擬交換器ID。

  • ClientInstanceId:與EAIS執行個體綁定的ECS或ECI執行個體ID。

  • InstanceType:EAIS執行個體規格。

  • JupyterUrl:Jupyter Notebook的訪問地址。

樣本

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ZoneId:
    Type: String
    Description: Switch ID.
    AssociationProperty: ALIYUN::ECS::Instance:ZoneId
  VpcId:
    Type: String
    Label: VPC ID
    Description: Please search the ID starting with (vpc-xxx) from console-Virtual Private Cloud
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
  VSwitchId:
    Type: String
    Description: Switch ID.
    AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
    AssociationPropertyMetadata:
      VpcId: ${VpcId}
      ZoneId: ${ZoneId}
  SecurityGroupId:
    Type: String
    Description: Security group ID.
    AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
    AssociationPropertyMetadata:
      VpcId: ${VpcId}
  InstanceName:
    Type: String
    Description: Name of the instance.
    Default: myTest
  InstanceType:
    Type: String
    Description: EAIS instance type.
    Default: eais.ei-a6.4xlarge
Resources:
  ExtensionResource:
    Type: ALIYUN::EAIS::Instance
    Properties:
      InstanceName:
        Ref: InstanceName
      SecurityGroupId:
        Ref: SecurityGroupId
      VSwitchId:
        Ref: VSwitchId
      InstanceType:
        Ref: InstanceType
      CreateWithNotebook: false
Outputs:
  InstanceName:
    Description: Name of the instance.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - InstanceName
  ClientInstanceType:
    Description: The type of the ECS instance bound to the EAIS instance.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ClientInstanceType
  ClientInstanceName:
    Description: The name of the ECS instance bound to the EAIS instance.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ClientInstanceName
  ZoneId:
    Description: The ID of the region to which the EAIS instance belongs.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ZoneId
  ResourceGroupId:
    Description: The ID of the resource group.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ResourceGroupId
  InstanceId:
    Description: Elastic accelerated instance ID.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - InstanceId
  SecurityGroupId:
    Description: Security group ID.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - SecurityGroupId
  CreateTime:
    Description: The creation time of the resource.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreateTime
  VSwitchId:
    Description: Switch ID.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - VSwitchId
  ClientInstanceId:
    Description: The ID of the ECS instance to be bound.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ClientInstanceId
  InstanceType:
    Description: EAIS instance type.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - InstanceType
  JupyterUrl:
    Description: The address of the Eais Notebook.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - JupyterUrl

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ZoneId": {
      "Type": "String",
      "Description": "Switch ID.",
      "AssociationProperty": "ALIYUN::ECS::Instance:ZoneId"
    },
    "VpcId": {
      "Type": "String",
      "Label": "VPC ID",
      "Description": "Please search the ID starting with (vpc-xxx) from console-Virtual Private Cloud",
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
    },
    "VSwitchId": {
      "Type": "String",
      "Description": "Switch ID.",
      "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
      "AssociationPropertyMetadata": {
        "VpcId": "${VpcId}",
        "ZoneId": "${ZoneId}"
      }
    },
    "SecurityGroupId": {
      "Type": "String",
      "Description": "Security group ID.",
      "AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
      "AssociationPropertyMetadata": {
        "VpcId": "${VpcId}"
      }
    },
    "InstanceName": {
      "Type": "String",
      "Description": "Name of the instance.",
      "Default": "myTest"
    },
    "InstanceType": {
      "Type": "String",
      "Description": "EAIS instance type.",
      "Default": "eais.ei-a6.4xlarge"
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::EAIS::Instance",
      "Properties": {
        "InstanceName": {
          "Ref": "InstanceName"
        },
        "SecurityGroupId": {
          "Ref": "SecurityGroupId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "InstanceType": {
          "Ref": "InstanceType"
        },
        "CreateWithNotebook": false
      }
    }
  },
  "Outputs": {
    "InstanceName": {
      "Description": "Name of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "InstanceName"
        ]
      }
    },
    "ClientInstanceType": {
      "Description": "The type of the ECS instance bound to the EAIS instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ClientInstanceType"
        ]
      }
    },
    "ClientInstanceName": {
      "Description": "The name of the ECS instance bound to the EAIS instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ClientInstanceName"
        ]
      }
    },
    "ZoneId": {
      "Description": "The ID of the region to which the EAIS instance belongs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ZoneId"
        ]
      }
    },
    "ResourceGroupId": {
      "Description": "The ID of the resource group.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ResourceGroupId"
        ]
      }
    },
    "InstanceId": {
      "Description": "Elastic accelerated instance ID.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "InstanceId"
        ]
      }
    },
    "SecurityGroupId": {
      "Description": "Security group ID.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SecurityGroupId"
        ]
      }
    },
    "CreateTime": {
      "Description": "The creation time of the resource.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreateTime"
        ]
      }
    },
    "VSwitchId": {
      "Description": "Switch ID.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "VSwitchId"
        ]
      }
    },
    "ClientInstanceId": {
      "Description": "The ID of the ECS instance to be bound.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ClientInstanceId"
        ]
      }
    },
    "InstanceType": {
      "Description": "EAIS instance type.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "InstanceType"
        ]
      }
    },
    "JupyterUrl": {
      "Description": "The address of the Eais Notebook.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "JupyterUrl"
        ]
      }
    }
  }
}