Skip to product information
1 of 12

PayPal, credit cards. Download editable-PDF & invoice In 1 second!

GB/T 31915-2015 English PDF (GBT31915-2015)

GB/T 31915-2015 English PDF (GBT31915-2015)

Regular price $310.00 USD
Regular price Sale price $310.00 USD
Sale Sold out
Shipping calculated at checkout.
Delivery: 3 seconds (Download full-editable-PDF + Invoice).
Quotation: Click GB/T 31915-2015>>Add to cart>>Quote
Editable-PDF Preview (Reload if blank, scroll for next page)

GB/T 31915-2015: Information technology -- Elastic computing application interface
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.
GB/T 31915-2015
NATIONAL STANDARD OF THE
PEOPLE’S REPUBLIC OF CHINA
ICS 35.100.05
L 79
Information technology - Elastic computing
application interface
ISSUED ON: SEPTEMBER 11, 2015
IMPLEMENTED ON: MAY 01, 2016
Issued by: General Administration of Quality Supervision, Inspection and Quarantine of PRC;
Standardization Administration of PRC.
Table of Contents
Foreword ... 3
1 Scope ... 4
2 Normative references ... 4
3 Terms, definitions, abbreviations ... 4
3.1 Terms and definitions ... 4
3.2 Abbreviations ... 5
4 Elastic computing architecture ... 5
5 General requirements for elastic computing application interfaces ... 6 5.1 Overview ... 6
5.2 Data type ... 6
5.3 HTTP protocol ... 7
6 Definition of elastic computing application interface ... 8
6.1 Overview ... 8
6.2 Handling method of error ... 9
6.3 Rental interface of virtual machine ... 9
6.4 Management interface of virtual machine’s image ... 23
6.5 Management interface of volume ... 27
6.6 Management interface of public network’s IP address ... 30
6.7 Management interface of load balancer ... 33
6.9 Management interface of key ... 42
Information technology - Elastic computing
application interface
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.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.
Table 4 -- Description of error information
Field name Type Constraint Description
Faultstring String Necessary Error message after the failed operation
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
The request message and the response message are as follows:
a) Request message: StopVMReq
The request message is as shown in Table 12.
Table 12 -- Request message
Field name Type Constraint Descriptions
VMIDs List< VMID> Necessary List of unique identifiers of virtual machine b) Response message: StopVMResp
The response message is as shown in Table 13.
Table 13 -- Response message
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.
Table 14 -- VMStateChange
Field name Type Constraint Descriptions
VMID String Necessary Unique identifier of virtual machine
VMState String Necessary Current state of virtual machine
6.3.5 Restarting a virtual machine (RestartVM)
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
The request message and the response message are as follows:
a) Request message: RestartVMReq
The request message is as shown in Table 15.
Table 15 -- Request message
b) Response message: SetVMInfoResp
No response message.
6.3.13 Querying a virtual machine’s template (QueryVMTemplate)
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
The request message and the response message are as follows:
a) Request message: QueryTemplateReq
The request message is as shown in Table 34.
Table 34 -- Request message
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.
Table 35 -- Response message
Field name Type Constraint Descriptions
VMTemplateList List< VMTemplate> Necessary List of templates of virtual machine Among them, VMTemplate is as shown in Table 36.
Table 38 -- Response message
Field name Type Constraint Descriptions
ImageID String Necessary Unique identifier of image after successful operation 6.4.2 Deleting a virtual machine image (DeleteImage)
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
The request message and the response message are as follows:
a) Request message: DeleteImageReq
The request message is as shown in Table 39.
Table 39 -- Request message
Field name Type Constraint Descriptions
ImageID String Necessary Unique identifier of the image to be deleted
b) Response message: DeleteImageResp
No response message.
6.4.3 Importing a virtual machine image (ImportImage)
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
The request message and the response message are as follows:
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.
Table 48 -- Request message
Field name Type Constraint Descriptions
VolumeID String Necessary Unique identifier of volume to be deleted
b) Response message: DeleteVolumeResp
No response message.
6.5.3 Querying a volume (QueryVolume)
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.
Table 49 -- Request message
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.
Table 53 -- Request message
Field name Type Constraint Descriptions
VolumeID String Necessary Unique identifier of volume
VMID String Optional Unique identifier of virtual machine as associated with detached volume b) Response message: DetachVolumeResp
The response message is as shown in Table 54.
Table 54 -- Response message
Field name Type Constraint Descriptions
DetachTime String Optional Operation time to detach a volume
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
The request message and the response message are as follows:
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.
Table 57 -- Response message
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.
Table 58 -- IP
Field name Type Constraint Descriptions
IP String Optional Public network’s IP address
6.6.4 Binding a public network IP (BindingPublicIP)
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.
Table 59 -- Request message
Field name Type Constraint Descriptions
IP String Necessary Public network’s IP address
VMID String Optional Unique identifier of virtual machine
LBID String Optional Unique identifier of load balancer
b) Response message: BindingPublicIPResp
No response message.
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.4.2 Interface messages
The request message and the response message are as follows:
a) Request message: RegisterVMWithLBReq
The request message is as shown in Table 67.
Table 67 -- Request message
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.
Table 68 -- Response message
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)
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
The request message and the response message are as follows:
a) Request message: DeregisterVMFromLBReq
The request message is as shown in Table 69.
6.8 Management interface of security group
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
The request message and the response message are as follows:
a) Request message: CreateSGReq
The request message is as shown in Table 72.
Table 81 -- Request message
Field name Type Constraint Descriptions
SGID String Necessary Unique identifier of security group
SGRulesID Int Necessary Security rule code in security group, value: 1 ~ 99999 b) Response message: DeleteSGRulesResp
No response message.
6.9 Management interface of key
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.
Table 82 -- Request message
Field name Type Constraint Descriptions
KeyName String Optional Nam...
View full details