Valid

GB/T 31915-2015Information technology—Elastic computing application interface (English PDF)

信息技术 弹性计算应用接口

Preview PDF

This is a limited preview

Buy now to download the full PDF (42 pages)

Need quotation for your management?

Get a formal quotation for GB/T 31915-2015 in 30 minutes.

Issued by

SAMR; SAC

Level / Type

National · Recommended

Issue date

September 11, 2015

Implementation date

May 1, 2016

Scope

GB/T 31915-2015 is the English-translated version of 信息技术 弹性计算应用接口.

GB/T 31915-2015 is the Chinese standard "Information technology - Elastic computing application interface". Its scope clause reads: This standard gives the elastic computing architecture; specifies the general requirements and interface definitions of the elastic computing application interface.

This standard applies to the design, development, service provision of the elastic computing application interfaces. Its clauses include terms, definitions, abbreviations; elastic computing architecture; definition of elastic computing application interface.

It was issued by the General Administration of Quality Supervision, Inspection and Quarantine on SEPTEMBER 11, 2015 and took effect on MAY 01, 2016.

Found what you need?

Document preview — GB/T 31915-2015

National Standard of the People's Republic of China

ICS
35.100.05
Classification
L 79

Issued by: State Administration for Market Regulation; Standardization Administration of the PRC

Contents

  • Foreword3
  • 1 Scope4
  • 2 Normative references4
  • 3 Terms, definitions, abbreviations4
  • 3.1 Terms and definitions4
  • 3.2 Abbreviations5
  • 4 Elastic computing architecture5
  • 5 General requirements for elastic computing application interfaces6
  • 5.1 Overview6
  • 5.2 Data type6
  • 5.3 HTTP protocol7
  • 6 Definition of elastic computing application interface8
  • 6.1 Overview8
  • 6.2 Handling method of error9
  • 6.3 Rental interface of virtual machine9
  • 6.4 Management interface of virtual machine's image23
  • 6.5 Management interface of volume27
  • 6.6 Management interface of public network's IP address30
  • 6.7 Management interface of load balancer33
  • 6.9 Management interface of key42

1 Scope

This standard gives the elastic computing architecture; specifies the general requirements and interface definitions of the elastic computing application interface.

This standard applies to the design, development, service provision of the elastic computing application interfaces.

2 Normative references

The following documents are essential to the application of this document. For the dated documents, only the versions with the dates indicated are applicable to this document; for the undated documents, only the latest version (including all the amendments) are applicable to this standard.

GB/T 7408-2005 Data elements and interchange formats - Information interchange - Representation of dates and times

RFC 2616 Hypertext transfer protocol (HTTP) 1.1 Specification

3 Terms, definitions, abbreviations

3.1 Terms and definitions

The following terms and definitions apply to this document.

3.1.1 Virtual machine

A virtual data processing system that appears to be used exclusively by a particular user, but whose functionality is achieved by sharing the resources of a real data processing system. [GB/T 5271.1-2000, definition 01.01.50]

3.1.2 Virtual machine image

The file system image corresponding to the virtual machine, including the operating system and software required for the virtual machine to run.

3.1.3 Virtual machine template

The metadata set required to configure the virtual machine, including the number of CPUs, memory size, disk size, etc.

Note: Virtual machine templates are used to easily generate virtual machines.

3.1.4 Security group

A collection of firewall rules.

3.2 Abbreviations

The following abbreviations apply to this document.

HTTP: Hyper Text Transfer Protocol ID: Identifier LB: Load Balance SSH: Secure Shell URL: Universal Resource Locator VM: Virtual Machine

4 Elastic computing architecture

The elastic computing architecture is as shown in Figure 1.

a) Virtual machine rental interface A functional interface that includes creation, start, stop, restart, register, resume, delete, query, modification of a virtual machine;

b) Management interface of virtual machine image Include the creation, deletion, import, export, query of virtual machine images;

c) Volume management interface Include the creation, deletion, query, loading, unloading of volumes;

d) Management interface of public network IP address Include the application, release, query, binding, unbinding of the public network IP address;

e) Management interface of load balancer Include the creation, deletion, query, mount, deletion, modification of the load balancer;

f) Management interface of security group Include the creation, deletion, query of security groups, as well as the addition and deletion of security rules;

g) Management interface of key Include the creation, deletion, query of key.

6 Definition of elastic computing application interface

6.2 Handling method of error

The elastic computing application interface should, when returning the execution result of operation, adopt a unified error handling method: if the operation fails, the elastic computing application interface shall return an error message. The error message is as described in Table 4.

6.3 Rental interface of virtual machine

6.3.1 Status of virtual machine being out of service;

d) Registered state: The state that the virtual machine requested by the user is temporarily registered of service and ensures that the data in the current running state is not lost.

6.3.1.2 Intermediate state

The virtual machine's intermediate state includes 6 categories, as follows:

a) Creating: The intermediate state of the virtual machine as transited from none to the created state;

b) Deleting: The intermediate state of the virtual machine as transited from the created state to the end;

c) Starting: The intermediate state of the virtual machine as transited from the stop state to the running state;

d) Registering: The intermediate state of the virtual machine as transited from the running state to the registering state;

e) Stopping: The intermediate state of the virtual machine as transited from the running state to the stop state;

f) Restoring: The intermediate state of the virtual machine as transited from the registering state to the running state.

6.3.1.3 Operation of state transition of virtual machine

The migration between different states of a virtual machine is achieved through the following seven types of operations:

a) Create operation: This operation completes the application of hardware, software and other resources of the virtual machine. After the operation is completed, the elastic computing platform gives the user the right to use the corresponding resources;

b) Delete operation: This operation completes releasing the hardware, software and other resources of the virtual machine that the user has applied;

c) Start operation: This operation completes the transition of the virtual machine requested by the user from the out of service state to the running state;

d) Stop operation: This operation completes the transition of the virtual machine requested by the user from the running state to the out of service machine; if the operation fails, it shall return the information as shown in Table 4.

6.3.4.2 Interface messages

a) Request message: StopVMReq The request message is as shown in Table 12.

b) Response message: StopVMResp The response message is as shown in Table 13.

Field name Type Constraint Descriptions VMStates List< VMStateChange> Necessary List of current states of virtual machine In Table 13, VMStateChange is as shown in Table 14.

6.3.5 Restarting a virtual machine (RestartVM)

The request message and the response message are as follows: […]

6.3.5.1 Interface function

This interface restarts one or more virtual machines that are running.

If the operation is successful, it shall return to the state information list of virtual machine; if the operation fails, it shall return the information as shown in Table 4.

6.3.5.2 Interface messages

a) Request message: RestartVMReq The request message is as shown in Table 15.

6.3.13 Querying a virtual machine's template (QueryVMTemplate)

The request message and the response message are as follows: […]

6.3.13.1 Interface function

This interface is used by the user to query the list of qualified virtual machine's templates.

If the operation is successful, it returns the template list of the qualified virtual machine; if the operation fails, it shall return the information as shown in Table 4.

6.3.13.2 Interface messages

a) Request message: QueryTemplateReq The request message is as shown in Table 34.

Field name Type Constraint Descriptions VMTemplateID String Optional Query the template information of the specified ID. If no template ID is specified, it shall return all visible templates for the current user VMTemplateName String Optional Template name query conditions, wildcards are available. If no template name is specified, it shall return all visible templates for the current user VMTemplateType String Optional Template type includes platform template and user template

b) Response message: QueryTemplateResp The response message is as shown in Table 35.

Field name Type Constraint Descriptions VMTemplateList List< VMTemplate> Necessary List of templates of virtual machine Among them, VMTemplate is as shown in Table 36.

6.4 Management interface of virtual machine's image

6.4.2 Deleting a virtual machine image (DeleteImage)

The request message and the response message are as follows: […]

6.4.2.1 Interface function

The interface deletes an image. After the deletion is successful, the user cannot use the image to create a virtual machine.

If the operation is successful, there is no return parameter; if the operation fails, it shall return the information as shown in Table 4.

6.4.2.2 Interface messages

a) Request message: DeleteImageReq The request message is as shown in Table 39.

6.4.3 Importing a virtual machine image (ImportImage)

The request message and the response message are as follows: […]

6.4.3.1 Interface function

The interface takes a user-specified path as the source and generates a new image inside the elastic computing application platform. Once the image is imported, it is visible to the system and can be used to create a virtual machine.

If the operation is successful, the returned result shall contain the unique identifier of new image. if the operation fails, it shall return the information as shown in Table 4.

6.4.3.2 Interface messages

a) Request message: ImportImageReq The request message is as shown in Table 40.

a) Request message: DeleteVolumeReq The request message is as shown in Table 48.

6.5 Management interface of volume

6.5.3 Querying a volume (QueryVolume)

The request message and the response message are as follows: […]

6.5.3.1 Interface function

This interface is used to query the state and other attribute information of the specified volume.

If the operation is successful, it returns the dynamic and static properties of the volume; if the operation fails, it shall return the information as shown in Table 4.

6.5.3.2 Interface messages

The request message and the response message are as follows:

a) Request message: QueryVolumeReq The request message is as shown in Table 49.

Field name Type Constraint Descriptions VolumeID String Optional Unique identifier of volume. If no volume ID is specified, it shall return all visible volumes of the current user

b) Response message: QueryVolumeResp The response message is as shown in Table 50.

If the operation is successful, it returns the detaching time of volume; if the operation fails, it shall return the information as shown in Table 4.

6.5.5.2 Interface messages

The request message and the response message are as follows:

a) Request message: DetachVolumeReq The request message is as shown in Table 53.

b) Response message: DetachVolumeResp The response message is as shown in Table 54.

6.6 Management interface of public network's IP address

6.6.1 Applying for a public network IP (ApplyPublicIP)
6.6.1.1 Interface function

This interface is used to apply for a public network's IP address.

If the operation is successful, it returns the public network's IP address; if the operation fails, it shall return the information as shown in Table 4.

6.6.1.2 Interface messages

a) Request message: ApplyPublicIPReq No parameters.

b) Response message: ApplyPublicIPResp The response message is as shown in Table 55. The response message is as shown in Table 57.

Field name Type Constraint Descriptions IPs List< IP> Necessary List of public network's IP address Among them, IP is as shown in Table 58.

6.6.4 Binding a public network IP (BindingPublicIP)

The request message and the response message are as follows: […]

6.6.4.1 Interface function

This interface is used to bind the public network's IP addresses and virtual machines, or to bind the public network IP and load balancers.

If the operation is successful, there is no response message; if the operation fails, it shall return the information as shown in Table 4.

Note: After the load balancer is created, it needs to be bind to the public network's IP address. Therefore, the interface has to scenarios: bind the public network IP to the virtual machine; bind the public network IP to the load balancer. Considering that the public network IP may be a charging service of the IDC operator, the establishment of LB/VM and the binding to IP address are operated in two independent steps.

6.6.4.2 Interface messages

The request message and the response message are as follows:

a) Request message: BindingPublicIPReq The request message is as shown in Table 59.

6.6.5 Unbinding the public network IP (UnbindPublicIP)

machines; if the operation fails, it shall return the information as shown in Table 4.

6.7 Management interface of load balancer

6.7.4.2 Interface messages

a) Request message: RegisterVMWithLBReq The request message is as shown in Table 67.

Field name Type Constraint Descriptions VMID String Necessary ID of virtual machine VMList List< VM> Necessary List of virtual machines to be registered In Table 67, VM is as shown in Table 30.

b) Response message: RegisterVMWithLBResp The response message is as shown in Table 68.

Field name Type Constraint Descriptions VMList List< VM> Necessary List of successfully registered virtual machines In Table 68, VM is as shown in Table 30.

6.7.5 Deregistering a load balancer (DeregisterVMFromLB)

The request message and the response message are as follows: […]

6.7.5.1 Interface function

This interface is used to deregister a virtual machine with the specified ID that is registered on the load balancer.

If the operation is successful, it returns the list of virtual machines that are deregistered successfully. If the operation fails, it shall return the information as shown in Table 4.

6.7.5.2 Interface messages

a) Request message: DeregisterVMFromLBReq The request message is as shown in Table 69.

6.8 Management interface of security group

The request message and the response message are as follows: […]

6.8.1 Overview

The elastic computing service platform configures firewall rules through security groups, to control network traffic to and from the virtual machine. Any virtual machine shall belong to one or more security groups. A security group can contain multiple virtual machines. Users can create their own security groups.

If a user does not specify their own security group when they create a virtual machine, the platform automatically generates and assigns a default security group to the virtual machine.

This standard does not provide an interface to change the security group to which a virtual machine belongs.

The initial settings for user-owned security groups and default security groups are:

a) Allow all outgoing network flows;

b) Prohibit all incoming network flows;

c) Allow virtual machines in the security group to access each other.

Users can modify user-owned security groups and default security groups by adding or removing security rules.

6.8.2 Creating a security group (CreateSG)
6.8.2.1 Interface function

This interface is used to create a security group.

If the operation is successful, it returns the information of the newly created security group; if the operation fails, it shall return the information as shown in Table 4.

6.8.2.2 Interface messages

a) Request message: CreateSGReq The request message is as shown in Table 72.

6.9 Management interface of key

The request message and the response message are as follows: […]

6.9.1 Overview

When a user accesses a virtual machine running Linux/Unix operating system through SSH, key management provides the user with a way to log in to the VM through key authentication.

6.9.2 Creating a key pair (CreateKeyPair)
6.9.2.1 Interface function

This interface is used to apply for a key pair.

If the operation is successful, it returns the key information; if the operation fails, it shall return the information as shown in Table 4.

6.9.2.2 Interface messages

The request message and the response message are as follows:

a) Request message: CreateKeyPairReq The request message is as shown in Table 82.

b) Response message: CreateKeyPairResp The response message is as shown in Table 83. […]

......
This preview omits tables, figures, formulas and parts of the technical clauses. The complete document — 42 pages — is available in the English PDF.

Referenced standards

Similar standards

How to Download GB/T 31915-2015

  1. 1

    Add to cart

    Click "Download PDF" on this page and choose "Buy this standard". You can add more standards before checkout.

  2. 2

    Checkout

    Enter your email and billing details. Payment is processed securely by Stripe (cards or bank transfer). Prefer bank details? Request a quotation (min. order $300).

  3. 3

    Fast delivery

    After payment you'll receive an email confirmation. The English PDF is sent to the same address, usually within minutes and at the latest within 1 business day.

  4. 4

    Invoice included

    A tax invoice is attached to the confirmation email. Need a custom invoice? Contact us.

Related Standards

English PDF
42 pages
Fast delivery
Invoice included
View Cart

Secure payment via Stripe

Payments accepted

VisaMastercardAmerican ExpressApple PayGoogle PayStripe

GB/T 31915-2015

$285.00