All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::EAIS::Instance

Last Updated:Sep 13, 2023

ALIYUN::EAIS::Instance is used 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

Type

Required

Editable

Description

Constraint

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 and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).

ResourceGroupId

String

No

Yes

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

None.

SecurityGroupId

String

Yes

No

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

None.

VSwitchId

String

Yes

No

The ID of the vSwitch to which the EAIS instance is connected.

Note

The number of IP addresses in the vSwitch CIDR block determines the maximum number of EAIS instances that can be created in the vSwitch. Make sure that you plan the vSwitch CIDR block properly.

PaymentType

String

No

No

The billing method of the EAIS instance.

Valid values:

  • PostPay: pay-as-you-go

  • PrePay: subscription

InstanceType

String

Yes

No

The EAIS instance type.

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 of the EAIS instance during initialization.  

None.

CreateWithNotebook

Boolean

Yes

No

Specifies whether to create the EAIS instance on which Jupyter Notebook is deployed.

Valid values:

  • true: creates the EAIS instance on which Jupyter Notebook is deployed.

  • false: does not create the EAIS instance on which Jupyter Notebook is deployed.

EnvironmentVar syntax

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

EnvironmentVar properties

Property

Type

Required

Editable

Description

Constraint

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 Elastic Compute Service (ECS) instance or elastic container instance that is associated with the EAIS instance.

  • ClientInstanceName: the name of the ECS instance or elastic container instance that is associated with the EAIS instance.

  • ZoneId: the ID of the zone in which the EAIS instance resides.

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

  • InstanceId: the ID of the EAIS instance.

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

  • CreateTime: the time when the EAIS instance was created.

  • VSwitchId: the ID of the vSwitch to which the EAIS instance is connected.

  • ClientInstanceId: the ID of the ECS instance or elastic container instance that is associated with the EAIS instance.

  • InstanceType: the EAIS instance type.

  • JupyterUrl: the URL that is used to access Jupyter Notebook.

Examples

YAML format

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 format

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