Description:
Manage OSS storage buckets.
Syntax:
oss_bucket(fd,bucket)
Note:
External library function (See External Library Guide).
The function manages OSS storage buckets, including create, delete and check whether a storage bucket exists or not. Perform only the check when no option works with it.
Parameter:
fd |
OSS connection object. |
bucket |
Bucket name. |
Option:
@c |
Create a storage bucket; if the storage bucket having the current name already exists, do not create it. |
@d |
Delete a bucket; cannot delete it if it isn’t empty. |
Return value:
Boolean
Example:
|
A |
|
1 |
=oss_open("LTAI5tRgzSpjU73Wt","4dNAtbcjF6arKp26JGaytM","http://oss-cn-beijing.aliyuncs.com") |
Create an OSS connection. |
2 |
=oss_bucket(A1,"raqtest1") |
Check whether bucket named raqtest1 exists or not. |
3 |
=oss_bucket@d(A1,"raqtest2") |
Check whether bucket named raqtest2 exists or not, and delete it if it exists (cannot delete it if the bucket isn’t empty). |
4 |
=oss_bucket@c(A1,"raqtest3") |
Check whether bucket named raqtest3 exists or not, and create one using such a name if it doesn’t exist. |
5 |
>oss_close(A1) |
Close the OSS connection. |