Granting or Canceling OBS Bucket Authorization
Function
This API is used to grant or cancel OBS bucket authorization.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
URI
PUT /v2/rtc-ops/buckets/authentication
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | User token. It can be obtained by calling the IAM API that is used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| bucket | Yes | String | OBS bucket name. |
| operation | Yes | Integer | Operation. The options are as follows: 1: authorize; 0: cancel authorization. |
| location | Yes | String | Region where a bucket resides. |
| project_id | No | String | HUAWEI CLOUD project ID of the tenant. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| X-request-Id | String | Request ID for task tracing. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| X-request-Id | String | Request ID for task tracing. |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Description. |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| X-request-Id | String | Request ID for task tracing. |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Description. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| X-request-Id | String | Request ID for task tracing. |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Description. |
Example Requests
Grants permissions for bucket bucket001 in the cn-north-4 region.
POST https://rtc-api.myhuaweicloud.com/rtc-ops/buckets/authentication
{
"bucket" : "bucket001",
"operation" : 1,
"location" : "cn-north-4"
} Example Responses
Status code: 400
Operation failed.
{
"error_code" : "RTC.00001003",
"error_msg" : "InvalidParameterValue"
} Status code: 401
Request failed due to an incorrect X-Auth-Token.
{
"error_code" : "RTC.00001003",
"error_msg" : "InvalidParameterValue"
} Status code: 500
Query failed due to a server error.
{
"error_code" : "RTC.00002xxx",
"error_msg" : "InternalError"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Operation succeeded. |
| 400 | Operation failed. |
| 401 | Request failed due to an incorrect X-Auth-Token. |
| 500 | Query failed due to a server error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot