Authorizing Cloud Storage
Function
This API is used to authorize cloud storage.
URI
POST /v1/{project_id}/cae/volumes
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. See Obtaining a Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token.
|
X-Enterprise-Project-ID |
No |
String |
Enterprise project ID.
NOTE:
For details about how to obtain enterprise project IDs and enterprise project features, see Enterprise Management User Guide.
|
X-Environment-ID |
Yes |
String |
Environment ID.
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
api_version |
Yes |
String |
API version. Fixed value: v1. |
kind |
Yes |
String |
API type. Fixed value: Volume. |
spec |
Yes |
VolumeSpec object |
Volume specifications. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
resource_type |
Yes |
String |
Resource type. Options: obs and sfs. |
resource_sub_type |
Yes |
String |
Object storage type. |
resources |
Yes |
Array of strings |
Cloud storage name. |
resources_credentials |
No |
Array of ResourcesCredential objects |
Cloud storage and authorization credential. This parameter needs to be added when the env_category field in the response of the API for obtaining the environment list is v2. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
access |
No |
String |
User access key. The current access key must have the permission to access the authorized cloud storage. |
secret |
No |
String |
User secret key. The current secret key must have the permission to access the authorized cloud storage. |
Response Parameters
Status code: 200
OK
None
Example Requests
Authorize cloud storage: Set resource_type to obs and resources to test-bucket.
POST https://{endpoint}/v1/{project_id}/cae/volumes { "api_version" : "v1", "kind" : "Volume", "spec" : { "resource_type" : "obs", "resource_sub_type" : "object_bucket", "resources" : [ "test-bucket" ], "resources_credentials" : [ { "access" : "xxx", "secret" : "xxx", "resources" : [ "test-bucket" ] } ] } }
Example Responses
None
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
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