API Overview of OBS SDK for Python
Table 1 describes the APIs provided by OBS SDK for Python. You can click an API name in the table to see its detailed information and sample code.
SDK API Overview
Interface |
Method |
Function |
---|---|---|
ObsClient.createBucket |
Creates a bucket. |
|
ObsClient.listBuckets |
Returns a list of buckets in alphabetical order. |
|
ObsClient.headBucket |
Determines whether a bucket exists. |
|
ObsClient.deleteBucket |
Deletes an empty bucket. |
|
ObsClient.listObjects |
Returns some or all (up to 1,000) of the objects in a bucket. |
|
ObsClient.listVersions |
Lists some or all (up to 1,000) of the object versions in a bucket. |
|
ObsClient.listMultipartUploads |
Lists ongoing multipart uploads. |
|
ObsClient.getBucketMetadata |
Sends a HEAD request to a bucket to obtain the bucket metadata such as CORS rules (if set), the storage class, and other information. |
|
ObsClient.getBucketLocation |
Returns the region where the bucket is created. |
|
ObsClient.getBucketStorageInfo |
Returns the storage information of a bucket, including the number of objects and the space occupied by the objects in the bucket. |
|
ObsClient.setBucketQuota |
Sets a storage quota for a bucket. |
|
ObsClient.getBucketQuota |
Returns the storage quota of a bucket. |
|
ObsClient.setBucketStoragePolicy |
Configures a storage class for a bucket. |
|
ObsClient.getBucketStoragePolicy |
Returns the storage class of a bucket. |
|
ObsClient.setBucketAcl |
Configures the ACL for a bucket. |
|
ObsClient.getBucketAcl |
Returns the bucket ACL. |
|
ObsClient.setBucketLogging |
Configures logging for a bucket. |
|
Obtaining the Logging Configuration of a Bucket (SDK for Python) |
ObsClient.getBucketLogging |
Returns the logging configuration of a bucket. |
ObsClient.setBucketPolicy |
Configures a bucket policy. If the bucket already has a policy, the policy will be overwritten by the one specified in this request. |
|
ObsClient.getBucketPolicy |
Returns the policy of a bucket. |
|
ObsClient.deleteBucketPolicy |
Deletes the policy of a bucket. |
|
ObsClient.setBucketLifecycle |
Configures lifecycle rules for a bucket to periodically transition objects between storage classes or delete objects. |
|
Obtaining the Lifecycle Configuration of a Bucket (SDK for Python) |
ObsClient.getBucketLifecycle |
Returns the lifecycle configuration of a bucket. |
Deleting the Lifecycle Configuration of a Bucket (SDK for Python) |
ObsClient.deleteBucketLifecycle |
Deletes all lifecycle rules of a bucket. |
Configuring Static Website Hosting for a Bucket (SDK for Python) |
ObsClient.setBucketWebsite |
Configures static website hosting for a bucket. |
Obtaining Static Website Hosting for a Bucket (SDK for Python) |
ObsClient.getBucketWebsite |
Returns the static website hosting configuration of a bucket. |
Deleting Static Website Hosting for a Bucket (SDK for Python) |
ObsClient.deleteBucketWebsite |
Deletes the static website hosting configurations of a bucket. |
ObsClient.setBucketVersioning |
Configures versioning for a bucket. |
|
Obtaining the Versioning Status of a Bucket (SDK for Python) |
ObsClient.getBucketVersioning |
Returns the versioning status of a bucket. |
ObsClient.setBucketCors |
Configures CORS for a bucket to allow cross-origin requests. |
|
Obtaining the CORS Configuration of a Bucket (SDK for Python) |
ObsClient.getBucketCors |
Returns the CORS rules of a bucket. |
Deleting the CORS Configuration of a Bucket (SDK for Python) |
ObsClient.deleteBucketCors |
Deletes the CORS configuration of a bucket. |
ObsClient.setBucketTagging |
Configures tags for a bucket. |
|
ObsClient.getBucketTagging |
Returns the tags of a bucket. |
|
ObsClient.deleteBucketTagging |
Deletes the tags of a bucket. |
|
ObsClient.putContent |
Uploads an object to a bucket. |
|
ObsClient.putFile |
Uploads a file or folder to a bucket. |
|
ObsClient.appendObject |
Appends content to an uploaded object. |
|
ObsClient.getObject |
Downloads an object from a bucket. |
|
ObsClient.copyObject |
Creates a copy for a specified object. |
|
ObsClient.deleteObject |
Deletes a single object from a bucket. |
|
ObsClient.deleteObjects |
Deletes multiple objects from a bucket in a batch. |
|
ObsClient.getObjectMetadata |
Returns the object metadata. |
|
ObsClient.setObjectMetadata |
Modifies the metadata for an object. |
|
ObsClient.setObjectAcl |
Configures the ACL for an object. |
|
ObsClient.getObjectAcl |
Returns the ACL of an object. |
|
ObsClient.initiateMultipartUpload |
Initiates a multipart upload in a bucket. |
|
ObsClient.uploadPart |
Uploads parts to a bucket by specifying the multipart upload ID. |
|
ObsClient.copyPart |
Copies a part to a specified bucket by specifying the multipart upload ID. |
|
ObsClient.listParts |
Returns the uploaded parts in a bucket by specifying the multipart upload ID. |
|
ObsClient.completeMultipartUpload |
Completes a multipart upload based on the multipart upload ID. |
|
ObsClient.abortMultipartUpload |
Aborts a multipart upload in a bucket by specifying the multipart upload ID. |
|
ObsClient.restoreObject |
Restores an Archive object. |
|
ObsClient.createSignedUrl |
Creates a signed URL based on the specified AK and SK, HTTP method, and request parameters. |
|
Generating Authentication Parameters for Browser-Based Uploads (SDK for Python) |
ObsClient.createPostSignature |
Creates request parameters for authentication to enable browser-based upload with POST. |
ObsClient.uploadFile |
Enables resumable uploads of objects in the event of unstable network connections or program crashes. |
|
ObsClient.downloadFile |
Adds the resumable function to the partial download API. |
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