2.Create and Manage Buckets
A bucket in MCS is a logical container for storing files and folders.
2.1 Create a new bucket
Use the create_bucket
method to create a new bucket:
2.2 List existing buckets
List all existing buckets using list_buckets
:
2.3 Get bucket information
Use get_bucket(bucket_name)
to get specific bucket info
2.4 Create folder
create_folder(bucket_name, folder_name, prefix='')
The create_folder
the method allows you to create a folder in the specified bucket. It accepts bucket names, folder names, and prefixes. The folder will be created in bucket_name/prefix/folder_name
Parameters
bucket_name: The name of the bucket
folder_name: The name of the folder to create
prefix: The prefix for the folder's object name
Last updated