You can use this command to generate the download link of a specified object in a bucket or generate the download links of objects in a bucket in batches by object name prefix.
obsutil sign obs://bucket/key [-e=300] [-config=xxx]
obsutil sign obs://bucket[/key] -r [-e=300] [-timeRange=time1-time2] [-include=*.xxx] [-exclude=*.xxx] [-o=xxx] [-config=xxx]
./obsutil sign obs://bucket/key [-e=300] [-config=xxx]
./obsutil sign obs://bucket[/key] -r [-e=300] [-timeRange=time1-time2] [-include=*.xxx] [-exclude=*.xxx] [-o=xxx] [-config=xxx]
obsutil sign obs://bucket-test/test.txt Download url of [obs://bucket-test/test.txt] is: http://your-endpoint/bucket-test/test.txt?AccessKeyId=xxxx&Expires=1552548758&Signature=xxxx
obsutil sign obs://bucket-test/test/ -r Generate download urls for objects . Generate the download url(s) for the objects in the bucket [bucket-test] finished Task id: af4dc692-6a88-4541-8156-ff1a889d2288
Parameter |
Optional or Mandatory |
Description |
|---|---|---|
bucket |
Mandatory |
The bucket name |
key |
Optional |
The object name used for generating the download link of a single object, or object name prefix used for generating download links of objects in batches |
e |
Optional (additional parameter) |
The validity period of the generated download links of objects, in seconds. Minimum value: 60s. Default value: 300s |
r |
Mandatory when generating download links of objects in batches (additional parameter) |
Generates the download links of objects in batches by a specified object name prefix. |
exclude |
Optional when generating download links of objects in batches (additional parameter) |
The matching patterns of objects that are excluded, for example: *.txt NOTE:
NOTICE:
|
include |
Optional when generating download links of objects in batches (additional parameter) |
The matching patterns of objects that are included, for example: *.jpg NOTE:
NOTICE:
|
timeRange |
Optional (additional parameter) |
The time range matching pattern when generating download links of objects. Only the download links of objects whose latest modification time is within the configured time range are generated. This pattern has a lower priority than the object matching patterns (exclude/include). That is, the time range matching pattern is executed after the configured object matching patterns. NOTE:
|
o |
Optional when generating download links of objects in batches (additional parameter) |
The folder that stores the result files. After the command is executed, result files (possibly success and failure files) will be created in the specified folder. The default value is .obsutil_output, a subfolder in the user's home directory where obsutil commands are executed. NOTE:
|
config |
Optional (additional parameter) |
The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. |
payer |
Optional (additional parameter) |
Specifies that requester pays is enabled. |