Public Header and Error Return
Last Updated:2021-12-16
Public Header Specification
Public Request Header
Public Header | Description |
---|---|
Authorization | Including Access Key and request signature. |
Content-Type | application/json; charset=utf-8 |
x-bce-date | String representing the date comply with API specifications. |
The standard header fields for the html protocol are no longer listed here. The common header field will appear in each BCC API and is required. POST, PUT, DELETE and other request data are placed in the request body.
Public Response Header
Public Header | Description |
---|---|
Content-Type | application/json; charset=utf-8 |
x-bce-request-id | VPC backend is generated and automatically set to the response header field. |
Error Return
When there is an error in the user's access to the VPC, the corresponding error code and error information will be returned to the user, which is convenient for the user to locate the problem and make appropriate treatment. The detailed error information is returned through Response Body in case of a request error, and the following format is followed:
Parameter Name | Type | Description |
---|---|---|
code | String | Error code |
message | String | Error description |
requestId | String | RequestID of this request |
Example:
{
"code": "NoSuchObject",
"message": "account not exist",
"requestId": "c4abab14-ebc4-4eb0-85d2-03c4d51eed18"
}
BCE Common Error Code
Error Code | Error Message | Status Code | Description |
---|---|---|---|
AccessDenied | Access denied. | 403Forbidden | No permission to access the corresponding resource. |
QualifyNotPass | The User has not pass qualify. | 403 | Account has not passed identity verification |
InappropriateJSON | The JSON you provided was well-formed and valid, but not appropriate forthis operation. | 400 Bad Request | The JSON format in the request is correct, but doesn't meet the requirements semantically, For example, a required item is missing, or the value type does not match. For consideration of compatibility, all unrecognizable items should be ignored directly, and this error should not be returned. |
InternalError | We encountered an internal error Please try again. | 500 Internal Server Error | All other undefined errors should not be utilized when there are specific corresponding other types of errors (including generic and service customized errors). |
InvalidAccessKeyId | The Access Key ID you provided doesnot exist in our records. | 403Forbidden | Access key ID does not exist. |
InvalidHTTPAuthHeader | The Access Key ID you provided does notexist in our records. | 400 BadRequest | Authorization header field format error. |
InvalidHTTPRequest | There was an error in the body of your HTTP request. | 400 Bad Request | The HTTP body format is wrong. For example, it does not conform to the specified Encoding. |
InvalidURI | Could not parse the specified URI. | 400 Bad Request | The URI format is incorrect, such as mismatch of some service-defined keywords. For ID mismatch, more specific error codes should be defined, such as NoSuchKey. |
MalformedJSON | The JSON you provided was not well-formed. | 400 BadRequest | Illegal JSON format. |
InvalidVersion | The API version specified was invalid. | 404 NotFound | The version number of the URI is illegal. |
OptInRequired | A subscription for the service is required. | 403Forbidden | No corresponding service has been enabled. |
PreconditionFailed | The specified If-Match header doesn't match the ETag header. | 412PreconditionFailed | See Etag for details. |
RequestExpired | Request has expired. Timestamp date is <Data>. | 400 BadRequest | The request has timed out. Change to x-bce-date. If only Date exists in the request, you need to convert Date to datetime. |
IdempotentParameterMismatch | The request uses the same client token asa previous, but non-identical request. | 403Forbidden | The API parameters corresponding to clientToken are non-identical. |
SignatureDoesNotMatch | The request signature we calculated does not match the signature you provided. Check yourSecret Access Key and signing method. Consultthe service documentation for details. | 400 Bad Request | The signature attached in the authorization header field is inconsistent with the server-side verification. |
VPC Error Return Code
Error code | Error Description | HTTP Status Code | Chinese explanation |
---|---|---|---|
BadRequest | Bad request parameters or illegal request. | 400 | The request is wrong |
NoSuchObject | The specified object is not found or resource do not exist. | 404 | The object is not found. |
ServiceInternalError | Internal service occurs error. | 500 | Internal service error |
LimitExceeded | Limit exceeded for current request. | 413 | Limit exceeded |
OperationDenied | Operation not available. | 409 | Operation not available |
CidrConflict | This subnet's cidr has conflict with other subnets'. | 409 | The subnet segments cannot overlap. |
ResourceNeedRelease | Delete failed, please delete bcc, blb, nat, vpn, rds and so on in the VPC. | 409 | Resources need to be released. |
ACL Error Return Code
Error code | Error Description | HTTP Status Code | Semantics |
---|---|---|---|
InvalidAction | The ACL rule's action was invalid. | 400 | The ACL rule's action was invalid. |
InvalidProtocol | The ACL rule's protocal was invalid. | 400 | The ACL rule's protocal was invalid. |
InvalidPosition | The ACL rule's position was out of range. | 400 | The ACL rule's position was out of range. |
DuplicatePosition | The ACL rule's position was repeated. | 400 | The ACL rule's action was invalid. |
InvalidPort | The ACL rule's port was invalid. | 400 | The ACL rule's port was invalid. |
NAT Gateway Error Return Code
Error code | Error Description | HTTP Status Code | Semantics |
---|---|---|---|
RequestVpcIdEmpty | The request's param vpcId cannot be empty. | 400 | The request's parameter vpcId cannot be empty. |
RequestNatIdEmpty | The request's param natId cannot be empty. | 400 | The request's parameter natId cannot be empty. |
NoSuchNat | The specified nat is not found. | 404 | The specified nat is not found. |
RequestNameEmpty | The request's param name cannot be empty. | 400 | The request's parameter name cannot be empty. |
RequestSpecEmpty | The request's param spec cannot be empty. | 400 | The request's parameter spec cannot be empty. |
RequestBillingEmpty | The request's param billing cannot be empty. | 400 | The request's parameter billing cannot be empty. |
SpecInvalid | The request's param spec is invalid. | 400 | The request's parameter spec is invalid. |
PaymentTimingEmpty | The request's param paymentTiming cannot be empty. | 400 | The request's parameter paymentTiming cannot be empty. |
PaymentTimingInvalid | The request's param paymentTiming is invalid. | 400 | The request's parameter paymentTiming is invalid. |
ReservationEmpty | The request's param reservation cannot be empty when paymentiming is Preaid. | 400 | The request's parameter reservation cannot be empty when paymentiming is Preaid. |
createOrderError | Create nat gateway order error. | 500 | Create NAT gateway order error. |
subnatEmpty | The VPC in the creation request has no subnet. | 500 | The VPC in the creation request has no subnet. |
NoSuchEip | The specified eip is not found. | 404 | The specified eip is not found. |
RequestEipInvalid | The request's param eip is invalid. | 400 | The request's param eip is invalid. |
NatPostpaid | Postpaid nat cannot be renewed. | 400 | Postpaid nat cannot be renewed. |
ReservationLengthInvalid | The request's param reservationLength is invalid. | 400 | The request's param reservationLength is invalid. |
ReservationTimeUnitInvalid | The request's param reservationTimeUnit is invalid. | 400 | The request's param reservationTimeUnit is invalid. |
NatIdInvalid | The natId is invalid. | 400 | The ntId is invalid. |
SnatRuleSourceAddressInvalid | The snat rule source address is invalid. | 400 | The source address is invalid. |
CidrFormatIllegal | Cidr format is illegal. | 400 | The source address format is illegal. |
SnatRuleSourceAddressConflict | The snat rule source address is conflict. | 400 | The source address conflicts |
LimitExceeded | Limit exceeded for current request. | 400 | The quota exceeds the limit. |
RuleIdNotExist | The rule id is not exist. | 404 | The ruleId is invalid. |
BadRequest | Bad request parameters or illegal request. | 400 | The parameter is invalid. |
SnatRuleEipsInvalid | The snat rule eips is invalid. | 400 | The public network IP is invalid. |
DnatRuleConflictException | The DnatRule's protocol Ip and port has exist. | 400 | DNAT rules conflicts |
DnatRuleProtocolInvalid | The DnatRule's protocol is invalid. | 400 | DNAT protocol is invalid |
DnatRuleInternalPortInvalid | The DnatRule's internal port is invalid. | 400 | The private network IP port is invalid. |
DnatRulePublicPortInvalid | The DnatRule's public port is invalid. | 400 | The public network IP port is invalid. |
DnatRuleInternalIpInvalid | The DnatRule's internalIp not allow empty. | 400 | The private network IP is invalid. |
DnatRuleEipNotAllowEmpty | The DnatRule's eip not allow empty. | 400 | The EIP of DNAT is not allowed to be null. |
DnatEipEmpty | The NatGateway is not bind dnat eip. | 400 | The NAT gateway is not bound with DNAT EIP. |
DnatRuleEipInvalid | The DnatRule’s eip is invalid. | 400 | The bound EIP is not consistent with the DNAT EIP bound with the NAT gateway. |
DnatRuleIdException | The DnatRule's id invalid. | 400 | The ID of DNAT is invalid. |
Peer Connection Error Code
Error Code | Error Description | HTTP Status Code | Semantics |
---|---|---|---|
BadRequest | BadRequest | 400 | Request parameter error |
UnsupportedPeerConnOperation | The peerConn does not support this operation | 400 | The peerConn does not support this operation. |
PeerIfNameException | diff account are not allowed to set PeerIfName | 400 | Diff account are not allowed to set PeerIfName. |
ResizeException | The prepay peerConn only support enlarge bandwidth | 400 | The prepay peerConn only support enlarge bandwidth. |
Error Code of ENIC Services
Error Code | Error Description | HTTP Status Code | Semantics |
---|---|---|---|
SubnetHasNoMoreIpException | The subnet has no more Ip to allocate. | 400 | No ip is available in the subnet. |
VmMemoryCanNotAttachMoreIpException | The device's memory can not attach more ip. | 403 | You cannot add more IPs in the memory of the virtual machine. |
DeviceInvalidException | he deviceId is not same with eni's deviceId. | 400 | The virtual machine Id is invalid. |
VmStatusException | The vm status is not allowed to operate. | 403 | You cannot perform any operation in the current status of the virtual machine. |
EniAndDeviceNotInSameAzException | The eni and device not in same az or not in same vpc. | 403 | The network card is not in the same availability as the virtual machine. |
NatSubnetCanNotBindEip | The subnet's type can not allow bind eip. | 403 | Binding the ENIC in the NAT subnet to the EIP is not allowed. |
PrimaryIPException | The privateIp is invalid or primary Ip is not allowed to delete. | 403 | The primary IP cannot be deleted. |
EniStatusException | The eni status is not allowed to operate. | 403 | You cannot perform any operation in the current network card status. |
EniIdException | The param eniId is invalid. | 400 | The network interface card id is invalid. |
PrivateIpInUseException | The ip is inuse. | 400 | The IP address is occupied. |
SubnetTypeInvalidException | The subnetType is invalid,not allow create eni in subnet which type is BBC and BBC_NAT. | 400 | You cannot create the ENIC in BBC or BBC_NAT subnet. |