0% found this document useful (0 votes)
123 views

Alibaba Cloud Object Storage Service: Quick Start

Uploaded by

aizkor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
123 views

Alibaba Cloud Object Storage Service: Quick Start

Uploaded by

aizkor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Alibaba Cloud

Object Storage Service

Quick Start

Issue: 20200529
Object Storage Service Quick Start /  Legal disclaimer

Legal disclaimer
Alibaba Cloud reminds you to carefully read and fully understand the terms and conditions
of this legal disclaimer before you read or use this document. If you have read or used this
document, it shall be deemed as your total acceptance of this legal disclaimer.

1. You shall download and obtain this document from the Alibaba Cloud website or other
Alibaba Cloud-authorized channels, and use this document for your own legal business
activities only. The content of this document is considered confidential information of
Alibaba Cloud. You shall strictly abide by the confidentiality obligations. No part of this
document shall be disclosed or provided to any third party for use without the prior
written consent of Alibaba Cloud.

2. No part of this document shall be excerpted, translated, reproduced, transmitted, or


disseminated by any organization, company, or individual in any form or by any means
without the prior written consent of Alibaba Cloud.

3. The content of this document may be changed due to product version upgrades,
adjustments, or other reasons. Alibaba Cloud reserves the right to modify the content
of this document without notice and the updated versions of this document will be
occasionally released through Alibaba Cloud-authorized channels. You shall pay
attention to the version changes of this document as they occur and download and
obtain the most up-to-date version of this document from Alibaba Cloud-authorized
channels.

4. This document serves only as a reference guide for your use of Alibaba Cloud products
and services. Alibaba Cloud provides the document in the context that Alibaba Cloud
products and services are provided on an "as is", "with all faults" and "as available"
basis. Alibaba Cloud makes every effort to provide relevant operational guidance based
on existing technologies. However, Alibaba Cloud hereby makes a clear statement that it
in no way guarantees the accuracy, integrity, applicability, and reliability of the content
of this document, either explicitly or implicitly. Alibaba Cloud shall not bear any liability
for any errors or financial losses incurred by any organizations, companies, or individual
s arising from their download, use, or trust in this document. Alibaba Cloud shall not,
under any circumstances, bear responsibility for any indirect, consequential, exemplary
, incidental, special, or punitive damages, including lost profits arising from the use or
trust in this document, even if Alibaba Cloud has been notified of the possibility of such
a loss.

Issue: 20200529 I
Object Storage Service Quick Start /  Legal disclaimer

5. By law, all the contents in Alibaba Cloud documents, including but not limited to
pictures, architecture design, page layout, and text description, are intellectual property
of Alibaba Cloud and/or its affiliates. This intellectual property includes, but is not
limited to, trademark rights, patent rights, copyrights, and trade secrets. No part of
this document shall be used, modified, reproduced, publicly transmitted, changed,
disseminated, distributed, or published without the prior written consent of Alibaba
Cloud and/or its affiliates. The names owned by Alibaba Cloud shall not be used,
published, or reproduced for marketing, advertising, promotion, or other purposes
without the prior written consent of Alibaba Cloud. The names owned by Alibaba Cloud
include, but are not limited to, "Alibaba Cloud", "Aliyun", "HiChina", and other brands
of Alibaba Cloud and/or its affiliates, which appear separately or in combination, as
well as the auxiliary signs and patterns of the preceding brands, or anything similar
to the company names, trade names, trademarks, product or service names, domain
names, patterns, logos, marks, signs, or special descriptions that third parties identify as
Alibaba Cloud and/or its affiliates.

6. Please contact Alibaba Cloud directly if you discover any errors in this document.

II Issue: 20200529
Object Storage Service Quick Start /  Legal disclaimer

Issue: 20200529 III


Object Storage Service Quick Start /  Document conventions

Document conventions
Style Description Example

A danger notice indicates a


situation that will cause major Danger:
system changes, faults, physical Resetting will result in the loss of
injuries, and other adverse results. user configuration data.

A warning notice indicates a


situation that may cause major Warning:
system changes, faults, physical Restarting will cause business
injuries, and other adverse results. interruption. About 10 minutes
are required to restart an
instance.

A caution notice indicates warning


information, supplementary Notice:
instructions, and other content If the weight is set to 0, the server
that the user must understand. no longer receives new requests.

A note indicates supplemental


instructions, best practices, tips, Note:
and other content. You can use Ctrl + A to select all
files.

> Closing angle brackets are used Click Settings > Network > Set
to indicate a multi-level menu network type.
cascade.

Bold Bold formatting is used for buttons Click OK.


, menus, page names, and other UI
elements.

Courier font Courier font is used for commands. Run the cd /d C:/window
command to enter the Windows
system folder.

Italic Italic formatting is used for bae log list --instanceid


parameters and variables.
Instance_ID

[] or [a|b] This format is used for an optional ipconfig [-all|-t]


value, where only one item can be
selected.

Issue: 20200529 I
Object Storage Service Quick Start /  Document conventions

Style Description Example

{} or {a|b} This format is used for a required switch {active|stand}


value, where only one item can be
selected.

II Issue: 20200529
Object Storage Service Quick Start /  Document conventions

Issue: 20200529 III


Object Storage Service Quick Start /  Contents

Contents

Legal disclaimer......................................................................... I
Document conventions................................................................I
1 Get started with Object Storage Service.................................... 1
2 Sign up for OSS...................................................................... 3
3 Create buckets........................................................................ 4
4 Upload objects......................................................................10
5 Download objects................................................................. 13
6 Delete objects....................................................................... 16
7 Delete buckets...................................................................... 18

IV Issue: 20200529
Object Storage Service Quick Start /  1 Get started with Object Storage Service

1 Get started with Object Storage Service


Alibaba Cloud Object Storage Service (OSS) provides you with network-based data access
services. OSS allows you to store and retrieve a variety of unstructured data files, including
text files, images, audio files, and video files, over the network at any time.

Before you use OSS, we recommend that you familiarize with OSS usage limits. For more
information, see Limits.

OSS uploads data files as objects to a bucket. You can perform the following operations in
OSS:

• Create one or multiple buckets and upload one or multiple objects to each bucket.

• Share or download an object by using its URL assigned by OSS.

• Configure the ACL for a bucket or object by modifying its attributes or metadata.

• Perform basic and advanced OSS operations in the OSS console or by using various
convenient tools and SDKs.

Use the OSS console

The following figure shows the steps to perform basic OSS operations in the OSS console.

1. Activate OSS.

2. Create a bucket.

3. Upload an object.

4. Download an object.

5. Delete an object.

6. Delete a bucket.

Use ossbrowser

ossbrowser is a graphical object management tool for OSS. This tool supports the Windows,
Linux, and Mac operating systems. You can use ossbrowser to view, upload, and download
objects and folders, upload or download objects in resumable mode, or perform GUI-based
policy authorization. As a desktop graphical tool, ossbrowser provides lower transmission
speed and performance than ossutil. For more information, see Quick start.

Issue: 20200529 1
Object Storage Service Quick Start /  1 Get started with Object Storage Service

Use ossutil

ossutil allows you to use command lines to manage OSS data and supports the following
operating systems: Windows, Linux, and Mac. ossutil provides simple commands to
efficiently manage buckets and objects and supports concurrent upload tasks. ossutil
supports the upload, download, and resumable transmission of objects and folders. For
more information, see Quick start.

Use APIs and SDKs

OSS provides APIs and SDKs in multiple programming languages to facilitate secondary
development. For more information, see the following links:

• Java SDK quick start

• Python SDK quick start

• PHP SDK quick start

• Go SDK quick start

• C SDK quick start

For SDK examples in more programming languages, see OSS SDK introduction. For more
information about OSS APIs, see OSS API introduction.

Subsequent operations

For more information about advanced OSS operations, see the OSS Developer Guide.

2 Issue: 20200529
Object Storage Service Quick Start /  2 Sign up for OSS

2 Sign up for OSS


This topic describes how to sign up for OSS.

Prerequisites

Before using OSS, you must register an Alibaba Cloud account.

Procedure

1. Log on to the Alibaba Cloud official website.

2. Click Object Storage Service in the Product list.

3. In the Object Storage Service page, click Buy Now.

4. Once OSS is activated, click Management Console in the Object Storage Service page to
access the OSS console.

You can also click Console in the upper right corner to access the Alibaba Cloud console,
and then select Object Storage Service in the left-side navigation pane to access the
OSS console.

What's next
Create a bucket

Issue: 20200529 3
Object Storage Service Quick Start /  3 Create buckets

3 Create buckets
After you activate Alibaba Cloud OSS, you must create a bucket in the OSS console to store
objects.

Use the OSS console

To create a bucket in the OSS console, perform the following steps:

1. Log on to the OSS console.

2. In the left-side navigation pane, click Buckets. On the page that appears, click Create
Bucket.

You can also click Overview. Click Create Bucket in the upper-right corner.

3. In the Create Bucket dialog box that appears, configure the parameters listed in the
following table.

Parameter Description

Bucket Name Set the name of the bucket. The name cannot be changed after the
bucket is created. The naming conventions are as follows:

• The bucket name must be globally unique in Alibaba Cloud OSS


.
• The name can contain only lowercase letters, digits, and
hyphens (-).
• The name must start and end with a lowercase letter or digit.
• The name must be 3 to 63 bytes in length.

Region Select the region for the bucket. The region cannot be changed
after the bucket is created. To access OSS from an ECS instance
over the internal network, select the region in which the ECS
instance is located. For more information, see Endpoints.

4 Issue: 20200529
Object Storage Service Quick Start /  3 Create buckets

Parameter Description

Storage Class Select the storage class for the bucket.

• Standard: provides storage services featuring high


performance, reliability, and availability. This storage class is
suitable for frequently accessed data.
• IA: has lower storage prices and is suitable for long-term
storage of data. Data of this storage class is less frequently
accessed. Objects of the IA storage class must be stored for a
minimum period of 30 days. Fees are incurred if objects of the
IA storage class are deleted before they are stored for 30 days.
Objects of the IA storage class also have a minimum billable
storage of 64 KB. Objects less than 64 KB are charged as 64 KB.
In addition, retrieving data of this storage class also incurs fees.
• Archive: is suitable for long-term (at least six months) storage
of data that is infrequently accessed. The data may take up to
one minute to restore before it can be read. This storage option
is suitable for data such as archival data, medical images,
scientific materials, and video footage.
• Cold Archive: is suitable for storing extremely cold data with
ultra-long lifecycles. Such data includes data that must be
retained for an extended period of time due to compliance
requirements, raw data that has been accumulated over an
extended period of time in the big data and AI fields, media
resources that have been retained in the film and television
industries, and archived videos from the online education
industry.

Note:
The Cold Archive storage class is in public preview in the
Australia (Sydney) region. You can contact technical support
to apply for a trial.

For more information, see #unique_22.

Issue: 20200529 5
Object Storage Service Quick Start /  3 Create buckets

Parameter Description

Zone-redundant For buckets in China (Shenzhen), China (Beijing), China


Storage (Hangzhou), China (Shanghai), and Singapore, you can select
whether to enable zone-redundant storage (ZRS).

• Enable: After ZRS is enabled, OSS backs up your data to three


zones within the same region. If the storage class of the bucket
is Standard, the objects in the bucket are standard (ZRS) objects
by default. For more information, see #unique_23.

Notice:
This feature incurs extra costs and cannot be disabled after it
is enabled. Exercise caution when you enable this feature.
• Disable: After ZRS is disabled, the redundancy type of the
objects in the bucket is locally redundant storage (LRS). If the
storage class of the bucket is Standard, the objects in the bucket
are standard (LRS) objects by default.

Versioning Select whether to enable versioning.

• Enable: When versioning is enabled for a bucket, an object that


is overwritten or deleted is saved as a previous version of the
object. Versioning allows you to restore objects in a bucket to
any previous point in time, and protects your data from being
accidentally overwritten or deleted. For more information, see
#unique_24.
• Disable: disables versioning.

6 Issue: 20200529
Object Storage Service Quick Start /  3 Create buckets

Parameter Description

Access Control List Select the bucket ACL.


(ACL)
• Private: Only the bucket owner can perform read and write
operations on objects in the bucket. Other users cannot access
the objects in the bucket.
• Public Read: Only the bucket owner can perform write
operations on objects in the bucket. Other users, including
anonymous users, can perform only read operations on the
objects in the bucket.

Warning:
All Internet users can access objects in the bucket. This may
cause unexpected access to the data in your bucket, and
cause an increase in your fees. Exercise caution when you set
your bucket ACL to Public Read.
• Public Read/Write: All users, including anonymous users, can
perform read and write operations on objects in the bucket.

Warning:
All Internet users can access objects in the bucket and write
data to the bucket. This may cause unexpected access to the
data in your bucket, and cause an increase in your fees. If a
user uploads prohibited data or information, it may affect
your legitimate interests and rights. Therefore, if there are no
special requirements, we recommend that you do not set your
bucket ACL to Public Read/Write.

Issue: 20200529 7
Object Storage Service Quick Start /  3 Create buckets

Parameter Description

Server-side Select whether to enable server-side encryption.


Encryption
• None: Server-side encryption is disabled.
• AES256: Objects are encrypted by using AES-256. OSS server-
side encryption uses AES-256 to encrypt objects with different
data keys. AES-256 uses master keys that are regularly rotated
to encrypt data keys.
• KMS: You can use a specified CMK ID or the default CMK stored
in KMS to encrypt or decrypt data. For more information about
KMS-based encryption, see Implement server-side encryption
with CMKs stored in KMS.

- alias/acs/oss: The default CMK stored in KMS is used to


encrypt different objects and decrypt the objects when they
are downloaded.
- CMK ID: The keys generated by a specified CMK are used
to encrypt different objects and the specified CMK ID is
recorded in the metadata of the encrypted object. Objects
are decrypted when they are downloaded by users who
have decryption permissions. Before specifying a CMK ID,
you must create a normal key or an external key in the same
region as the bucket in the KMS console. This feature is in
public preview. To obtain the related permissions, contact
technical support personnel.

Notice:

- Before using the KMS-based encryption, you must activate


KMS.
- You are charged for calling API operations when you use
CMKs to encrypt or decrypt data.

Real-time Log Select whether to enable real-time log query for OSS.
Query
• Enable: enables real-time log query for OSS. OSS uses Log
Service to provide real-time OSS log queries for the last seven
days free of charge. After this feature is enabled, you can query
and analyze records of access to objects in OSS buckets by
using the OSS console in real time. For more information, see
Real-time log query.
• Disable: disables real-time log query.

8 Issue: 20200529
Object Storage Service Quick Start /  3 Create buckets

Parameter Description

Scheduled Backup Select whether to create a scheduled backup plan to back up your
OSS data by using Hybrid Backup Recovery (HBR).

• Enable: After scheduled backup is enabled, OSS creates a


backup plan to buck up data once a day and retain the backup
files for one week. You can choose Files > Scheduled Backup to
view the backup plan that was created.
• Disable: creates no scheduled backup plans.

Notice:
If HBR is not activated or not authorized to access OSS, scheduled
backup plans cannot be created. For more information, see
#unique_28.

4. Click OK.

Use ossutil

ossutil is a command line tool for OSS. You can use ossutil to create a bucket. For more
information, see mb.

Use APIs and SDKs

OSS provides APIs and SDKs that use a variety of programming languages to facilitate
secondary development. For more information, see the following topics:

• API operation: PutBucket

• Java SDK: #unique_31

• Python SDK: the "Create a bucket" section in Manage buckets

• PHP SDK: the "Create a bucket" section in Bucket

• Go SDK: the "Create a bucket" section in Bucket

• C SDK: the "Create a bucket" section in Bucket

For more information about SDK examples in more programming languages, see
t22258.dita#concept_dcn_tp1_kfb.

What's next
Upload objects

Issue: 20200529 9
Object Storage Service Quick Start /  4 Upload objects

4 Upload objects
After a bucket is created, you can upload any type of object to it.

Prerequisites
A bucket has been created. For more information, see Create a bucket.

Use the OSS console

To upload an object to an OSS bucket in the OSS console, perform the following steps:

1. Log on to the OSS console.

2. Click the target bucket.

• New console: Click Buckets, and then click the name of the target bucket.

• Old console: In the left-side navigation pane, click the name of the target bucket.

3. Choose Files > Upload.

4. In the Upload dialog box that appears, set the following parameters.

Parameter Description

Upload To Sets the folder to which objects are uploaded.

• Current: Objects are uploaded to the current folder.


• Specified: Objects are uploaded to the specified folder. You
must enter a folder name. If the entered folder does not exist,
OSS automatically creates the corresponding folder and
uploads the object to the folder.

10 Issue: 20200529
Object Storage Service Quick Start /  4 Upload objects

Parameter Description

File ACL Sets the ACL of the object to upload. Default value: Inherited from
Bucket.

• Inherited from Bucket: The ACL of each object is the same as


that of the bucket.
• Private: Only the bucket owner or authorized users of this
bucket can read and write objects in the bucket. Other users,
including anonymous users cannot access the objects in the
bucket without authorization.
• Public Read: Only the bucket owner can perform write
operations on objects in the bucket. Other users, including
anonymous users, can perform only read operations on objects
in the bucket.
• Public Read/Write: All users, including anonymous users, can
read and write objects in the bucket.

For more information about object ACL, see #unique_37/


unique_37_Connect_42_section_yft_rvm_2gb.

Upload Drag and drop one or more objects to upload to this section, or
click Upload to select one or more objects to upload.

Notice:

• If the uploaded object has the same name as an existing


object in the bucket, the existing object will be overwritten.
• If you upload a folder to OSS, only the files in the folder are
uploaded and stored in the same folder as the bucket.
• Do not refresh or close the upload page when objects are
being uploaded. Otherwise, the upload tasks are interrupted
and the upload object list is cleared.

5. After the upload is complete, close the Upload Tasks dialogue box.

Use ossbrowser

ossbrowser is a graphical object management tool for OSS. You can use ossbrowser to
upload an object to an OSS bucket. For more information, see #unique_11.

Use ossutil

ossutil is a command-line tool for OSS. You can use ossutil to upload an object to OSS. For
more information, see cp.

Issue: 20200529 11
Object Storage Service Quick Start /  4 Upload objects

Use APIs and SDKs


OSS provides APIs and SDKs that use a variety of programming languages to facilitate
secondary development. For more information, see the following topics:

• API operation:

- Simple upload: PutObject

- Append upload: #unique_40

- Multipart upload: #unique_41

• Java SDK: Overview

• Python SDK: Overview

• PHP SDK: Overview

• Go SDK: Overview

• C SDK: Overview

For more information about SDK examples in other programming languages, see Introducti
on.

Precautions

• You can use the OSS console to upload an object up to 5 GB in size.

• You can use ossbrowser and ossutil to upload an object up to 48.8 TB in size.

• When you use #unique_47 to upload an object, the size of object that can be appended
each time and the size of the entire object cannot exceed 5 GB.

• If you use an SDK or API to perform Simple upload and Form upload, the size of the
object to upload cannot exceed 5 GB.

• If you use an SDK or API to perform Multipart upload and resumable upload the size of
the object to upload cannot exceed 48.8 TB.

What's next

• Images can be processed in OSS after they are uploaded. For more information, see
Image processing.

• Audio or video objects can be processed in OSS after they are uploaded. For more
information, see the "Media Processing" section in Cloud data processing.

• After objects are uploaded to OSS, you can use Upload callback to submit a callback
request to the specified application server and perform subsequent operations.

• You can also download objects that have been uploaded to OSS as needed. For more
information, see Download objects.

12 Issue: 20200529
Object Storage Service Quick Start /  5 Download objects

5 Download objects
This topic describes how to download one or more objects from a bucket in the OSS
console.

Prerequisites

Objects have been uploaded to the bucket. For more information, see Upload objects.

Use the OSS console

Click the Files tab. You can perform the operations listed in the following table.

Operation Procedure Description

Download Select one or more objects. Choose You can download up to 100
multiple Batch Operation > Download. objects at a time from the console.
objects at a
time

Download You can use one of the following -


a single methods to download a single
object object:

• Choose More > Download in the


Actions column corresponding to
the object.
• Click the name of an object, or
click View Details in the Actions
column corresponding to the
object. In the View Details
dialog box that appears, click
Download.

Issue: 20200529 13
Object Storage Service Quick Start /  5 Download objects

Operation Procedure Description

Preview an You can use one of the following If your bucket is bound to a custom
object methods to preview an object: domain name, find the Custom
Domain Name section in the View
• Preview an object from the
Details dialog box. Select the
console
bound custom domain name or
Click the name of an object, None from the drop-down list
or click View Details in the to generate different URLs of the
object. For more information about
Actions column corresponding
how to bind a custom domain
to the object. If your browser name, see #unique_55.
supports previews of objects in
• When you use a browser to
this format, you can preview the access web page objects of
object in the View Details dialog the HTM, HTML, JSP, PLG, HTX,
and STM formats by using an
box that appears.
unmodified URL generated
• Preview an object by using the
from an OSS domain name,
object URL
the objects are downloaded
Click the name of an object, or . However, if you use a URL
generated from a custom
click View Details in the Actions
domain name, you can preview
column corresponding to the the object in the browser.
object. In the View Details • When you access an image
dialog box that appears, click object by using an unmodified
URL:
Open File URL.
- If your bucket was created
before September 23, 2019
within the mainland China
regions, you can use an
object URL generated from
an OSS domain name or a
custom domain name to
preview the object in the
browser.
- If your bucket was created
after September 23, 2019
within the mainland China
regions, when you access
an image object through
the browser by using an
object URL generated from
an OSS domain name, the
image object is downloaded
as an attachment. If you
14 instead access anIssue:
image20200529

object by using an object URL


generated from a custom
Object Storage Service Quick Start /  5 Download objects

Operation Procedure Description

Share an Click the name of an object, or click If you want to share a private
object View Details in the Actions column object, you must set Validity Period
corresponding to the object. In (Seconds) during which the object
the View Details dialog box that can be shared. The default validity
appears, click Copy File URL. Send period of the URL is 3,600 seconds
the object URL to other visitors. (1 hour). The maximum validity
period is 32,400 seconds (9 hours).
To obtain a URL with a longer
validity period, we recommend
that you use ossutil, ossbrowser, or
SDKs.

Use ossbrowser

ossbrowser is a graphical object management tool for OSS. You can use ossbrowser to
download objects you need. For more information, see Quick start.

Use ossutil

ossutil is a command-line tool for OSS. You can use ossutil to download objects you need.
For more information, see cp.

Use APIs and SDKs

OSS provides APIs and SDKs that use a variety of programming languages to facilitate
secondary development. For more information, see the following topics:

• API operation: GetObject

• Java SDK: Overview

• Python SDK: Overview

• PHP SDK: Overview

• Go SDK: Overview

• C SDK: Overview

For more information about SDK examples in other programming languages, see
Introduction.

Issue: 20200529 15
Object Storage Service Quick Start /  6 Delete objects

6 Delete objects
If you no longer need objects in a bucket, delete them from the bucket to avoid incurring
further fees.

Context
You can delete a single object or multiple objects by using the OSS console. You can delete
up to 100 objects at a time by using the console. You can select and delete objects in a
more flexible manner. For more information about how to delete more than 100 objects at
a time, see Delete objects in OSS Developer Guide.

Warning:
You cannot recover deleted objects. Exercise caution when you perform this operation.

Use the OSS console

To delete unnecessary objects by using the OSS console, perform the following steps:

1. Log on to the OSS console.

2. Click Buckets, and then click the name of the target bucket.

3. Click Files.

4. Select one or multiple objects, and then choose Batch Operation > Delete.

You can also choose More > Delete in the Actions column corresponding to the target
object.

5. In the Delete File message that appears, click OK.

Use ossbrowser

ossbrowser is a graphical object management tool for OSS. You can use ossbrowser to
delete unnecessary objects. For more information, see #unique_11.

Use ossutil

ossutil is a command-line tool for OSS. You can use ossutil to delete unnecessary objects.
For more information, see rm.

Use APIs and SDKs


OSS provides APIs and SDKs for a variety of programming languages to facilitate secondary
development. For more information, see the following topics:

16 Issue: 20200529
Object Storage Service Quick Start /  6 Delete objects

• API: DeleteObject

• Java SDK: Delete objects

• Python SDK: Delete objects

• PHP SDK: Delete objects

• Go SDK: Delete objects

• C SDK: Delete objects

For more information about SDK examples for other programming languages, see
Introduction.

Issue: 20200529 17
Object Storage Service Quick Start /  7 Delete buckets

7 Delete buckets
If you no longer use a bucket, delete it to avoid incurring further fees.

Prerequisites

To delete a bucket, ensure that all objects in the bucket are deleted, including parts
generated from incomplete multipart upload tasks. Otherwise, the bucket cannot be
deleted.

• To delete all objects in a bucket, we recommend that you configure lifecycle rules for the
bucket.

• For more information about how to delete parts in a bucket, see #unique_74.

Warning:
Deleted objects cannot be recovered. We recommended that you proceed with caution
when you perform this operation.

Use the OSS console

To create a bucket in the OSS console, perform the following steps:

1. Log on to the OSS console.

2. Click the target bucket. Find the Bucket Management section.

• New console

a. Choose Basic Settings > Delete Bucket.

• Old console

a. Click the Basic Settings tab. Find the Bucket Management section.

3. Click Delete Bucket.

4. In the message that appears, click OK.

Use ossbrowser

ossbrowser is a graphical object management tool for OSS. You can use ossbrowser to
delete buckets. For more information, see #unique_11.

Use ossutil

ossutil is a command line tool for OSS. You can use ossutil to delete buckets. For more
information, see rm.

18 Issue: 20200529
Object Storage Service Quick Start /  7 Delete buckets

Use APIs and SDKs


OSS provides APIs and SDKs that use a variety of programming languages to facilitate
secondary development. For more information, see the following topics:

• API operation: #unique_75

• Java SDK: the "Delete a bucket" section in Buckets

• Python SDK: the "Delete a bucket" section in Bucket

• PHP SDK: the "Delete a bucket" section in Bucket

• Go SDK: the "Delete a bucket" section in Bucket

• C SDK: the "Delete a bucket" section in Bucket

For more information about SDK examples in other programming languages, see Introducti
on.

Issue: 20200529 19

You might also like