Creating an Authorization Code for Directory Sharing
Function
You can use this command to specify the bucket name, object name prefix, and access code to create an authorization code for directory sharing.
Command Line Structure
- In Windows
obsutil create-share obs://bucket[/prefix] [-ac=xxx] [-vp=xxx] [-dst=xxx] [-config=xxx]
- In Linux OS or macOS
./obsutil create-share obs://bucket[/prefix] [-ac=xxx] [-vp=xxx] [-dst=xxx] [-config=xxx]
Examples
- In Windows, you can run the obsutil create-share obs://bucket/test/ -ac=123456 -vp=1m command to create an authorization code that is valid within one month.
obsutil create-share obs://bucket/test/ -ac=123456 -vp=1m Authorization Code: token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Access Code: 123456 Valid Until: Sat, 26 Oct 2019 11:28:10 GMT +8000
Parameter Description
Parameter |
Optional or Mandatory |
Description |
---|---|---|
bucket |
Mandatory |
Name of a bucket |
prefix |
Optional |
Prefix of an object name. If this parameter is specified, objects starting with this prefix are shared. If this parameter is left blank, all objects in the bucket are shared.
NOTE:
It is recommended that the value end with a slash (/). |
ac |
Optional (additional parameter) |
Access code.
NOTE:
|
vp |
Optional (additional parameter) |
Validity period of an authorization code. The default value is one day, indicating that the generated authorization code is valid for only one day.
NOTE:
|
dst |
Optional (additional parameter) |
Path for storing the generated authorization code. |
config |
Optional (additional parameter) |
User-defined configuration file for executing a command. For details about parameters that can be configured, see Parameter Description. |
Response
Field |
Description |
---|---|
Authorization Code |
Code for authorization |
Access Code |
Access code |
Valid Until |
Expiration time |
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