ALIYUN::EAIS::Instance

更新时间:
复制 MD 格式

Use the ALIYUN::EAIS::Instance resource type to create an Elastic Accelerated Computing Instances (EAIS) instance.

Syntax

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

Properties

Property Name

Type

Required

Allow updates

Description

Constraints

InstanceName

String

No

No

The name of the EAIS instance.

The name must be 2 to 128 characters in length. It must start with a letter. It cannot start with http:// or https://. It can contain digits, colons (:), underscores (_), periods (.), and hyphens (-).

ResourceGroupId

String

No

Yes

The ID of the resource group to which the instance belongs.

None

SecurityGroupId

String

Yes

No

The ID of the security group to which the instance belongs.

None

VSwitchId

String

Yes

No

The ID of the vSwitch to which the instance belongs.

Note

The number of available IP addresses in the vSwitch CIDR block determines the maximum number of EAIS instances that you can create in the vSwitch. Plan your CIDR block in advance.

PaymentType

String

No

No

Billing method.

Valid values:

  • PostPay: pay-as-you-go.

  • PrePay: subscription.

InstanceType

String

Yes

No

The instance type of the EAIS instance.

Valid values:

  • eais.ei-a6.4xlarge

  • eais.ei-a6.2xlarge

  • eais.ei-a6.xlarge

  • eais.ei-a6.large

EnvironmentVar

List

No

No

The environment variables to set in the instance during initialization. 

None

CreateWithNotebook

Boolean

Yes

No

Specifies whether to create an EAIS instance with a pre-deployed Jupyter Notebook.

Valid values:

  • true: A Notebook is deployed on the Elastic Accelerated Computing Instance.

    Note

    Call the CreateEaiJupyter operation to create the EAIS instance.

  • false: A Notebook is not deployed on the Elastic Accelerated Computing Instance.

    Note

    Call the CreateEai operation to create the EAIS instance. 

EnvironmentVar syntax

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

EnvironmentVar properties

Property

Type

Required

Updatable

Description

Constraints

Value

String

No

No

The value of the environment variable.

None

Key

String

No

No

The key of the environment variable.

None

Return values

Fn::GetAtt

  • InstanceName: The name of the EAIS instance.

  • ClientInstanceType: The instance type of the ECS or ECI instance attached to the EAIS instance.

  • ClientInstanceName: The name of the ECS or ECI instance attached to the EAIS instance.

  • ZoneId: The ID of the zone to which the EAIS instance belongs.

  • ResourceGroupId: The ID of the resource group to which the instance belongs.

  • InstanceId: The ID of the EAIS instance.

  • SecurityGroupId: The ID of the security group to which the instance belongs.

  • CreateTime: The time when the resource was created.

  • VSwitchId: The ID of the vSwitch to which the instance belongs.

  • ClientInstanceId: The ID of the ECS or ECI instance attached to the EAIS instance.

  • InstanceType: The instance type of the EAIS instance.

  • JupyterUrl: The endpoint of the Jupyter Notebook.

Examples

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ZoneId:
    Type: String
    Description: The ID of the zone.
    AssociationProperty: ALIYUN::ECS::Instance:ZoneId
  VpcId:
    Type: String
    Label: VPC ID
    Description: The ID of the VPC. Find the ID, which starts with vpc-, in the Virtual Private Cloud console.
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
  VSwitchId:
    Type: String
    Description: The ID of the vSwitch.
    AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
    AssociationPropertyMetadata:
      VpcId: ${VpcId}
      ZoneId: ${ZoneId}
  SecurityGroupId:
    Type: String
    Description: The ID of the security group.
    AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
    AssociationPropertyMetadata:
      VpcId: ${VpcId}
  InstanceName:
    Type: String
    Description: The name of the instance.
    Default: myTest
  InstanceType:
    Type: String
    Description: The instance type of the EAIS instance.
    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: The name of the instance.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - InstanceName
  ClientInstanceType:
    Description: The instance type of the attached ECS instance.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ClientInstanceType
  ClientInstanceName:
    Description: The name of the attached ECS instance.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ClientInstanceName
  ZoneId:
    Description: The ID of the zone 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: The ID of the EAIS instance.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - InstanceId
  SecurityGroupId:
    Description: The ID of the security group.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - SecurityGroupId
  CreateTime:
    Description: The time when the resource was created.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreateTime
  VSwitchId:
    Description: The ID of the vSwitch.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - VSwitchId
  ClientInstanceId:
    Description: The ID of the attached ECS instance.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ClientInstanceId
  InstanceType:
    Description: The instance type of the EAIS instance.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - InstanceType
  JupyterUrl:
    Description: The endpoint of the Jupyter Notebook.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - JupyterUrl

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ZoneId": {
      "Type": "String",
      "Description": "The ID of the zone.",
      "AssociationProperty": "ALIYUN::ECS::Instance:ZoneId"
    },
    "VpcId": {
      "Type": "String",
      "Label": "VPC ID",
      "Description": "The ID of the VPC. Find the ID, which starts with vpc-, in the Virtual Private Cloud console.",
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
    },
    "VSwitchId": {
      "Type": "String",
      "Description": "The ID of the vSwitch.",
      "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
      "AssociationPropertyMetadata": {
        "VpcId": "${VpcId}",
        "ZoneId": "${ZoneId}"
      }
    },
    "SecurityGroupId": {
      "Type": "String",
      "Description": "The ID of the security group.",
      "AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
      "AssociationPropertyMetadata": {
        "VpcId": "${VpcId}"
      }
    },
    "InstanceName": {
      "Type": "String",
      "Description": "The name of the instance.",
      "Default": "myTest"
    },
    "InstanceType": {
      "Type": "String",
      "Description": "The instance type of the EAIS instance.",
      "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": "The name of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "InstanceName"
        ]
      }
    },
    "ClientInstanceType": {
      "Description": "The instance type of the attached ECS instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ClientInstanceType"
        ]
      }
    },
    "ClientInstanceName": {
      "Description": "The name of the attached ECS instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ClientInstanceName"
        ]
      }
    },
    "ZoneId": {
      "Description": "The ID of the zone 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": "The ID of the EAIS instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "InstanceId"
        ]
      }
    },
    "SecurityGroupId": {
      "Description": "The ID of the security group.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SecurityGroupId"
        ]
      }
    },
    "CreateTime": {
      "Description": "The time when the resource was created.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreateTime"
        ]
      }
    },
    "VSwitchId": {
      "Description": "The ID of the vSwitch.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "VSwitchId"
        ]
      }
    },
    "ClientInstanceId": {
      "Description": "The ID of the attached ECS instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ClientInstanceId"
        ]
      }
    },
    "InstanceType": {
      "Description": "The instance type of the EAIS instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "InstanceType"
        ]
      }
    },
    "JupyterUrl": {
      "Description": "The endpoint of the Jupyter Notebook.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "JupyterUrl"
        ]
      }
    }
  }
}