Checking Whether Data Can Be Transferred to the Configured OBS Bucket
Function
This API is used to check whether data can be transferred to the OBS bucket.
URI
POST /v3/{domain_id}/checkbucket
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
domain_id |
Yes |
String |
Account ID. For details, see Obtaining an Account ID and Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
buckets |
No |
Array of CheckBucketRequest objects |
List of OBS buckets to be checked. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
bucket_name |
Yes |
String |
OBS bucket name. The value contains 3 to 63 characters and must start with a digit or lowercase letter. Only lowercase letters, digits, hyphens (-), and periods (.) are allowed. |
bucket_location |
Yes |
String |
OBS bucket location. |
kms_id |
No |
String |
Key ID used for encrypting transferred trace files. This parameter is mandatory when is_support_trace_files_encryption is set to true. |
is_support_trace_files_encryption |
No |
Boolean |
Whether trace files are encrypted during transfer to an OBS bucket. This parameter must be used with kms_id. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
buckets |
Array of Bucket objects |
Response body for checking the OBS bucket status. |
Parameter |
Type |
Description |
---|---|---|
bucket_name |
String |
OBS bucket name. The value contains 3 to 63 characters and must start with a digit or lowercase letter. Only lowercase letters, digits, hyphens (-), and periods (.) are allowed. |
bucket_location |
String |
Bucket location. |
kms_id |
String |
Key ID used for transferring and encrypting trace files. This parameter is mandatory when is_support_trace_files_encryption is set to true. |
is_support_trace_files_encryption |
Boolean |
Whether trace files are encrypted during transfer to an OBS bucket. This parameter must be used with kms_id. |
check_bucket_response |
CheckBucketResponse object |
Check result of the OBS bucket. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_message |
String |
Error message. |
response_code |
Integer |
Returned HTTP status code. |
success |
Boolean |
Whether the transfer is successful. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. Format: CTS.XXX. |
error_msg |
String |
Error message. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. Format: CTS.XXX. |
error_msg |
String |
Error message. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. Format: CTS.XXX. |
error_msg |
String |
Error message. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. Format: CTS.XXX. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. Format: CTS.XXX. |
error_msg |
String |
Error message. |
Status code: 503
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. Format: CTS.XXX. |
error_msg |
String |
Error message. |
Example Request
Example request body for checking the OBS bucket status:
GET https://{endpoint}/v3/{domain_id}/checkbucket { "buckets" : [ { "bucket_location" : "cn-north-1", "bucket_name" : "bucket1", "is_support_trace_files_encryption" : false, "kms_id" : "1f26f8d8-65d4-436b-bea2-bd0ac1984f71" }, { "bucket_location" : "cn-north-2", "bucket_name" : "bucket2", "is_support_trace_files_encryption" : false, "kms_id" : "0c1b7d87-5186-411a-86ce-ed3b2ec848c9" } ] }
Example Response
Status code: 200
The request is successfully sent.
{ "buckets" : [ { "bucket_location" : "cn-north-1", "bucket_name" : "bucket1", "check_bucket_response" : { "response_code" : 200, "success" : true }, "is_support_trace_files_encryption" : false, "kms_id" : "1f26f8d8-65d4-436b-bea2-bd0ac1984f71" }, { "bucket_location" : "cn-north-2", "bucket_name" : "bucket2", "check_bucket_response" : { "error_code" : "OBS.NoSuchBucket", "error_message" : "Error message:Request Error.OBS service Error Message.", "response_code" : 404, "success" : false }, "is_support_trace_files_encryption" : false, "kms_id" : "0c1b7d87-5186-411a-86ce-ed3b2ec848c9" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
The request is successfully sent. |
400 |
The server failed to process the request. |
401 |
The request is rejected due to authentication failure. |
403 |
The server understood the request but refused to authorize it. |
404 |
The requested resource does not exist. |
500 |
Failed to complete the request because of an internal service error. |
503 |
The requested service is invalid. The client should not repeat the request without modifications. |
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.