ALIYUN::EAIS::Instance

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的弹性加速计算实例。

    说明

    请调用CreateEaiJupyter创建EAIS实例。

  • false:未部署Notebook的弹性加速计算实例。

    说明

    请调用CreateEai创建EAIS实例。 

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