From 7d2a7ec198e95d59754714c63dcbb40f94910da4 Mon Sep 17 00:00:00 2001 From: zhangyue Date: Tue, 5 Nov 2024 16:37:11 +0000 Subject: [PATCH] OBS API DOC Reviewed-by: Sabelnikov, Dmitriy Co-authored-by: zhangyue Co-committed-by: zhangyue --- docs/obs/api-ref/ALL_META.TXT.json | 374 ++++---- docs/obs/api-ref/CLASS.TXT.json | 143 +-- .../api-ref/en-us_topic_0000001399487626.html | 141 +++ .../api-ref/en-us_topic_0000001399647606.html | 80 ++ docs/obs/api-ref/en-us_topic_0031051947.html | 2 +- docs/obs/api-ref/obs_04_0000.html | 9 +- docs/obs/api-ref/obs_04_0004.html | 10 +- docs/obs/api-ref/obs_04_0005.html | 161 ++-- docs/obs/api-ref/obs_04_0007.html | 12 +- docs/obs/api-ref/obs_04_0009.html | 8 +- docs/obs/api-ref/obs_04_0010.html | 437 +++++---- docs/obs/api-ref/obs_04_0011.html | 79 +- docs/obs/api-ref/obs_04_0012.html | 151 ++-- docs/obs/api-ref/obs_04_0013.html | 4 +- docs/obs/api-ref/obs_04_0015.html | 3 - docs/obs/api-ref/obs_04_0016.html | 3 - docs/obs/api-ref/obs_04_0017.html | 3 - docs/obs/api-ref/obs_04_0020.html | 64 +- docs/obs/api-ref/obs_04_0021.html | 243 +++-- docs/obs/api-ref/obs_04_0022.html | 827 +++++++++++++----- docs/obs/api-ref/obs_04_0023.html | 184 ++-- docs/obs/api-ref/obs_04_0024.html | 4 - docs/obs/api-ref/obs_04_0025.html | 4 - docs/obs/api-ref/obs_04_0027.html | 18 +- docs/obs/api-ref/obs_04_0028.html | 4 - docs/obs/api-ref/obs_04_0029.html | 4 - docs/obs/api-ref/obs_04_0030.html | 169 ++-- docs/obs/api-ref/obs_04_0031.html | 4 - docs/obs/api-ref/obs_04_0032.html | 23 +- docs/obs/api-ref/obs_04_0033.html | 4 - docs/obs/api-ref/obs_04_0034.html | 12 +- docs/obs/api-ref/obs_04_0035.html | 4 - docs/obs/api-ref/obs_04_0036.html | 4 - docs/obs/api-ref/obs_04_0037.html | 4 - docs/obs/api-ref/obs_04_0038.html | 4 - docs/obs/api-ref/obs_04_0039.html | 14 +- docs/obs/api-ref/obs_04_0040.html | 13 +- docs/obs/api-ref/obs_04_0044.html | 6 +- docs/obs/api-ref/obs_04_0045.html | 4 - docs/obs/api-ref/obs_04_0046.html | 8 +- docs/obs/api-ref/obs_04_0047.html | 6 +- docs/obs/api-ref/obs_04_0048.html | 4 - docs/obs/api-ref/obs_04_0049.html | 92 +- docs/obs/api-ref/obs_04_0050.html | 4 - docs/obs/api-ref/obs_04_0051.html | 4 - docs/obs/api-ref/obs_04_0052.html | 4 - docs/obs/api-ref/obs_04_0053.html | 4 - docs/obs/api-ref/obs_04_0054.html | 4 - docs/obs/api-ref/obs_04_0055.html | 12 +- docs/obs/api-ref/obs_04_0056.html | 8 +- docs/obs/api-ref/obs_04_0057.html | 6 +- docs/obs/api-ref/obs_04_0058.html | 8 +- docs/obs/api-ref/obs_04_0059.html | 4 - docs/obs/api-ref/obs_04_0060.html | 4 - docs/obs/api-ref/obs_04_0061.html | 4 - docs/obs/api-ref/obs_04_0062.html | 21 +- docs/obs/api-ref/obs_04_0063.html | 6 +- docs/obs/api-ref/obs_04_0064.html | 4 - docs/obs/api-ref/obs_04_0068.html | 4 - docs/obs/api-ref/obs_04_0069.html | 4 - docs/obs/api-ref/obs_04_0071.html | 4 - docs/obs/api-ref/obs_04_0072.html | 4 - docs/obs/api-ref/obs_04_0073.html | 4 - docs/obs/api-ref/obs_04_0074.html | 189 ++-- docs/obs/api-ref/obs_04_0075.html | 10 +- docs/obs/api-ref/obs_04_0076.html | 4 - docs/obs/api-ref/obs_04_0077.html | 6 +- docs/obs/api-ref/obs_04_0078.html | 4 - docs/obs/api-ref/obs_04_0079.html | 6 + docs/obs/api-ref/obs_04_0080.html | 488 +++++++---- docs/obs/api-ref/obs_04_0081.html | 802 ++++++++++++----- docs/obs/api-ref/obs_04_0082.html | 671 +++++++++----- docs/obs/api-ref/obs_04_0083.html | 509 +++++++---- docs/obs/api-ref/obs_04_0084.html | 432 ++++++--- docs/obs/api-ref/obs_04_0085.html | 4 - docs/obs/api-ref/obs_04_0086.html | 8 +- docs/obs/api-ref/obs_04_0087.html | 162 ++-- docs/obs/api-ref/obs_04_0089.html | 12 +- docs/obs/api-ref/obs_04_0090.html | 4 - docs/obs/api-ref/obs_04_0091.html | 373 +++++--- docs/obs/api-ref/obs_04_0092.html | 2 - docs/obs/api-ref/obs_04_0093.html | 2 - docs/obs/api-ref/obs_04_0094.html | 2 - docs/obs/api-ref/obs_04_0096.html | 2 +- docs/obs/api-ref/obs_04_0097.html | 6 +- docs/obs/api-ref/obs_04_0098.html | 504 +++++++---- docs/obs/api-ref/obs_04_0099.html | 181 ++-- docs/obs/api-ref/obs_04_0100.html | 14 +- docs/obs/api-ref/obs_04_0101.html | 7 +- docs/obs/api-ref/obs_04_0102.html | 225 +++-- docs/obs/api-ref/obs_04_0103.html | 5 +- docs/obs/api-ref/obs_04_0106.html | 50 +- docs/obs/api-ref/obs_04_0107.html | 7 +- docs/obs/api-ref/obs_04_0110.html | 2 +- docs/obs/api-ref/obs_04_0111.html | 4 +- docs/obs/api-ref/obs_04_0112.html | 31 +- docs/obs/api-ref/obs_04_0115.html | 23 +- docs/obs/api-ref/obs_04_0116.html | 2 +- docs/obs/api-ref/obs_04_0117.html | 2 +- docs/obs/api-ref/obs_04_0160.html | 5 +- docs/obs/api-ref/obs_04_0166.html | 18 +- docs/obs/api-ref/obs_04_0167.html | 10 +- docs/obs/api-ref/obs_04_0168.html | 6 +- docs/obs/api-ref/obs_04_0172.html | 263 ++++++ 104 files changed, 5701 insertions(+), 2820 deletions(-) create mode 100644 docs/obs/api-ref/en-us_topic_0000001399487626.html create mode 100644 docs/obs/api-ref/en-us_topic_0000001399647606.html create mode 100644 docs/obs/api-ref/obs_04_0172.html diff --git a/docs/obs/api-ref/ALL_META.TXT.json b/docs/obs/api-ref/ALL_META.TXT.json index 4585cec8..6487747d 100644 --- a/docs/obs/api-ref/ALL_META.TXT.json +++ b/docs/obs/api-ref/ALL_META.TXT.json @@ -15,7 +15,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -35,7 +35,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -55,7 +55,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -75,7 +75,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -87,7 +87,7 @@ "node_id":"obs_04_0004.xml", "product_code":"obs", "code":"5", - "des":"DomainYou can register a domain with the cloud service. The domain has full access permissions for all the resources and cloud services that are subscribed under it. The ", + "des":"DomainYou can register a domain with the cloud service. The domain has full access permissions for all of its cloud services and resources. The domain can also reset user", "doc_type":"api", "kw":"Basic Concepts,Before You Start,API Reference", "search_title":"", @@ -95,7 +95,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -115,7 +115,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -135,7 +135,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -155,7 +155,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -175,7 +175,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -195,7 +195,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -215,7 +215,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -227,7 +227,7 @@ "node_id":"obs_04_0011.xml", "product_code":"obs", "code":"12", - "des":"OBS allows users to construct a URL for a specific operation. The URL contains information such as the user's AK, signature, validity period, and resources. Any user who ", + "des":"You can create a presigned URL for a specific operation. This kind of URL includes the user AK, signature, validity period, resources and other information. It allows any", "doc_type":"api", "kw":"Authentication of Signature in a URL,Authentication,API Reference", "search_title":"", @@ -235,7 +235,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -247,7 +247,7 @@ "node_id":"obs_04_0012.xml", "product_code":"obs", "code":"13", - "des":"OBS supports browser-based object upload using the POST method. Signatures of such requests are uploaded in tables. First, create a security policy and specify the requir", + "des":"OBS supports browser-based uploads using POST requests. Authenticating such a request uses the signature carried in the form. First, create a policy to specify the requir", "doc_type":"api", "kw":"Authentication of Signature Carried in the Table Uploaded Through a Browser,Authentication,API Refer", "search_title":"", @@ -255,7 +255,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -275,7 +275,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -295,7 +295,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -315,7 +315,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -335,7 +335,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -355,7 +355,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -375,7 +375,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -395,7 +395,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -407,7 +407,7 @@ "node_id":"obs_04_0020.xml", "product_code":"obs", "code":"21", - "des":"You can perform this operation to list all buckets that you have created.This request contains no parameters.This request header uses common message fields. For details, ", + "des":"You can perform this operation to list all buckets that you have created across all regions.Regardless of the endpoint you specified, a list of buckets spanning all regio", "doc_type":"api", "kw":"Listing Buckets,Operations on Buckets,API Reference", "search_title":"", @@ -415,7 +415,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -435,7 +435,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -455,7 +455,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -475,7 +475,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -495,7 +495,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -515,7 +515,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -535,7 +535,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -555,7 +555,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -567,7 +567,7 @@ "node_id":"obs_04_0027.xml", "product_code":"obs", "code":"29", - "des":"This operation creates or modifies policies for buckets. If the specified bucket already has a policy, the policy in the request will overwrite the existing one. There is", + "des":"This operation creates or modifies policies for buckets. The existing policy in a bucket is overwritten by the policy in the request. You can add as many statements as yo", "doc_type":"api", "kw":"Configuring a Bucket Policy,Advanced Bucket Settings,API Reference", "search_title":"", @@ -575,7 +575,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -595,7 +595,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -615,7 +615,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -635,7 +635,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -655,7 +655,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -675,7 +675,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -695,7 +695,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -715,7 +715,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -735,7 +735,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -755,7 +755,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -775,7 +775,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -795,7 +795,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -815,7 +815,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -835,7 +835,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -855,7 +855,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -875,7 +875,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -895,7 +895,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -915,7 +915,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -935,7 +935,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -955,7 +955,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -975,7 +975,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -995,7 +995,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1015,7 +1015,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1035,7 +1035,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1055,7 +1055,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1075,7 +1075,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1095,7 +1095,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1115,7 +1115,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1135,7 +1135,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1155,7 +1155,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1175,7 +1175,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1195,7 +1195,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1215,7 +1215,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1235,7 +1235,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1255,7 +1255,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1275,7 +1275,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1295,7 +1295,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1315,7 +1315,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1335,7 +1335,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1355,7 +1355,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1375,7 +1375,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1395,7 +1395,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1415,7 +1415,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1435,7 +1435,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1455,7 +1455,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1475,7 +1475,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1495,7 +1495,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1515,7 +1515,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1535,7 +1535,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1555,7 +1555,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1567,7 +1567,7 @@ "node_id":"obs_04_0081.xml", "product_code":"obs", "code":"79", - "des":"This operation uploads an object to a bucket. To use this operation, you must have the write permission for the bucket.The name of each object in a bucket must be unique.", + "des":"This API allows you to upload an object to a bucket. This requires the write permission for the bucket.The name of each object in a bucket must be unique.If a bucket has ", "doc_type":"api", "kw":"Uploading an Object - POST,Operations on Objects,API Reference", "search_title":"", @@ -1575,7 +1575,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1595,7 +1595,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1615,7 +1615,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1627,7 +1627,7 @@ "node_id":"obs_04_0084.xml", "product_code":"obs", "code":"82", - "des":"Users with the read permission on objects can perform the HeadObject operation to obtain metadata of objects. The object metadata is included in the response.This operati", + "des":"Users with the read permission on objects can perform the HeadObject operation to obtain metadata of objects. The object metadata is included in the response.SSE-C header", "doc_type":"api", "kw":"Querying Object Metadata,Operations on Objects,API Reference", "search_title":"", @@ -1635,7 +1635,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1655,7 +1655,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1675,7 +1675,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1695,7 +1695,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1715,7 +1715,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1735,7 +1735,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1755,7 +1755,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1775,7 +1775,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1795,7 +1795,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1815,18 +1815,78 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], "title":"Renaming an Object", "githuburl":"" }, + { + "uri":"obs_04_0172.html", + "node_id":"obs_04_0172.xml", + "product_code":"obs", + "code":"92", + "des":"This operation adds or updates the tag information for an object. An object tag is a key-value pair.If you do not specify a version ID in a request, make sure that you ha", + "doc_type":"api", + "kw":"Adding Object Tags,Operations on Objects,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"obs", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", + "opensource":"true" + } + ], + "title":"Adding Object Tags", + "githuburl":"" + }, + { + "uri":"en-us_topic_0000001399487626.html", + "node_id":"en-us_topic_0000001399487626.xml", + "product_code":"obs", + "code":"93", + "des":"This operation returns tags of an object.If you do not specify a version ID in a request, make sure that you have the GetObjectTagging permission. If you do specify a ver", + "doc_type":"api", + "kw":"Obtaining Object Tags,Operations on Objects,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"obs", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", + "opensource":"true" + } + ], + "title":"Obtaining Object Tags", + "githuburl":"" + }, + { + "uri":"en-us_topic_0000001399647606.html", + "node_id":"en-us_topic_0000001399647606.xml", + "product_code":"obs", + "code":"94", + "des":"This operation deletes tags from an object.If you do not specify a version ID in a request, make sure that you have the DeleteObjectTagging permission. If you do specify ", + "doc_type":"api", + "kw":"Deleting Object Tags,Operations on Objects,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"obs", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", + "opensource":"true" + } + ], + "title":"Deleting Object Tags", + "githuburl":"" + }, { "uri":"obs_04_0166.html", "node_id":"obs_04_0166.xml", "product_code":"obs", - "code":"92", + "code":"95", "des":"This operation configures or updates the retention period for objects uploaded to a bucket with WORM enabled.When you upload an object, if you do not configure a protecti", "doc_type":"api", "kw":"Configuring WORM Retention for an Object,Operations on Objects,API Reference", @@ -1835,7 +1895,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1846,7 +1906,7 @@ "uri":"obs_04_0096.html", "node_id":"obs_04_0096.xml", "product_code":"obs", - "code":"93", + "code":"96", "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", "doc_type":"api", "kw":"Operations on Multipart Upload", @@ -1855,7 +1915,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1866,8 +1926,8 @@ "uri":"obs_04_0097.html", "node_id":"obs_04_0097.xml", "product_code":"obs", - "code":"94", - "des":"This operation queries all the multipart upload tasks that are initialized but have not been merged or canceled in a bucket.This request uses parameters to specify the qu", + "code":"97", + "des":"You can use this API to query all initiated multipart uploads that have not been completed or canceled in a bucket.This request uses parameters to specify the query range", "doc_type":"api", "kw":"Listing Initiated Multipart Uploads in a Bucket,Operations on Multipart Upload,API Reference", "search_title":"", @@ -1875,7 +1935,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1886,7 +1946,7 @@ "uri":"obs_04_0098.html", "node_id":"obs_04_0098.xml", "product_code":"obs", - "code":"95", + "code":"98", "des":"Before using this operation, make an API operation call to create a multipart upload task. The system will return a globally unique upload ID as the multipart upload iden", "doc_type":"api", "kw":"Initiating a Multipart Upload,Operations on Multipart Upload,API Reference", @@ -1895,7 +1955,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1906,8 +1966,8 @@ "uri":"obs_04_0099.html", "node_id":"obs_04_0099.xml", "product_code":"obs", - "code":"96", - "des":"After initiating a multipart upload, you can use this operation to upload parts for the multipart upload using its task ID. When parts are uploaded in a multipart upload ", + "code":"99", + "des":"After a multipart upload task is created, you can upload parts for this task using the obtained multipart upload ID. When parts are uploaded in a multipart upload of an o", "doc_type":"api", "kw":"Uploading Parts,Operations on Multipart Upload,API Reference", "search_title":"", @@ -1915,7 +1975,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1926,8 +1986,8 @@ "uri":"obs_04_0100.html", "node_id":"obs_04_0100.xml", "product_code":"obs", - "code":"97", - "des":"After creating a multipart upload job, you can specify its upload ID and upload a part to the job in OBS. Alternatively, you can make an API call to add a part (part of a", + "code":"100", + "des":"After a multipart upload task is created, you can upload parts for this task using the obtained multipart upload ID. Alternatively, you can make an API call to add a part", "doc_type":"api", "kw":"Copying Parts,Operations on Multipart Upload,API Reference", "search_title":"", @@ -1935,7 +1995,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1946,28 +2006,28 @@ "uri":"obs_04_0101.html", "node_id":"obs_04_0101.xml", "product_code":"obs", - "code":"98", - "des":"You can perform this operation to query all parts associated to a multipart upload. The size of each part listed by this API is the same as the size of the part uploaded.", + "code":"101", + "des":"You can use this API to query all parts of an uncompleted multipart upload task. The size of each part listed by this API is the same as the size of the part uploaded.Thi", "doc_type":"api", - "kw":"Listing Uploaded Parts,Operations on Multipart Upload,API Reference", + "kw":"Listing Uploaded Parts that Have Not Been Assembled,Operations on Multipart Upload,API Reference", "search_title":"", "metedata":[ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], - "title":"Listing Uploaded Parts", + "title":"Listing Uploaded Parts that Have Not Been Assembled", "githuburl":"" }, { "uri":"obs_04_0102.html", "node_id":"obs_04_0102.xml", "product_code":"obs", - "code":"99", - "des":"After uploading all parts for a multipart upload, you can use this operation to complete the multipart upload. Before performing this operation, you cannot download the u", + "code":"102", + "des":"After all parts are uploaded, you can call this API to assemble specified parts into an object. Before performing this operation, you cannot download the uploaded data. W", "doc_type":"api", "kw":"Completing a Multipart Upload,Operations on Multipart Upload,API Reference", "search_title":"", @@ -1975,7 +2035,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -1986,8 +2046,8 @@ "uri":"obs_04_0103.html", "node_id":"obs_04_0103.xml", "product_code":"obs", - "code":"100", - "des":"You can perform this operation to abort a multipart upload. You cannot upload or list parts after operations to merge parts or abort a multipart upload are performed.This", + "code":"103", + "des":"You can call this API to cancel a multipart upload task. You cannot upload or list parts after operations to merge parts or abort a multipart upload are performed.This re", "doc_type":"api", "kw":"Canceling a Multipart Upload Task,Operations on Multipart Upload,API Reference", "search_title":"", @@ -1995,7 +2055,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -2006,7 +2066,7 @@ "uri":"obs_04_0104.html", "node_id":"obs_04_0104.xml", "product_code":"obs", - "code":"101", + "code":"104", "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", "doc_type":"api", "kw":"Server-Side Encryption", @@ -2015,7 +2075,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -2026,7 +2086,7 @@ "uri":"obs_04_0105.html", "node_id":"obs_04_0105.xml", "product_code":"obs", - "code":"102", + "code":"105", "des":"You can configure server-side encryption for objects, so that they will be encrypted or decrypted when you upload them to or download them from a bucket.The encryption an", "doc_type":"api", "kw":"Server-Side Encryption Overview,Server-Side Encryption,API Reference", @@ -2035,7 +2095,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -2046,7 +2106,7 @@ "uri":"obs_04_0106.html", "node_id":"obs_04_0106.xml", "product_code":"obs", - "code":"103", + "code":"106", "des":"With SSE-KMS, OBS uses the keys provided by Key Management Service (KMS) for server-side encryption. You can create custom keys on KMS to encrypt your objects. If you do ", "doc_type":"api", "kw":"SSE-KMS,Server-Side Encryption,API Reference", @@ -2055,7 +2115,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -2066,7 +2126,7 @@ "uri":"obs_04_0107.html", "node_id":"obs_04_0107.xml", "product_code":"obs", - "code":"104", + "code":"107", "des":"With SSE-C used, OBS uses the keys and MD5 values provided by customers for server-side encryption.OBS does not store your encryption keys. If you lost them, you lost the", "doc_type":"api", "kw":"SSE-C,Server-Side Encryption,API Reference", @@ -2075,7 +2135,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -2086,7 +2146,7 @@ "uri":"obs_04_0108.html", "node_id":"obs_04_0108.xml", "product_code":"obs", - "code":"105", + "code":"108", "des":"This section lists the operations related to server-side encryption and describes HTTP protocols applicable to the operations.The following table describes the requiremen", "doc_type":"api", "kw":"API Operations Related to Server-Side Encryption,Server-Side Encryption,API Reference", @@ -2095,7 +2155,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -2106,7 +2166,7 @@ "uri":"obs_04_0115.html", "node_id":"obs_04_0115.xml", "product_code":"obs", - "code":"106", + "code":"109", "des":"If an API call fails, no result data is returned. You can locate the cause of the error according to the error code of each API. If an API call fails, HTTP status code 3x", "doc_type":"api", "kw":"Error Codes,API Reference", @@ -2115,7 +2175,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -2126,7 +2186,7 @@ "uri":"obs_04_0109.html", "node_id":"obs_04_0109.xml", "product_code":"obs", - "code":"107", + "code":"110", "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", "doc_type":"api", "kw":"IAM Policies and Supported Actions", @@ -2135,7 +2195,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -2146,7 +2206,7 @@ "uri":"obs_04_0110.html", "node_id":"obs_04_0110.xml", "product_code":"obs", - "code":"108", + "code":"111", "des":"This section describes fine-grained permissions management for your OBS. If your account does not require individual IAM users, skip this section.By default, new IAM user", "doc_type":"api", "kw":"Introduction,IAM Policies and Supported Actions,API Reference", @@ -2155,7 +2215,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -2166,7 +2226,7 @@ "uri":"obs_04_0111.html", "node_id":"obs_04_0111.xml", "product_code":"obs", - "code":"109", + "code":"112", "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", "doc_type":"api", "kw":"Bucket Actions,IAM Policies and Supported Actions,API Reference", @@ -2175,7 +2235,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -2186,7 +2246,7 @@ "uri":"obs_04_0112.html", "node_id":"obs_04_0112.xml", "product_code":"obs", - "code":"110", + "code":"113", "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", "doc_type":"api", "kw":"Object Actions,IAM Policies and Supported Actions,API Reference", @@ -2195,7 +2255,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -2206,7 +2266,7 @@ "uri":"obs_04_0113.html", "node_id":"obs_04_0113.xml", "product_code":"obs", - "code":"111", + "code":"114", "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", "doc_type":"api", "kw":"Appendixes", @@ -2215,7 +2275,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -2226,7 +2286,7 @@ "uri":"obs_04_0114.html", "node_id":"obs_04_0114.xml", "product_code":"obs", - "code":"112", + "code":"115", "des":"Table 1 lists the status codes and prompt message returned by the server to the user.Send API requests using the HTTP/HTTPS format that complies with https://www.ietf.org", "doc_type":"api", "kw":"Status Codes,Appendixes,API Reference", @@ -2235,7 +2295,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -2246,7 +2306,7 @@ "uri":"obs_04_0116.html", "node_id":"obs_04_0116.xml", "product_code":"obs", - "code":"113", + "code":"116", "des":"When you call APIs, you need to use the AK and SK for authentication. To obtain the AK and SK, perform the following steps:This step is required only when you have enable", "doc_type":"api", "kw":"Obtaining Access Keys (AK/SK),Appendixes,API Reference", @@ -2255,7 +2315,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -2266,8 +2326,8 @@ "uri":"obs_04_0117.html", "node_id":"obs_04_0117.xml", "product_code":"obs", - "code":"114", - "des":"When making API calls, you may need to specify the domain ID (DomainID) and user ID (UserID) in some requests. To obtain them from the console, do as follows:On the My Cr", + "code":"117", + "des":"When calling certain APIs, you may need to specify the domain ID (DomainID) and user ID (UserID) in the request. To obtain them from the console, do as follows:On the My ", "doc_type":"api", "kw":"Obtaining a Domain ID and a User ID,Appendixes,API Reference", "search_title":"", @@ -2275,7 +2335,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -2286,7 +2346,7 @@ "uri":"obs_04_0118.html", "node_id":"obs_04_0118.xml", "product_code":"obs", - "code":"115", + "code":"118", "des":"After a success message is returned in response to a client's write or deletion request, the client can obtain the latest data. If a client that initiates a write request", "doc_type":"api", "kw":"Consistency of Concurrent Operations,Appendixes,API Reference", @@ -2295,7 +2355,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], @@ -2306,7 +2366,7 @@ "uri":"obs_04_0000.html", "node_id":"obs_04_0000.xml", "product_code":"obs", - "code":"116", + "code":"119", "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", "doc_type":"api", "kw":"Change History,API Reference", @@ -2315,7 +2375,7 @@ { "documenttype":"api", "prodname":"obs", - "mdname":"Sample Code for Uploading an Object", + "mdname":"Sample Code for Creating a Bucket;Sample Code for Obtaining a Bucket List;Sample Code for Uploading an Object", "opensource":"true" } ], diff --git a/docs/obs/api-ref/CLASS.TXT.json b/docs/obs/api-ref/CLASS.TXT.json index d8a709d0..d2c49eab 100644 --- a/docs/obs/api-ref/CLASS.TXT.json +++ b/docs/obs/api-ref/CLASS.TXT.json @@ -36,7 +36,7 @@ "code":"4" }, { - "desc":"DomainYou can register a domain with the cloud service. The domain has full access permissions for all the resources and cloud services that are subscribed under it. The ", + "desc":"DomainYou can register a domain with the cloud service. The domain has full access permissions for all of its cloud services and resources. The domain can also reset user", "product_code":"obs", "title":"Basic Concepts", "uri":"obs_04_0004.html", @@ -99,7 +99,7 @@ "code":"11" }, { - "desc":"OBS allows users to construct a URL for a specific operation. The URL contains information such as the user's AK, signature, validity period, and resources. Any user who ", + "desc":"You can create a presigned URL for a specific operation. This kind of URL includes the user AK, signature, validity period, resources and other information. It allows any", "product_code":"obs", "title":"Authentication of Signature in a URL", "uri":"obs_04_0011.html", @@ -108,7 +108,7 @@ "code":"12" }, { - "desc":"OBS supports browser-based object upload using the POST method. Signatures of such requests are uploaded in tables. First, create a security policy and specify the requir", + "desc":"OBS supports browser-based uploads using POST requests. Authenticating such a request uses the signature carried in the form. First, create a policy to specify the requir", "product_code":"obs", "title":"Authentication of Signature Carried in the Table Uploaded Through a Browser", "uri":"obs_04_0012.html", @@ -180,7 +180,7 @@ "code":"20" }, { - "desc":"You can perform this operation to list all buckets that you have created.This request contains no parameters.This request header uses common message fields. For details, ", + "desc":"You can perform this operation to list all buckets that you have created across all regions.Regardless of the endpoint you specified, a list of buckets spanning all regio", "product_code":"obs", "title":"Listing Buckets", "uri":"obs_04_0020.html", @@ -252,7 +252,7 @@ "code":"28" }, { - "desc":"This operation creates or modifies policies for buckets. If the specified bucket already has a policy, the policy in the request will overwrite the existing one. There is", + "desc":"This operation creates or modifies policies for buckets. The existing policy in a bucket is overwritten by the policy in the request. You can add as many statements as yo", "product_code":"obs", "title":"Configuring a Bucket Policy", "uri":"obs_04_0027.html", @@ -702,7 +702,7 @@ "code":"78" }, { - "desc":"This operation uploads an object to a bucket. To use this operation, you must have the write permission for the bucket.The name of each object in a bucket must be unique.", + "desc":"This API allows you to upload an object to a bucket. This requires the write permission for the bucket.The name of each object in a bucket must be unique.If a bucket has ", "product_code":"obs", "title":"Uploading an Object - POST", "uri":"obs_04_0081.html", @@ -729,7 +729,7 @@ "code":"81" }, { - "desc":"Users with the read permission on objects can perform the HeadObject operation to obtain metadata of objects. The object metadata is included in the response.This operati", + "desc":"Users with the read permission on objects can perform the HeadObject operation to obtain metadata of objects. The object metadata is included in the response.SSE-C header", "product_code":"obs", "title":"Querying Object Metadata", "uri":"obs_04_0084.html", @@ -818,6 +818,33 @@ "p_code":"77", "code":"91" }, + { + "desc":"This operation adds or updates the tag information for an object. An object tag is a key-value pair.If you do not specify a version ID in a request, make sure that you ha", + "product_code":"obs", + "title":"Adding Object Tags", + "uri":"obs_04_0172.html", + "doc_type":"api", + "p_code":"77", + "code":"92" + }, + { + "desc":"This operation returns tags of an object.If you do not specify a version ID in a request, make sure that you have the GetObjectTagging permission. If you do specify a ver", + "product_code":"obs", + "title":"Obtaining Object Tags", + "uri":"en-us_topic_0000001399487626.html", + "doc_type":"api", + "p_code":"77", + "code":"93" + }, + { + "desc":"This operation deletes tags from an object.If you do not specify a version ID in a request, make sure that you have the DeleteObjectTagging permission. If you do specify ", + "product_code":"obs", + "title":"Deleting Object Tags", + "uri":"en-us_topic_0000001399647606.html", + "doc_type":"api", + "p_code":"77", + "code":"94" + }, { "desc":"This operation configures or updates the retention period for objects uploaded to a bucket with WORM enabled.When you upload an object, if you do not configure a protecti", "product_code":"obs", @@ -825,7 +852,7 @@ "uri":"obs_04_0166.html", "doc_type":"api", "p_code":"77", - "code":"92" + "code":"95" }, { "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", @@ -834,16 +861,16 @@ "uri":"obs_04_0096.html", "doc_type":"api", "p_code":"19", - "code":"93" + "code":"96" }, { - "desc":"This operation queries all the multipart upload tasks that are initialized but have not been merged or canceled in a bucket.This request uses parameters to specify the qu", + "desc":"You can use this API to query all initiated multipart uploads that have not been completed or canceled in a bucket.This request uses parameters to specify the query range", "product_code":"obs", "title":"Listing Initiated Multipart Uploads in a Bucket", "uri":"obs_04_0097.html", "doc_type":"api", - "p_code":"93", - "code":"94" + "p_code":"96", + "code":"97" }, { "desc":"Before using this operation, make an API operation call to create a multipart upload task. The system will return a globally unique upload ID as the multipart upload iden", @@ -851,53 +878,53 @@ "title":"Initiating a Multipart Upload", "uri":"obs_04_0098.html", "doc_type":"api", - "p_code":"93", - "code":"95" + "p_code":"96", + "code":"98" }, { - "desc":"After initiating a multipart upload, you can use this operation to upload parts for the multipart upload using its task ID. When parts are uploaded in a multipart upload ", + "desc":"After a multipart upload task is created, you can upload parts for this task using the obtained multipart upload ID. When parts are uploaded in a multipart upload of an o", "product_code":"obs", "title":"Uploading Parts", "uri":"obs_04_0099.html", "doc_type":"api", - "p_code":"93", - "code":"96" + "p_code":"96", + "code":"99" }, { - "desc":"After creating a multipart upload job, you can specify its upload ID and upload a part to the job in OBS. Alternatively, you can make an API call to add a part (part of a", + "desc":"After a multipart upload task is created, you can upload parts for this task using the obtained multipart upload ID. Alternatively, you can make an API call to add a part", "product_code":"obs", "title":"Copying Parts", "uri":"obs_04_0100.html", "doc_type":"api", - "p_code":"93", - "code":"97" + "p_code":"96", + "code":"100" }, { - "desc":"You can perform this operation to query all parts associated to a multipart upload. The size of each part listed by this API is the same as the size of the part uploaded.", + "desc":"You can use this API to query all parts of an uncompleted multipart upload task. The size of each part listed by this API is the same as the size of the part uploaded.Thi", "product_code":"obs", - "title":"Listing Uploaded Parts", + "title":"Listing Uploaded Parts that Have Not Been Assembled", "uri":"obs_04_0101.html", "doc_type":"api", - "p_code":"93", - "code":"98" + "p_code":"96", + "code":"101" }, { - "desc":"After uploading all parts for a multipart upload, you can use this operation to complete the multipart upload. Before performing this operation, you cannot download the u", + "desc":"After all parts are uploaded, you can call this API to assemble specified parts into an object. Before performing this operation, you cannot download the uploaded data. W", "product_code":"obs", "title":"Completing a Multipart Upload", "uri":"obs_04_0102.html", "doc_type":"api", - "p_code":"93", - "code":"99" + "p_code":"96", + "code":"102" }, { - "desc":"You can perform this operation to abort a multipart upload. You cannot upload or list parts after operations to merge parts or abort a multipart upload are performed.This", + "desc":"You can call this API to cancel a multipart upload task. You cannot upload or list parts after operations to merge parts or abort a multipart upload are performed.This re", "product_code":"obs", "title":"Canceling a Multipart Upload Task", "uri":"obs_04_0103.html", "doc_type":"api", - "p_code":"93", - "code":"100" + "p_code":"96", + "code":"103" }, { "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", @@ -906,7 +933,7 @@ "uri":"obs_04_0104.html", "doc_type":"api", "p_code":"19", - "code":"101" + "code":"104" }, { "desc":"You can configure server-side encryption for objects, so that they will be encrypted or decrypted when you upload them to or download them from a bucket.The encryption an", @@ -914,8 +941,8 @@ "title":"Server-Side Encryption Overview", "uri":"obs_04_0105.html", "doc_type":"api", - "p_code":"101", - "code":"102" + "p_code":"104", + "code":"105" }, { "desc":"With SSE-KMS, OBS uses the keys provided by Key Management Service (KMS) for server-side encryption. You can create custom keys on KMS to encrypt your objects. If you do ", @@ -923,8 +950,8 @@ "title":"SSE-KMS", "uri":"obs_04_0106.html", "doc_type":"api", - "p_code":"101", - "code":"103" + "p_code":"104", + "code":"106" }, { "desc":"With SSE-C used, OBS uses the keys and MD5 values provided by customers for server-side encryption.OBS does not store your encryption keys. If you lost them, you lost the", @@ -932,8 +959,8 @@ "title":"SSE-C", "uri":"obs_04_0107.html", "doc_type":"api", - "p_code":"101", - "code":"104" + "p_code":"104", + "code":"107" }, { "desc":"This section lists the operations related to server-side encryption and describes HTTP protocols applicable to the operations.The following table describes the requiremen", @@ -941,8 +968,8 @@ "title":"API Operations Related to Server-Side Encryption", "uri":"obs_04_0108.html", "doc_type":"api", - "p_code":"101", - "code":"105" + "p_code":"104", + "code":"108" }, { "desc":"If an API call fails, no result data is returned. You can locate the cause of the error according to the error code of each API. If an API call fails, HTTP status code 3x", @@ -951,7 +978,7 @@ "uri":"obs_04_0115.html", "doc_type":"api", "p_code":"", - "code":"106" + "code":"109" }, { "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", @@ -960,7 +987,7 @@ "uri":"obs_04_0109.html", "doc_type":"api", "p_code":"", - "code":"107" + "code":"110" }, { "desc":"This section describes fine-grained permissions management for your OBS. If your account does not require individual IAM users, skip this section.By default, new IAM user", @@ -968,8 +995,8 @@ "title":"Introduction", "uri":"obs_04_0110.html", "doc_type":"api", - "p_code":"107", - "code":"108" + "p_code":"110", + "code":"111" }, { "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", @@ -977,8 +1004,8 @@ "title":"Bucket Actions", "uri":"obs_04_0111.html", "doc_type":"api", - "p_code":"107", - "code":"109" + "p_code":"110", + "code":"112" }, { "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", @@ -986,8 +1013,8 @@ "title":"Object Actions", "uri":"obs_04_0112.html", "doc_type":"api", - "p_code":"107", - "code":"110" + "p_code":"110", + "code":"113" }, { "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", @@ -996,7 +1023,7 @@ "uri":"obs_04_0113.html", "doc_type":"api", "p_code":"", - "code":"111" + "code":"114" }, { "desc":"Table 1 lists the status codes and prompt message returned by the server to the user.Send API requests using the HTTP/HTTPS format that complies with https://www.ietf.org", @@ -1004,8 +1031,8 @@ "title":"Status Codes", "uri":"obs_04_0114.html", "doc_type":"api", - "p_code":"111", - "code":"112" + "p_code":"114", + "code":"115" }, { "desc":"When you call APIs, you need to use the AK and SK for authentication. To obtain the AK and SK, perform the following steps:This step is required only when you have enable", @@ -1013,17 +1040,17 @@ "title":"Obtaining Access Keys (AK/SK)", "uri":"obs_04_0116.html", "doc_type":"api", - "p_code":"111", - "code":"113" + "p_code":"114", + "code":"116" }, { - "desc":"When making API calls, you may need to specify the domain ID (DomainID) and user ID (UserID) in some requests. To obtain them from the console, do as follows:On the My Cr", + "desc":"When calling certain APIs, you may need to specify the domain ID (DomainID) and user ID (UserID) in the request. To obtain them from the console, do as follows:On the My ", "product_code":"obs", "title":"Obtaining a Domain ID and a User ID", "uri":"obs_04_0117.html", "doc_type":"api", - "p_code":"111", - "code":"114" + "p_code":"114", + "code":"117" }, { "desc":"After a success message is returned in response to a client's write or deletion request, the client can obtain the latest data. If a client that initiates a write request", @@ -1031,8 +1058,8 @@ "title":"Consistency of Concurrent Operations", "uri":"obs_04_0118.html", "doc_type":"api", - "p_code":"111", - "code":"115" + "p_code":"114", + "code":"118" }, { "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", @@ -1041,6 +1068,6 @@ "uri":"obs_04_0000.html", "doc_type":"api", "p_code":"", - "code":"116" + "code":"119" } ] \ No newline at end of file diff --git a/docs/obs/api-ref/en-us_topic_0000001399487626.html b/docs/obs/api-ref/en-us_topic_0000001399487626.html new file mode 100644 index 00000000..0e3600f9 --- /dev/null +++ b/docs/obs/api-ref/en-us_topic_0000001399487626.html @@ -0,0 +1,141 @@ + + +

Obtaining Object Tags

+

Functions

This operation returns tags of an object.

+

If you do not specify a version ID in a request, make sure that you have the GetObjectTagging permission. If you do specify a version ID in a request, make sure that you have the GetObjectTagging and GetObjectVersionTagging permissions. By default, only the object owner can perform this operation. The object owner can grant this permission to others by using a bucket or user policy.

+

OBS returns the tags of the current object version by default. You can use the versionId parameter to retrieve tags of any other version. If the version you are retrieving tags from is a delete marker, OBS returns 404 Not Found.

+
+

Tags are not supported for files in parallel file systems.

+
+

Request Syntax

1
+2
+3
+4
GET /objectname?tagging&versionId=versionid HTTP/1.1
+Host: bucketname.obs.region.example.com
+Date: date 
+Authorization: authorization string
+
+
+
+

Request Parameters

This request contains no message parameters.

+
+

Request Headers

This request uses common headers. For details, see Table 3.

+
+

Request Elements

This request involves no elements.

+
+

Response Syntax

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
HTTP/1.1 status_code
+x-obs-request-id: request id
+x-obs-id-2: id
+x-obs-version-id: version id
+Content-Type: application/xml 
+Content-Length: length
+Date: date
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
+<Tagging xmlns="http://obs.region.example.com/doc/2015-06-30/">
+    <TagSet> 
+        <Tag> 
+            <Key>key</Key> 
+            <Value>value</Value> 
+        </Tag> 
+    </TagSet> 
+</Tagging>
+
+
+
+

Response Headers

This response uses common headers. For details, see Table 1.

+
+

Response Elements

For more information about the object tag elements returned in the response, see Table 3.

+
+

Error Responses

In addition to common error codes, this API also returns others. Table 1 lists the common errors and possible causes.

+ +
+ + + + + + + + + +
Table 1 Error codes of obtaining object tags

Error Code

+

Description

+

HTTP Status Code

+

NoSuchTagSet

+

No tags were configured for the specified object.

+

404

+
+
+
+

Sample Request

1
+2
+3
+4
+5
+6
GET /objectname?tagging&versionId=G001018455096CE600005306000000DD HTTP/1.1   
+User-Agent: curl/7.29.0   
+Host: bucketname.obs.region.example.com
+Accept: */*   
+Date: Wed, 27 Jun 2018 13:25:44 GMT  
+Authorization: OBS H4IPJX0TQTHTHEBQQCEC:H1INcyc5i0XlHqYTfuzkPxLZUPM=
+
+
+
+

Sample Response

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
HTTP/1.1 200 OK 
+x-obs-request-id: 0002B7532E0000015BEB35330C5884X1 
+x-obs-id-2: s12w20LYNQqSb7moq4ibgJwmQRSmVQV+rFBqplOGYkXUpXeS/nOmbkyD+E35K79j 
+x-obs-version-id: G001018455096CE600005306000000DD
+Content-Type: application/xml 
+Date: Wed, 27 Jun 2018 13:25:44 GMT 
+Content-Length: 441 
+
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<Tagging xmlns="http://obs.region.example.com/doc/2015-06-30/">
+  <TagSet>
+    <Tag>
+      <Key>TagName1</Key>
+      <Value>TageSetVaule1</Value>
+    </Tag>
+  </TagSet>
+</Tagging>
+
+
+
+
+
+ +
+ diff --git a/docs/obs/api-ref/en-us_topic_0000001399647606.html b/docs/obs/api-ref/en-us_topic_0000001399647606.html new file mode 100644 index 00000000..80605c52 --- /dev/null +++ b/docs/obs/api-ref/en-us_topic_0000001399647606.html @@ -0,0 +1,80 @@ + + +

Deleting Object Tags

+

Functions

This operation deletes tags from an object.

+

If you do not specify a version ID in a request, make sure that you have the DeleteObjectTagging permission. If you do specify a version ID in a request, make sure that you have the DeleteObjectTagging and DeleteObjectVersionTagging permissions. By default, only the object owner can perform this operation. The object owner can grant this permission to others by using a bucket or user policy.

+

OBS deletes tags from the current object version by default. You can use the versionId parameter to delete tags from any other version. If the version you are deleting tags from is a delete marker, OBS returns 404 Not Found.

+
+

Tags are not supported for files in parallel file systems.

+
+

Request Syntax

1
+2
+3
+4
DELETE /objectname?tagging&versionId=versionid  HTTP/1.1  
+Host: bucketname.obs.region.example.com
+Date: date
+Authorization: authorization string
+
+
+
+

Request Parameters

This request contains no message parameters.

+
+

Request Headers

This request uses common headers. For details, see Table 3.

+
+

Request Elements

This request involves no elements.

+
+

Response Syntax

1
+2
+3
+4
+5
+6
HTTP/1.1 status_code
+x-obs-request-id: request id
+x-obs-id-2: id
+x-obs-version-id: version id
+Content-Length: length
+Date: date
+
+
+
+

Response Headers

This request uses common headers. For details, see Table 3.

+
+

Response Elements

This response contains no elements.

+
+

Error Responses

No special error responses are returned. For details, see Table 2. If the object has no tags or the tag deletion is successful, OBS returns a 204 error.

+
+

Sample Request

1
+2
+3
+4
+5
+6
DELETE /objectname?tagging&versionId=G001018455096CE600005306000000DD HTTP/1.1   
+User-Agent: curl/7.19.7    
+Host: bucketname.obs.region.example.com
+Accept: */*   
+Date: Wed, 27 Jun 2018 13:46:58 GMT   
+Authorization: authorization string
+
+
+
+

Sample Response

1
+2
+3
+4
+5
+6
HTTP/1.1 204 No Content 
+x-obs-request-id: 0002B7532E0000015BEB2C212E53A17L 
+x-obs-id-2: CqT+86nnOkB+Cv9KZoVgZ28pSgMF+uGQBUC68flvkQeq6CxoCz65wWFMNBpXvea4 
+x-obs-version-id: G001018455096CE600005306000000DD
+Content-Length: 0
+Date: Wed, 27 Jun 2018 13:46:58 GMT
+
+
+
+
+
+ +
+ diff --git a/docs/obs/api-ref/en-us_topic_0031051947.html b/docs/obs/api-ref/en-us_topic_0031051947.html index 0af83174..06346817 100644 --- a/docs/obs/api-ref/en-us_topic_0031051947.html +++ b/docs/obs/api-ref/en-us_topic_0031051947.html @@ -2,7 +2,7 @@

Overview

Welcome to the Object Storage Service API Reference. Object Storage Service (OBS) provides massive, secure, reliable, and cost-effective data storage capabilities for users to store data of any type and size. It is suitable for scenarios such as enterprise backup/archiving, video on demand (VoD), and video surveillance.

-

This document describes how to use application programming interfaces (APIs) to perform operations on OBS, such as creating, modifying, and deleting bucket, as well as uploading, downloading, and deleting objects. For details about all supported operations, see API Overview.

+

This document describes how to use application programming interfaces (APIs) to perform operations on OBS, such as creating, modifying, and deleting bucket, as well as uploading, downloading, and deleting objects. For details about all supported operations, see API Overview.

Before calling OBS APIs, ensure that you have fully understood relevant concepts. For details, see Basic Concepts.

diff --git a/docs/obs/api-ref/obs_04_0000.html b/docs/obs/api-ref/obs_04_0000.html index ea972521..5aaad421 100644 --- a/docs/obs/api-ref/obs_04_0000.html +++ b/docs/obs/api-ref/obs_04_0000.html @@ -8,7 +8,14 @@ -

2024-03-21

+

2024-08-02

+ +

This is the twelfth official release.

+

This issue incorporates the following changes:

+ + + +

2024-03-21

This is the eleventh official release.

This issue incorporates the following change:

diff --git a/docs/obs/api-ref/obs_04_0004.html b/docs/obs/api-ref/obs_04_0004.html index a72c2350..bb415c98 100644 --- a/docs/obs/api-ref/obs_04_0004.html +++ b/docs/obs/api-ref/obs_04_0004.html @@ -1,15 +1,15 @@

Basic Concepts

-

Basic Concepts Related to OBS APIs

  • Domain

    You can register a domain with the cloud service. The domain has full access permissions for all the resources and cloud services that are subscribed under it. The domain can also reset user passwords and grant permissions to users. A domain is a payment entity. To keep the domain secure, it is recommended that you create users under the domain to perform routine management operations.

    +

    Basic Concepts Related to OBS APIs

    • Domain

      You can register a domain with the cloud service. The domain has full access permissions for all of its cloud services and resources. The domain can also reset user passwords and grant permissions to users. A domain is a payment entity. To keep the domain secure, it is recommended that you create users under the domain to perform routine management operations.

    • User

      A user is created using a domain on Identity and Access Management (IAM) to use cloud services. Each IAM user has its own identity credentials (password and access keys).

      -

      On the My Credentials page on the console, you can view the domain ID and user ID, you can also manage the access keys of the domain and IAM users.

      +

      On the My Credentials page on the console, you can view the domain ID and user ID, and manage the access keys of the domain or IAM users.

      Access keys of the domain and its IAM users are required for authentication when calling APIs.

      -
    • Bucket

      A bucket is a container where objects are stored. It is the top namespace in OBS. Each object must reside in a bucket. For example, if the object named picture.jpg is stored in the photo bucket, you can use the following URL to access the object: http://photo.obs.region.example.com/picture.jpg.

      -
    • Objects

      An object is a basic data unit on OBS. A bucket can store multiple objects, and OBS does not distinguish between object types. Objects are serialized in OBS. An object may be a text, a video, or any other types of files. In OBS, the size of a file can range from 0 bytes to 48.8 TB. However, when an object is uploaded through the PutObject operation, it cannot exceed the maximum size of 5 GB. Use the multipart upload method, if the object size is larger than 5 GB.

      +
    • Bucket

      A bucket is a container where objects are stored. It is the top namespace in OBS. Each object must reside in a bucket. For example, if you store object picture.jpg in bucket photo, the object can be accessed by using this URL: http://photo.obs.region.example.com/picture.jpg

      +
    • Object

      An object is a basic data unit on OBS. A bucket can store multiple objects, and OBS does not distinguish between object file types. Objects are serialized in OBS. An object may be a text, a video, or any other types of files. In OBS, the size of a file can range from 0 bytes to 48.8 TB. However, when an object is uploaded through the PutObject operation, it cannot exceed the maximum size of 5 GB. Use the multipart upload method, if the object size is larger than 5 GB.

    • Region

      A region is a geographic area in which cloud resources are deployed. Availability zones (AZs) in the same region can communicate with each other over an intranet, while AZs in different regions are isolated from each other. Deploying cloud resources in different regions can better suit certain user requirements or comply with local laws or regulations.

      -

      Each bucket in OBS must reside in a region. You can specify the region when creating the bucket. Once a bucket is created, its region cannot be changed. Select the most appropriate region for a bucket based on the location, cost, and regulatory compliance requirements. For details about regions, see Endpoints.

      +

      Each bucket in OBS must reside in a region. You can specify the region when creating the bucket. Once a bucket is created, its region cannot be changed. Select the most appropriate region for a bucket based on the location, cost, and regulatory compliance requirements. For details about the available regions, see Endpoints.

    diff --git a/docs/obs/api-ref/obs_04_0005.html b/docs/obs/api-ref/obs_04_0005.html index e40c0b69..0ca799c7 100644 --- a/docs/obs/api-ref/obs_04_0005.html +++ b/docs/obs/api-ref/obs_04_0005.html @@ -1,8 +1,8 @@

    API Overview

    -

    API Operations on Buckets

    -
    Table 1 API operations on buckets

    Operation

    +

    APIs for Basic Bucket Operations

    +
    @@ -10,12 +10,12 @@ - - - - -
    Table 1 APIs for basic bucket operations

    API

    Description

    Listing Buckets

    Queries the list of buckets created by the user.

    +

    Queries the buckets created by the user.

    Creating a Bucket

    Creates a bucket. You can add different request headers to specify the region, storage class, and permission control policy.

    +

    Creates a bucket. You can add request headers to specify the region, storage class, and ACL.

    Listing Objects in a Bucket

    @@ -25,25 +25,25 @@

    Obtaining Bucket Metadata

    Checks whether the bucket metadata exists. You can query the information about the bucket region, storage class, OBS version number, and CORS configuration.

    +

    Checks the bucket metadata. You can query the region, storage class, service version, CORS, or other information.

    Obtaining Bucket Location

    Obtains the bucket region information.

    +

    Obtains the bucket region.

    Deleting Buckets

    Deletes a specified bucket. Before deleting a bucket, ensure that the bucket is empty.

    +

    Deletes a bucket. Only empty buckets can be deleted.

    -

    API Operations on Advanced Bucket Settings

    -
    Table 2 API operations on advanced bucket settings

    Operation

    +

    APIs for Advanced Bucket Settings

    +
    @@ -51,67 +51,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Table 2 APIs for advanced bucket settings

    API

    Description

    Configuring a Bucket Policy

    Creates or modifies a bucket policy. If the specified bucket already has a policy, the policy in the request will overwrite the existing one.

    +

    Creates or modifies a bucket policy. The existing policy in a bucket is overwritten by the policy in the request.

    Obtaining Bucket Policy Information

    Obtains the policy information of a specified bucket.

    +

    Obtains the policy of a bucket.

    Deleting a Bucket Policy

    Deletes the policy of a specified bucket.

    +

    Deletes the policy of a bucket.

    Configuring a Bucket ACL

    Configures the ACL of a specified bucket. You can control the read and write permissions of a bucket through ACL settings.

    +

    Sets an ACL to control the read and write permissions on a bucket.

    Obtaining Bucket ACL Information

    Obtains the ACL information of a specified bucket.

    +

    Obtains the ACL of a bucket.

    Configuring Logging for a Bucket

    Enables or disables the log management function of a bucket. When this function is enabled, a log record is generated for each operation on a bucket. Multiple log records are packed into a log file, which will be saved in a specified location.

    +

    Enables or disables logging for a bucket. If logging is enabled for a bucket, each operation creates a record. Multiple records are packed and stored in a specified location.

    Obtaining a Bucket Logging Configuration

    Obtains the logging configuration of the current bucket.

    +

    Obtains the logging configuration of a bucket.

    Configuring Bucket Lifecycle Rules

    Configures rules to automatically delete or migrate objects in a bucket.

    +

    Configures rules to delete or migrate objects in a bucket.

    Obtaining Bucket Lifecycle Configuration

    Obtains the lifecycle rules configured for a specified bucket.

    +

    Obtains the lifecycle rules of a bucket.

    Deleting Lifecycle Rules

    Deletes the lifecycle configuration of a bucket.

    +

    Deletes the lifecycle rules of a bucket.

    Configuring Versioning for a Bucket

    Enables or disables versioning for a bucket. When this function is enabled, objects of different versions can be retrieved and restored, and data can be quickly restored in case of accidental operations or application faults.

    +

    Enables or suspends versioning for a bucket. With versioning enabled, you can use various object versions to protect data against accidental deletion or application breakdown.

    Obtaining Bucket Versioning Status

    Obtains the versioning status of a specified bucket.

    +

    Obtains the versioning status of a bucket.

    Configuring Event Notification for a Bucket

    Configures the event notification for a bucket to ensure that the bucket owner is notified about events occur on the bucket in a secure and timely manner.

    +

    Configures the event notification for a bucket.

    Obtaining the Event Notification Configuration of a Bucket

    @@ -121,32 +121,32 @@

    Configuring Storage Class for a Bucket

    Creates or updates the default storage class configuration of a bucket.

    +

    Creates or updates the default storage class of a bucket.

    Obtaining Bucket Storage Class Information

    Obtains the default storage class configuration of a bucket.

    +

    Obtains the default storage class of a bucket.

    Configuring Cross-Region Replication for a Bucket

    Configures the cross-region replication function for a bucket. By activating cross-region replication, OBS can copy new objects and modified objects from a source bucket in one region to a destination bucket in a different region.

    +

    Configures cross-region replication for a bucket. This allows you to copy an object from a region to another one.

    Obtaining the Cross-Region Replication Configuration of a Bucket

    Obtains the cross-region replication configuration of a specified bucket.

    +

    Obtains the cross-region replication configuration of a bucket.

    Deleting the Cross-Region Replication Configuration of a Bucket

    Deletes the cross-region replication configuration of a specified bucket.

    +

    Deletes the cross-region replication configuration of a bucket.

    Configuring Tags for a Bucket

    Adds a tag to an existing bucket. After tags are added to a bucket, all service detail records (SDRs) generated by the requests for this bucket will have the same tags. You can categorize the SDRs for detailed cost analysis.

    +

    Adds a tag to an existing bucket. The tags you added are attached to all service detail records (SDRs) generated by bucket requests. This makes it easy to manage costs.

    Obtaining Bucket Tags

    @@ -156,47 +156,47 @@

    Deleting Tags

    Deletes the tags of a specified bucket.

    +

    Deletes the tags of a bucket.

    Configuring Bucket Storage Quota

    Sets the bucket space quota to limit the maximum storage capacity of the bucket.

    +

    Sets a quota to limit how much space of a bucket can be used.

    Querying Bucket Storage Quota

    Obtains the bucket space quota.

    +

    Obtains the bucket quota.

    Obtaining Storage Information of a Bucket

    Obtains the number of objects in a bucket and the space occupied by the objects.

    +

    Obtains the number of objects in a bucket and the space occupied by them.

    Configuring Bucket Inventories

    Configures an inventory rule for a bucket. OBS provides bucket inventories to facilitate your management of objects in a bucket. You can configure bucket inventories to periodically list objects in a bucket. During the listing of objects, object metadata is saved in a CSV file, which is uploaded to the specified bucket.

    +

    Configures an inventory rule for a bucket. You can use an inventory rule to get a list of all objects in your bucket on a regular basis. The object metadata is saved in CSV files. These files are uploaded to your bucket.

    Obtaining a Specific Inventory of a Bucket

    Obtains an inventory rule of a specified bucket.

    +

    Obtains an inventory rule of a bucket.

    Listing All Inventories of a Bucket

    Obtains all inventory rules of a specified bucket.

    +

    Obtains all inventory rules of a bucket.

    Deleting Bucket Inventories

    Deletes an inventory rule of a specified bucket.

    +

    Deletes an inventory rule of a bucket.

    Configuring a Custom Domain Name for a Bucket

    Configures a custom domain name for a bucket. Once a user-defined domain name is successfully configured, the bucket can be accessed through the user-defined domain name.

    +

    Configures a custom domain name for a bucket. You can use the configured domain name to access the bucket.

    Obtaining the Custom Domain Name of a Bucket

    @@ -211,17 +211,17 @@

    Configuring Bucket Encryption

    Creates or updates the default server-side encryption configuration for a bucket. After encryption is enabled for a bucket, objects uploaded to the bucket are encrypted with the encryption configuration the bucket.

    +

    Creates or updates the server-side encryption configuration for a bucket. This configuration is later used to encrypt newly uploaded objects.

    Obtaining Bucket Encryption Configuration

    Queries the default server-side encryption configuration of a bucket.

    +

    Queries the server-side encryption configuration of a bucket.

    Deleting the Encryption Configuration of a Bucket

    Deletes the default server-side encryption configuration of a bucket.

    +

    Deletes the server-side encryption configuration of a bucket.

    Configuring the Requester-Pays Function for a Bucket

    @@ -231,25 +231,25 @@

    Obtaining the Requester-Pays Configuration Information of a Bucket

    Obtains the requester-pays configuration information of a bucket.

    +

    Obtains the requester-pays configuration of a bucket.

    Configuring a Default WORM Policy for a Bucket

    Configures the default WORM policy and a retention period for a bucket.

    +

    Configures the WORM policy and retention period for a bucket.

    Obtaining the Default WORM Policy of a Bucket

    Returns the default WORM policy of a bucket.

    +

    Returns the WORM policy of a bucket.

    -

    API Operations for Static Website Hosting

    -
    Table 3 API Operations for Static Website Hosting

    Operation

    +

    APIs for Static Website Hosting

    +
    @@ -257,7 +257,7 @@ - - - -
    Table 3 APIs for static website hosting

    API

    Description

    Configuring Static Website Hosting for a Bucket

    Creates or updates the website hosting configuration of a bucket. OBS allows you to store static web page resources such as HTML web pages, flash files, videos, and audios in a bucket. When a client accesses these resources from the website endpoint of the bucket, the browser can directly resolve and present the resources to the client.

    +

    Creates or updates the website hosting configuration of a bucket. You can host static website resources such as HTML web pages, flash files, or audio and video files in an OBS bucket, so that you can provide these hosted resources using the bucket's website endpoint to end users.

    Obtaining the Static Website Hosting Configuration of a Bucket

    @@ -272,7 +272,7 @@

    Configuring Bucket CORS

    Configures the cross-origin resource sharing (CORS) configuration of a bucket. OBS allows static web page resources to be stored in buckets. The buckets can be used as website resources. A website hosted by OBS can respond to cross-domain requests from another website only after the CORS rule is configured.

    +

    Configures cross-origin resource sharing (CORS) for a bucket. Static website resources stored in a bucket in a domain can be configured with CORS to accept requests from a different domain.

    Obtaining the CORS Configuration of a Bucket

    @@ -287,20 +287,20 @@

    OPTIONS Bucket

    Checks whether the client has the permission to perform operations on the server. It is usually performed before the cross-domain access.

    +

    Checks whether the client has the permission to access the server. This operation is usually performed before cross-domain access.

    OPTIONS Object

    Checks whether the client has the permission to perform operations on the server. It is usually performed before the cross-domain access.

    +

    Checks whether the client has the permission to access the server. This operation is usually performed before cross-domain access.

    -

    API Operations on Objects

    -
    Table 4 API operations on objects

    Operation

    +

    APIs for Object Operations

    +
    @@ -308,17 +308,17 @@ - - - - - - - - - - - - - + + + + + + + + +
    Table 4 APIs for object operations

    API

    Description

    Uploading an Object - PUT

    Uploads an object to a specified bucket.

    +

    Uploads an object to a bucket.

    Uploading an Object - POST

    Uploads an object to a specified bucket based on tables.

    +

    Uploads an object to a bucket using a form.

    Copying an Object

    Creates a copy for an existing object in OBS.

    +

    Creates a copy for an existing object.

    Downloading an Object

    @@ -328,52 +328,67 @@

    Querying Object Metadata

    Obtains the object metadata. Information such as object expiration time, version number, and CORS configuration is the object metadata.

    +

    Obtains object metadata (such as expiration time, version number, and CORS configuration).

    Deleting an Object

    Deletes a specified object. You can also carry the versionId field to delete the specified object version.

    +

    Deletes an object. You can use versionId to specify a version to delete.

    Deleting Objects

    Deletes a batch of objects from a bucket permanently. Objects deleted in this way cannot be recovered.

    +

    Permanently deletes a batch of objects from a bucket.

    Restoring Cold Objects

    Restores objects in the Cold storage class. You can download these objects only after they are restored.

    +

    Restores objects from the Cold storage class.

    Configuring an Object ACL

    Configures the ACL of a specified object. You can control the read and write permissions of objects through ACL settings.

    +

    Sets an ACL to control the read and write permissions on an object.

    Obtaining Object ACL Configuration

    Obtains the ACL configuration of a specified object.

    +

    Obtains the ACL of an object.

    Modifying Object Metadata

    Adds, modifies, or deletes metadata of uploaded objects.

    +

    Adds, modifies, or deletes the existing object metadata.

    Modifying an Object

    Modifies the content of an object in a specified parallel file system from the specified location.

    +

    Modifies the content of an object in a parallel file system from a specified location.

    Truncating an Object

    Truncates an object in a specified parallel file system to the specified size.

    +

    Truncates an object in a parallel file system to a specified size.

    Renaming an Object

    Renames an object in a specified parallel file system.

    +

    Renames an object in a parallel file system.

    +

    Adding Object Tags

    +

    Adds tags to an object.

    +

    Obtaining Object Tags

    +

    Obtains tags of an object.

    +

    Deleting Object Tags

    +

    Deletes tags of an object.

    Configuring WORM Retention for an Object

    @@ -385,8 +400,8 @@
    -

    API Operations for Multipart Tasks

    -
    Table 5 API operations for multipart tasks

    Operation

    +

    APIs for Multipart Uploads

    +
    @@ -394,32 +409,32 @@ - - - - - - - - - - - - - diff --git a/docs/obs/api-ref/obs_04_0009.html b/docs/obs/api-ref/obs_04_0009.html index e330c8e6..751fb063 100644 --- a/docs/obs/api-ref/obs_04_0009.html +++ b/docs/obs/api-ref/obs_04_0009.html @@ -2,7 +2,7 @@

    User Signature Authentication

    OBS signs a request using AK/SK. When a client is sending a request to OBS, the message header must contain the SK, request time, request type, and other information of the signature.

    -
    • AK: access key ID, which is a unique identifier associated with a secret access key (SK). The AK and SK are used together to obtain an encrypted signature for a request. Format example: HCY8BGCN1YM5ZWYOK1MH
    • SK: secret access key, which is used together with the AK to sign requests, identify a request sender, and prevent the request from being modified. Format example: 9zYwf1uabSQY0JTnFqbUqG7vcfqYBaTdXde2GUcq
    +
    • AK: access key ID, which is a unique identifier associated with a secret access key (SK). The AK and SK are used together to obtain an encrypted signature for a request.
    • SK: secret access key, which is used together with the AK to sign requests, identify a request sender, and prevent the request from being modified.

    A user can obtain the AK and SK from IAM. For details, see Obtaining Access Keys (AK/SK).

    OBS provides three signature calculation methods based on application scenarios: Authentication of Signature in a Header, Authentication of Signature in a URL, and Authentication of Signature Carried in the Table Uploaded Through a Browser.

    The SDK provided by OBS integrates signature calculation. It is recommended that you use the SDK for development.

    @@ -60,12 +60,12 @@

    Date: Tue, 04 Jun 2019 06:54:59 GMT

    Content-Type: text/plain

    Content-Length: 5913

    -

    Authorization: OBS AccessKeyID:Signature

    +

    Authorization: OBS AccessKeyID:Signature

    - - diff --git a/docs/obs/api-ref/obs_04_0010.html b/docs/obs/api-ref/obs_04_0010.html index 31a57ff9..efff9a8a 100644 --- a/docs/obs/api-ref/obs_04_0010.html +++ b/docs/obs/api-ref/obs_04_0010.html @@ -3,12 +3,9 @@

    Authentication of Signature in a Header

    For all API operations, the most common identity authentication is to carry signatures in headers.

    In the header, the signature is carried in the authorization header field of the HTTP message. The format of the message header is as follows:

    -
    Authorization: OBS AccessKeyID:signature
    -

    The signature calculation process is as follows:

    -

    1. Construct the request character string (StringToSign).

    -

    2. Perform UTF-8 encoding on the result obtained from the preceding step.

    -

    3. Use the SK to perform the HMAC-SHA1 signature calculation on the result obtained from step 2.

    -

    4. Perform Base64 encoding on the result of step 3 to obtain the signature.

    +
    Authorization: OBS AccessKeyID:Signature
    +

    The process of calculating a signature is as follows:

    +
    1. Construct the StringToSign.
    2. Encode the result of 1 in UTF-8.
    3. Use the SK to calculate the HMAC-SHA1 signature on the result of 2.
    4. Encode the result of 3 in Base64 to obtain the signature.

    The StringToSign is constructed according to the following rules. Table 1 describes the parameters.
    StringToSign = 
         HTTP-Verb + "\n" + 
    @@ -17,49 +14,48 @@
         Date + "\n" + 
         CanonicalizedHeaders + CanonicalizedResource
    -
    Table 5 APIs for multipart uploads

    API

    Description

    Listing Initiated Multipart Uploads in a Bucket

    Queries all the multipart upload tasks that have not been merged or canceled in a bucket.

    +

    Queries all multipart uploads for a bucket that have been initiated but not completed or aborted.

    Initiating a Multipart Upload

    Initiates a multipart upload task, and obtains the globally unique multipart upload task ID for subsequent operations, such as uploading, merging, and listing parts.

    +

    Initiates a multipart upload and obtains a globally unique task ID for later use when uploading, assembling, and listing parts.

    Uploading Parts

    Uploads parts for a specific multipart task.

    +

    Uploads parts for a multipart task.

    Copying Parts

    Copies an object or a part of the object as a part of a multipart task.

    +

    Copies part or all of an existing object as a part.

    Listing Uploaded Parts

    +

    Listing Uploaded Parts that Have Not Been Assembled

    Queries information about all parts of a multipart task.

    +

    Queries all parts of a multipart task.

    Completing a Multipart Upload

    Merges the specified parts into a complete object.

    +

    Assembles parts into an object.

    Canceling a Multipart Upload Task

    diff --git a/docs/obs/api-ref/obs_04_0007.html b/docs/obs/api-ref/obs_04_0007.html index 6acfec9e..ff6612df 100644 --- a/docs/obs/api-ref/obs_04_0007.html +++ b/docs/obs/api-ref/obs_04_0007.html @@ -74,32 +74,32 @@

    GET

    Requests the server to return a specific resource, for example, a bucket list or object.

    +

    Requests that the server return a specific resource, for example, a bucket list or object.

    PUT

    Requests the server to update a specific resource, for example, creating a bucket or uploading an object.

    +

    Requests that the server update a specific resource, for example, creating a bucket or uploading an object.

    POST

    Requests the server to add a resource or perform a special operation, for example, part uploading or merging.

    +

    Requests that the server add a resource or perform a special operation, for example, initiating multipart uploads or assembling parts.

    DELETE

    Requests the server to delete specified resources, for example, an object.

    +

    Requests that the server delete specified resources, for example, an object.

    HEAD

    Requests the server to return the digest of a specific resource, for example, object metadata.

    +

    Requests that the server return the description of a specific resource, for example, object metadata.

    OPTIONS

    The request server checks whether the user has the operation permission for a resource. The CORS needs to be configured for the bucket.

    +

    Requests that the server check whether the user has the operation permission for a resource. The CORS needs to be configured for the bucket.

    7. Obtain the SK based on the AK in the request.

    Obtain the AK from the authorization header and obtain the SK of the user from IAM.

    +

    Obtain the AK from the Authorization header and obtain the SK from IAM.

    8. Calculate StringToSign based on the signature rule.

    @@ -80,7 +80,7 @@

    10. Authenticate the signature.

    Verify that the value of Signature in the authorization header is the same as the value of Signature calculated by the server.

    +

    Check whether the value of Signature in the Authorization header is the same as the value of Signature calculated by the server.

    If the two values are the same, the signature verification is successful.

    If the two values are different, the signature verification fails.

    Table 1 Parameters required for constructing a StringToSign

    Parameter

    +
    - - - - - - - - - - - - - @@ -69,17 +65,17 @@

    The following tables provide some examples of generating StringToSign.

    -
    Table 1 Parameters required for constructing a StringToSign

    Parameter

    Description

    +

    Description

    HTTP-Verb

    +

    HTTP-Verb

    Indicates an HTTP request method supported by the OBS REST API. The value can be an HTTP verb such as PUT, GET, or DELETE.

    +

    Indicates an HTTP request method supported by the OBS REST API. The value can be an HTTP verb such as PUT, GET, or DELETE.

    Content-MD5

    +

    Content-MD5

    Base64-encoded 128-bit MD5 digest of the message according to RFC 1864. This parameter can be empty. For details, see Table 6 and the algorithm examples below the table.

    +

    Base64-encoded 128-bit MD5 digest of the message according to RFC 1864. This parameter can be empty. For details, see Table 6 and the algorithm examples below the table.

    Content-Type

    +

    Content-Type

    Specifies the message type, for example, text/plain.

    +

    Specifies the message type, for example, text/plain.

    If a request does not contain this header field, this parameter is deemed as an empty string. For details, see Table 2.

    Date

    +

    Date

    Time when a request is initiated. This parameter uses the RFC 1123 time format. If the deviation between the time specified by this parameter and the server time is over 15 minutes, the server returns error 403.

    +

    Time when a request is initiated. This parameter uses the RFC 1123 time format. If the deviation between the time specified by this parameter and the server time is over 15 minutes, the server returns error 403.

    This parameter is an empty string when the x-obs-date is specified. For details, see Table 6.

    If an operation (for example, obtaining an object content) is temporarily authorized, this parameter is not required.

    -

    CanonicalizedHeaders

    +

    CanonicalizedHeaders

    OBS request header field in an HTTP request header, referring to header fields starting with x-obs-, such as, x-obs-date, x-obs-acl, and x-obs-meta-*. When calling an API, choose a header that is supported by the API as required.

    +

    OBS request header field in an HTTP request header, referring to header fields starting with x-obs-, such as, x-obs-date, x-obs-acl, and x-obs-meta-*. When calling an API, choose a header that is supported by the API as required.

    1. All characters of keywords in a request header field must be converted to lowercase letters (content values must be case sensitive, for example, x-obs-storage-class:STANDARD). If a request contains multiple header fields, these fields should be organized by keyword in the alphabetical order from a to z.
    2. If multiple header fields in a request have the same prefix, combine the header fields into one. For example, x-obs-meta-name:name1 and x-obs-meta-name:name2 should be reorganized into x-obs-meta-name:name1,name2. Use comma to separate the values.
    3. Keywords in the request header field cannot contain non-ASCII or unrecognizable characters, which are also not advisable for values in the request header field. If the two types of characters are necessary, they should be encoded and decoded on the client side. Either URL encoding or Base64 encoding is acceptable, but the server does not perform decoding.
    4. Delete meaningless spaces and tabs in a header field. For example, x-obs-meta-name: name (with a meaningless space before name) must be changed to x-obs-meta-name:name.
    5. Each header field occupies a separate line. See Table 4.

    CanonicalizedResource

    +

    CanonicalizedResource

    Indicates the OBS resource specified by an HTTP request. This parameter is constructed as follows:

    +

    Indicates the OBS resource specified by an HTTP request. This parameter is constructed as follows:

    <Bucket name + Object name> + [Subresource 1] + [Subresource 2] + ...

    -
    1. Bucket name and object name, for example, /bucket/object. If no object name is specified, for example, /bucket/, the entire bucket is listed. If no bucket name is specified either, the value of this field is /.
    2. If a subresource (such as ?acl and ?logging) exists, the subresource must be added.

      OBS supports a variety of sub-resources, including acl, attname, cors, customdomain, delete, deletebucket, encryption, inventory, length, lifecycle, location, logging, metadata, modify, name, notification, partNumber, policy, position, quota, rename, replication, requestPayment, response-cache-control, response-content-disposition, response-content-encoding, response-content-language, response-content-type, response-expires, restore, storageClass, storagePolicy, storageinfo, tagging, torrent, truncate, uploadId, uploads, versionId, versioning, versions, website, object-lock, retention, and x-obs-security-token.

      +
      1. Bucket name and object name, for example, /bucket/object. If no object name is specified, for example, /bucket/, the entire bucket is listed. If no bucket name is specified either, the value of this field is /.
      2. If a subresource (such as ?acl and ?logging) exists, the subresource must be added.

        OBS supports a variety of sub-resources, including acl, attname, cors, customdomain, delete, deletebucket, encryption, inventory, length, lifecycle, location, logging, metadata, modify, name, notification, partNumber, policy, position, quota, rename, replication, requestPayment, response-cache-control, response-content-disposition, response-content-encoding, response-content-language, response-content-type, response-expires, restore, storageClass, storagePolicy, storageinfo, tagging, torrent, truncate, uploadId, uploads, versionId, versioning, versions, website, object-lock, retention, and x-obs-security-token.

      3. If there are multiple subresources, sort them in the alphabetical order from a to z, and use & to combine the subresources.
      -
      NOTE:
      • A subresource is unique. Do not add subresources with the same keyword (for example, key=value1&key=value2) in the same request URL. In this case, signature is computed only based on the first subresource, and only the value of the first subresource takes effect on the actual service.
      • Using the GetObject API as an example, assume there is a bucket named bucket-test and an object named object-test in the bucket, and the object version is xxx. When obtaining the object, you need to rewrite Content-Type to text/plain. Then, the CanonicalizedResource calculated by the signature is /bucket-test/object-test?response-content-type=text/plain&versionId=xxx.
      +
      NOTE:
      • A subresource is unique. Do not add subresources with the same keyword (for example, key=value1&key=value2) in the same request URL. In this case, signature is computed only based on the first subresource, and only the value of the first subresource takes effect on the actual service.
      • Using the GetObject API as an example, assume there is a bucket named bucket-test and an object named object-test in the bucket, and the object version is xxx. When obtaining the object, you need to rewrite Content-Type to text/plain. Then, the CanonicalizedResource calculated by the signature is /bucket-test/object-test?response-content-type=text/plain&versionId=xxx.
      • CanonicalizedResource should be located on a separate line from CanonicalizedHeaders.
    Table 2 Obtaining an object

    Request Header

    +
    - - -
    Table 2 Obtaining an object

    Request Header

    StringToSign

    +

    StringToSign

    GET /object.txt HTTP/1.1

    +

    GET /object.txt HTTP/1.1

    Host: bucket.obs.region.example.com

    Date: Sat, 12 Oct 2015 08:12:38 GMT

    GET \n

    +

    GET \n

    \n

    \n

    Sat, 12 Oct 2015 08:12:38 GMT\n

    @@ -90,26 +86,26 @@
    -
    Table 3 Using temporary AK/SK and security token to upload objects

    Request Header

    +
    - - - @@ -120,13 +116,13 @@

    For details about how to obtain a temporary AK/SK pair and security token, see Obtaining a Temporary AK/SK Pair.

    -
    Table 3 Using temporary AK/SK and security token to upload objects

    Request Header

    StringToSign

    +

    StringToSign

    PUT /object.txt HTTP/1.1

    +

    PUT /object.txt HTTP/1.1

    User-Agent: curl/7.15.5

    Host: bucket.obs.region.example.com

    x-obs-date:Tue, 15 Oct 2015 07:20:09 GMT

    -

    x-obs-security-token: YwkaRTbdY8g7q....

    +

    x-obs-security-token: YwkaRTbdY8g7q....

    content-type: text/plain

    Content-Length: 5913339

    PUT\n

    +

    PUT\n

    \n

    text/plain\n

    \n

    x-obs-date:Tue, 15 Oct 2015 07:20:09 GMT\n

    -

    x-obs-security-token:YwkaRTbdY8g7q....\n

    +

    x-obs-security-token:YwkaRTbdY8g7q....\n

    /bucket/object.txt

    Table 4 An object upload request containing header fields

    Request Header

    +
    - - -
    Table 4 An object upload request containing header fields

    Request Header

    StringToSign

    +

    StringToSign

    PUT /object.txt HTTP/1.1

    +

    PUT /object.txt HTTP/1.1

    User-Agent: curl/7.15.5

    Host: bucket.obs.region.example.com

    Date: Mon, 14 Oct 2015 12:08:34 GMT

    @@ -134,7 +130,7 @@

    content-type: text/plain

    Content-Length: 5913339

    PUT\n

    +

    PUT\n

    \n

    text/plain\n

    Mon, 14 Oct 2015 12:08:34 GMT\n

    @@ -146,17 +142,17 @@
    -
    Table 5 Obtaining an object ACL

    Request Header

    +
    - - -
    Table 5 Obtaining an object ACL

    Request Header

    StringToSign

    +

    StringToSign

    GET /object.txt?acl HTTP/1.1

    +

    GET /object.txt?acl HTTP/1.1

    Host: bucket.obs.region.example.com

    Date: Sat, 12 Oct 2015 08:12:38 GMT

    GET \n

    +

    GET \n

    \n

    \n

    Sat, 12 Oct 2015 08:12:38 GMT\n

    @@ -167,19 +163,19 @@
    -
    - - - - -
    Table 6 An object upload request carrying the Content-MD5 header

    Request Header

    +
    - - -
    Table 6 An object upload request carrying the Content-MD5 header

    Request Header

    StringToSign

    +

    StringToSign

    PUT /object.txt HTTP/1.1

    +

    PUT /object.txt HTTP/1.1

    Host: bucket.obs.region.example.com

    x-obs-date:Tue, 15 Oct 2015 07:20:09 GMT

    Content-MD5: I5pU0r4+sgO9Emgl1KMQUg==

    Content-Length: 5913339

    PUT\n

    +

    PUT\n

    I5pU0r4+sgO9Emgl1KMQUg==\n

    \n

    \n

    @@ -191,19 +187,19 @@
    -
    Table 7 Uploading an object through a user domain name

    Request Header

    +
    - - -
    Table 7 Uploading an object through a user domain name

    Request Header

    StringToSign

    +

    StringToSign

    PUT /object.txt HTTP/1.1

    +

    PUT /object.txt HTTP/1.1

    Host: obs.ccc.com

    x-obs-date:Tue, 15 Oct 2015 07:20:09 GMT

    Content-MD5: I5pU0r4+sgO9Emgl1KMQUg==

    Content-Length: 5913339

    PUT\n

    +

    PUT\n

    I5pU0r4+sgO9Emgl1KMQUg==\n

    \n

    \n

    @@ -214,7 +210,7 @@
    -

    Content-MD5 Algorithm in Java

     1
    +

    Content-MD5 Algorithm in Java

     1
      2
      3
      4
    @@ -252,20 +248,17 @@
          }
     }
     
    -
    The signature is generated as follows based on the StringToSign and SK. The hash-based message authentication code algorithm (HMAC algorithm) is used to generate the signature.
    Signature = Base64( HMAC-SHA1( YourSecretAccessKeyID, UTF-8-Encoding-Of( StringToSign ) ) )
    -

    -
    For example, to create a private bucket named newbucketname2 in a region, the client request format is as follows:
    PUT / HTTP/1.1 
    +
    For example, to create a private bucket named newbucketname2 in a region, the format of a client request is as follows:
    PUT / HTTP/1.1 
     Host: newbucketname2.obs.region.example.com
     Content-Length: length
     Date: Fri, 06 Jul 2018 03:45:51 GMT
     x-obs-acl:private
     x-obs-storage-class:STANDARD
     Authorization: OBS UDSIAMSTUBTEST000254:ydH8ffpcbS6YpeOMcEZfn0wE90c=
    -
     <CreateBucketConfiguration xmlns="http://obs.region.example.com/doc/2015-06-30/">
         <Location>region</Location> 
     </CreateBucketConfiguration>
    @@ -482,17 +475,7 @@ Authorization: OBS UDSIAMSTUBTEST000254:ydH8ffpcbS6YpeOMcEZfn0wE90c= 209 210 211 -212 -213 -214 -215 -216 -217 -218 -219 -220 -221 -222
    import java.io.UnsupportedEncodingException;
    +212
    import java.io.UnsupportedEncodingException;
     import java.net.URLEncoder;
     import java.security.InvalidKeyException;
     import java.security.NoSuchAlgorithmException;
    @@ -509,213 +492,202 @@ Authorization: OBS UDSIAMSTUBTEST000254:ydH8ffpcbS6YpeOMcEZfn0wE90c=
     import javax.crypto.Mac;
     import javax.crypto.spec.SecretKeySpec;
     
    -import org.omg.CosNaming.IstringHelper;
    -
    -
     public class SignDemo {
     	
    -	private static final String SIGN_SEP = "\n";
    +    private static final String SIGN_SEP = "\n";
     	
    -	private static final String OBS_PREFIX = "x-obs-";
    +    private static final String OBS_PREFIX = "x-obs-";
      
    - private static final String DEFAULT_ENCODING = "UTF-8";
    +    private static final String DEFAULT_ENCODING = "UTF-8";
      
    - private static final List<String> SUB_RESOURCES = Collections.unmodifiableList(Arrays.asList(
    -   "CDNNotifyConfiguration", "acl", "attname",  "cors", "customdomain", "delete",
    -   "deletebucket", "encryption", "inventory", "length", "lifecycle", "location", "logging",
    -   "metadata", "mirrorBackToSource", "modify", "name", "notification", "obscompresspolicy", 
    -   "partNumber", "policy", "position", "quota","rename", "replication", "requestPayment", "response-cache-control", 
    -   "response-content-disposition","response-content-encoding", "response-content-language", "response-content-type", 
    -   "response-expires","restore", "storageClass", "storagePolicy", "storageinfo", "tagging", "torrent", "truncate",
    -   "uploadId", "uploads", "versionId", "versioning", "versions", "website", 
    -   "x-obs-security-token", "object-lock", "retention"));
    +    private static final List<String> SUB_RESOURCES = Collections.unmodifiableList(Arrays.asList(
    +        "CDNNotifyConfiguration", "acl", "attname",  "cors", "customdomain", "delete",
    +   	"deletebucket", "encryption", "inventory", "length", "lifecycle", "location", "logging",
    +   	"metadata", "mirrorBackToSource", "modify", "name", "notification", "obscompresspolicy", 
    +   	"partNumber", "policy", "position", "quota","rename", "replication", "requestPayment", "response-cache-control", 
    +   	"response-content-disposition","response-content-encoding", "response-content-language", "response-content-type", 
    +   	"response-expires","restore", "storageClass", "storagePolicy", "storageinfo", "tagging", "torrent", "truncate",
    +   	"uploadId", "uploads", "versionId", "versioning", "versions", "website", 
    +  	 "x-obs-security-token", "object-lock", "retention"));
      
    - private String ak;
    +    private String ak;
      
    - private String sk;
    +    private String sk;
      
    -  public String urlEncode(String input) throws UnsupportedEncodingException
    -    {
    -  return URLEncoder.encode(input, DEFAULT_ENCODING)
    -        .replaceAll("%7E", "~") //for browser
    -        .replaceAll("%2F", "/")
    -        .replaceAll("%20", "+");
    +     public String urlEncode(String input) throws UnsupportedEncodingException {
    +        return URLEncoder.encode(input, DEFAULT_ENCODING)
    +            .replaceAll("%7E", "~") //for browser
    +            .replaceAll("%2F", "/")
    +            .replaceAll("%20", "+");
         }
      
    - private String join(List<?> items, String delimiter)
    -    {
    +    private String join(List<?> items, String delimiter) {
             StringBuilder sb = new StringBuilder();
    -        for (int i = 0; i < items.size(); i++)
    -        {
    - String item = items.get(i).toString();
    +        for (int i = 0; i < items.size(); i++) {
    +            String item = items.get(i).toString();
                 sb.append(item);
    -            if (i < items.size() - 1)
    -            {
    +            if (i < items.size() - 1) {
                     sb.append(delimiter);
                 }
             }
             return sb.toString();
         }
     	
    -	private boolean isValid(String input) {
    -		return input != null && !input.equals("");
    -	}
    +    private boolean isValid(String input) {
    +        return input != null && !input.equals("");
    +    }
     	
    -	public String hamcSha1(String input) throws NoSuchAlgorithmException, InvalidKeyException, UnsupportedEncodingException {
    -		SecretKeySpec signingKey = new SecretKeySpec(this.sk.getBytes(DEFAULT_ENCODING), "HmacSHA1");
    -		Mac mac = Mac.getInstance("HmacSHA1");
    -		mac.init(signingKey);
    -		return Base64.getEncoder().encodeToString(mac.doFinal(input.getBytes(DEFAULT_ENCODING)));
    -	}
    +    public String hmacSha1(String input) throws NoSuchAlgorithmException, InvalidKeyException, UnsupportedEncodingException {
    +        SecretKeySpec signingKey = new SecretKeySpec(this.sk.getBytes(DEFAULT_ENCODING), "HmacSHA1");
    +        Mac mac = Mac.getInstance("HmacSHA1");
    +        mac.init(signingKey);
    +        return Base64.getEncoder().encodeToString(mac.doFinal(input.getBytes(DEFAULT_ENCODING)));
    +    }
     	
    -	private String stringToSign(String httpMethod, Map<String, String[]> headers, Map<String, String> queries,
    -			String bucketName, String objectName) throws Exception{
    -		String contentMd5 = "";
    -		String contentType = "";
    -		String date = "";
    +    private String stringToSign(String httpMethod, Map<String, String[]> headers, Map<String, String> queries,
    +        String bucketName, String objectName) throws Exception{
    +        String contentMd5 = "";
    +        String contentType = "";
    +        String date = "";
     		
    -		TreeMap<String, String> canonicalizedHeaders = new TreeMap<String, String>();
    +        TreeMap<String, String> canonicalizedHeaders = new TreeMap<String, String>();
     		
    -		String key;
    -		List<String> temp = new ArrayList<String>();
    -		for(Map.Entry<String, String[]> entry : headers.entrySet()) {
    -			key = entry.getKey();
    -			if(key == null || entry.getValue() == null || entry.getValue().length == 0) {
    -				continue;
    -			}
    +        String key;
    +        List<String> temp = new ArrayList<String>();
    +        for(Map.Entry<String, String[]> entry : headers.entrySet()) {
    +            key = entry.getKey();
    +            if(key == null || entry.getValue() == null || entry.getValue().length == 0) {
    +                continue;
    +            }
     			
    -			key = key.trim().toLowerCase(Locale.ENGLISH);
    -			if(key.equals("content-md5")) {
    -				contentMd5 = entry.getValue()[0];
    -				continue;
    -			}
    +            key = key.trim().toLowerCase(Locale.ENGLISH);
    +            if(key.equals("content-md5")) {
    +                contentMd5 = entry.getValue()[0];
    +                continue;
    +            }
     			
    -			if(key.equals("content-type")) {
    -				contentType = entry.getValue()[0];
    -				continue;
    -			}
    +            if(key.equals("content-type")) {
    +                contentType = entry.getValue()[0];
    +                continue;
    +            }
     			
    -			if(key.equals("date")) {
    -				date = entry.getValue()[0];
    -				continue;
    -			}
    +            if(key.equals("date")) {
    +                date = entry.getValue()[0];
    +                continue;
    +            }
     			
    -			if(key.startsWith(OBS_PREFIX)) {
    -				
    -				for(String value : entry.getValue()) {
    -					if(value != null) {
    -						temp.add(value.trim());
    -					}
    -				}
    -				canonicalizedHeaders.put(key, this.join(temp, ","));
    -				temp.clear();
    -			}
    -		}
    +            if(key.startsWith(OBS_PREFIX)) {				
    +                for(String value : entry.getValue()) {
    +                    if(value != null) {
    +                        temp.add(value.trim());
    +                    }
    +                }
    +                canonicalizedHeaders.put(key, this.join(temp, ","));
    +                temp.clear();
    +            }
    +        }
     		
    -		if(canonicalizedHeaders.containsKey("x-obs-date")) {
    -			date = "";
    -		}
    +        if(canonicalizedHeaders.containsKey("x-obs-date")) {
    +            date = "";
    +        }	
     		
    -		
    -		// handle method/content-md5/content-type/date
    -		StringBuilder stringToSign = new StringBuilder();
    -		stringToSign.append(httpMethod).append(SIGN_SEP)
    -			.append(contentMd5).append(SIGN_SEP)
    -			.append(contentType).append(SIGN_SEP)
    -			.append(date).append(SIGN_SEP);
    +        // handle method/content-md5/content-type/date
    +        StringBuilder stringToSign = new StringBuilder();
    +        stringToSign.append(httpMethod).append(SIGN_SEP)
    +            .append(contentMd5).append(SIGN_SEP)
    +            .append(contentType).append(SIGN_SEP)
    +            .append(date).append(SIGN_SEP);
     			
    -		// handle canonicalizedHeaders
    -		for(Map.Entry<String, String> entry : canonicalizedHeaders.entrySet()) {
    -			stringToSign.append(entry.getKey()).append(":").append(entry.getValue()).append(SIGN_SEP);
    -		}
    +        // handle canonicalizedHeaders
    +        for(Map.Entry<String, String> entry : canonicalizedHeaders.entrySet()) {
    +            stringToSign.append(entry.getKey()).append(":").append(entry.getValue()).append(SIGN_SEP);
    +        }
     		
    -		// handle CanonicalizedResource
    -		stringToSign.append("/");
    -		if(this.isValid(bucketName)) {
    -			stringToSign.append(bucketName).append("/");
    -			if(this.isValid(objectName)) {
    -				stringToSign.append(this.urlEncode(objectName));
    -			}
    -		}
    +        // handle CanonicalizedResource
    +        stringToSign.append("/");
    +        if(this.isValid(bucketName)) {
    +            stringToSign.append(bucketName).append("/");
    +            if(this.isValid(objectName)) {
    +                stringToSign.append(this.urlEncode(objectName));
    +            }
    +        }
     		
    -		TreeMap<String, String> canonicalizedResource = new TreeMap<String, String>();
    -		for(Map.Entry<String, String> entry : queries.entrySet()) {
    -			key = entry.getKey();
    -			if(key == null) {
    -				continue;
    -			}
    +        TreeMap<String, String> canonicalizedResource = new TreeMap<String, String>();
    +        for(Map.Entry<String, String> entry : queries.entrySet()) {
    +            key = entry.getKey();
    +            if(key == null) {
    +                continue;
    +            }
     			
    -			if(SUB_RESOURCES.contains(key)) {
    -				canonicalizedResource.put(key, entry.getValue());
    -			}
    -		}
    +            if(SUB_RESOURCES.contains(key)) {
    +                canonicalizedResource.put(key, entry.getValue());
    +            }
    +        }
     		
    -		if(canonicalizedResource.size() > 0) {
    -			stringToSign.append("?");
    -			for(Map.Entry<String, String> entry : canonicalizedResource.entrySet()) {
    -				stringToSign.append(entry.getKey());
    -				if(this.isValid(entry.getValue())) {
    -					stringToSign.append("=").append(entry.getValue());
    -				}
    -                                stringToSign.append("&");
    -			}
    -                        stringToSign.deleteCharAt(stringToSign.length()-1);
    -		}
    +        if(canonicalizedResource.size() > 0) {
    +            stringToSign.append("?");
    +            for(Map.Entry<String, String> entry : canonicalizedResource.entrySet()) {
    +                stringToSign.append(entry.getKey());
    +                if(this.isValid(entry.getValue())) {
    +                    stringToSign.append("=").append(entry.getValue());
    +                }
    +                stringToSign.append("&");
    +            }
    +            stringToSign.deleteCharAt(stringToSign.length()-1);
    +        }
     		
    -//		System.out.println(String.format("StringToSign:%s%s", SIGN_SEP, stringToSign.toString()));
    +        //    System.out.println(String.format("StringToSign:%s%s", SIGN_SEP, stringToSign.toString()));
     		
    -		return stringToSign.toString();
    -	}
    +        return stringToSign.toString();
    +    }
     	
    -	public String headerSignature(String httpMethod, Map<String, String[]> headers, Map<String, String> queries,
    -			String bucketName, String objectName) throws Exception {
    +    public String headerSignature(String httpMethod, Map<String, String[]> headers, Map<String, String> queries,
    +        String bucketName, String objectName) throws Exception {
     
    -		//1. stringToSign
    -		String stringToSign = this.stringToSign(httpMethod, headers, queries, bucketName, objectName);
    +        //1. stringToSign
    +        String stringToSign = this.stringToSign(httpMethod, headers, queries, bucketName, objectName);
     		
    -		//2. signature
    -		return String.format("OBS %s:%s", this.ak, this.hamcSha1(stringToSign));
    -	}
    -	
    -	
    -	public String querySignature(String httpMethod, Map<String, String[]> headers, Map<String, String> queries,
    -			String bucketName, String objectName, long expires) throws Exception {
    -		if(headers.containsKey("x-obs-date")) {
    -			headers.put("x-obs-date", new String[] {String.valueOf(expires)});
    -		}else {
    -			headers.put("date", new String[] {String.valueOf(expires)});
    -		}
    -		//1. stringToSign
    -		String stringToSign = this.stringToSign(httpMethod, headers, queries, bucketName, objectName);
    +        //2. signature
    +        return String.format("OBS %s:%s", this.ak, this.hmacSha1(stringToSign));
    +    }
     		
    -		//2. signature
    -		return this.urlEncode(this.hamcSha1(stringToSign));
    -	}
    +    public String querySignature(String httpMethod, Map<String, String[]> headers, Map<String, String> queries,
    +        String bucketName, String objectName, long expires) throws Exception {
    +        if(headers.containsKey("x-obs-date")) {
    +            headers.put("x-obs-date", new String[] {String.valueOf(expires)});
    +        } else {
    +            headers.put("date", new String[] {String.valueOf(expires)});
    +        }
    +        //1. stringToSign
    +        String stringToSign = this.stringToSign(httpMethod, headers, queries, bucketName, objectName);
    +		
    +        //2. signature
    +        return this.urlEncode(this.hmacSha1(stringToSign));
    +    }
     	
    -	public static void main(String[] args) throws Exception {
    -		SignDemo demo = new SignDemo();
    +    public static void main(String[] args) throws Exception {
    +        SignDemo demo = new SignDemo();
     
                     /* Hard-coded or plaintext AK and SK are risky. For security purposes, encrypt your AK and SK and store them in the configuration file or environment variables.
    -                In this example, the AK and SK are stored in environment variables for identity authentication. Before running the code in this example, configure environment variables OTCCLOUD_SDK_AK and OTCCLOUD_SDK_SK. */
    -		demo.ak = System.getenv("OTCCLOUD_SDK_AK");
    -		demo.sk = System.getenv("OTCCLOUD_SDK_SK");
    +        In this example, the AK and SK are stored in environment variables for identity authentication. Before running the code in this example, configure environment variables OTCCLOUD_SDK_AK and OTCCLOUD_SDK_SK. */
    +        demo.ak = System.getenv("OTCCLOUD_SDK_AK");
    +        demo.sk = System.getenv("OTCCLOUD_SDK_SK");
     		
    -		String bucketName = "bucket-test";
    -		String objectName = "hello.jpg";
    -		Map<String, String[]> headers = new HashMap<String, String[]>();
    -		headers.put("date", new String[] {"Sat, 12 Oct 2015 08:12:38 GMT"});
    -		headers.put("x-obs-acl", new String[] {"public-read"});
    -		headers.put("x-obs-meta-key1", new String[] {"value1"});
    -		headers.put("x-obs-meta-key2", new String[] {"value2", "value3"});
    -		Map<String, String> queries = new HashMap<String, String>();
    -		queries.put("acl", null);
    +        String bucketName = "bucket-test";
    +        String objectName = "hello.jpg";
    +        Map<String, String[]> headers = new HashMap<String, String[]>();
    +        headers.put("date", new String[] {"Sat, 12 Oct 2015 08:12:38 GMT"});
    +        headers.put("x-obs-acl", new String[] {"public-read"});
    +        headers.put("x-obs-meta-key1", new String[] {"value1"});
    +        headers.put("x-obs-meta-key2", new String[] {"value2", "value3"});
    +        Map<String, String> queries = new HashMap<String, String>();
    +        queries.put("acl", null);
     		
    -		System.out.println(demo.headerSignature("PUT", headers, queries, bucketName, objectName));
    -	}
    +        System.out.println(demo.headerSignature("PUT", headers, queries, bucketName, objectName));
    +    }
     	
     }
     
    -

    The calculation result of the signature is ydH8ffpcbS6YpeOMcEZfn0wE90c=, which varies depending on the execution time.

    @@ -742,7 +714,10 @@ Authorization: OBS UDSIAMSTUBTEST000254:ydH8ffpcbS6YpeOMcEZfn0wE90c= 21 22 23 -24
    import sys
    +24
    +25
    +26
    import os
    +import sys
     import hashlib
     import hmac
     import binascii
    @@ -760,14 +735,14 @@ Authorization: OBS UDSIAMSTUBTEST000254:ydH8ffpcbS6YpeOMcEZfn0wE90c=
     CanonicalizedResource = "/newbucketname2"
     canonical_string = httpMethod + "\n" + "\n" + contentType + "\n" + date + "\n" + canonicalizedHeaders + CanonicalizedResource
     if IS_PYTHON2:    
    -     hashed = hmac.new(yourSecretAccessKeyID, canonical_string, hashlib.sha1)    
    -     encode_canonical = binascii.b2a_base64(hashed.digest())[:-1]
    +    hashed = hmac.new(yourSecretAccessKeyID, canonical_string, hashlib.sha1)    
    +    encode_canonical = binascii.b2a_base64(hashed.digest())[:-1]
     else:    
    -     hashed = hmac.new(yourSecretAccessKeyID.encode('UTF-8'), canonical_string.encode('UTF-8'),hashlib.sha1)    
    -     encode_canonical = binascii.b2a_base64(hashed.digest())[:-1].decode('UTF-8')
    +    hashed = hmac.new(yourSecretAccessKeyID.encode('UTF-8'), canonical_string.encode('UTF-8'), hashlib.sha1)    
    +    encode_canonical = binascii.b2a_base64(hashed.digest())[:-1].decode('UTF-8')
    +
     print(encode_canonical)
     
    -

    The calculation result of the signature is ydH8ffpcbS6YpeOMcEZfn0wE90c=, which varies depending on the execution time.

    diff --git a/docs/obs/api-ref/obs_04_0011.html b/docs/obs/api-ref/obs_04_0011.html index 8e1eaa36..10fd110d 100644 --- a/docs/obs/api-ref/obs_04_0011.html +++ b/docs/obs/api-ref/obs_04_0011.html @@ -1,12 +1,12 @@

    Authentication of Signature in a URL

    -

    OBS allows users to construct a URL for a specific operation. The URL contains information such as the user's AK, signature, validity period, and resources. Any user who obtains the URL can perform the operation. After receiving the request, the OBS deems that the operation is performed by the user who issues the URL. For example, if the URL of an object download request carries signature information is constructed, the user who obtains the URL can download the object, but the URL is valid only within the expiration time specified by the parameter of Expires. The URL that carries the signature is used to allow others to use the pre-issued URL for identity authentication when the SK is not provided, and perform the predefined operation.

    -

    The format of the message where a signature is contained in the URL:

    +

    You can create a presigned URL for a specific operation. This kind of URL includes the user AK, signature, validity period, resources and other information. It allows any user who gets it to perform the specified operation (such as download) as if they are its creator. Presigned URLs enable authentication without secret access keys. Such URLs, however, must be used before expiration.

    +

    A request with a presigned URL is formed as follows:

    GET /ObjectKey?AccessKeyId=AccessKeyID&Expires=ExpiresValue&Signature=signature HTTP/1.1
     Host: bucketname.obs.region.example.com
    -

    The format of the message where a temporary AK/SK pair and a security token are used in the URL for downloading objects:

    -
    GET /ObjectKey?AccessKeyId=AccessKeyID&Expires=ExpiresValue&Signature=signature&x-obs-security-token=securitytoken HTTP/1.1
    +

    A download request with a URL that uses a temporary AK/SK pair and security token is formed as follows:

    +
    GET /ObjectKey?AccessKeyId=AccessKeyID&Expires=ExpiresValue&Signature=signature&x-obs-security-token=securitytoken HTTP/1.1
     Host: bucketname.obs.region.example.com

    Table 1 describes the parameters.

    @@ -20,7 +20,7 @@ Host: bucketname.obs.region.example.com<

    AccessKeyId

    AK information of the issuer. OBS determines the identity of the issuer based on the AK and considers that the URL is accessed by the issuer.

    +

    The access key of the URL creator. OBS uses it to verify the identity.

    Type: string

    Yes

    @@ -28,7 +28,7 @@ Host: bucketname.obs.region.example.com<

    Expires

    Indicates when the temporarily authorized URL expires, in seconds. The time must be in Coordinated Universal Time (UTC) format and later than 00:00:00 on January 1, 1970.

    +

    When the URL expires, in UTC (how many seconds have elapsed since 00:00:00 UTC on January 1, 1970)

    Type: string

    Yes

    @@ -36,15 +36,15 @@ Host: bucketname.obs.region.example.com<

    Signature

    The signature generated using the SK and the expiration time.

    +

    The signature based on the user SK and Expires

    Type: string

    Yes

    x-obs-security-token

    +

    x-obs-security-token

    During temporary authentication, the temporary AK/SK and security token must be used at the same time and the x-obs-security-token field must be added to the request header.

    +

    A temporary AK/SK pair must be used with a security token, indicated by the x-obs-security-token header.

    For details about how to obtain a temporary AK/SK pair and security token, see Obtaining a Temporary AK/SK Pair and Security Token.

    No

    @@ -53,18 +53,18 @@ Host: bucketname.obs.region.example.com<
    -

    The process of calculating a signature is as follows:

    -
    1. Construct the StringToSign.
    2. Encode the result of 1 in UTF-8.
    3. Use the SK to calculate the HMAC-SHA1 signature on the result of 2.
    4. Encode the result of 3 in Base64.
    5. Encode the result of 4 in URL to obtain the signature.
    +

    A signature is calculated as follows:

    +
    1. Construct the StringToSign.
    2. Encode the result of 1 in UTF-8.
    3. Use the SK to calculate HMAC-SHA1 based on the result of 2.
    4. Encode the result of 3 in Base64.
    5. Encode the result of 4 in URL to obtain the signature.

    -

    The StringToSign is constructed according to the following rules. Table 2 describes the parameters.

    +

    The format of StringToSign is shown below. Table 2 describes the parameters.

    StringToSign = 
    -     HTTP-Verb + "\n" +   
    -     Content-MD5 + "\n" +   
    -     Content-Type + "\n" +   
    -     Expires + "\n" +   
    -     CanonicalizedHeaders +   CanonicalizedResource; 
    + HTTP-Verb + "\n" + + Content-MD5 + "\n" + + Content-Type + "\n" + + Expires + "\n" + + CanonicalizedHeaders + CanonicalizedResource -
    - - @@ -163,7 +163,7 @@ Host: bucketname.obs.region.example.com<

    If you enter the address in the browser, then the object objectkey in the examplebucket bucket can be downloaded. The validity period of this link is 1532779451 (indicating Sat Jul 28 20:04:11 CST 2018).

    In the Linux operating system, when running the curl command, you need to add a forward slash (\) to escape the character (&). The following command can download the objectkey object to the output file:

    curl http(s)://examplebucket.obs.region.example.com/objectkey?AccessKeyId=AccessKeyID\&Expires=1532779451\&Signature=0Akylf43Bm3mD1bh2rM3dmVp1Bo%3D -X GET -o output

    -

    If you want to use the pre-defined URL generated by the signature carried in the URL in the browser, do not use Content-MD5, Content-Type, or CanonicalizedHeaders that can only be carried in the header to calculate the signature. Otherwise, the browser cannot carry these parameters. After the request is sent to the server, a message is displayed indicating that the signature is incorrect.

    +

    If you want to open a pre-defined URL using your browser, you must not use Content-MD5, Content-Type, or CanonicalizedHeaders headers to calculate a signature. This is because the browser cannot carry them. If you do so, the server will return a signature error.

    Signature Calculation in Java

    Table 2 Parameters required for constructing a StringToSign

    Parameter

    +
    @@ -72,48 +72,48 @@ Host: bucketname.obs.region.example.com< - - - - - -
    Table 2 Parameters for StringToSign

    Parameter

    Description

    HTTP-Verb

    Indicates an HTTP request method supported by the OBS REST API. The value can be an HTTP verb such as PUT, GET, or DELETE.

    +

    Type of operation. For REST APIs, HTTP request operations include PUT, GET, and DELETE.

    Content-MD5

    Base64-encoded 128-bit MD5 digest of the message according to RFC 1864. This parameter can be empty.

    +

    (Optional) Base64-encoded 128-bit MD5 value of the request body based on RFC 1864

    Content-Type

    Specifies the message type, for example, text/plain.

    -

    If a request does not contain this header field, this parameter is deemed as an empty string.

    +

    The type of the message, for example, text/plain.

    +

    If this header is not included, an empty string is used.

    Expires

    Expiration time of the temporary authorization, that is, the value of parameter Expires in the request message: ExpiresValue.

    +

    When the URL expires (ExpiresValue)

    CanonicalizedHeaders

    OBS request header field in an HTTP request header, referring to header fields starting with x-obs-, such as, x-obs-date, x-obs-acl, and x-obs-meta-*.

    -
    1. All characters of keywords in the header field must be converted to lower-case letters. If a request contains multiple header fields, these fields should be organized by keywords in the alphabetical order from a to z.
    2. If multiple header fields in a request have the same prefix, combine the header fields into one. For example, x-obs-meta-name:name1 and x-obs-meta-name:name2 should be reorganized into x-obs-meta-name:name1,name2. Use comma to separate the values.
    3. Keywords in the request header field cannot contain non-ASCII or unrecognizable characters, which are also not advisable for values in the request header field. If the two types of characters are necessary, they should be encoded and decoded on the client side. Either URL encoding or Base64 encoding is acceptable, but the server does not perform decoding.
    4. Delete meaningless spaces and tabs in a header field. For example, x-obs-meta-name: name (with a meaningless space before name) must be changed to x-obs-meta-name:name.
    5. Each header field occupies a separate line.
    +

    HTTP request headers that start with x-obs-, such as x-obs-date, x-obs-acl, and x-obs-meta-*.

    +
    1. All characters in a header name must be lower-case. Multiple header names are sorted in alphabetical order.
    2. If a header has more than one value, combine them using commas (,). For example, x-obs-meta-name:name1 and x-obs-meta-name:name2 need to be written as x-obs-meta-name:name1,name2.
    3. Non-ASCII or unrecognizable characters are not allowed for header names and also not recommended for header values. If such characters are required, encode or decode them on the client using URL or Base64. The server does not perform decoding.
    4. Delete meaningless spaces or tabs in a header. For example, x-obs-meta-name: name (there is a meaningless space before the second name) must be changed to x-obs-meta-name:name.
    5. Each header occupies a separate line.

    CanonicalizedResource

    Indicates the OBS resource specified by an HTTP request. This parameter is constructed as follows:

    -

    <Bucket name + Object name> + [Subresource 1] + [Subresource 2] + ...

    -
    1. Bucket name and object name, for example, /bucket/object. If no object name is specified, for example, /bucket/, the entire bucket is listed. If no bucket name is specified either, the value of this field is /.
    2. If a subresource (such as ?acl and ?logging) exists, the subresource must be added.

      OBS supports a variety of sub-resources, including acl, attname, cors, customdomain, delete, deletebucket, encryption, inventory, length, lifecycle, location, logging, metadata, modify, name, notification, partNumber, policy, position, quota, rename, replication, requestPayment, response-cache-control, response-content-disposition, response-content-encoding, response-content-language, response-content-type, response-expires, restore, storageClass, storagePolicy, storageinfo, tagging, torrent, truncate, uploadId, uploads, versionId, versioning, versions, website, object-lock, retention, and x-obs-security-token.

      -
    3. If there are multiple subresources, sort them in the alphabetical order from a to z, and use & to combine the subresources.
    -
    NOTE:
    • A subresource is unique. Do not add subresources with the same keyword (for example, key=value1&key=value2) in the same request URL. In this case, signature is computed only based on the first subresource, and only the value of the first subresource takes effect on the actual service.
    • Using the GetObject API as an example, assume there is a bucket named bucket-test and an object named object-test in the bucket, and the object version is xxx. When obtaining the object, you need to rewrite Content-Type to text/plain. Then, the CanonicalizedResource calculated by the signature is /bucket-test/object-test?response-content-type=text/plain&versionId=xxx.
    +

    OBS resources specified in an HTTP request.

    +

    Resources are arranged in this order: bucket name, object name, sub-resource 1, sub-resource 2...

    +
    1. Bucket name and object name, for example, /bucket/object. If no object name is specified, for example, /bucket/, the entire bucket is listed. If no bucket name is specified either, the value of this field is /.
    2. If a subresource (such as ?acl and ?logging) exists, the subresource must be added.

      OBS sub-resources: acl, attname, cors, customdomain, delete, deletebucket, encryption, inventory, length, lifecycle, location, logging, metadata, modify, name, notification, partNumber, policy, position, quota, rename, replication, requestPayment, response-cache-control, response-content-disposition, response-content-encoding, response-content-language, response-content-type, response-expires, restore, storageClass, storagePolicy, storageinfo, tagging, torrent, truncate, uploadId, uploads, versionId, versioning, versions, website, x-obs-security-token, object-lock, retention

      +
    3. Sort multiple sub-resources in alphabetical order by name and use ampersands (&) to separate them.
    +
    NOTE:
    • A sub-resource is usually unique. Do not specify multiple values for the same sub-resource (such as key=value1&key=value2). Otherwise, only the first value is used.
    • Suppose you use the GetObject API to download version xxx of object object-test from bucket bucket-test and require Content-Type be changed to text/plain. CanonicalizedResource is /bucket-test/object-test?response-content-type=text/plain&versionId=xxx.
    • CanonicalizedResource should be located on a separate line from CanonicalizedHeaders.
    -

    The signature is generated as follows based on the StringToSign and SK. The hash-based message authentication code algorithm (HMAC algorithm) is used to generate the signature.

    +

    Use hash-based message authentication code (HMAC) to calculate the signature based on the StringToSign and SK:

    Signature = URL-Encode( Base64( HMAC-SHA1( YourSecretAccessKeyID, UTF-8-Encoding-Of( StringToSign ) ) ) )
    -

    The method for calculating the signature carried in the URL is different from that for calculating the authorization signature carried in a header.

    -
    • The signature in the URL must be encoded using the URL after Base64 encoding.
    • Expires in StringToSign corresponds to Date in authorization information.
    +

    Compared with the Authorization header method:

    +
    • URLs must use URL encoding — after using Base64 — for signatures.
    • Expires in StringToSign of a URL is similar to Date in the Authorization header.

    Generate a predefined URL instance for the browser by carrying the signature in the URL.

    @@ -123,7 +123,7 @@ Host: bucketname.obs.region.example.com<

    GET /objectkey?AccessKeyId=MFyfvK41ba2giqM7Uio6PznpdUKGpownRZlmVmHc&Expires=1532779451&Signature=0Akylf43Bm3mD1bh2rM3dmVp1Bo%3D HTTP/1.1

    +

    GET /objectkey?AccessKeyId=MFyfvK41ba2giqM7Uio6PznpdUKGpownRZlmVmHc&Expires=1532779451&Signature=0Akylf43Bm3mD1bh2rM3dmVp1Bo%3D HTTP/1.1

    Host: examplebucket.obs.region.example.com

    GET \n

    @@ -143,14 +143,14 @@ Host: bucketname.obs.region.example.com<

    GET /objectkey?AccessKeyId=MFyfvK41ba2giqM7Uio6PznpdUKGpownRZlmVmHc&Expires=1532779451&Signature=0Akylf43Bm3mD1bh2rM3dmVp1Bo%3D&x-obs-security-token=YwkaRTbdY8g7q.... HTTP/1.1

    +

    GET /objectkey?AccessKeyId=MFyfvK41ba2giqM7Uio6PznpdUKGpownRZlmVmHc&Expires=1532779451&Signature=0Akylf43Bm3mD1bh2rM3dmVp1Bo%3D&x-obs-security-token=YwkaRTbdY8g7q.... HTTP/1.1

    Host: examplebucket.obs.region.example.com

    GET \n

    \n

    \n

    1532779451\n

    -

    /examplebucket/objectkey?x-obs-security-token=YwkaRTbdY8g7q....

    +

    /examplebucket/objectkey?x-obs-security-token=YwkaRTbdY8g7q....

      1
       2
    @@ -652,11 +652,11 @@ Host: bucketname.obs.region.example.com<
             String bucketName = "bucket-test";
             String objectName = "hello.jpg";
     
    -                // A header cannot be carried if you want to use a URL to access OBS with a browser. If a header is added to headers, the signature does not match. To use headers, it must be processed by the client.
    +        // A header cannot be included if you want to use a URL to access OBS with a browser. If a header is added to headers, the signature does not match. To use headers, it must be processed by the client.
             Map<String, String[]> headers = new HashMap<String, String[]>();
             Map<String, String> queries = new HashMap<String, String>();
     
    -                // Expiration time. Set it to expire in 24 hours.
    +        // Expiration time. Set it to expire in 24 hours.
             long expires = (System.currentTimeMillis() + 86400000L) / 1000;
             String signature = demo.querySignature("GET", headers, queries, bucketName, objectName, expires);
             System.out.println(signature);
    @@ -665,7 +665,6 @@ Host: bucketname.obs.region.example.com<
         }
     }
     
    - diff --git a/docs/obs/api-ref/obs_04_0012.html b/docs/obs/api-ref/obs_04_0012.html index 2028eb92..616b5be2 100644 --- a/docs/obs/api-ref/obs_04_0012.html +++ b/docs/obs/api-ref/obs_04_0012.html @@ -1,198 +1,199 @@

    Authentication of Signature Carried in the Table Uploaded Through a Browser

    -

    OBS supports browser-based object upload using the POST method. Signatures of such requests are uploaded in tables. First, create a security policy and specify the requirements in the request, for example, bucket name and object name prefix. Then, create a signature based on this policy. The request form to be signed must contain valid signature and policy. Finally, create a table to upload the object to the bucket.

    +

    OBS supports browser-based uploads using POST requests. Authenticating such a request uses the signature carried in the form. First, create a policy to specify the requirements for requests, such as bucket name or object name prefix. Then, create a signature based on this policy. The request form to be signed must contain a valid signature and policy. Finally, create a form to upload the object to the bucket.

    The process of calculating a signature is as follows:

    1. Encode the policy content in UTF-8.
    2. Encode the result of 1 in Base64.
    3. Use the SK to calculate the HMAC-SHA1 signature on the result of 2.
    4. Encode the result of 3 in Base64 to obtain the signature.
    StringToSign = Base64( UTF-8-Encoding-Of( policy ) )
     Signature = Base64( HMAC-SHA1( YourSecretAccessKeyID, StringToSign ) )
    -
    The content of the policy is as follows:
    { "expiration": "2017-12-31T12:00:00.000Z",
    +

    The content of the policy is as follows:

    +
    { "expiration": "2017-12-31T12:00:00.000Z",
       "conditions": [
         {"x-obs-acl": "public-read" },
    -    {"x-obs-security-token": "YwkaRTbdY8g7q...." },
    +    {"x-obs-security-token": "YwkaRTbdY8g7q...." },
         {"bucket": "book" },
         ["starts-with", "$key", "user/"]
       ]
     }
    -
    +

    The policy contains the validity period (see Expiration) and conditions (see Conditions).

    Expiration

    The expiration field describes when the signature will expire, which is expressed in the format according to ISO 8601 UTC. For example, expiration: 2017-12-31T12:00:00.000Z in the example means that the request becomes invalid after 12:00:00 on December 31, 2017. This field must be specified in a policy. It can only be in the yyyy-MM-dd'T'HH:mm:ss'Z' or yyyy-MM-dd'T'HH:mm:ss.SSS'Z' format.

    -

    Conditions

    A mechanism used to verify the validity of a request. Conditions are used to define the content that must be contained in a request. In the example, the requested bucket name is book, the object name is prefixed with user/, and the ACL of the object is public read. All items in the form, excluding AccessKeyId, signature, file, policy, token, field names, and the prefix x-ignore-, must be included in the policy. The following table lists the items that should be contained in Conditions.

    +

    Conditions

    A mechanism used to verify the validity of a request. Conditions are used to define the content that must be contained in a request. In the example, the requested bucket name is book, the object name is prefixed with user/, and the ACL of the object is public read. All items in the form must be included in the policy, excluding AccessKeyId, Signature, file, policy, token, field names, and items with the prefix x-ignore-. The following table lists the items that should be contained in conditions:

    -
    Table 1 Conditions contained in a policy

    Element

    +
    - - - - - - - - - - - - - - - - - - - - -
    Table 1 Conditions contained in a policy

    Element

    Description

    +

    Description

    x-obs-acl

    +

    x-obs-acl

    ACL in the request.

    +

    ACL in the request.

    Supports exact match and conditional match such as starts-with.

    content-length-range

    +

    content-length-range

    Maximum and minimum length of an object to be uploaded. The value can be a range.

    +

    Maximum and minimum length of an object to be uploaded. The value can be a range.

    Cache-Control, Content-Type, Content-Disposition, Content-Encoding, Expires

    +

    Cache-Control, Content-Type, Content-Disposition, Content-Encoding, Expires

    Headers specially for REST requests

    +

    Headers specially for REST requests

    Supports exact match and conditional match such as starts-with.

    key

    +

    key

    Name of an object to be uploaded.

    +

    Name of an object to be uploaded.

    Supports exact match and conditional match such as starts-with.

    bucket

    +

    bucket

    Name of the requested bucket.

    +

    Name of the requested bucket.

    Supports exact match.

    success_action_redirect

    +

    success_action_redirect

    Redirection address after the upload is successful. For details, see Uploading an Object - POST.

    +

    Redirection address after the upload is successful. For details, see Uploading an Object - POST.

    Supports exact match and conditional match such as starts-with.

    success_action_status

    +

    success_action_status

    If success_action_redirect is not specified, the status code is returned to the client when the upload is successful. For details, see Uploading an Object - POST.

    +

    If success_action_redirect is not specified, the status code is returned to the client when the upload is successful. For details, see Uploading an Object - POST.

    Supports exact match.

    x-obs-meta-*

    +

    x-obs-meta-*

    User-defined metadata.

    -

    Keywords in an element cannot contain non-ASCII or unrecognizable characters. If non-ASCII or unrecognizable characters are necessary, they should be encoded and decoded on the client side. Either URL encoding or Base64 encoding is acceptable, but the server does not perform decoding.

    +

    User-defined metadata.

    +

    Keywords in this element cannot include non-ASCII or unrecognizable characters. If such characters are necessary, they must be encoded and decoded on the client side in either URL or Base64. The server does not perform decoding.

    Supports exact match and conditional match such as starts-with.

    x-obs-*

    +

    x-obs-*

    Other header fields with prefix x-obs-.

    +

    Other header fields with prefix x-obs-.

    Supports exact match and conditional match such as starts-with.

    x-obs-security-token

    +

    x-obs-security-token

    Field name in the request header.

    -

    Mandatory field for the temporary AK/SK and security token authentication.

    +

    Field name in the request header.

    +

    Mandatory field for the temporary AK/SK and security token authentication.

    -

    The table below describes how policy conditions can be matched.

    +

    The table below describes the supported condition matching types:

    -
    Table 2 Policy condition matching methods

    Matching Method

    +
    - - - - - - - - -
    Table 2 Policy condition matching methods

    Matching Method

    Description

    +

    Description

    Exact Matches

    +

    Exact Matches

    Exact match by default. The value in the POST table must be the same as that in the policy. For example, if object ACL is set to public-read when the object is uploaded, the value of the x-obs-acl element in the table is public-read. Therefore, the conditions in the policy can be set to

    -

    {"x-obs-acl": "public-read"} or ["eq", "$x-obs-acl", "public-read"], which are equivalent.

    +

    The default type. The form field value must match the value specified in conditions. This example indicates the object ACL must be set to public-read:

    +

    {"x-obs-acl": "public-read"} or ["eq", "$x-obs-acl", "public-read"], which are equivalent.

    Starts With

    +

    Starts With

    If this condition is used, the value set in the POST table must start with a fixed character string. For example, if the name of uploaded objects must be prefixed with user/, the value of the key element in the table can be user/test1, user/test2, and so on. Therefore, conditions in the policy can be set to:

    -

    ["starts-with", "$key", "user/"]

    +

    The form field value must start with the specified value. This example indicates the object key must start with user/:

    +

    ["starts-with", "$key", "user/"]

    Matching Any Content

    +

    Matching Any Content

    The corresponding element in the POST table can be any value. For example, if the redirection address upon request success can be any address, the value of the success_action_redirect element in the table can be any value. Therefore, conditions in the policy can be set to:

    -

    ["starts-with", "$success_action_redirect", ""]

    +

    To allow any content within a form field, use "starts-with" with an empty value (""). This example allows any value for success_action_redirect:

    +

    ["starts-with", "$success_action_redirect", ""]

    Specifying Ranges

    +

    Specifying Ranges

    The content length of the file element in the POST table can be a specified range and is used only to limit the object size. For example, if the size of the uploaded object is between 1 MB to 10 MB, the content length of the file element in the table can be from 1048576 to 10485760. Therefore, conditions in the policy can be set to (the value does not contain quotation marks)

    -

    ["content-length-range", 1048576, 10485760]

    +

    Only used to restrict the size of the uploaded file. Quotation marks are not allowed for element values. This example allows a file size from 1 to 10 MB, that is, from 1048576 to 10485760:

    +

    ["content-length-range", 1048576, 10485760]

    -

    A policy is in the JSON format. Conditions can be put in curly brackets {} and square brackets []. The key and value elements of the table are written in the curly brackets {}, which are separated by colons (:). The square brackets [] contain the condition type, key, and value. These three items are separated by commas (,). The dollar sign ($) in front of the key indicates that the key is a variable.

    +

    Policies use the JSON format. Use curly brackets ({}) or square brackets ([]) to specify conditions. Curly brackets ({}) can enclose a key and a value separated by a colon (:). Square brackets ([]) can contain a condition type, key, and value separated by commas (,). Use the dollar sign ($) ahead of a key to mark a variable.

    The table below lists the characters that must be escaped in a policy.

    -
    Table 3 Characters that must be escaped in a policy

    Character After Escape

    +
    - - - - - - - - - - - - - - - - - - -
    Table 3 Characters that must be escaped in a policy

    Character After Escape

    Real Character

    +

    Real Character

    \\

    +

    \\

    Backslash (\)

    +

    Backslash (\)

    \$

    +

    \$

    Dollar symbol ($)

    +

    Dollar symbol ($)

    \b

    +

    \b

    Backspace

    +

    Backspace

    \f

    +

    \f

    Page up and down

    +

    Page up and down

    \n

    +

    \n

    Newline characters

    +

    Newline characters

    \r

    +

    \r

    Enter

    +

    Enter

    \t

    +

    \t

    Horizontal table

    +

    Horizontal tab

    \v

    +

    \v

    Vertical table

    +

    Vertical tab

    \uxxxx

    +

    \uxxxx

    All Unicode characters

    +

    All Unicode characters

    -

    Request and Policy Examples

    The following tables provide examples of requests and policies.

    +

    Request and Policy Examples

    The following tables provide some example requests and policies.

    Example 1: Upload the testfile.txt object to bucket examplebucket and set the object ACL to public-read.

    -

    Request

    +
    - - -

    Request

    Policy

    +

    Policy

    POST / HTTP/1.1

    +

    POST / HTTP/1.1

    Host: examplebucket.obs.region.example.com

    Content-Type: multipart/form-data; boundary=7e32233530b26

    Content-Length: 1250

    @@ -218,7 +219,7 @@ Signature = Base64( HMAC-SHA1( YourSecretAccessKeyID, StringToSign ) )

    ewogICJleHBpcmF0aW9uIjogIjIwMTktMDctMDFUMTI6MDA6MDAuMDAwWiIsCiAgImNvbmRpdGlvbnMiOiBbCiAgICB7ImJ1Y2tldCI6ICJleGFtcGxlYnVja2V0IiB9LAogICAgWyJlcSIsICIka2V5IiwgInRlc3RmaWxlLnR4dCJdLAoJeyJ4LW9icy1hY2wiOiAicHVibGljLXJlYWQiIH0sCiAgICBbImVxIiwgIiRDb250ZW50LVR5cGUiLCAidGV4dC9wbGFpbiJdLAogICAgWyJjb250ZW50LWxlbmd0aC1yYW5nZSIsIDYsIDEwXQogIF0KfQo=

    --7e32233530b26

    -

    Content-Disposition: form-data; name="signature"

    +

    Content-Disposition: form-data; name="Signature"

    xxl7bZs/5FgtBUggOdQ88DPZUo0=

    --7e32233530b26

    @@ -232,7 +233,7 @@ Signature = Base64( HMAC-SHA1( YourSecretAccessKeyID, StringToSign ) )

    Upload

    --7e32233530b26--

    {

    +

    {

    "expiration": "2019-07-01T12:00:00.000Z",

    "conditions": [

    {"bucket": "examplebucket" },

    @@ -248,13 +249,13 @@ Signature = Base64( HMAC-SHA1( YourSecretAccessKeyID, StringToSign ) )

    Example 2: Upload the file/obj1 object to bucket examplebucket and configure the four custom metadata items of the object.

    -

    Request

    +
    - - -

    Request

    Policy

    +

    Policy

    POST / HTTP/1.1

    +

    POST / HTTP/1.1

    Host: examplebucket.obs.region.example.com

    Content-Type: multipart/form-data; boundary=7e329d630b26

    Content-Length: 1597

    @@ -302,7 +303,7 @@ Signature = Base64( HMAC-SHA1( YourSecretAccessKeyID, StringToSign ) )

    Upload

    --7e3542930b26--

    {

    +

    {

    "expiration": "2019-07-01T12:00:00.000Z",

    "conditions": [

    {"bucket": "examplebucket" },

    diff --git a/docs/obs/api-ref/obs_04_0013.html b/docs/obs/api-ref/obs_04_0013.html index bfdf0789..a57f63cf 100644 --- a/docs/obs/api-ref/obs_04_0013.html +++ b/docs/obs/api-ref/obs_04_0013.html @@ -4,7 +4,7 @@

    After sending a request, you will receive a response, including the status code, response header, and response body.

    Status Codes

    A status code is a group of digits ranging from 2xx (indicating successes) to 4xx or 5xx (indicating errors). It indicates the status of a response. For more information, see Status Codes.

    -

    Response Headers

    A response header corresponds to a request header, for example, Content-Type.

    +

    Response Headers

    Responses have some headers matching their corresponding requests, for example, Content-Length.

    For details about common response headers, see Table 1.
    @@ -36,7 +36,7 @@ - diff --git a/docs/obs/api-ref/obs_04_0015.html b/docs/obs/api-ref/obs_04_0015.html index 5e5db41f..99ea19ff 100644 --- a/docs/obs/api-ref/obs_04_0015.html +++ b/docs/obs/api-ref/obs_04_0015.html @@ -201,7 +201,6 @@ }
    Table 1 Common response headers

    Header

    ETag

    128-bit MD5 digest of the Base64 code of an object. ETag is the unique identifier of the object content. It can be used to identify whether the object content is changed. For example, if ETag value is A when an object is uploaded and the ETag value has changed to B when the object is downloaded, it indicates that the object content is changed. The actual ETag is the hash value of the object, which only reflects the changed content rather than the metadata. An uploaded object or copied object has a unique ETag after being encrypted using MD5. If an object is uploaded in the multipart mode, the MD5 splits ETag regardless of the encryption method. In this case, the ETag is not an MD5 digest.

    +

    128-bit MD5 digest of the Base64 code of an object. ETag is the unique identifier of the object content. It can be used to determine whether the object content is changed. For example, if ETag value is A when an object is uploaded and the ETag value has changed to B when the object is downloaded, it indicates that the object content is changed. The actual ETag is the hash value of the object, which only reflects the changed content rather than the metadata. An uploaded object or copied object has a unique ETag after being encrypted using MD5. If an object is uploaded in the multipart mode, the MD5 splits ETag regardless of the encryption method. In this case, the ETag is not an MD5 digest.

    Type: string

    -

    @@ -238,7 +237,6 @@ } }
    -

    The method of calculating the signature character string is as follows:

    @@ -288,7 +286,6 @@ } }
    - diff --git a/docs/obs/api-ref/obs_04_0016.html b/docs/obs/api-ref/obs_04_0016.html index 1c222581..19d3e7e9 100644 --- a/docs/obs/api-ref/obs_04_0016.html +++ b/docs/obs/api-ref/obs_04_0016.html @@ -201,7 +201,6 @@ }
    -

    The format of the Date header field DateUtils is as follows:

    @@ -237,7 +236,6 @@ } }
    -

    The method of calculating the signature character string is as follows:

    @@ -287,7 +285,6 @@ } }
    -
    diff --git a/docs/obs/api-ref/obs_04_0017.html b/docs/obs/api-ref/obs_04_0017.html index e094a568..0a410e10 100644 --- a/docs/obs/api-ref/obs_04_0017.html +++ b/docs/obs/api-ref/obs_04_0017.html @@ -219,7 +219,6 @@ }
    -

    The format of the Date header field DateUtils is as follows:

    @@ -255,7 +254,6 @@ } }
    -

    The method of calculating the signature character string is as follows:

    @@ -305,7 +303,6 @@ } }
    - diff --git a/docs/obs/api-ref/obs_04_0020.html b/docs/obs/api-ref/obs_04_0020.html index 605aab11..4f0ef928 100644 --- a/docs/obs/api-ref/obs_04_0020.html +++ b/docs/obs/api-ref/obs_04_0020.html @@ -1,7 +1,7 @@

    Listing Buckets

    -

    Functions

    You can perform this operation to list all buckets that you have created.

    +

    Functions

    You can perform this operation to list all buckets that you have created across all regions.

    Request Syntax

    1
     2
    @@ -11,32 +11,33 @@ Host: obs.region.example.com
     Date: date
     Authorization: authorization
     
    -
    +

    Regardless of the endpoint you specified, a list of buckets spanning all regions is returned.

    +

    Do not list buckets during bucket creation.

    +

    Request Parameters

    This request contains no parameters.

    Request Headers

    This request header uses common message fields. For details, see Table 3.

    The operation message header is the same as that of a common request. For details, see Table 3. However, this request can contain additional headers. The following table describes the additional headers for this request.

    -
    Table 1 Additional request headers

    Header

    +
    - - - - - @@ -85,72 +86,71 @@ Content-Length: length </Buckets> </ListAllMyBucketsResult>
    Table 1 Additional request headers

    Header

    Description

    +

    Description

    Mandatory

    +

    Mandatory (Yes/No)

    x-obs-bucket-type

    +

    x-obs-bucket-type

    This header field is used to specify the content to be obtained.

    +

    This header field is used to specify the content to be obtained.

    Value:

    • OBJECT: Obtain the list of all buckets.
    • POSIX: Obtain the list of all parallel file systems.

    If this header is not carried, the list of all buckets and parallel file systems is obtained.

    -

    Type: string

    Example: x-obs-bucket-type: POSIX

    No

    +

    No

    -

    Response Headers

    The response to the request uses common headers. For details, see Table 1.

    Response Elements

    This response contains the XML list of buckets owned by the user. Table 2 describes the elements.

    -
    Table 2 Response elements

    Element

    +
    - - - - - - - - - - - - - - - - - - - @@ -171,7 +171,6 @@ Accept: */* Date: Mon, 25 Jun 2018 05:37:12 +0000 Authorization: OBS GKDF4C7Q6SI0IPGTXTJN:9HXkVQIiQKw33UEmyBI4rWrzmic=
    Table 2 Response elements

    Element

    Description

    +

    Description

    ListAllMyBucketsResult

    +

    ListAllMyBucketsResult

    List of buckets created by the user

    +

    List of buckets created by the user

    Type: XML

    Owner

    +

    Owner

    Bucket owner information, including the tenant ID.

    +

    Bucket owner information, including the tenant ID.

    Type: XML

    ID

    +

    ID

    Domain ID (account ID) of a user.

    +

    Domain ID (account ID) of a user.

    Type: string

    Buckets

    +

    Buckets

    Buckets owned by the user

    +

    Buckets owned by the user

    Type: XML

    Bucket

    +

    Bucket

    Details about a bucket

    +

    Details about a bucket

    Type: XML

    Name

    +

    Name

    Bucket name

    +

    Bucket name

    Type: string

    CreationDate

    +

    CreationDate

    Creation time of the bucket

    +

    Creation time of the bucket

    Type: string

    Location

    +

    Location

    Location of the bucket

    +

    Location of the bucket

    Type: string

    BucketType

    +

    BucketType

    Bucket type

    +

    Bucket type

    Type: string

    -
    • OBJECT: indicates a bucket.
    • POSIX: indicates a parallel file system.
    +
    • OBJECT: indicates a bucket.
    • POSIX: a parallel file system.
    -

    Sample Response

     1
    @@ -230,7 +229,6 @@ Content-Length: 460
       </Buckets>
     </ListAllMyBucketsResult>
     
    -
    diff --git a/docs/obs/api-ref/obs_04_0021.html b/docs/obs/api-ref/obs_04_0021.html index 9d151251..91f90e0b 100644 --- a/docs/obs/api-ref/obs_04_0021.html +++ b/docs/obs/api-ref/obs_04_0021.html @@ -6,9 +6,9 @@

    A bucket name must be unique in OBS. If a user creates a bucket with the same name as that of an existing bucket under the same account and in the same region, a 200 code (indicating success) is returned. In scenarios other than the preceding one, the request for creating a bucket with the same name as that of an existing one will receive the 409 code (indicating that a namesake bucket already exists). To set an access control policy for the bucket to be created, you can add the x-obs-acl parameter to request headers.

    -

    Storage Class

    You can create buckets with different storage classes. The x-obs-storage-class header in a bucket creation request specifies the bucket's storage class. If you do not specify a storage class when you upload an object to the bucket, the object inherits the storage class of the bucket. The storage class options are as follows: STANDARD (Standard), WARM (Warm), COLD (Cold). If the x-obs-storage-class header is not in the request, a Standard bucket will be created.

    +

    Storage Class

    You can create buckets with different storage classes. The x-obs-storage-class header in a bucket creation request specifies the bucket's storage class. If you do not specify a storage class when you upload an object to the bucket, the object inherits the storage class of the bucket. The storage class options are as follows: STANDARD (Standard), WARM (Warm), COLD (Cold). If the x-obs-storage-class header is not in the request, a Standard bucket will be created.

    If the storage class of an object is not specified when it is uploaded to a bucket (see Uploading an Object - PUT), the object will be stored in the default storage class of the bucket.

    -
    • OBS Standard features low access latency and high throughput. It is most suitable for storing frequently accessed (multiple times per month) hot files. Potential application scenarios include big data, mobile applications, trending videos, and social media images.
    • OBS Warm storage class is suitable for storing data that is infrequently accessed (less than 12 times a year) yet has quick response requirements. Potential application scenarios include file synchronization or sharing and enterprise backup. It provides the same durability, access latency, and throughput as the Standard storage class but at a lower price. However, the Warm storage class has lower availability than the Standard one.
    • OBS Cold storage class is applicable to archiving rarely-accessed (averagely once a year) data. The application scenarios include data archiving and long-term data retention for backup. The Cold storage class is secure, durable, and inexpensive, which can replace tape libraries. To keep cost low, it may take hours to restore data from the Cold storage class.
    +
    • OBS Standard features low access latency and high throughput. It is most suitable for storing frequently accessed (multiple times per month) hot files. Potential application scenarios include big data, mobile applications, trending videos, and social media images.
    • OBS Warm storage class is suitable for storing data that is infrequently accessed (less than 12 times a year) yet has quick response requirements. Potential application scenarios include file synchronization or sharing and enterprise backup. It provides the same durability, access latency, and throughput as the Standard storage class but at a lower price. However, the Warm storage class has lower availability than the Standard one.
    • OBS Cold storage class is applicable to archiving rarely-accessed (averagely once a year) data. The application scenarios include data archiving and long-term data retention for backup. The Cold storage class is secure, durable, and inexpensive, which can replace tape libraries. However, the low cost comes at the cost of minutes to hours needed to restore data from the Cold storage class.

    Request Syntax

    1
     2
    @@ -28,142 +28,236 @@ Authorization: authorization
         <Location>location</Location> 
     </CreateBucketConfiguration>
     
    -

    Request Parameters

    This request contains no parameters.

    Request Headers

    The operation message header is the same as that of a common request. For details, see Table 3. However, this request can contain additional headers. The following table describes the additional headers for this request.

    -
    Table 1 Additional request headers

    Header

    +
    - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - +
    Table 1 Additional request headers

    Header

    Description

    +

    Type

    Mandatory

    +

    Mandatory (Yes/No)

    +

    Description

    x-obs-acl

    +

    x-obs-acl

    When creating a bucket, you can add this header to set the permission control policy for the bucket. The predefined common policies are as follows: private, public-read, public-read-write, public-read-delivered, and public-read-write-delivered.

    -

    Type: string

    +

    String

    No

    +

    No

    +

    Explanation:

    +

    When creating a bucket, you can use this parameter to set a pre-defined ACL.

    +

    Value range:

    +
    • private: A bucket or an object can be accessed only by its owner.
    • public-read: If this permission is granted on a bucket, anyone can read the object list, multipart uploads, and bucket metadata.
    • public-read-write: If this permission is granted on a bucket, anyone can obtain the object list, multipart tasks, and metadata, and can upload or delete objects, initiate multipart upload tasks, upload parts, assemble parts, copy parts, and cancel multipart upload tasks.
    • public-read-delivered: If this permission is set for a bucket, everyone can obtain the object list, multipart uploads, and bucket metadata in the bucket, and obtain the content and metadata of the objects in the bucket.
    • public-read-write-delivered: If this permission is set for a bucket, everyone can obtain the object list in the bucket, multipart uploads in the bucket, and metadata of the bucket; upload and delete objects; initiate multipart uploads; upload, assemble, and copy parts; cancel multipart uploads; and obtain content and metadata of objects in the bucket.
    • bucket-owner-full-control: If this permission is granted on an object, only the bucket and object owners have the full control over the object.

      By default, if you upload an object to a bucket of any other user, the bucket owner does not have the permissions on your object. After you grant this policy to the bucket owner, the bucket owner can have full control over your object.

      +

      For example, if user A uploads object x to user B's bucket, user B does not have the control over object x. If user A sets the bucket-owner-full-control policy for object x, user B then has the control over object x.

      +
    +

    Default value:

    +

    private

    x-obs-storage-class

    +

    x-obs-storage-class

    When creating a bucket, you can add this header to specify the default storage class for the bucket. The storage class options are as follows: STANDARD (Standard), WARM (Warm), and COLD (Cold). If this header is not in the request, a Standard bucket will be created.

    -

    Type: string

    +

    String

    No

    +

    No

    +

    Explanation:

    +

    When creating a bucket, you can add this header to set the default storage class for the bucket.

    +

    Value range:

    +
    • STANDARD (Standard storage)
    • WARM (Warm storage)
    • COLD (Cold storage)
    +

    Default value:

    +

    STANDARD

    x-obs-grant-read

    +

    x-obs-grant-read

    This header grants the read permission to all users under an account. It allows you to list objects in a bucket, list multipart tasks in a bucket, list multi-version objects in a bucket, and obtain bucket metadata.

    -

    Type: string

    -

    Example: x-obs-grant-read:id=Tenant ID

    +

    String

    No

    +

    No

    +

    Explanation:

    +

    Grants the read permission to all users in a specified domain. It allows you to list objects in a bucket, list multipart tasks in a bucket, list multi-version objects in a bucket, and obtain bucket metadata.

    +

    Example: x-obs-grant-read:id=tenant-ID

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    id=tenant-ID. For details, see Obtaining a Domain ID and a User ID.

    +

    Default value:

    +

    None

    x-obs-grant-write

    +

    x-obs-grant-write

    This header grants the write permission to all users under an account. Therefore, the users can create, delete, and overwrite all objects in a bucket, and can initialize parts, upload parts, copy parts, merge parts, and cancel multipart upload tasks.

    -

    Type: string

    -

    Example: x-obs-grant-write:id=Tenant ID

    +

    String

    No

    +

    No

    +

    Explanation:

    +

    Grants the WRITE permission to all users in a specified domain to create, delete, and overwrite all objects in a bucket; and initiate multipart uploads, upload parts, copy parts, assemble parts, and cancel multipart uploads.

    +

    Example: x-obs-grant-write:id=tenant-ID

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    id=tenant-ID. For details, see Obtaining a Domain ID and a User ID.

    +

    Default value:

    +

    None

    x-obs-grant-read-acp

    +

    x-obs-grant-read-acp

    This header grants the ACL read permission to all users under an account. Therefore, the users can read the bucket ACL information.

    -

    Type: string

    -

    Example: x-obs-grant-read-acp:id=Account ID

    +

    String

    No

    +

    No

    +

    Explanation:

    +

    Grant the READ_ACP permission to all users in a specified domain to allow them to read the bucket ACL.

    +

    Example: x-obs-grant-read-acp:id=Account ID

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    id=tenant-ID. For details, see Obtaining a Domain ID and a User ID.

    +

    Default value:

    +

    None

    x-obs-grant-write-acp

    +

    x-obs-grant-write-acp

    This header grants the ACL write permission to all users under an account. Therefore, the users can modify the ACL of the bucket.

    -

    Type: string

    -

    Example: x-obs-grant-write-acp:id=Account ID

    +

    String

    No

    +

    No

    +

    Explanation:

    +

    Grants the WRITE_ACP permission to all users in a specified domain to allow them to modify the bucket ACL.

    +

    Example: x-obs-grant-write-acp:id=Account ID

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    id=tenant-ID. For details, see Obtaining a Domain ID and a User ID.

    +

    Default value:

    +

    None

    x-obs-grant-full-control

    +

    x-obs-grant-full-control

    This header grants the full control permission to all users under an account.

    -

    Type: string

    -

    Example: x-obs-grant-full-control:id=Account ID

    +

    String

    No

    +

    No

    +

    Explanation:

    +

    Grants the FULL_CONTROL permission to all users in a specified domain.

    +

    Example: x-obs-grant-full-control:id=tenant-ID

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    id=tenant-ID. For details, see Obtaining a Domain ID and a User ID.

    +

    Default value:

    +

    None

    x-obs-grant-read-delivered

    +

    x-obs-grant-read-delivered

    This header grants the read permission to all users under an account. By default, the read permission is applied to all objects in the bucket.

    -

    Type: string

    -

    Example: x-obs-grant-read-delivered:id=Account ID

    +

    String

    No

    +

    No

    +

    Explanation:

    +

    Grants the READ permission to all users in a specified domain. By default, the read permission is granted on all objects in the bucket.

    +

    Example: x-obs-grant-read-delivered:id=tenant-ID

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    id=tenant-ID. For details, see Obtaining a Domain ID and a User ID.

    +

    Default value:

    +

    None

    x-obs-grant-full-control-delivered

    +

    x-obs-grant-full-control-delivered

    This header grants the full control permission to all users under an account. By default, the FULL_CONTROL permission is applied to all objects in the bucket.

    -

    Type: string

    -

    Example: x-obs-grant-full-control-delivered:id=Account ID

    +

    String

    No

    +

    No

    +

    Explanation:

    +

    Grants the FULL_CONTROL permission to all users in a specified domain. By default, the FULL_CONTROL permission is granted on all objects in the bucket.

    +

    Example: x-obs-grant-full-control-delivered:id=tenant-ID

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    id=tenant-ID. For details, see Obtaining a Domain ID and a User ID.

    +

    Default value:

    +

    None

    x-obs-fs-file-interface

    +

    x-obs-fs-file-interface

    This header can be carried when you create a bucket as a parallel file system.

    -

    Type: string

    -

    Example: x-obs-fs-file-interface:Enabled

    +

    String

    No

    +

    No

    +

    Explanation:

    +

    This header can be carried when you want to create a parallel file system.

    +

    Example: x-obs-fs-file-interface:Enabled

    +

    Value range:

    +

    Enabled

    +

    Default value:

    +

    If the header is specified, the value must be Enabled. There is no default value.

    x-obs-bucket-object-lock-enabled

    +

    x-obs-bucket-object-lock-enabled

    When creating a bucket, you can use this header to enable WORM for the bucket.

    -

    Type: string

    -

    Example: x-obs-bucket-object-lock-enabled:true

    +

    String

    No

    +

    No

    +

    Explanation:

    +

    When creating a bucket, you can use this header to enable WORM for the bucket.

    +

    Example: x-obs-bucket-object-lock-enabled:true

    +

    Restrictions:

    +

    Only object buckets are supported.

    +

    Value range:

    +

    true: WORM is enabled.

    +

    Default value:

    +

    If the header is specified, the value must be true. There is no default value. If the header is not specified, WORM is disabled.

    -

    Request Elements

    This request can use additional elements. For details about additional elements, see Table 2.

    +

    Request Elements

    This request can use additional elements. For details about additional elements, see Table 2.

    -
    Table 2 Additional request elements

    Element

    +
    - - + - - + + - @@ -178,7 +272,6 @@ Location: location Date: date Content-Length: length
    Table 2 Additional request elements

    Element

    Description

    +

    Type

    Mandatory

    +

    Mandatory (Yes/No)

    +

    Description

    Location

    +

    Location

    Specifies the region where a bucket will be created.

    +

    String

    +

    No

    +

    Explanation:

    +

    Specifies the region where a bucket will be created.

    -
    • When creating a bucket using the endpoint of the default region, note the following:
      • If Location is not specified, the bucket is created in the default region.
      • If Location is specified to other region, the bucket is created in the specified region.
      -
    • When creating a bucket using the endpoint of a non-default region, Location must be specified to the region corresponding to the endpoint.
    -

    For details about OBS regions and endpoints, see Regions and Endpoints.

    -

    Type: string

    -

    No

    +
    • When creating a bucket using the endpoint of the default region, note the following:
      • If Location is not specified, the bucket is created in the default region.
      • If Location is specified to other region, the bucket is created in the specified region.
      +
    • When creating a bucket using the endpoint of a non-default region, Location must be specified to the region corresponding to the endpoint.
    +

    Restrictions:

    +

    If the used endpoint is obs.otc.t-systems.com, this parameter is not required. If any other endpoint is used, this parameter is required.

    +

    Value range:

    +

    For details about OBS regions and endpoints, see Regions and Endpoints.

    +

    Default value:

    +

    If the endpoint is obs.otc.t-systems.com and no region is specified, the default value is eu-de.

    -

    Response Headers

    The response to the request uses common headers. For details, see Table 1.

    @@ -209,7 +302,6 @@ Content-Length: 157 <Location>region</Location> </CreateBucketConfiguration>
    -

    Sample Response: Creating a Bucket

    1
    @@ -226,7 +318,6 @@ x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCT9W2tcvLmMJ+
     Date: WED, 01 Jul 2015 02:25:06 GMT
     Content-Length: 0
     
    -

    Sample Request: Creating a Bucket (with the ACL and Storage Class Specified)

     1
    @@ -255,7 +346,6 @@ Content-Length: 157
         <Location>region</Location> 
     </CreateBucketConfiguration>
     
    -

    Sample Response: Creating a Bucket (with the ACL and Storage Class Specified)

    1
    @@ -272,7 +362,6 @@ x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCT9W2tcvLmMJ+
     Date: WED, 01 Jul 2015 02:25:06 GMT
     Content-Length: 0
     
    -

    Sample Request: Creating a Parallel File System

     1
    @@ -299,7 +388,6 @@ x-obs-fs-file-interface: Enabled
     <Location>region</Location> 
     </CreateBucketConfiguration>
     
    -

    Sample Response: Creating a Parallel File System

    1
    @@ -316,7 +404,6 @@ x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCT9W2tcvLmMJ+
     Date: WED, 01 Jul 2015 02:25:06 GMT
     Content-Length: 0
     
    -

    Sample Request: Creating a Bucket with WORM Enabled

    PUT / HTTP/1.1
    diff --git a/docs/obs/api-ref/obs_04_0022.html b/docs/obs/api-ref/obs_04_0022.html
    index c391a898..3e0ea722 100644
    --- a/docs/obs/api-ref/obs_04_0022.html
    +++ b/docs/obs/api-ref/obs_04_0022.html
    @@ -2,7 +2,7 @@
     
     

    Listing Objects in a Bucket

    Functions

    This operation lists objects in a bucket. To use this operation, you must have the permission to read the bucket.

    -

    If you specify only the bucket name in the request, OBS returns descriptions for some or all of the objects (a maximum of 1,000 objects) in the bucket. If you also specify one or more parameters among prefix, marker, max-keys, and delimiter in the request, OBS returns a list of objects based on the semantics specified in Table 1.

    +

    If you specify only the bucket name in the request, OBS returns descriptions for some or all of the objects (a maximum of 1,000 objects) in the bucket. If you also specify one or more of the following parameters in the request: prefix, marker, max-keys, and delimiter, OBS returns a list of objects based on the semantics specified in Table 1.

    You can also add the versions parameter to the request to list multiple versions of an object in a bucket.

    Request Syntax

    1
    @@ -15,7 +15,6 @@ Host: bucketname.obs.region.example.com
     Date: date
     Authorization: authorization
     
    -

    Request Syntax (for multi-version objects)

    1
    @@ -26,70 +25,116 @@ Host: bucketname.obs.region.example.com
     Date: date
     Authorization: authorization
     
    -
    -

    Request Parameters

    This request uses parameters to list some objects in a bucket. Table 1 describes the parameters.

    +

    Request Parameters

    This request uses parameters to list some objects in a bucket. Table 1 describes the parameters.

    -
    Table 1 Request parameters

    Parameter

    +
    - - + - - - + - - - + - - - + - - - + - - - + - - - + @@ -121,322 +166,675 @@ Authorization: authorization

    Response Headers

    The response to the request uses common headers. For details, see Table 1.

    -

    Response Elements

    This response lists objects in XML format. Specific elements are described in Table 2.

    +

    Response Elements

    This response lists objects in XML format. Specific elements are described in Table 2.

    -
    Table 1 Request parameters

    Parameter

    Description

    +

    Type

    Mandatory

    +

    Mandatory (Yes/No)

    +

    Description

    prefix

    +

    prefix

    Lists objects that begin with the specified prefix.

    -

    Type: string

    +

    String

    No

    +

    No

    +

    Explanation:

    +

    Name prefix that the objects to be listed must contain.

    +

    Restrictions:

    +

    The value must comply with the format of the object name.

    +

    Value range:

    +

    The value can contain 1 to 1,024 characters.

    +

    Default value:

    +

    None

    marker

    +

    marker

    Specifies a marker when listing objects in a bucket. With a marker configured, objects after this marker will be returned in alphabetical order. This field is used only for listing objects.

    -

    Type: string

    +

    String

    No

    +

    No

    +

    Explanation:

    +

    Name of the object to start with when listing objects in a bucket. All objects following this object are listed in lexicographical order by object name.

    +

    Restrictions:

    +

    This parameter is used only for listing non-versioned objects.

    +

    Value range:

    +

    The value can contain 1 to 1,024 characters.

    +

    Default value:

    +

    None

    max-keys

    +

    max-keys

    Specifies the maximum number (from 1 to 1000) of objects returned (in alphabetical order) in the response. If the value is beyond this range, only 1,000 objects are returned by default.

    -

    Type: integer

    +

    Integer

    No

    +

    No

    +

    Explanation:

    +

    The maximum number of objects returned in the response in alphabetical order

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    The value ranges from 1 to 1000. If the specified value is greater than 1000, only 1,000 objects are returned.

    +

    Default value:

    +

    1000

    delimiter

    +

    delimiter

    Separator used to group object names. If a prefix is specified, objects with the same string from the prefix to the first delimiter are grouped into one CommonPrefixes. If no prefix is specified, objects with the same string from the first character to the first delimiter are grouped into one CommonPrefixes.

    -

    For example, there are three objects (abcd, abcde, and bbcde) in a bucket. If delimiter is set to d and prefix is set to a, objects abcd and abcde are grouped into a CommonPrefixes with abcd as the prefix. If only delimiter is set to d, objects abcd and abcde are grouped into a CommonPrefixes with abcd as the prefix, and bbcde is grouped separately into another CommonPrefixes with bbcd as the prefix.

    -

    For a parallel file system, if this parameter is not specified, all the content in the directory is recursively listed by default, and subdirectories are also listed. In big data scenarios, parallel file systems usually have deep directory levels and each directory has a large number of files. In such case, you are advised to configure [delimiter=/] to list the content in the current directory, but not list subdirectories, thereby improving the listing efficiency.

    -

    Type: string

    +

    String

    No

    +

    No

    +

    Explanation:

    +

    Separator used to group object names. If a prefix is specified, objects with the same string from the prefix to the first delimiter are grouped into one CommonPrefixes. If no prefix is specified, objects with the same string from the first character to the first delimiter are grouped into one CommonPrefixes.

    +

    For example, there are three objects (abcd, abcde, and bbcde) in a bucket. If delimiter is set to d and prefix is set to a, objects abcd and abcde are grouped into a CommonPrefixes with abcd as the prefix. If only delimiter is set to d, objects abcd and abcde are grouped into a CommonPrefixes with abcd as the prefix, and bbcde is grouped separately into another CommonPrefixes with bbcd as the prefix.

    +

    For a parallel file system, if this parameter is not specified, all the content in the directory is recursively listed by default, and subdirectories are also listed. In big data scenarios, parallel file systems usually have deep directory levels and each directory has a large number of files. In such case, you are advised to configure [delimiter=/] to list the content in the current directory, but not list subdirectories, thereby improving the listing efficiency.

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    The value can contain 1 to 1,024 characters.

    +

    Default value:

    +

    None

    key-marker

    +

    key-marker

    Position to start with when objects are listed. This field is used only for listing versioned objects.

    -

    Type: string

    -

    Valid value: value of NextKeyMarker in the response body of the last request

    +

    String

    No

    +

    No

    +

    Explanation:

    +

    Object name to start with when listing object versions in a bucket. All object versions following the specified value are listed in lexicographical order by object name.

    +

    Restrictions:

    +

    This field is used only for listing versioned objects.

    +

    Value range:

    +

    The value of NextKeyMarker in the response body of the last request

    +

    Default value:

    +

    None

    version-id-marker

    +

    version-id-marker

    This parameter applies only when versioning is enabled.

    -

    Specifies the version ID to start with when objects in a bucket are listed. Objects are listed in alphabetical order (a maximum of 1,000 objects are displayed at a time). This parameter is used together with the key-marker in the request. If the value of version-id-marker is not a version ID specified by key-marker, version-id-marker is invalid.

    -

    Type: string

    -

    Valid value: object version ID, that is, the value of NextVersionIdMarker in the response body of the last request

    +

    String

    No

    +

    No

    +

    Explanation:

    +

    Version ID to start with when listing objects in a bucket. All objects following the specified value are listed in lexicographical order by object name and version ID. This parameter must be used together with key_marker. A maximum of 1,000 objects can be returned at a time. key_marker specifies the object name, and version_id_marker specifies the version of the specified object.

    +

    Restrictions:

    +
    • This parameter is only used for listing objects with multiple versions.
    • If the value of version_id_marker is not a version ID that belongs to the object specified by key_marker, version_id_marker does not take effect.
    +

    Value range:

    +

    Object version ID, that is, the value of nextVersionIdMarker in the response body of the last request

    +

    Default value:

    +

    None

    Table 2 Response elements

    Element

    +
    - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - +
    Table 2 Response elements

    Parameter

    Description

    +

    Type

    +

    Description

    ListBucketResult

    +

    ListBucketResult

    A list of objects in a bucket

    -

    Type: XML

    +

    XML

    +

    Explanation:

    +

    A list of objects in a bucket

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    None

    +

    Default value:

    +

    None

    Contents

    +

    Contents

    Object metadata

    -

    Type: XML

    -

    Parent: ListBucketResult

    +

    XML

    +

    Explanation:

    +

    Object metadata

    +

    Parent: ListBucketResult

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    None

    +

    Default value:

    +

    None

    CommonPrefixes

    +

    CommonPrefixes

    Group information. If you specify a delimiter in the request, the response contains group information in CommonPrefixes.

    -

    Type: XML

    -

    Parent: ListBucketResult

    +

    XML

    +

    Explanation:

    +

    Group information. If you specify a delimiter in the request, the response contains group information in CommonPrefixes.

    +

    Parent: ListBucketResult

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    None

    +

    Default value:

    +

    None

    Delimiter

    +

    Delimiter

    The delimiter parameter specified in a request

    -

    Type: string

    -

    Parent: ListBucketResult

    +

    String

    +

    Explanation:

    +

    Separator used to group object names. If a prefix is specified, objects with the same string from the prefix to the first delimiter are grouped into one CommonPrefix. If no prefix is specified, objects with the same string from the first character to the first delimiter are grouped into one CommonPrefix.

    +

    Assume that a bucket has objects abcd, abcde, and bbcde in it. If delimiter is set to d and prefix is set to a, objects abcd and abcde are grouped into a commonPrefix with abcd as the prefix. If only delimiter is set to d, objects abcd and abcde are grouped into a commonPrefix with abcd as the prefix, and bbcde is grouped separately into another commonPrefix with bbcd as the prefix.

    +

    Parent: ListBucketResult

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    The value can contain 1 to 1,024 characters.

    +

    Default value:

    +

    None

    ETag

    +

    ETag

    Base64-encoded 128-bit MD5 digest of an object. ETag is the unique identifier of the object content. It can be used to determine whether the object content is changed. For example, if the ETag value is A when an object is uploaded, but this value has changed to B when the object is downloaded, it indicates that the object content has been changed. The ETag value is a hash of the object. The ETag reflects changes to the object content, rather than the object metadata. An uploaded object or copied object has a unique ETag after being encrypted using MD5. (If the object is encrypted on the server side, the ETag value is not the MD5 digest of the object, but the unique identifier calculated through server-side encryption.)

    -

    Type: string

    -

    Parent: ListBucketResult.Contents

    +

    String

    +

    Explanation:

    +

    Base64-encoded 128-bit MD5 digest of an object. ETag is the unique identifier of the object content. It can be used to determine whether the object content is changed. For example, if the ETag value is A when an object is uploaded, but this value has changed to B when the object is downloaded, it indicates that the object content has been changed. The ETag value is a hash of the object. The ETag reflects changes to the object content, rather than the object metadata. An uploaded object or copied object has a unique ETag after being encrypted using MD5.

    +

    Parent: ListBucketResult.Contents

    +

    Restriction:

    +

    If the object is encrypted on the server side, the ETag value is not the MD5 digest of the object, but the unique identifier calculated through server-side encryption.

    +

    Value range:

    +

    The value must contain 32 characters.

    +

    Default value:

    +

    None

    Type

    +

    Type

    Object type. This parameter is returned when the object type is not Normal.

    -

    Type: string

    -

    Parent: ListBucketResult.Contents

    +

    String

    +

    Explanation:

    +

    Object type

    +

    Parent: ListBucketResult.Contents

    +

    Restrictions:

    +

    This parameter is returned when the object is not a Normal object.

    +

    Value range:

    +
    • Normal: normal objects
    • APPENDABLE: appendable objects
    +

    Default value:

    +

    None

    ID

    +

    ID

    Domain ID of the object owner

    -

    Type: string

    -

    Parent: ListBucketResult.Contents.Owner

    +

    String

    +

    Explanation:

    +

    Domain ID of the object owner

    +

    Parent: ListBucketResult.Contents.Owner

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    DomainId

    +

    Default value:

    +

    None

    IsTruncated

    +

    IsTruncated

    Determines whether the returned list of objects is truncated. The value true indicates that the list was truncated and false indicates that the list was not truncated.

    -

    Type: boolean

    -

    Parent: ListBucketResult

    +

    Boolean

    +

    Explanation:

    +

    Whether all results are returned in the response.

    +

    Parent: ListBucketResult

    +

    Restrictions:

    +

    None

    +

    Value range:

    +
    • true: Not all results are returned.
    • false: All results are returned.
    +

    Default value:

    +

    None

    Key

    +

    Key

    Object name

    -

    Type: string

    -

    Parent: ListBucketResult.Contents

    +

    String

    +

    Explanation:

    +

    Object name. An object is uniquely identified by an object name in a bucket. An object name is a complete path that does not contain the bucket name.

    +

    Parent: ListBucketResult.Contents

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    The value can contain 1 to 1,024 characters.

    +

    Default value:

    +

    None

    LastModified

    +

    LastModified

    Time (UTC) when an object was last modified

    -

    Type: date

    -

    Parent: ListBucketResult.Contents

    +

    Date

    +

    Explanation:

    +

    Time (UTC) when an object was last modified

    +

    Parent: ListBucketResult.Contents

    +

    Restrictions:

    +

    The date is in the ISO8601 format.

    +

    Example: 2018-01-01T00:00:00.000Z

    +

    Value range:

    +

    None

    +

    Default value:

    +

    None

    Marker

    +

    Marker

    Marker for the position from which objects in a bucket will be listed

    -

    Type: string

    -

    Parent: ListBucketResult

    +

    String

    +

    Explanation:

    +

    Name of the object to start with when listing objects in a bucket. All objects following this object are listed in lexicographical order by object name.

    +

    Assume that you have the following objects: test/a, test/b, test/c, and test/d. If you specify test/b as the marker, test/c and test/d are returned.

    +

    Parent: ListBucketResult

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    The value can contain 1 to 1,024 characters.

    +

    Default value:

    +

    None

    NextMarker

    +

    NextMarker

    A marker for the last returned object in the list. NextMarker is returned when not all the objects are listed. You can set the Marker value to list the remaining objects in follow-up requests.

    -

    Type: string

    -

    Parent: ListBucketResult

    +

    String

    +

    Explanation:

    +

    The last object in the returned list. This parameter is returned when not all the objects are listed. You can set the Marker value to list the remaining objects in follow-up requests.

    +

    Parent: ListBucketResult

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    An object name string

    +

    Default value:

    +

    None

    MaxKeys

    +

    MaxKeys

    Maximum number of objects returned

    -

    Type: string

    -

    Parent: ListBucketResult

    +

    String

    +

    Explanation:

    +

    The maximum number of objects returned in the response in alphabetical order

    +

    Parent: ListBucketResult

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    The value ranges from 1 to 1000. If a value larger than 1000 is specified, 1000 is used.

    +

    Default value:

    +

    1000

    Name

    +

    Name

    Name of the requested bucket

    -

    Type: string

    -

    Parent: ListBucketResult

    +

    String

    +

    Explanation:

    +

    Bucket name

    +

    Parent: ListBucketResult

    +

    Restrictions:

    +
    • A bucket name must be unique across all accounts and regions.
    • A bucket name:
      • Must be 3 to 63 characters long and start with a digit or letter. Lowercase letters, digits, hyphens (-), and periods (.) are allowed.
      • Cannot be formatted as an IP address.
      • Cannot start or end with a hyphen (-) or period (.).
      • Cannot contain two consecutive periods (..), for example, my..bucket.
      • Cannot contain a period (.) and a hyphen (-) adjacent to each other, for example, my-.bucket or my.-bucket.
      +
    • If you repeatedly create buckets of the same name in the same region, no error will be reported and the bucket attributes comply with those set in the first creation request.
    +

    Default value:

    +

    None

    Owner

    +

    Owner

    User information, including the domain ID and name of the object owner

    -

    Type: XML

    -

    Parent: ListBucketResult.Contents

    +

    XML

    +

    Explanation:

    +

    User information, including the domain ID and name of the object owner

    +

    Parent: ListBucketResult.Contents

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    None

    +

    Default value:

    +

    None

    DisplayName

    +

    DisplayName

    Name of the object owner

    -

    Type: string

    -

    Parent: ListBucketResult.Contents.Owner

    +

    String

    +

    Explanation:

    +

    Name of the object owner

    +

    Parent: ListBucketResult.Contents.Owner

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    None

    +

    Default value:

    +

    None

    Prefix

    +

    Prefix

    Prefix of an object name. Only objects whose names have this prefix are listed.

    -

    Type: string

    -

    Parent: ListBucketResult

    +

    String

    +

    Explanation:

    +

    Name prefix that the objects to be listed must contain.

    +

    Assume that you have the following objects: logs/day1, logs/day2, logs/day3, and ExampleObject.jpg. If you specify logs/ as the prefix, logs/day1, logs/day2, and logs/day3 will be returned. If you leave this parameter blank and there are also no other filters specified, all objects in the bucket will be returned.

    +

    Parent: ListBucketResult

    +

    Restrictions:

    +

    The prefix you specified must already exist in the bucket.

    +

    Value range:

    +

    The value can contain 1 to 1,024 characters.

    +

    Default value:

    +

    None

    Size

    +

    Size

    Object size in bytes

    -

    Type: string

    -

    Parent: ListBucketResult.Contents

    +

    String

    +

    Explanation:

    +

    Object size in bytes

    +

    Parent: ListBucketResult.Contents

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    The value ranges from 0 TB to 48.8 TB, in bytes.

    +

    Default value:

    +

    None

    StorageClass

    +

    StorageClass

    Storage class of an object

    -

    Type: string

    -

    Value options: STANDARD, WARM, COLD

    -

    Parent: ListBucketResult.Contents

    +

    String

    +

    Explanation:

    +

    Storage class of an object.

    +

    Parent: ListBucketResult.Contents

    +

    Restrictions:

    +

    None

    +

    Value range:

    +
    • STANDARD
    • WARM
    • COLD
    +

    Default value:

    +

    None

    -
    Table 3 Elements in the response message for listing multi-version objects.

    Element

    +
    - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + @@ -457,7 +855,6 @@ Accept: */* Date: WED, 01 Jul 2015 02:28:25 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:KiyoYze4pmRNPYfmlXBfRTVxt8c=
    Table 3 Elements in the response message for listing versioned objects

    Parameter

    Description

    +

    Type

    +

    Description

    ListVersionsResult

    +

    ListVersionsResult

    Container for the list of objects (including objects with multiple version IDs)

    -

    Type: container

    +

    Container

    +

    Explanation:

    +

    Container for the list of objects (including versioned objects)

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    None

    +

    Default value:

    +

    None

    Name

    +

    Name

    Bucket name

    -

    Type: string

    -

    Parent: ListVersionsResult

    +

    String

    +

    Explanation:

    +

    Bucket name

    +

    Parent: ListVersionsResult

    +

    Restrictions:

    +
    • A bucket name must be unique across all accounts and regions.
    • A bucket name:
      • Must be 3 to 63 characters long and start with a digit or letter. Lowercase letters, digits, hyphens (-), and periods (.) are allowed.
      • Cannot be formatted as an IP address.
      • Cannot start or end with a hyphen (-) or period (.).
      • Cannot contain two consecutive periods (..), for example, my..bucket.
      • Cannot contain a period (.) and a hyphen (-) adjacent to each other, for example, my-.bucket or my.-bucket.
      +
    • If you repeatedly create buckets of the same name in the same region, no error will be reported and the bucket attributes comply with those set in the first creation request.
    +

    Value range:

    +

    None

    +

    Default value:

    +

    None

    Prefix

    +

    Prefix

    Prefix of an object name. Only objects whose names have this prefix are listed. Type: string

    -

    Parent: ListVersionsResult

    +

    String

    +

    Explanation:

    +

    Name prefix that the objects to be listed must contain.

    +

    Assume that you have the following objects: logs/day1, logs/day2, logs/day3, and ExampleObject.jpg. If you specify logs/ as the prefix, logs/day1, logs/day2, and logs/day3 will be returned. If you leave this parameter blank and there are also no other filters specified, all objects in the bucket will be returned.

    +

    Parent: ListVersionsResult

    +

    Restrictions:

    +

    The prefix you specified must already exist in the bucket.

    +

    Value range:

    +

    The value can contain 1 to 1,024 characters.

    +

    Default value:

    +

    None

    KeyMarker

    +

    KeyMarker

    Marker for the object key from which objects will be listed

    -

    Type: string

    -

    Parent: ListVersionsResult

    +

    String

    +

    Explanation:

    +

    Name of the object to start with when listing objects in a bucket. All objects following this object are listed in lexicographical order by object name.

    +

    Assume that you have the following objects: test/a, test/b, test/c, and test/d. If you specify test/b as the marker, test/c and test/d are returned.

    +

    Parent: ListVersionsResult

    +

    Restrictions:

    +

    This parameter is used only for listing versioned objects.

    +

    Value range:

    +

    The value can contain 1 to 1,024 characters.

    +

    Default value:

    +

    None

    VersionIdMarker

    +

    VersionIdMarker

    Object version ID to start with when objects are listed

    -

    Type: string

    -

    Parent: ListVersionsResult

    +

    String

    +

    Explanation:

    +

    Version ID to start with when listing versioned objects, which is consistent with that set in the request

    +

    Restrictions:

    +

    This parameter is used only for listing versioned objects.

    +

    Value range:

    +

    The value must contain 32 characters.

    +

    Default value:

    +

    None

    NextKeyMarker

    +

    NextKeyMarker

    Key marker for the last returned object in the list. NextKeyMarker is returned when not all the objects are listed. You can set the KeyMarker value to list the remaining objects in follow-up requests.

    -

    Type: string

    -

    Parent: ListVersionsResult

    +

    String

    +

    Explanation:

    +

    Start position when listing versioned objects in the next request. Key marker for the last returned object in the list. NextKeyMarker is returned when not all the objects are listed. You can set the KeyMarker value to list the remaining objects in follow-up requests.

    +

    Parent: ListVersionsResult

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    An object name string

    +

    Default value:

    +

    None

    NextVersionIdMarker

    +

    NextVersionIdMarker

    Version ID marker for the last returned object in the list. NextVersionIdMarker is returned when not all the objects are listed. You can set the VersionIdMarker value to list the remaining objects in follow-up requests.

    -

    Type: string

    -

    Parent: ListVersionsResult

    +

    String

    +

    Explanation:

    +

    Version ID to start with when listing versioned objects in the next request. It is used with the nextKeyMarker parameter. Version ID marker for the last returned object in the list. NextVersionIdMarker is returned when not all the objects are listed. You can set the VersionIdMarker value to list the remaining objects in follow-up requests.

    +

    Parent: ListVersionsResult

    +

    Restrictions:

    +

    This parameter is used only for listing versioned objects.

    +

    Value range:

    +

    The value must contain 32 characters.

    +

    Default value:

    +

    None

    MaxKeys

    +

    MaxKeys

    Maximum number of objects returned

    -

    Type: string

    -

    Parent: ListVersionsResult

    +

    String

    +

    Explanation:

    +

    The maximum number of objects returned in the response in alphabetical order

    +

    Parent: ListVersionsResult

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    The value ranges from 1 to 1000. If a value larger than 1000 is specified, 1000 is used.

    +

    Default value:

    +

    1000

    IsTruncated

    +

    IsTruncated

    Indicates whether the returned list of objects is truncated. The value true indicates that the list was truncated and false indicates that the list was not truncated.

    -

    Type: boolean

    -

    Parent: ListVersionsResult

    +

    Boolean

    +

    Explanation:

    +

    Whether all results are returned in the response.

    +

    Parent: ListVersionsResult

    +

    Restrictions:

    +

    None

    +

    Value range:

    +
    • true: Not all results are returned.
    • false: All results are returned.
    +

    Default value:

    +

    None

    Version

    +

    Version

    Container of version information

    -

    Type: container

    -

    Parent: ListVersionsResult

    +

    Container

    +

    Explanation:

    +

    Container that contains the version information

    +

    Parent: ListVersionsResult

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    None

    +

    Default value:

    +

    None

    DeleteMarker

    +

    DeleteMarker

    Container for objects with delete markers

    -

    Type: container

    -

    Parent: ListVersionsResult

    +

    Container

    +

    Explanation:

    +

    Container that contains objects with delete markers

    +

    Parent: ListVersionsResult

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    None

    +

    Default value:

    +

    None

    Key

    +

    Key

    Object name

    -

    Type: string

    -

    Parent: ListVersionsResult.Version | ListVersionsResult.DeleteMarker

    +

    String

    +

    Explanation:

    +

    Name of the versioned object. An object is uniquely identified by an object name in a bucket. An object name is a complete path that does not contain the bucket name.

    +

    Parent: ListVersionsResult.Version | ListVersionsResult.DeleteMarker

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    The value can contain 1 to 1,024 characters.

    +

    Default value:

    +

    None

    VersionId

    +

    VersionId

    Object version ID

    -

    Type: string

    -

    Parent: ListVersionsResult.Version | ListVersionsResult.DeleteMarker

    +

    String

    +

    Explanation:

    +

    Version ID of the object.

    +

    Parent: ListVersionsResult.Version | ListVersionsResult.DeleteMarker

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    The value must contain 32 characters.

    +

    Default value:

    +

    None

    IsLatest

    +

    IsLatest

    Whether the object is the latest version. If the parameter value is true, the object is the latest version.

    -

    Type: boolean

    -

    Parent: ListVersionsResult.Version | ListVersionsResult.DeleteMarker

    +

    Boolean

    +

    Explanation:

    +

    Whether the object is of the latest version

    +

    Parent: ListVersionsResult.Version | ListVersionsResult.DeleteMarker

    +

    Restrictions:

    +

    None

    +

    Value range:

    +
    • true: The version is the latest.
    • false: The version is not the latest.
    +

    Default value:

    +

    None

    LastModified

    +

    LastModified

    Time (UTC) when an object was last modified

    -

    Type: date

    -

    Parent: ListVersionsResult.Version | ListVersionsResult.DeleteMarker

    +

    Date

    +

    Explanation:

    +

    Time (UTC) when an object was last modified

    +

    Parent: ListVersionsResult.Version | ListVersionsResult.DeleteMarker

    +

    Restrictions:

    +

    The date is in the ISO8601 format.

    +

    Example: 2018-01-01T00:00:00.000Z

    +

    Value range:

    +

    None

    +

    Default value:

    +

    None

    ETag

    +

    ETag

    Base64-encoded 128-bit MD5 digest of an object. ETag is the unique identifier of the object content. It can be used to determine whether the object content is changed. The actual ETag is the hash value of the object. For example, if the ETag value is A when an object is uploaded, but this value has changed to B when the object is downloaded, it indicates that the object content has been changed. The ETag reflects changes to the object content, rather than the object metadata. An uploaded object or copied object has a unique ETag after being encrypted using MD5.

    -

    Type: string

    -

    Parent: ListVersionsResult.Version

    +

    String

    +

    Explanation:

    +

    Base64-encoded 128-bit MD5 digest of an object. ETag is the unique identifier of the object content. It can be used to determine whether the object content is changed. For example, if the ETag value is A when an object is uploaded, but this value has changed to B when the object is downloaded, it indicates that the object content has been changed. The ETag value is a hash of the object. The ETag reflects changes to the object content, rather than the object metadata. An uploaded object or copied object has a unique ETag after being encrypted using MD5.

    +

    Parent: ListVersionsResult.Version

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    The value must contain 32 characters.

    +

    Default value:

    +

    None

    Type

    +

    Type

    Object type. This parameter is returned when the object type is not Normal.

    -

    Type: string

    -

    Parent: ListVersionsResult.Version

    +

    String

    +

    Explanation:

    +

    Object type

    +

    Parent: ListVersionsResult.Version

    +

    Restrictions:

    +

    This parameter is returned when the object is not a Normal object.

    +

    Value range:

    +
    • NORMAL: normal objects
    • APPENDABLE: appendable objects
    +

    Default value:

    +

    None

    Size

    +

    Size

    Object size in bytes

    -

    Type: string

    -

    Parent: ListVersionsResult.Version

    +

    String

    +

    Explanation:

    +

    Object size in bytes

    +

    Parent: ListVersionsResult.Version

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    The value ranges from 0 TB to 48.8 TB, in bytes.

    +

    Default value:

    +

    None

    Owner

    +

    Owner

    User information, including the domain ID and name of the object owner

    -

    Type: container

    -

    Parent: ListVersionsResult.Version | ListVersionsResult.DeleteMarker

    +

    Container

    +

    Explanation:

    +

    User information, including the domain ID and name of the object owner

    +

    Parent: ListVersionsResult.Version | ListVersionsResult.DeleteMarker

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    None

    +

    Default value:

    +

    None

    ID

    +

    ID

    Domain ID of the object owner

    -

    Type: string

    -

    Parent: ListVersionsResult.Version.Owner | ListVersionsResult.DeleteMarker.Owner

    +

    String

    +

    Explanation:

    +

    Domain ID of the object owner

    +

    Parent: ListVersionsResult.Version.Owner | ListVersionsResult.DeleteMarker.Owner

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    DomainId

    +

    Default value:

    +

    None

    DisplayName

    +

    DisplayName

    Name of the object owner

    -

    Type: string

    -

    Parent: ListVersionsResult.Version.Owner | ListVersionsResult.DeleteMarker.Owner

    +

    String

    +

    Explanation:

    +

    Name of the object owner

    +

    Parent: ListVersionsResult.Version.Owner | ListVersionsResult.DeleteMarker.Owner

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    None

    +

    Default value:

    +

    None

    StorageClass

    +

    StorageClass

    Storage class of an object

    -

    Type: string

    -

    Value options: STANDARD, WARM, COLD

    -

    Parent: ListVersionsResult.Version

    +

    String

    +

    Explanation:

    +

    Storage class of an object

    +

    Parent: ListVersionsResult.Version

    +

    Restrictions:

    +

    None

    +

    Value range:

    +
    • STANDARD
    • WARM
    • COLD
    +

    Default value:

    +

    None

    CommonPrefixes

    +

    CommonPrefixes

    Group information. If you specify a delimiter in the request, the response contains group information in CommonPrefixes.

    -

    Type: container

    -

    Parent: ListVersionsResult

    +

    Container

    +

    Explanation:

    +

    Group information. If you specify a delimiter in the request, the response contains group information in CommonPrefixes.

    +

    Parent: ListVersionsResult

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    None

    +

    Default value:

    +

    None

    Prefix

    +

    Prefix

    Indicates a different prefix in the group information in CommonPrefixes.

    -

    Type: string

    -

    Parent: ListVersionsResult.CommonPrefixes

    +

    String

    +

    Explanation:

    +

    Indicates a different prefix in the group information in CommonPrefixes.

    +

    Parent: ListVersionsResult.CommonPrefixes

    +

    Restrictions:

    +

    The prefix you specified must already exist in the bucket.

    +

    Value range:

    +

    The value can contain 1 to 1,024 characters.

    +

    Default value:

    +

    None

    -

    Sample Response: Listing All Objects

     1
    @@ -514,7 +911,6 @@ Content-Length: 586
       </Contents>
     </ListBucketResult>
     
    -

    Sample Request: Listing Some Objects

    Assume that you have a bucket examplebucket that contains objects newfile, obj001, obj002, and obs001. If you want to list only object obj002, the request message is as follows:

    @@ -579,7 +975,6 @@ Content-Length: 707 </Contents> </ListBucketResult>
    -

    Sample Request: Listing Object Versions

    1
    @@ -594,7 +989,6 @@ Accept: */*
     Date: WED, 01 Jul 2015 02:29:45 GMT
     Authorization: OBS H4IPJX0TQTHTHEBQQCEC:iZeDESIMxBK2YODk7vIeVpyO8DI=
     
    -

    Sample Response: Listing Object Versions

     1
    @@ -657,7 +1051,6 @@ Content-Length: 707
       </Version>
     </ListVersionsResult>
     
    -
    diff --git a/docs/obs/api-ref/obs_04_0023.html b/docs/obs/api-ref/obs_04_0023.html index 53328eb0..ef2691a7 100644 --- a/docs/obs/api-ref/obs_04_0023.html +++ b/docs/obs/api-ref/obs_04_0023.html @@ -11,36 +11,53 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization
    -

    Request Parameters

    This request contains no parameters.

    Request Headers

    This request uses common headers. For details, see Table 3.

    -

    Table 1 lists the header fields required when obtaining CORS configuration information.

    +

    If you want to get CORS configuration information, you must use the headers in Table 1.

    -
    Table 1 Request headers for obtaining CORS configuration

    Header

    +
    - - + - - - + - - - + @@ -55,72 +72,143 @@ Authorization: authorization x-obs-bucket-location: region Date: date
    Table 1 Request headers for obtaining CORS configuration

    Header

    Description

    +

    Type

    Mandatory

    +

    Mandatory (Yes/No)

    +

    Description

    Origin

    +

    Origin

    Origin of the cross-domain request specified by the pre-request. Generally, it is a domain name.

    -

    Type: string

    +

    String

    Yes

    +

    Yes

    +

    Explanation:

    +

    Origin of the cross-domain request specified by the pre-request. Generally, it is a domain name.

    +

    Restrictions:

    +

    You can enter multiple origins, with one separated from another using a line break. Each origin can contain at most one wildcard character (*).

    +

    Value range:

    +

    An HTTP-compliant header value

    +

    Default value:

    +

    None

    Access-Control-Request-Headers

    +

    Access-Control-Request-Headers

    HTTP headers of a request. The request can use multiple HTTP headers.

    -

    Type: string

    +

    String

    No

    +

    No

    +

    Explanation:

    +

    HTTP headers in a request

    +

    Restrictions:

    +

    You can enter multiple allowed headers, with one separated from another using a line break. Each header can contain one wildcard character (*) at most. Spaces, ampersands (&), colons (:), and less-than signs (<) are not allowed.

    +

    Value range:

    +

    An HTTP-compliant header value

    +

    Default value:

    +

    None

    -

    Response Headers

    The response to the request uses common headers. For details, see Table 1.

    -

    In addition to the common response headers, the headers listed in Table 2 may be used.

    +

    In addition to the common response headers, the headers listed in Table 2 may be used.

    -
    Table 2 Additional response headers

    Header

    +
    - + - - + - - + - - + - - + - - + - - + - - + - - + - - + @@ -143,7 +231,6 @@ Accept: */* Date: WED, 01 Jul 2015 02:30:25 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:niCQCuGIZpETKIyx1datxHZyYlk=
    Table 2 Additional response headers

    Header

    Description

    +

    Type

    +

    Description

    x-obs-bucket-location

    +

    x-obs-bucket-location

    The region where the bucket resides.

    -

    Type: string

    +

    String

    +

    Explanation:

    +

    The region where the bucket resides.

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    None

    +

    Default value:

    +

    None

    x-obs-storage-class

    +

    x-obs-storage-class

    Default storage class of the bucket. The options are as follows: STANDARD (Standard), WARM (Warm), COLD (Cold).

    -

    Type: string

    +

    String

    +

    Explanation:

    +

    Default storage class of the bucket.

    +

    Restrictions:

    +

    None

    +

    Value range:

    +
    • STANDARD (Standard storage)
    • WARM (Warm storage)
    • COLD(Cold storage)
    +

    Default value:

    +

    None

    x-obs-version

    +

    x-obs-version

    OBS version of the bucket.

    -

    Type: string

    +

    String

    +

    Explanation:

    +

    OBS version of the bucket.

    +

    Restrictions:

    +

    None

    +

    Value range:

    +
    • 3.0: bucket of the latest version
    • --: bucket of an earlier version
    +

    Default value:

    +

    None

    x-obs-fs-file-interface

    +

    x-obs-fs-file-interface

    Indicates whether the bucket is a parallel file system. The value can be Enabled (parallel file system).

    -

    If this header field is not carried, the bucket is not a parallel file system.

    -

    Type: string

    +

    String

    +

    Explanation:

    +

    Whether it is a parallel file system

    +

    Restrictions:

    +

    If this header field is not carried, the bucket is not a parallel file system.

    +

    Value range:

    +

    The value can be Enabled (parallel file system).

    +

    Default value:

    +

    None

    Access-Control-Allow-Origin

    +

    Access-Control-Allow-Origin

    Indicates that the origin is included in the response if the origin in the request meets the CORS configuration requirements when CORS is configured for buckets.

    -

    Type: string

    +

    String

    +

    Explanation:

    +

    Indicates that the origin is included in the response if the origin in the request meets the CORS configuration requirements when CORS is configured for buckets.

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    The value that complies with the CORS

    +

    Default value:

    +

    None

    Access-Control-Allow-Headers

    +

    Access-Control-Allow-Headers

    Indicates that the headers are included in the response if headers in the request meet the CORS configuration requirements when CORS is configured for buckets.

    -

    Type: string

    +

    String

    +

    Explanation:

    +

    Indicates that the headers are included in the response if headers in the request meet the CORS configuration requirements when CORS is configured for buckets.

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    The value that complies with the CORS

    +

    Default value:

    +

    None

    Access-Control-Max-Age

    +

    Access-Control-Max-Age

    Value of MaxAgeSeconds in the CORS configuration of the server when CORS is configured for buckets.

    -

    Type: integer

    +

    Integer

    +

    Explanation:

    +

    Value of MaxAgeSeconds in the CORS configuration of the server when CORS is configured for buckets.

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    An integer greater than or equal to 0, in seconds

    +

    Default value:

    +

    3000

    Access-Control-Allow-Methods

    +

    Access-Control-Allow-Methods

    Indicates that methods in the rule are included in the response if Access-Control-Request-Method in the request meets the CORS configuration requirements when CORS is configured for buckets.

    -

    Type: string

    -

    Value options: GET, PUT, HEAD, POST, DELETE

    +

    String

    +

    Explanation:

    +

    Indicates that methods in the rule are included in the response if Access-Control-Request-Method in the request meets the CORS configuration requirements when CORS is configured for buckets.

    +

    Restrictions:

    +

    None

    +

    Value range:

    +
    • GET
    • PUT
    • HEAD
    • POST
    • DELETE
    +

    Default value:

    +

    None

    Access-Control-Expose-Headers

    +

    Access-Control-Expose-Headers

    Value of ExposeHeader in the CORS configuration of a server when CORS is configured for buckets.

    -

    Type: string

    +

    String

    +

    Explanation:

    +

    ExposeHeader in the CORS rules of the bucket. It specifies additional headers allowed in the response by a CORS rule, which are used to provide extra information to clients. By default, a browser can access only headers Content-Length and Content-Type. If the browser needs to access other headers, you need to configure them in this parameter.

    +

    Restrictions:

    +

    Spaces, wildcard characters (*), ampersands (&), colons (:), less-than signs (<), and full-width characters are not allowed.

    +

    Value range:

    +

    None

    +

    Default value:

    +

    None

    -

    Sample Response: Getting CORS Configuration (with No Headers Specified)

     1
    @@ -166,7 +253,6 @@ x-obs-bucket-location: region
     x-obs-version: 3.0
     Content-Length: 0
     
    -

    Sample Request: Getting Bucket Metadata and CORS Configuration

    1
    @@ -185,7 +271,6 @@ Authorization: OBS H4IPJX0TQTHTHEB
     Origin:www.example.com
     Access-Control-Request-Headers:AllowedHeader_1
     
    -

    Sample Response: Getting Bucket Metadata and CORS Configuration

     1
    @@ -218,7 +303,6 @@ Access-Control-Expose-Headers: ExposeHeader_1 3.0
     Content-Length: 0
     
    -
    diff --git a/docs/obs/api-ref/obs_04_0024.html b/docs/obs/api-ref/obs_04_0024.html index 9a60d9a2..8582b733 100644 --- a/docs/obs/api-ref/obs_04_0024.html +++ b/docs/obs/api-ref/obs_04_0024.html @@ -11,7 +11,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization
    -

    Request Parameters

    This request contains no parameters.

    @@ -34,7 +33,6 @@ Content-Length: length <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Location xmlns="http://obs.region.example.com/doc/2015-06-30/">region</Location>
    -

    Response Headers

    The response to the request uses common headers. For details, see Table 1.

    @@ -71,7 +69,6 @@ Accept: */* Date: WED, 01 Jul 2015 02:30:25 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:1DrmbCV+lhz3zV7uywlj7lrh0MY=
    -

    Sample Response

     1
    @@ -94,7 +91,6 @@ Content-Length: 128
     <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
     <Location xmlns="http://obs.region.example.com/doc/2015-06-30/">region</Location>
     
    -
    diff --git a/docs/obs/api-ref/obs_04_0025.html b/docs/obs/api-ref/obs_04_0025.html index ea40dd36..a0ab6f80 100644 --- a/docs/obs/api-ref/obs_04_0025.html +++ b/docs/obs/api-ref/obs_04_0025.html @@ -13,7 +13,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization
    -

    Request Parameters

    This request contains no parameters.

    @@ -26,7 +25,6 @@ Authorization: authorization 2
    HTTP/1.1 status_code
     Date: date
     
    -

    Response Headers

    The response to the request uses common headers. For details, see Table 1.

    @@ -47,7 +45,6 @@ Accept: */* Date: WED, 01 Jul 2015 02:31:25 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:jZiAT8Vx4azWEvPRMWi0X5BpJMA=
    -

    Sample Response

    1
    @@ -60,7 +57,6 @@ x-obs-request-id: BF260000016435DE6D67C35F9B969C47
     x-obs-id-2: 32AAAQAAEAABKAAQAAEAABAAAQAAEAABCTukraCnXLsb7lEw4ZKjzDWWhzXdgme3
     Date: WED, 01 Jul 2015 02:31:25 GMT
     
    -
    diff --git a/docs/obs/api-ref/obs_04_0027.html b/docs/obs/api-ref/obs_04_0027.html index 8007969c..3f6d1dc8 100644 --- a/docs/obs/api-ref/obs_04_0027.html +++ b/docs/obs/api-ref/obs_04_0027.html @@ -1,7 +1,7 @@

    Configuring a Bucket Policy

    -

    Functions

    This operation creates or modifies policies for buckets. If the specified bucket already has a policy, the policy in the request will overwrite the existing one. There is no limit on the number of bucket policies (statements) for a bucket. However, the total size of JSON descriptions of all bucket policies in a bucket cannot exceed 20 KB.

    +

    Functions

    This operation creates or modifies policies for buckets. The existing policy in a bucket is overwritten by the policy in the request. You can add as many statements as you would like to a bucket. All these statements in JSON cannot exceed 20 KB.

    To perform this operation, the user must be the bucket owner or the bucket owner's IAM user that has permissions required for configuring bucket policies.

    Request Syntax

    1
    @@ -14,7 +14,6 @@ Date: date
     Authorization: signatureValue
     Policy written in JSON
     
    -

    Request Parameters

    This request contains no message parameters.

    @@ -29,7 +28,6 @@ Policy written in Date: date Content-Length: length
    -

    Response Headers

    The response to the request uses common headers. For details, see Table 1.

    @@ -40,7 +38,7 @@ Content-Length: length

    Sample Request 1

    Grant permissions to an OBS tenant.

    Grant permissions to the tenant whose ID is 783fc6652cf246c096ea836694f71855.

    -

    For details about how to obtain the tenant ID, see Obtaining a Domain ID and a User ID.

    +

    For details about how to obtain the tenant ID, see Obtaining a Domain ID and a User ID.

     1
      2
      3
    @@ -85,7 +83,6 @@ Authorization: OBS H4IPJX0TQTHTHEB
         ]
     }
     
    -

    Sample Response 1

    1
    @@ -100,12 +97,11 @@ Date: WED, 01  0
     Server: OBS
     
    -

    Sample Request 2

    Grant permissions to an OBS user.

    The user ID is 71f3901173514e6988115ea2c26d1999, and the account ID is 783fc6652cf246c096ea836694f71855.

    -

    For details about how to obtain the account ID and user ID, see Obtaining a Domain ID and a User ID.

    +

    For details about how to obtain the account ID and user ID, see Obtaining a Domain ID and a User ID.

     1
      2
      3
    @@ -150,7 +146,6 @@ Authorization: OBS H4IPJX0TQTHTHEB
         ]
     }
     
    -

    Sample Response 2

    1
    @@ -165,12 +160,11 @@ Date: WED, 01  0
     Server: OBS
     
    -

    Sample Request 3

    Deny all users except the specified one all the operation permissions.

    The user ID is 71f3901173514e6988115ea2c26d1999, and the account ID is 783fc6652cf246c096ea836694f71855.

    -

    For details about how to obtain the account ID and user ID, see Obtaining a Domain ID and a User ID.

    +

    For details about how to obtain the account ID and user ID, see Obtaining a Domain ID and a User ID.

     1
      2
      3
    @@ -217,7 +211,6 @@ Authorization: OBS H4IPJX0TQTHTHEB
          ]
     }
     
    -

    Sample Response 3

    1
    @@ -232,7 +225,6 @@ Date: WED, 01  0
     Server: OBS
     
    -

    Sample Request 4

    Request to allow only the specified domain name and external link requests that have no referer headers by using the URL validation whitelist.

    @@ -289,7 +281,6 @@ Authorization: OBS H4IPJX0TQTHTHEB }] }
    -

    Sample Response 4

    1
    @@ -304,7 +295,6 @@ Date: WED, 01  0
     Server: OBS
     
    -
    diff --git a/docs/obs/api-ref/obs_04_0028.html b/docs/obs/api-ref/obs_04_0028.html index df6faf9e..ef3b329d 100644 --- a/docs/obs/api-ref/obs_04_0028.html +++ b/docs/obs/api-ref/obs_04_0028.html @@ -14,7 +14,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization
    -

    Request Parameters

    This request contains no message parameters.

    @@ -31,7 +30,6 @@ Content-Type: application/xml Date: date Policy Content
    -

    Response Headers

    The response to the request uses common headers. For details, see Table 1.

    @@ -48,7 +46,6 @@ Host: examplebucket.obs.region.example.com Date: WED, 01 Jul 2015 02:35:46 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:jZiAT8Vx4azWEvPRMWi0X5BpJMA=
    -

    Sample Response

     1
    @@ -105,7 +102,6 @@ Server: OBS
         ]
     }
     
    -
    diff --git a/docs/obs/api-ref/obs_04_0029.html b/docs/obs/api-ref/obs_04_0029.html index 1c5b1277..e8d3bfcd 100644 --- a/docs/obs/api-ref/obs_04_0029.html +++ b/docs/obs/api-ref/obs_04_0029.html @@ -13,7 +13,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization
    -

    Request Parameters

    This request contains no message parameters.

    @@ -30,7 +29,6 @@ Date: date Content-Type: text/xml Content-Length: length
    -

    Response Headers

    The response to the request uses common headers. For details, see Table 1.

    @@ -47,7 +45,6 @@ Host: examplebucket.obs.region.example.com Date: WED, 01 Jul 2015 02:36:06 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:jZiAT8Vx4azWEvPRMWi0X5BpJMA=
    -

    Sample Response

    1
    @@ -60,7 +57,6 @@ x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSB4oWmNX3gVG
     Date: WED, 01 Jul 2015 02:36:06 GMT 
     Server: OBS
     
    -
    diff --git a/docs/obs/api-ref/obs_04_0030.html b/docs/obs/api-ref/obs_04_0030.html index 8b55b5c8..3d740e28 100644 --- a/docs/obs/api-ref/obs_04_0030.html +++ b/docs/obs/api-ref/obs_04_0030.html @@ -46,28 +46,37 @@ Content-Length: length </AccessControlList> </AccessControlPolicy>
    -

    Request Parameters

    This request contains no parameters.

    Request Headers

    You can change the ACL of a bucket by using the header settings. Each ACL configured with the header setting has a set of predefined grantees and authorized permissions. If you want to authorize access permissions by adding the header to a request, you must add the following header and specify the value.

    -
    Table 1 Optional header for specifying canned ACLs

    Name

    +
    - - + - - - + @@ -76,79 +85,142 @@ Content-Length: length

    Request Elements

    This request carries ACL information in elements to specify an ACL. Table 3 describes the elements.

    -
    Table 1 Optional header for specifying canned ACLs

    Header

    Description

    +

    Type

    Mandatory

    +

    Mandatory (Yes/No)

    +

    Description

    x-obs-acl

    +

    x-obs-acl

    Uses the canned ACL for a bucket.

    -

    Value options: private, public-read, public-read-write, public-read-delivered, public-read-write-delivered

    -

    Type: string

    +

    String

    No

    +

    No

    +

    Explanation:

    +

    Uses the canned ACL for a bucket.

    +

    Restrictions:

    +

    None

    +

    Value range:

    +
    • private
    • public-read
    • public-read-write
    • public-read-delivered
    • public-read-write-delivered
    +

    .

    +

    Default value:

    +

    private

    Table 2 Additional request elements

    Element

    +
    - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + @@ -161,7 +233,6 @@ Content-Length: length Date: date Content-Length: length
    Table 2 Additional request elements

    Element

    Description

    +

    Type

    Mandatory

    +

    Mandatory (Yes/No)

    +

    Description

    Owner

    +

    Owner

    Bucket owner information, including the ID

    -

    Type: XML

    +

    XML

    Yes

    +

    Yes

    +

    Explanation:

    +

    Bucket owner information, including the ID

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    None

    +

    Default value:

    +

    None

    ID

    +

    ID

    Account ID of the authorized user

    -

    Type: string

    +

    String

    Yes

    +

    Yes

    +

    Explanation:

    +

    Tenant ID of the grantee.

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    None

    +

    Default value:

    +

    None

    Grant

    +

    Grant

    Container for the grantee and the granted permissions A single bucket ACL can contain no more than 100 grants.

    -

    Type: XML

    +

    XML

    No

    +

    No

    +

    Explanation:

    +

    Container for the grantee and the granted permissions

    +

    Restrictions:

    +

    A single bucket can contain at most 100 grants in its ACL.

    +

    Value range:

    +

    None

    +

    Default value:

    +

    None

    Grantee

    +

    Grantee

    Grantee information

    -

    Type: XML

    +

    XML

    No

    +

    No

    +

    Explanation:

    +

    Grantee information

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    None

    +

    Default value:

    +

    None

    Canned

    +

    Canned

    Grants permissions to all users.

    -

    Value range: Everyone

    -

    Type: string

    +

    String

    No

    +

    No

    +

    Explanation:

    +

    Grants permissions to all users.

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    Everyone

    +

    Default value:

    +

    None

    Delivered

    +

    Delivered

    Indicates whether the bucket ACL is applied to all objects in the bucket.

    -

    Type: boolean

    -

    Default value: false

    +

    Boolean

    No

    +

    No

    +

    Explanation:

    +

    Whether the bucket ACL is applied to all objects in the bucket.

    +

    Restrictions:

    +

    None

    +

    Value range:

    +
    • true: The bucket ACL is applied to all objects in the bucket.
    • false: The bucket ACL is not applied to any objects in the bucket.
    +

    Default value:

    +

    false

    Permission

    +

    Permission

    Permissions to be granted.

    -

    Value options: READ, READ_ACP, WRITE, WRITE_ACP, FULL_CONTROL

    -

    Type: string

    +

    String

    No

    +

    Yes

    +

    Explanation:

    +

    Permissions to be granted.

    +

    Restrictions:

    +

    None

    +

    Value range:

    +
    • READ
    • READ_ACP
    • WRITE
    • WRITE_ACP
    • FULL_CONTROL
    +

    Default value:

    +

    None

    AccessControlList

    +

    AccessControlList

    Indicates an ACL, which consists of three elements: Grant, Grantee, and Permission.

    -

    Type: XML

    +

    XML

    Yes

    +

    Yes

    +

    Explanation:

    +

    Indicates an ACL, which consists of three elements: Grant, Grantee, and Permission.

    +

    Restrictions:

    +

    None

    +

    Value range:

    +

    None

    +

    Default value:

    +

    None

    -

    Response Headers

    The response to the request uses common headers. For details, see Table 1.

    @@ -238,7 +309,6 @@ Content-Length: 727 </AccessControlList> </AccessControlPolicy>
    -

    Sample Response

    1
    @@ -253,7 +323,6 @@ x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCT78HTIBuhe0F
     Date: WED, 01 Jul 2015 02:37:22 GMT
     Content-Length: 0
     
    -
    diff --git a/docs/obs/api-ref/obs_04_0031.html b/docs/obs/api-ref/obs_04_0031.html index 525b48f4..5ba45659 100644 --- a/docs/obs/api-ref/obs_04_0031.html +++ b/docs/obs/api-ref/obs_04_0031.html @@ -11,7 +11,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization
    -

Request Parameters

This request contains no message parameters.

@@ -60,7 +59,6 @@ Content-Type: application/xml </AccessControlList> </AccessControlPolicy>
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -139,7 +137,6 @@ Accept: */* Date: WED, 01 Jul 2015 02:39:28 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:X7HtzGsIEkzJbd8vo1DRu30vVrs=
-

Sample Response

 1
@@ -212,7 +209,6 @@ Content-Length: 784
   </AccessControlList> 
 </AccessControlPolicy>
 
-
diff --git a/docs/obs/api-ref/obs_04_0032.html b/docs/obs/api-ref/obs_04_0032.html index c535c6b9..bb1f0672 100644 --- a/docs/obs/api-ref/obs_04_0032.html +++ b/docs/obs/api-ref/obs_04_0032.html @@ -63,7 +63,6 @@ Authorization: signatureValue </LoggingEnabled> </BucketLoggingStatus> -

Request Parameters

This request contains no message parameters.

@@ -92,7 +91,7 @@ Authorization: signatureValue

Name of the IAM agency created by the owner of the target bucket on IAM.

Type: string

-

You must set this parameter when enabling the logging function. Do not set this parameter when disabling the logging function.

+

Yes only when you need to enable the logging function

LoggingEnabled

@@ -100,7 +99,7 @@ Authorization: signatureValue

Container for logging information. Present this element when enabling the logging function. Otherwise, absent it. You can add specific logging information in this element.

Type: container

-

You must set this parameter when enabling the logging function. Do not set this parameter when disabling the logging function.

+

Yes only when you need to enable the logging function

Grant

@@ -141,7 +140,7 @@ Authorization: signatureValue

When enabling the logging function, the owner of the bucket being logged can specify a target bucket to store the generated log files. Ensure that the bucket owner who configures the logging function has the FULL_CONTROL permission for the bucket that stores log files. Log files generated for multiple buckets can be stored in the same target bucket. If you do so, you need to specify different TargetPrefixes to classify logs for different buckets.

Type: string

-

You must set this parameter when enabling the logging function. Do not set this parameter when disabling the logging function.

+

Yes only when you need to enable the logging function

TargetPrefix

@@ -149,7 +148,7 @@ Authorization: signatureValue

You can specify a prefix using this element so that log files are named with this prefix.

Type: string

-

You must set this parameter when enabling the logging function. Do not set this parameter when disabling the logging function.

+

Yes only when you need to enable the logging function

TargetGrants

@@ -166,20 +165,17 @@ Authorization: signatureValue

Naming rules for access logs

1
<TargetPrefix>YYYY-mm-DD-HH-MM-SS-<UniqueString>
 
-
  • <TargetPrefix> is the log name prefix specified by the user.
  • YYYY-mm-DD-HH-MM-SS indicates the date and time when the log is generated.
  • <UniqueString> indicates a character string generated by OBS.

The following is an example of a log file name:

1
bucket-log2015-06-29-12-22-07-N7MXLAF1BDG7MPDV
 
-
  • bucket-log is the target prefix specified by the user.
  • 2015-06-29-12-22-07 indicates the time when the log is generated.
  • N7MXLAF1BDG7MPDV is a string automatically generated by OBS

Format of bucket access logs

The following shows an access log delivered to the target bucket:

1
787f2f92b20943998a4fe2ab75eb09b8 bucket [13/Aug/2015:01:43:42 +0000] xx.xx.xx.xx 787f2f92b20943998a4fe2ab75eb09b8 281599BACAD9376ECE141B842B94535B  REST.GET.BUCKET.LOCATION - "GET /bucket?location HTTP/1.1" 200 - 211 - 6 6 "-"  "HttpClient" - - 
 
-

Each access log contains the following information:

@@ -327,16 +323,16 @@ Authorization: signatureValue

Federated authentication and agency information

-

StorageClass

+

StorageClass

-

STANDARD_IA

+

STANDARD_IA

Current object storage class

-

TargetStorageClass

+

TargetStorageClass

-

GLACIER

+

GLACIER

Storage class that the object will be transitioned to

@@ -358,7 +354,6 @@ Authorization: signatureValue Date: date Content-Length: length
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -415,7 +410,6 @@ Content-Length: 528 </LoggingEnabled> </BucketLoggingStatus>
-

Sample Response

1
@@ -430,7 +424,6 @@ x-obs-id-2: 32AAAQAAEAABSAAkpAIAABAAAQAAEAABCT9CjuOx8cETS
 Date: WED, 01 Jul 2015 02:40:06 GMT
 Content-Length: 0
 
-
diff --git a/docs/obs/api-ref/obs_04_0033.html b/docs/obs/api-ref/obs_04_0033.html index 5a86919f..49283726 100644 --- a/docs/obs/api-ref/obs_04_0033.html +++ b/docs/obs/api-ref/obs_04_0033.html @@ -12,7 +12,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization -

Request Parameters

This request contains no message parameters.

@@ -63,7 +62,6 @@ Content-Length: length </LoggingEnabled> </BucketLoggingStatus>
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -155,7 +153,6 @@ Accept: */* Date: WED, 01 Jul 2015 02:42:46 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:hUk+jTnR07hcKwJh4ousF2E1U3E=
-

Sample Response

 1
@@ -206,7 +203,6 @@ Content-Length: 429
   </LoggingEnabled>
 </BucketLoggingStatus>
 
-
diff --git a/docs/obs/api-ref/obs_04_0034.html b/docs/obs/api-ref/obs_04_0034.html index 10006555..0db6e27d 100644 --- a/docs/obs/api-ref/obs_04_0034.html +++ b/docs/obs/api-ref/obs_04_0034.html @@ -2,7 +2,7 @@

Configuring Bucket Lifecycle Rules

Functions

This operation configures lifecycle rules that can delete or migrate objects from a bucket at a specified time. Typical application scenarios:

-
  • Delete periodically uploaded files. Some files uploaded periodically need only to be retained for only one week or one month.
  • Delete files that are frequently accessed within a certain period of time but are seldom accessed afterward. You can archive these files and then schedule the time for deletion.
  • The minimum time for the transition of the bucket storage to Warm or to Cold can be configured. The value ranges from 24 to 8640.
+
  • Delete periodically uploaded files. Some files uploaded periodically need only to be retained for only one week or one month.
  • Delete files that are frequently accessed within a certain period of time but are seldom accessed afterward. You can archive these files and then schedule the time for deletion.
  • The minimum time for the transition of the bucket storage to Warm or Cold can be configured. The value ranges from 24 to 8640.

You can perform this operation to create or update the lifecycle configuration of a bucket.

  • Expired objects deleted based on a lifecycle rule cannot be recovered.
@@ -89,7 +89,6 @@ Content-MD5: MD5 </Rule> </LifecycleConfiguration>
-

Request Parameters

This request contains no parameters.

@@ -118,7 +117,7 @@ Content-MD5: MD5

Request Elements

In this request body, you need to specify the lifecycle configuration in XML format. Table 2 describes the specific configuration elements.

-
  • If the versioning of a bucket is enabled or suspended, you can set NoncurrentVersionTransition or NoncurrentVersionExpiration to control the lifecycle of historical object versions. The lifecycle of a historical version depends on the time when it becomes a historical one (time when the version is replaced by a new version) and the value of NoncurrentDays. For object deletion, if NoncurrentDays is set to 1, an object version will be deleted only after it becomes a historical one for one day. If the version V1 of object A is created on the first date of a month and new version V2 is uploaded on the fifth date of the month, V1 becomes a historical version. At 00:00 on the seventh date of the month, V1 will expire. If an object version does not meet the deletion conditions, but NoncurrentDays is set to 1 and StorageClass is set to WARM, the version transitions to the Warm storage class one day after it has become a historical version. For example, the V1 version of object A is created on the first day of a month, and its new version V2 is uploaded on the fifth day of the month. Then V1 becomes a historical version. One day later, that is, at 0 o'clock of the seventh day, V1 transitions to the Warm storage class. The deletion or transition of the object after the expiration time may be delayed. The delay is within 48 hours.
  • Objects are processed according to the following procedures, if their latest versions meet the expiration rule and versioning is enabled or suspended for the bucket.
    • Versioning enabled:

      If the latest object version is not a delete marker, a new delete marker will be inserted for the object.

      +
      • If the versioning of a bucket is enabled or suspended, you can set NoncurrentVersionTransition or NoncurrentVersionExpiration to control the lifecycle of historical object versions. The lifecycle of a historical version depends on the time when it becomes a historical one (time when the version is replaced by a new version) and the value of NoncurrentDays. If NoncurrentDays is set to 1 in an object deletion scenario, an object version will be deleted one day after it becomes historical. If the version V1 of object A is created on the first date of a month and new version V2 is uploaded on the fifth date of the month, V1 becomes a historical version. At 00:00 on the seventh date of the month, V1 will expire. If an object version does not meet the deletion conditions, but NoncurrentDays is set to 1 and StorageClass is set to WARM, the version transitions to the Warm storage class one day after it has become a historical version. For example, the V1 version of object A is created on the first day of a month, and its new version V2 is uploaded on the fifth day of the month. Then V1 becomes a historical version. One day later, that is, at 0 o'clock of the seventh day, V1 transitions to the Warm storage class. The deletion or transition of the object after the expiration time may be delayed. The delay is within 48 hours.
      • Objects are processed according to the following procedures, if their latest versions meet the expiration rule and versioning is enabled or suspended for the bucket.
        • Versioning enabled:

          If the latest object version is not a delete marker, a new delete marker will be inserted for the object.

          If the latest object version is a delete marker and is the only version of the object, this latest version will be deleted.

          If the object of the latest version has the DeleteMarker and the object has other versions, all versions of the object remain unchanged.

        • Versioning suspended:

          If the latest version of the object does not have the DeleteMarker and is not the null version, the object generates a new DeleteMarker for the null version.

          @@ -220,7 +219,7 @@ Content-MD5: MD5

          Child: NoncurrentDays, StorageClass

          Parent: Rule

          -

          Required if the Transition, Expiration, AbortIncompleteMultipartUpload, or NoncurrentVersionExpiration element is absent.

          +

          Required if the Transition, Expiration, AbortIncompleteMultipartUpload, or NoncurrentVersionExpiration element is absent.

          NoncurrentVersionExpiration

          @@ -239,6 +238,8 @@ Content-MD5: MD5

          Type: XML

          Child: DaysAfterInitiation

          Parent: Rule

          +
          NOTE:

          AbortIncompleteMultipartUpload does not support filtering by tag.

          +

          Required if the Transition, Expiration, NoncurrentVersionExpiration, or NoncurrentVersionTransition element is absent.

          @@ -292,7 +293,6 @@ Content-MD5: MD5 Date: date Content-Length: length
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -385,7 +385,6 @@ Content-Length: 919 </Rule> </LifecycleConfiguration>
-

Sample Response

1
@@ -400,7 +399,6 @@ x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSvK6z8HV6nrJ
 Date: WED, 01 Jul 2015 03:05:34 GMT
 Content-Length: 0
 
-
diff --git a/docs/obs/api-ref/obs_04_0035.html b/docs/obs/api-ref/obs_04_0035.html index e03fd839..8e817d72 100644 --- a/docs/obs/api-ref/obs_04_0035.html +++ b/docs/obs/api-ref/obs_04_0035.html @@ -12,7 +12,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization -

Request Parameters

This request contains no message parameters.

@@ -99,7 +98,6 @@ Content-Length: length </Rule> </LifecycleConfiguration>
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -263,7 +261,6 @@ Accept: */* Date: WED, 01 Jul 2015 03:06:56 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:/Nof9FCNANfzIXDS0NDp1IfDu8I=
-

Sample Response

 1
@@ -346,7 +343,6 @@ Content-Length: 919
   </Rule>
 </LifecycleConfiguration>
 
-
diff --git a/docs/obs/api-ref/obs_04_0036.html b/docs/obs/api-ref/obs_04_0036.html index ae8d20d1..f118c4da 100644 --- a/docs/obs/api-ref/obs_04_0036.html +++ b/docs/obs/api-ref/obs_04_0036.html @@ -12,7 +12,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: Authorization -

Request Parameters

This request contains no message parameters.

@@ -29,7 +28,6 @@ Date: date Content-Type: text/xml Date: date
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -50,7 +48,6 @@ Accept: */* Date: WED, 01 Jul 2015 03:12:22 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:5DGAS7SBbMC1YTC4tNXY57Zl2Fo=
-

Sample Response

1
@@ -63,7 +60,6 @@ x-obs-request-id: BF260000016436C2550A1EEA97614A98
 x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSB7A0KZEBOCutgcfZvaGVthTGOJSuyk
 Date: WED, 01 Jul 2015 03:12:22 GMT
 
-
diff --git a/docs/obs/api-ref/obs_04_0037.html b/docs/obs/api-ref/obs_04_0037.html index 41cfed56..0e88cd24 100644 --- a/docs/obs/api-ref/obs_04_0037.html +++ b/docs/obs/api-ref/obs_04_0037.html @@ -29,7 +29,6 @@ Content-Length: length <Status>status</Status> </VersioningConfiguration> -

Request Parameters

This request contains no parameters.

@@ -76,7 +75,6 @@ Date: date Content-Length: length
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -107,7 +105,6 @@ Content-Length: 89 <Status>Enabled</Status> </VersioningConfiguration>
-

Sample Response

1
@@ -122,7 +119,6 @@ x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSH6rPRHjQCa6
 Date: Date: WED, 01 Jul 2015 03:14:18 GMT
 Content-Length: 0
 
-
diff --git a/docs/obs/api-ref/obs_04_0038.html b/docs/obs/api-ref/obs_04_0038.html index 8b36dcd5..cfcf1adc 100644 --- a/docs/obs/api-ref/obs_04_0038.html +++ b/docs/obs/api-ref/obs_04_0038.html @@ -12,7 +12,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization -

Request Parameters

This request contains no message parameters.

@@ -37,7 +36,6 @@ Content-Length: length <Status>status</Status> </VersioningConfiguration>
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -81,7 +79,6 @@ Accept: */* Date: WED, 01 Jul 2015 03:15:20 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:4N5qQIoluLO9xMY0m+8lIn/UWXM=
-

Sample Response

 1
@@ -108,7 +105,6 @@ Content-Length: 180
   <Status>Enabled</Status>
 </VersioningConfiguration>
 
-
diff --git a/docs/obs/api-ref/obs_04_0039.html b/docs/obs/api-ref/obs_04_0039.html index f323dc32..20e48119 100644 --- a/docs/obs/api-ref/obs_04_0039.html +++ b/docs/obs/api-ref/obs_04_0039.html @@ -7,7 +7,6 @@ 2
<NotificationConfiguration>
 </NotificationConfiguration> 
 
-

After receiving a request for configuring event notification, OBS verifies whether the specified SMN topic exists and whether the topic is authorized to OBS. If the topic exists and is authorized to OBS, OBS sends a test notification to the topic subscriber.

To perform this operation, you must have the PutBucketNotification permission. By default, the permission is granted to the bucket owner only. However, it can be granted to other users by configuring the bucket policy.

@@ -66,7 +65,6 @@ Authorization: authorization strin ... </NotificationConfiguration> -

Request Parameters

This request contains no message parameters.

@@ -85,7 +83,7 @@ Authorization: authorization strin

NotificationConfiguration

-

Root element for configuring the event notification function of a bucket. If the sub element is null, the function is disabled.

+

Root element for configuring the event notification function of a bucket. If the sub-element is null, the function is disabled.

Type: container

Parent: none

Child: zero or multiple TopicConfiguration elements

@@ -111,12 +109,10 @@ Authorization: authorization strin

Template:

1
<Topic>urn:smn:region:project_id:smn_topic</Topic>
 
-

Example:

1
<Topic>urn:smn:exampleRegion:d745b885f14941369b2d2138e7a65bef:obs_test</Topic>
 
-

Required if TopicConfiguration is added

@@ -135,7 +131,7 @@ Authorization: authorization strin

Element used to store rules of filtering object names.

Type: container

-

Parent: TopicConfiguration

+

Parent: TopicConfiguration

Child: Object

No

@@ -195,8 +191,7 @@ Authorization: authorization strin
  • ObjectRemoved:Delete
  • ObjectRemoved:DeleteMarkerCreated

Or use wildcard characters to support all delete operations:

  • ObjectRemoved:*
-

-

Parent: TopicConfiguration

+

Parent: TopicConfiguration

Required if TopicConfiguration is added

@@ -213,7 +208,6 @@ Date: date Content-Length: length Content-Type: type
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -303,7 +297,6 @@ Content-Length: 538 </TopicConfiguration> </NotificationConfiguration>
-

Sample Response

1
@@ -318,7 +311,6 @@ x-obs-id-2: 32AAAQAAEAABSAAkgAIAABAAAQAAEAABCTFAxJPTib3Gk
 Date: WED, 01 Jul 2015 03:15:46 GMT
 Content-Length: 0
 
-
diff --git a/docs/obs/api-ref/obs_04_0040.html b/docs/obs/api-ref/obs_04_0040.html index e8cfcc16..e8c64502 100644 --- a/docs/obs/api-ref/obs_04_0040.html +++ b/docs/obs/api-ref/obs_04_0040.html @@ -12,7 +12,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization -

Request Parameters

This request contains no message parameters.

@@ -75,7 +74,6 @@ Content-Length: length </TopicConfiguration> </NotificationConfiguration>
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -115,14 +113,14 @@ Content-Length: length

Unique ID of each event notification. If the ID is not specified, OBS automatically assigns an ID.

Type: string

-

Parent: TopicConfiguration

+

Parent: TopicConfiguration

Filter

Element used to store rules of filtering object names.

Type: container

-

Parent: TopicConfiguration

+

Parent: TopicConfiguration

Child: Object

@@ -130,7 +128,7 @@ Content-Length: length

Element used to store rules of filtering object names.

Type: container

-

Parent: TopicConfiguration

+

Parent: TopicConfiguration

FilterRule

@@ -171,8 +169,7 @@ Content-Length: length
  • ObjectRemoved:Delete
  • ObjectRemoved:DeleteMarkerCreated

Or use wildcard characters to support all delete operations:

  • ObjectRemoved:*
-

-

Parent: TopicConfiguration

+

Parent: TopicConfiguration

@@ -193,7 +190,6 @@ Accept: */* Date: WED, 01 Jul 2015 03:16:32 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:r5+2zwPTKwupMg6lkeTUUqPcHfQ=
-

Sample Response

 1
@@ -252,7 +248,6 @@ Content-Length: 490
   </TopicConfiguration>
 </NotificationConfiguration>
 
-
diff --git a/docs/obs/api-ref/obs_04_0044.html b/docs/obs/api-ref/obs_04_0044.html index e29fbe85..63f8cb64 100644 --- a/docs/obs/api-ref/obs_04_0044.html +++ b/docs/obs/api-ref/obs_04_0044.html @@ -24,7 +24,6 @@ Authorization: authorization <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <StorageClass xmlns="http://obs.example.com/doc/2015-06-30/">STANDARD</StorageClass> -

Request Parameters

This request contains no parameters.

@@ -46,7 +45,7 @@ Authorization: authorization

Specifies the default storage class for a bucket.

Type: string

Value options: STANDARD, WARM, COLD

-

The available storage classes are as follows: Standard (STANDARD), Warm (WARM), Cold (COLD).

+

The storage class options are as follows: STANDARD (Standard), WARM (Warm), COLD (Cold).

Yes

@@ -59,7 +58,6 @@ Authorization: authorization 2
HTTP/1.1 status_code
 Date: date 
 
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -86,7 +84,6 @@ Content-Length: 87 <StorageClass xmlns="http://obs.example.com/doc/2015-06-30/">STANDARD</StorageClass>
-

Sample Response

1
@@ -101,7 +98,6 @@ x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSIsw3tPtUn6d
 Date: WED, 01 Jul 2015 03:18:19 GMT
 Content-Length: 0
 
-
diff --git a/docs/obs/api-ref/obs_04_0045.html b/docs/obs/api-ref/obs_04_0045.html index 39b66925..5eda5282 100644 --- a/docs/obs/api-ref/obs_04_0045.html +++ b/docs/obs/api-ref/obs_04_0045.html @@ -12,7 +12,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization -

Request Parameters

This request contains no message parameters.

@@ -37,7 +36,6 @@ Content-Length: length <StorageClass xmlns="http://obs.example.com/doc/2015-06-30/">STANDARD</StorageClass>
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -74,7 +72,6 @@ Accept: */* Date: WED, 01 Jul 2015 03:20:28 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:0zVTSdKG6OFCIH2dKvmsVGYCQyw=
-

Sample Response

 1
@@ -99,7 +96,6 @@ Content-Length: 142
 
 <StorageClass xmlns="http://obs.example.com/doc/2015-06-30/">STANDARD</StorageClass>
 
-
diff --git a/docs/obs/api-ref/obs_04_0046.html b/docs/obs/api-ref/obs_04_0046.html index 33ed8225..1f84ca05 100644 --- a/docs/obs/api-ref/obs_04_0046.html +++ b/docs/obs/api-ref/obs_04_0046.html @@ -50,7 +50,6 @@ Content-Length: contentlength </Rule> </ReplicationConfiguration> -

Request Parameters

This request contains no message parameters.

@@ -67,7 +66,7 @@ Content-Length: contentlength

Content-MD5

-

Base64-encoded 128-bit MD5 digest of the message according to RFC 1864.

+

Base64-encoded 128-bit MD5 digest of the message calculated based on RFC 1864. For details about how to calculate the value of Content-MD5, see Content-MD5 Algorithm in Java.

Yes

@@ -138,7 +137,7 @@ Content-Length: contentlength

Prefix

Prefix of an object key name, applicable to one or more objects. If the Prefix is left blank, the cross-region replication rule is applied to the whole bucket.

-

The maximum length of a prefix is 1024 characters. Duplicated prefixes are not supported.

+

The prefix should be a UTF-8-encoded character sequence of 1 to 1,024 characters. Duplicate prefixes are not supported.

Type: string

Parent: Rule

@@ -206,7 +205,6 @@ Server: OBS Date:date Content-Length: contentlength
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -261,7 +259,6 @@ Content-Length: 330 </Rule> </ReplicationConfiguration>
-

Sample Response

1
@@ -276,7 +273,6 @@ x-obs-id-2: 32AAAQAAEAABKAAQAAEAABAAAQAAEAABCStv51t2NMMx+
 Date: Wed, 27 Jun 2018 13:39:15 GMT
 Content-Length: 0
 
-
diff --git a/docs/obs/api-ref/obs_04_0047.html b/docs/obs/api-ref/obs_04_0047.html index e7a026d9..5d39a1d1 100644 --- a/docs/obs/api-ref/obs_04_0047.html +++ b/docs/obs/api-ref/obs_04_0047.html @@ -11,7 +11,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization:authorization string -

Request Parameters

This request contains no message parameters.

@@ -60,7 +59,6 @@ Content-Length: contentlength </Rule> </ReplicationConfiguration>
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -114,7 +112,7 @@ Content-Length: contentlength

Prefix

Prefix of an object key name, applicable to one or more objects. If the Prefix is left blank, the cross-region replication rule is applied to the whole bucket.

-

The maximum length of a prefix is 1,024 characters. Duplicated prefixes are not supported.

+

The prefix should be a UTF-8-encoded character sequence of 1 to 1,024 characters. Duplicate prefixes are not supported.

Type: string

Parent: Rule

@@ -199,7 +197,6 @@ Accept: */* Date: Wed, 27 Jun 2018 13:42:40 +0000 Authorization: OBS H4IPJX0TQTHTHEBQQCEC:jGHviInfRyOkT/EpySpua1hlBuY=
-

Sample Response

 1
@@ -248,7 +245,6 @@ Content-Length: 337
   <Agency>testAcy</Agency> 
 </ReplicationConfiguration>
 
-
diff --git a/docs/obs/api-ref/obs_04_0048.html b/docs/obs/api-ref/obs_04_0048.html index d92f7dd5..23fb85b9 100644 --- a/docs/obs/api-ref/obs_04_0048.html +++ b/docs/obs/api-ref/obs_04_0048.html @@ -11,7 +11,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization string -

Request Parameters

This request contains no message parameters.

@@ -28,7 +27,6 @@ Server: OBS Date: date Connection: keep-alive
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -49,7 +47,6 @@ Accept: */* Date: Wed, 27 Jun 2018 13:45:50 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:3ycNYD0CfMf0gOmmXzdGJ58KjHU=
-

Sample Response

1
@@ -62,7 +59,6 @@ x-obs-request-id: 900B000001643FE6BBCC9C9F54FA7A7E
 x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCS8Exs52zCf9duxPLnBircmGa/JOCjec
 Date: Wed, 27 Jun 2018 13:45:50 GMT
 
-
diff --git a/docs/obs/api-ref/obs_04_0049.html b/docs/obs/api-ref/obs_04_0049.html index 2727ae13..682c0563 100644 --- a/docs/obs/api-ref/obs_04_0049.html +++ b/docs/obs/api-ref/obs_04_0049.html @@ -4,8 +4,8 @@

Functions

This operation adds tags to a bucket.

After tags are added to a bucket, all service detail records (SDRs) generated by the requests for this bucket will have the same tags. You can categorize the SDRs for detailed cost analysis. For example, if a running application uploads data to a bucket, you can tag the bucket with the application name. In this manner, the costs on the application can be analyzed using tags in SDRs.

To perform this operation, you must have the PutBucketTagging permission. By default, only the bucket owner can delete the tags of a bucket. The bucket owner can allow other users to perform this operation by setting a bucket policy or granting them the permission.

-
  • A bucket can have up to 20 tags.
  • A tag key and key value can contain a maximum of 36 and 43 characters, respectively.
  • Tag keys and values cannot contain commas (,), asterisks (*), vertical bars (|), slashes (/), less-than signs (<), greater-than signs (>), equal signs (=), backslashes (\), or ASCII control character code (0x00 to 0x1F). These tag keys and values must be URL encoded before being sent to a server.
-
+
+

Restrictions

  • A bucket can have up to 20 tags.

Request Syntax

 1
  2
@@ -33,28 +33,27 @@ Content-MD5: md5
     </TagSet> 
 </Tagging>
 
-

Request Parameters

This request contains no message parameters.

Request Headers

Table 1 lists the request header.

-
Table 1 Request headers

Header

+
- - - - - @@ -63,57 +62,67 @@ Content-MD5: md5

Request Elements

In this request, you must configure bucket tags in the request body. The tag configuration is uploaded in XML format. Table 2 describes the configuration elements.

-
Table 1 Request headers

Header

Description

+

Description

Mandatory

+

Mandatory

Content-MD5

+

Content-MD5

Base64-encoded 128-bit MD5 digest of the message according to RFC 1864.

+

Base64-encoded 128-bit MD5 digest of the message according to RFC 1864.

Type: string

Example: n58IG6hfM7vqI4K0vnWpog==

Yes

+

Yes

Table 2 Bucket tag configuration elements

Header

+
- - - - - - - - - - - - - - - - - @@ -130,7 +139,6 @@ x-obs-id-2: id Content-Length: length Date: date
Table 2 Bucket tag configuration elements

Header

Description

+

Description

Mandatory

+

Mandatory

Tagging

+

Tagging

Root element for TagSet and Tag

+

Root element for TagSet and Tag

Type: container

Parent: none

Yes

+

Yes

TagSet

+

TagSet

Element of the tag set

+

Element of the tag set

Type: container

Parent: Tagging

Yes

+

Yes

Tag

+

Tag

Information element of Tag

+

Information element of Tag

Type: container

Parent: TagSet

Yes

+

Yes

Key

+

Key

Tag name

-

Type: string

-

Parent: Tag

+

Explanation:

+

Name of a tag. Type: string. Parent: Tag.

+

Restrictions:

+
  • A tag key can contain a maximum of 36 characters.
  • Tag keys and values cannot contain commas (,), asterisks (*), vertical bars (|), slashes (/), less-than signs (<), greater-than signs (>), equal signs (=), backslashes (\), or ASCII control characters (0x00 to 0x1F). Tag keys and values must be URL encoded before being sent to a server.
+

Value range:

+

A string between 0 and 36 characters long.

+

Default value:

+

None

Yes

+

Yes

Value

+

Value

Tag value

-

Type: string

-

Parent: Tag

+

Explanation:

+

Tag value. Type: string. Parent: Tag.

+

Restrictions:

+
  • A key value can contain a maximum of 43 characters.
  • Tag keys and values cannot contain commas (,), asterisks (*), vertical bars (|), slashes (/), less-than signs (<), greater-than signs (>), equal signs (=), backslashes (\), or ASCII control characters (0x00 to 0x1F). Tag keys and values must be URL encoded before being sent to a server.
+

Value range:

+

A string of 0 to 42 characters.

+

Default value:

+

None

Yes

+

Yes

-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -139,26 +147,26 @@ Date: date

Error Responses

In addition to common error codes, this API also returns other error codes. The following table lists common errors and possible causes. For details, see Table 3.

-
Table 3 Bucket tag configuration errors

Error Code

+
- - - - - - - - @@ -200,7 +208,6 @@ Content-Length: 182 </TagSet></Tagging>
Table 3 Bucket tag configuration errors

Error Code

Description

+

Description

HTTP Status Code

+

HTTP Status Code

InvalidTagError

+

InvalidTagError

An invalid tag is provided when configuring bucket tags.

+

An invalid tag is provided when configuring bucket tags.

400 Bad Request

+

400 Bad Request

MalformedXMLError

+

MalformedXMLError

An incorrect XML format is provided when configuring bucket tags.

+

An incorrect XML format is provided when configuring bucket tags.

400 Bad Request

+

400 Bad Request

-

Sample Response

1
@@ -213,7 +220,6 @@ x-obs-request-id: BF26000001643FEBA09B1ED46932CD07
 x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSEZp87iEirC6DggPB5cN49pSvHBWClg
 Date: Wed, 27 Jun 2018 13:22:50 GMT
 
-
diff --git a/docs/obs/api-ref/obs_04_0050.html b/docs/obs/api-ref/obs_04_0050.html index 6b8e25cd..3a67539b 100644 --- a/docs/obs/api-ref/obs_04_0050.html +++ b/docs/obs/api-ref/obs_04_0050.html @@ -12,7 +12,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization string
-

Request Parameters

This request contains no message parameters.

@@ -51,7 +50,6 @@ Date: date </TagSet> </Tagging>
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -136,7 +134,6 @@ Accept: */* Date: Wed, 27 Jun 2018 13:25:44 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:H1INcyc5i0XlHqYTfuzkPxLZUPM=
-

Sample Response

 1
@@ -171,7 +168,6 @@ Content-Length: 441 
   </TagSet>
 </Tagging>
 
-
diff --git a/docs/obs/api-ref/obs_04_0051.html b/docs/obs/api-ref/obs_04_0051.html index 533df16b..4d1c360f 100644 --- a/docs/obs/api-ref/obs_04_0051.html +++ b/docs/obs/api-ref/obs_04_0051.html @@ -12,7 +12,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization string -

Request Parameters

This request contains no message parameters.

@@ -31,7 +30,6 @@ x-obs-id-2: id Content-Length: length Date: date
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -52,7 +50,6 @@ Accept: */* Date: Wed, 27 Jun 2018 13:46:58 GMT Authorization: authorization string
-

Sample Response

1
@@ -65,7 +62,6 @@ x-obs-id-2: CqT+86nnOkB+Cv9KZoVgZ28pSgMF+uGQBUC68flvkQeq6
 Content-Length: 0
 Date: Wed, 27 Jun 2018 13:46:58 GMT
 
-
diff --git a/docs/obs/api-ref/obs_04_0052.html b/docs/obs/api-ref/obs_04_0052.html index cfac343e..c5b31839 100644 --- a/docs/obs/api-ref/obs_04_0052.html +++ b/docs/obs/api-ref/obs_04_0052.html @@ -25,7 +25,6 @@ Authorization: authorization <StorageQuota>value</StorageQuota> </Quota> -

Request Parameters

This request contains no parameters.

@@ -60,7 +59,6 @@ Authorization: authorization Date: date Content-Length: length
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -91,7 +89,6 @@ Content-Length: 106 <StorageQuota>10240000</StorageQuota> </Quota>
-

Sample Response

1
@@ -108,7 +105,6 @@ x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSHbmBecv7ohD
 Date: WED, 01 Jul 2015 03:24:37 GMT
 Content-Length: 0
 
-
diff --git a/docs/obs/api-ref/obs_04_0053.html b/docs/obs/api-ref/obs_04_0053.html index e77131d7..9f835176 100644 --- a/docs/obs/api-ref/obs_04_0053.html +++ b/docs/obs/api-ref/obs_04_0053.html @@ -11,7 +11,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization -

Request Parameters

This request contains no message parameters.

@@ -38,7 +37,6 @@ Content-Length: length <StorageQuota>quota</StorageQuota> </Quota>
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -81,7 +79,6 @@ Accept: */* Date: WED, 01 Jul 2015 03:27:45 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:8m4bW1gFCNeXQlfu45uO2gpo7l8=
-

Sample Response

 1
@@ -108,7 +105,6 @@ Content-Length: 150
   <StorageQuota>0</StorageQuota>
 </Quota>
 
-
diff --git a/docs/obs/api-ref/obs_04_0054.html b/docs/obs/api-ref/obs_04_0054.html index 85a52a69..ecdafa00 100644 --- a/docs/obs/api-ref/obs_04_0054.html +++ b/docs/obs/api-ref/obs_04_0054.html @@ -13,7 +13,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization -

Request Parameters

This request contains no parameters.

@@ -40,7 +39,6 @@ Content-Length: length <ObjectNumber>number</ObjectNumber> </GetBucketStorageInfoResult>
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -89,7 +87,6 @@ Accept: */* Date: WED, 01 Jul 2015 03:31:18 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:bLcdeJGYWw/eEEjMhPZx2MK5R9U=
-

Sample Response

 1
@@ -118,7 +115,6 @@ Content-Length: 206
   <ObjectNumber>24</ObjectNumber>
 </GetBucketStorageInfoResult>
 
-
diff --git a/docs/obs/api-ref/obs_04_0055.html b/docs/obs/api-ref/obs_04_0055.html index ed145e8c..ab2d4b13 100644 --- a/docs/obs/api-ref/obs_04_0055.html +++ b/docs/obs/api-ref/obs_04_0055.html @@ -15,17 +15,17 @@ "Resource": "target-bucket-name/*" } -

Request Syntax

PUT /?inventory&id=configuration-id  HTTP/1.1
+

Request Syntax

PUT /?inventory&id=configuration-id  HTTP/1.1
 User-Agent: curl/7.29.0
 Host: bucketname.obs.region.example.com
 Accept: */*
-Date: date
-Authorization: authorization string
-Content-Length: length
+Date: date
+Authorization: authorization string
+Content-Length: length
 Expect: 100-continue
 
 <InventoryConfiguration>
-   <Id>configuration-id</Id>
+   <Id>configuration-id</Id>
    <IsEnabled>true</IsEnabled>
    <Filter>
          <Prefix>inventoryTestPrefix</Prefix>
@@ -239,7 +239,6 @@ x-obs-id-2: id
 Date: date
 Content-Length: length
 
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -335,7 +334,6 @@ x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCSIGTuRtBfo7l Date: Tue, 08 Jan 2019 08:12:38 GMT Content-Length: 0
- diff --git a/docs/obs/api-ref/obs_04_0056.html b/docs/obs/api-ref/obs_04_0056.html index b8f5db4d..c0c83b23 100644 --- a/docs/obs/api-ref/obs_04_0056.html +++ b/docs/obs/api-ref/obs_04_0056.html @@ -4,12 +4,12 @@

Functions

OBS uses the GET method to obtain a specific inventory of a bucket.

To perform this operation, you must have the GetBucketInventoryConfiguration permission. By default, the bucket owner has this permission and can grant it to others.

-

Request Syntax

GET /?inventory&id=configuration-id HTTP/1.1
+

Request Syntax

GET /?inventory&id=configuration-id HTTP/1.1
 User-Agent: curl/7.29.0
 Host: bucketname.obs.region.example.com
 Accept: */*
-Date: date
-Authorization: authorization string
+Date: date +Authorization: authorization string

Request Parameters

Table 1 Request parameters

Parameter

@@ -107,7 +107,6 @@ Content-Length: length </OptionalFields> </InventoryConfiguration>
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -325,7 +324,6 @@ Content-Length: 626 </OptionalFields> </InventoryConfiguration>
- diff --git a/docs/obs/api-ref/obs_04_0057.html b/docs/obs/api-ref/obs_04_0057.html index f9273066..07f4b4ea 100644 --- a/docs/obs/api-ref/obs_04_0057.html +++ b/docs/obs/api-ref/obs_04_0057.html @@ -16,7 +16,6 @@ Accept: */* Date: date Authorization: authorization string -

Request Parameters

This request message does not contain the request parameters.

@@ -91,7 +90,6 @@ Content-Length: length </InventoryConfiguration> </ListInventoryConfiguration>
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -104,7 +102,7 @@ Content-Length: length -

ListInventoryConfiguration

+

ListInventoryConfiguration

List of bucket inventories.

Type: container

@@ -135,7 +133,6 @@ Accept: */* Date: Tue, 08 Jan 2019 09:32:24 +0000 Authorization: OBS UDSIAMSTUBTEST000001:ySWncC9M08jNsyXdJLSMJkpi7XM=
-

Sample Response

 1
@@ -204,7 +201,6 @@ Content-Length: 626
  </InventoryConfiguration>
 </ListInventoryConfiguration>
 
-
diff --git a/docs/obs/api-ref/obs_04_0058.html b/docs/obs/api-ref/obs_04_0058.html index 530aa8f3..2c32e369 100644 --- a/docs/obs/api-ref/obs_04_0058.html +++ b/docs/obs/api-ref/obs_04_0058.html @@ -4,12 +4,12 @@

Functions

OBS uses the DELETE method to delete inventories (identified by inventory IDs) of a specified bucket.

To perform this operation, you must have the DeleteBucketInventoryConfiguration permission. By default, the bucket owner has this permission and can grant it to others.

-

Request Syntax

DELETE /?inventory&id=configuration-id HTTP/1.1
+

Request Syntax

DELETE /?inventory&id=configuration-id HTTP/1.1
 User-Agent: curl/7.29.0
 Host: bucketname.obs.region.example.com
 Accept: */*
-Date: date
-Authorization: authorization string
+Date: date +Authorization: authorization string

Request Parameters

Table 1 Request parameters

Parameter

@@ -49,7 +49,6 @@ x-obs-request-id: request id x-obs-id-2: id Date: date
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -75,7 +74,6 @@ x-obs-request-id: 000001682D993B666808E265A3F6361D x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCSyB46jGSQsu06m1nyIeKxTuJ+H27ooC Date: Tue, 08 Jan 2019 13:14:03 GMT
- diff --git a/docs/obs/api-ref/obs_04_0059.html b/docs/obs/api-ref/obs_04_0059.html index a8a57186..7980a8a2 100644 --- a/docs/obs/api-ref/obs_04_0059.html +++ b/docs/obs/api-ref/obs_04_0059.html @@ -18,7 +18,6 @@ Date: date Authorization: authorization string Content-Length: 0 -

Request Parameters

@@ -61,7 +60,6 @@ x-obs-id-2: id Date: date Content-Length: 0
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -84,7 +82,6 @@ Date: Mon, 14 OBS UDSIAMSTUBTEST000094:u2kJF4kENs6KlIDcAZpAKSKPtnc= Content-Length: 0
-

Sample Response

1
@@ -99,7 +96,6 @@ x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSsfu2GXj9gSc
 Date: Wed, 13 Mar 2019 10:22:05 GMT
 Content-Length: 0
 
-
diff --git a/docs/obs/api-ref/obs_04_0060.html b/docs/obs/api-ref/obs_04_0060.html index 5b991292..05135aed 100644 --- a/docs/obs/api-ref/obs_04_0060.html +++ b/docs/obs/api-ref/obs_04_0060.html @@ -15,7 +15,6 @@ Accept: */* Date: date Authorization: authorization string -

Request Parameters

This request message does not contain the request parameters.

@@ -54,7 +53,6 @@ Content-Length: 272 </Domains> </ListBucketCustomDomainsResult>
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -117,7 +115,6 @@ Accept: */* Date: Mon, 14 Jan 2019 08:31:45 +0000 Authorization: OBS UDSIAMSTUBTEST000094:veTm8B18MPLFqNyGh2wmQqovZ2U=
-

Sample Response

 1
@@ -150,7 +147,6 @@ Content-Length: 272
   </Domains>
 </ListBucketCustomDomainsResult>
 
-
diff --git a/docs/obs/api-ref/obs_04_0061.html b/docs/obs/api-ref/obs_04_0061.html index c62e9dd7..0234da7f 100644 --- a/docs/obs/api-ref/obs_04_0061.html +++ b/docs/obs/api-ref/obs_04_0061.html @@ -15,7 +15,6 @@ Accept: */* Date: date Authorization: authorization string -

Request Parameters

@@ -55,7 +54,6 @@ x-obs-request-id: request id x-obs-id-2: id Date: date
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -76,7 +74,6 @@ Accept: */* Date: Mon, 14 Jan 2019 08:27:50 +0000 Authorization: OBS UDSIAMSTUBTEST000094:ACgHHA1z+dqZhqS7D2SbU8ugluw=
-

Sample Response

1
@@ -89,7 +86,6 @@ x-obs-request-id: 000001697694073F80E9D3D43BB10B8F
 x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSyjWyXNRPSnFymJW0AI59GKpW0Qm9UJ
 Date: Wed, 13 Mar 2019 10:23:26 GMT
 
-
diff --git a/docs/obs/api-ref/obs_04_0062.html b/docs/obs/api-ref/obs_04_0062.html index cb6c7a2b..8120d92b 100644 --- a/docs/obs/api-ref/obs_04_0062.html +++ b/docs/obs/api-ref/obs_04_0062.html @@ -2,10 +2,10 @@

Configuring Bucket Encryption

Functions

OBS uses the PUT method to create or update the default server-side encryption for a bucket.

-

After you configure encryption for a bucket, objects uploaded to this bucket will be encrypted with the bucket encryption settings you specified. Available encryption methods include server-side encryption with KMS-managed keys (SSE-KMS) and server-side encryption with customer-provided keys (SSE-C). For details, see Server-Side Encryption.

+

After you configure encryption for a bucket, objects uploaded to this bucket will be encrypted with the bucket encryption settings you specified. Currently, OBS supports server-side encryption with KMS-managed keys (SSE-KMS). For details, see Server-Side Encryption.

To perform this operation, you must have the PutEncryptionConfiguration permission. By default, the bucket owner has this permission and can grant it to others.

-

Request Syntax (SSE-KMS)

-
 1
+

Request Syntax (SSE-KMS AES256)

 1
  2
  3
  4
@@ -37,7 +37,6 @@ Content-Length: length
     </Rule>
 </ServerSideEncryptionConfiguration>
 
-

Request Parameters

This request contains no message parameters.

@@ -88,20 +87,21 @@ Content-Length: length

Server-side encryption algorithm used for the default encryption configuration of a bucket.

Type: string

-

Value options: kms

+

Value options:

+
  • kms: SSE-KMS encryption and the AES256 algorithm are used. To use the SM4 algorithm, you need to configure KMSDataEncryption.
  • AES256: SSE-OBS encryption and the AES256 algorithm are used.

Parent: ApplyServerSideEncryptionByDefault

Yes

KMSMasterKeyID

+

KMSMasterKeyID

Customer master key (CMK) used in SSE-KMS encryption mode. If you do not specify this header, the default master key will be used.

Type: string

Valid value formats are as follows:

-
  1. regionID:domainID:key/key_id
  2. key_id
+
  1. regionID:domainID:key/key_id
  2. key_id

In the preceding formats:

-
  • regionID indicates the ID of the region where the key belongs.
  • domainID indicates the ID of the domain to which the key belongs. For details, see Obtaining a Domain ID and a User ID.
  • key_id indicates the ID of the key created in KMS.
+
  • regionID indicates the ID of the region where the key belongs.
  • domainID indicates the ID of the domain to which the key belongs. For details, see Obtaining a Domain ID and a User ID.
  • key_id indicates the ID of the key created in KMS.

Parent: ApplyServerSideEncryptionByDefault

No

@@ -130,7 +130,6 @@ Content-Length: length Date: date Content-Length: length
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -139,7 +138,7 @@ Content-Length: length

Error Responses

No special error responses are returned. For details about error responses, see Table 2.

-

Sample Request

 1
+

Sample Request (SSE-KMS AES256)

 1
  2
  3
  4
@@ -173,10 +172,9 @@ Content-Length: 778
     </Rule>
 </ServerSideEncryptionConfiguration>
 
-
-

Sample Response

1
+

Sample Response (SSE-KMS AES256)

1
 2
 3
 4
@@ -188,7 +186,6 @@ x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSvK6z8HV6nrJ
 Date: Thu, 21 Feb 2019 03:05:34 GMT
 Content-Length: 0
 
-
diff --git a/docs/obs/api-ref/obs_04_0063.html b/docs/obs/api-ref/obs_04_0063.html index c199c1ba..7a7c6291 100644 --- a/docs/obs/api-ref/obs_04_0063.html +++ b/docs/obs/api-ref/obs_04_0063.html @@ -16,7 +16,6 @@ Accept: */* Date: date Authorization: authorization string
-

Request parameters

This request contains no message parameters.

@@ -59,7 +58,6 @@ Date: date </Rule> </ServerSideEncryptionConfiguration>
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -104,7 +102,7 @@ Date: date

Parent: ApplyServerSideEncryptionByDefault

-

KMSMasterKeyID

+

KMSMasterKeyID

ID of the customer master key (CMK) used for SSE-KMS.

Type: string

@@ -157,7 +155,6 @@ Accept: */* Date: Thu, 21 Feb 2019 03:05:34 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:DpSAlmLX/BTdjxU5HOEwflhM0WI=
-

Sample Response

 1
@@ -192,7 +189,6 @@ Content-Length: 788
     </Rule>
 </ServerSideEncryptionConfiguration>
 
-
diff --git a/docs/obs/api-ref/obs_04_0064.html b/docs/obs/api-ref/obs_04_0064.html index b56baa56..5900634e 100644 --- a/docs/obs/api-ref/obs_04_0064.html +++ b/docs/obs/api-ref/obs_04_0064.html @@ -16,7 +16,6 @@ Accept: */* Date: date Authorization: authorization string -

Request parameters

This request contains no message parameters.

@@ -35,7 +34,6 @@ x-obs-request-id: request id id Date: date
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -56,7 +54,6 @@ Accept: */* Date: Tue, 08 Jan 2019 13:18:35 +0000 Authorization: OBS UDSIAMSTUBTEST000001:UT9F2YUgaFu9uFGMmxFj2CBgQHs=
-

Sample Response

1
@@ -69,7 +66,6 @@ x-obs-request-id: 000001682D993B666808E265A3F6361D
 x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCSyB46jGSQsu06m1nyIeKxTuJ+H27ooC
 Date: Tue, 08 Jan 2019 13:14:03 GMT
 
-
diff --git a/docs/obs/api-ref/obs_04_0068.html b/docs/obs/api-ref/obs_04_0068.html index 028e8243..fc381b4c 100644 --- a/docs/obs/api-ref/obs_04_0068.html +++ b/docs/obs/api-ref/obs_04_0068.html @@ -23,7 +23,6 @@ Content-Length: length <Payer>Payer</Payer> </RequestPaymentConfiguration> -

Request Parameters

This request contains no message parameters.

@@ -69,7 +68,6 @@ Content-Length: length Date: date Content-Length: length
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -98,7 +96,6 @@ Authorization: OBS H4IPJX0TQTHTHEB <Payer>Requester</Payer> </RequestPaymentConfiguration>
-

Sample Response

1
@@ -115,7 +112,6 @@ Content-Type: application/xml
 Date: Tue, 30 Apr 2019 02:45:07 GMT
 Content-Length: 0
 
-
diff --git a/docs/obs/api-ref/obs_04_0069.html b/docs/obs/api-ref/obs_04_0069.html index 0d38fe3a..ddfc7f1c 100644 --- a/docs/obs/api-ref/obs_04_0069.html +++ b/docs/obs/api-ref/obs_04_0069.html @@ -13,7 +13,6 @@ Date: date Authorization: authorization Content-Length: length -

Request Parameters

This request contains no message parameters.

@@ -40,7 +39,6 @@ Content-Length: length <Payer>Payer</Payer> </RequestPaymentConfiguration>
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -86,7 +84,6 @@ Accept: */* Date: Tue, 03 Mar 2020 12:07:05 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:5DGAS7SBbMC1YTC4tNXY57Zl2Fo=
-

Sample Response

 1
@@ -113,7 +110,6 @@ Content-Length: 0
   <Payer>Requester</Payer>
 </RequestPaymentConfiguration>
 
-
diff --git a/docs/obs/api-ref/obs_04_0071.html b/docs/obs/api-ref/obs_04_0071.html index 4f473aec..cd0379c9 100644 --- a/docs/obs/api-ref/obs_04_0071.html +++ b/docs/obs/api-ref/obs_04_0071.html @@ -29,7 +29,6 @@ Authorization: authorization </RedirectAllRequestsTo> </WebsiteConfiguration> -

Request Parameters

This request contains no parameters.

@@ -268,7 +267,6 @@ Authorization: authorization Date: date Content-Length: length
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -303,7 +301,6 @@ Content-Length: 194 </RedirectAllRequestsTo> </WebsiteConfiguration>
-

Sample Response: Redirecting All Requests for a Bucket to Another Bucket or URL

1
@@ -318,7 +315,6 @@ x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSItqMZ/AoFUX
 Date: WED, 01 Jul 2015 03:40:29 GMT
 Content-Length: 0
 
-
diff --git a/docs/obs/api-ref/obs_04_0072.html b/docs/obs/api-ref/obs_04_0072.html index c4099f6f..9c87d78c 100644 --- a/docs/obs/api-ref/obs_04_0072.html +++ b/docs/obs/api-ref/obs_04_0072.html @@ -12,7 +12,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization -

Request Parameters

This request contains no message parameters.

@@ -41,7 +40,6 @@ Content-Length: length </RedirectAllRequestsTo> </WebsiteConfiguration>
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -82,7 +80,6 @@ Accept: */* Date: WED, 01 Jul 2015 03:41:54 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:Yxt1Ru+feHE0S94R7dcBp+hfLnI=
-

Sample Response

 1
@@ -113,7 +110,6 @@ Content-Length: 250
   </RedirectAllRequestsTo>
 </WebsiteConfiguration>
 
-
diff --git a/docs/obs/api-ref/obs_04_0073.html b/docs/obs/api-ref/obs_04_0073.html index b898d7c9..1b20d3cc 100644 --- a/docs/obs/api-ref/obs_04_0073.html +++ b/docs/obs/api-ref/obs_04_0073.html @@ -12,7 +12,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization -

Request Parameters

This request contains no message parameters.

@@ -29,7 +28,6 @@ Date: date Content-Type: type Content-Length: length
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -50,7 +48,6 @@ Accept: */* Date: WED, 01 Jul 2015 03:44:37 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:AZ1b0N5eLknxNOe/c0BISV1bEqc=
-

Sample Response

1
@@ -63,7 +60,6 @@ x-obs-request-id: BF2600000164363786230E2001DC0807
 x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSFUG4fEyDRgzUiEY2i71bJndBCy+wUZ
 Date: WED, 01 Jul 2015 03:44:37 GMT
 
-
diff --git a/docs/obs/api-ref/obs_04_0074.html b/docs/obs/api-ref/obs_04_0074.html index b7ccbadf..bb96c100 100644 --- a/docs/obs/api-ref/obs_04_0074.html +++ b/docs/obs/api-ref/obs_04_0074.html @@ -41,116 +41,190 @@ Content-MD5: MD5 </CORSRule> </CORSConfiguration> -

Request Parameters

This request contains no parameters.

-

Request Headers

This request uses common headers and CORS request headers. For details, see Table 3 and Table 1.

+

Request Headers

This request uses common headers and CORS request headers. For details, see Table 3 and Table 1.

-
Table 1 CORS request header

Header

+
- - + - - - +
Table 1 CORS request headers

Header

Description

+

Type

Mandatory

+

Mandatory (Yes/No)

+

Description

Content-MD5

+

Content-MD5

Base64-encoded 128-bit MD5 digest of the message according to RFC 1864

-

Type: string

-

Example: n58IG6hfM7vqI4K0vnWpog==

+

String

Yes

+

Yes

+

Explanation:

+

Base64-encoded 128-bit MD5 digest of the message according to RFC 1864

+

Example: n58IG6hfM7vqI4K0vnWpog==

+

Restrictions:

+

None

+

Value range:

+

None

+

Default value:

+

None

-

Request Elements

In this request body, you must configure the CORS rules for a bucket in XML format. Table 2 describes the specific configuration elements.

+

Request Elements

In this request body, you must configure the CORS rules for a bucket in XML format. Table 2 describes the specific configuration elements.

-
Table 2 CORS configuration elements

Element

+
- - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + @@ -165,7 +239,6 @@ Content-MD5: MD5 Date: date Content-Length: length
Table 2 CORS configuration elements

Element

Description

+

Type

Mandatory

+

Mandatory (Yes/No)

+

Description

CORSConfiguration

+

CORSConfiguration

Root node of CORSRule and its capacity cannot exceed 64 KB.

-

Type: container

-

Parent: none

+

Container

Yes

+

Yes

+

Explanation:

+

Root node of CORSRules.

+

Parent: none

+

Restrictions:

+

The maximum size is 64 KB.

+

Value range:

+

None

+

Default value:

+

None

CORSRule

+

CORSRule

CORS rules. CORSConfiguration can contain a maximum of 100 rules.

-

Type: container

-

Parent: CORSConfiguration

+

Container

Yes

+

Yes

+

Explanation:

+

CORS rules

+

Parent: CORSConfiguration

+

Restrictions:

+

CORSConfiguration can contain a maximum of 100 rules.

+

Value range:

+

None

+

Default value:

+

None

ID

+

ID

Unique identifier of a rule. The value can contain a maximum of 255 characters.

-

Type: string

-

Parent: CORSRule

+

String

No

+

No

+

Explanation:

+

The ID of a CORS rule.

+

Parent: CORSRule

+

Restrictions:

+

The ID cannot be longer than 255 characters.

+

Value range:

+

A string of 1 to 255 characters.

+

Default value:

+

None

AllowedMethod

+

AllowedMethod

Method allowed by a CORS rule

-

Type: string

-

Value options: GET, PUT, HEAD, POST, DELETE

-

Parent: CORSRule

+

String

Yes

+

Yes

+

Explanation:

+

The allowed HTTP methods (types of operations on buckets and objects) for a cross-origin request.

+

Parent: CORSRule

+

Restrictions:

+

None

+

Value range:

+

The following HTTP methods are supported:

+
  • GET
  • PUT
  • HEAD
  • POST
  • DELETE
+

Default value:

+

None

AllowedOrigin

+

AllowedOrigin

Origins that are allowed in the CORS rule. Only English domain names are supported for configuring origins, and regular expressions can be used for matching origins. Each AllowedOrigin allows one wildcard character (*) at most.

-

Type: string

-

Parent: CORSRule

+

String

Yes

+

Yes

+

Explanation:

+

The origin that is allowed to access the bucket.

+

Parent: CORSRule

+

Restrictions:

+

Only English domain names are supported. Regular expressions are used to match. Each rule allows at most one asterisk (*). For example, https://*.vbs.example.com.

+

Value range:

+

The value must comply with the CORS protocol and contain 0 to 20480 characters.

+

Default value:

+

None

AllowedHeader

+

AllowedHeader

Headers that are allowed in a PutBucketCORS request via the Access-Control-Request-Headers header. If a CORS request contains Access-Control-Request-Headers, this request is considered valid only when it matches the configuration of AllowedHeader. The match is based on regular expressions. Each AllowedHeader can contain at most one wildcard (*) and cannot contain spaces.

-

Type: string

-

Parent: CORSRule

+

String

No

+

No

+

Explanation:

+

What headers are allowed in a CORS request. If a CORS request contains the Access-Control-Request-Headers header, the headers listed in this header must match the headers in the AllowedHeader element so that the request can be considered valid. The matching is based on regular expressions.

+

Parent: CORSRule

+

Restrictions:

+

At most one asterisk (*) is allowed. Spaces, ampersands (&), colons (:), less-than signs (<), and full-width characters are not allowed.

+

Value range:

+

The value must comply with the CORS protocol and contain 0 to 20480 characters.

+

Default value:

+

None

MaxAgeSeconds

+

MaxAgeSeconds

The time in seconds that the client can cache CORS responses.

-

Each CORSRule can contain only one MaxAgeSeconds. It can be set to a negative value.

-

Type: integer

-

Parent: CORSRule

+

Integer

No

+

No

+

Explanation:

+

How long the response can be cached on a client

+

Parent: CORSRule

+

Restrictions:

+

Each CORS rule can contain at most one MaxAgeSeconds.

+

Value range:

+

An integer greater than or equal to 0, in seconds

+

Default value:

+

3000

ExposeHeader

+

ExposeHeader

An additional header in CORS responses. The header provides additional information for clients. It cannot contain spaces.

-

Type: string

-

Parent: CORSRule

+

String

No

+

No

+

Explanation:

+

Specifies additional headers allowed in the response by a CORS rule, which are used to provide extra information to clients. By default, a browser can access only headers Content-Length and Content-Type. If the browser needs to access other headers, you need to configure them in this parameter.

+

Parent: CORSRule

+

Restrictions:

+

Spaces, asterisks (*), ampersands (&), colons (:), less-than signs (<), and full-width characters are not allowed.

+

Value range:

+

The value that complies with the CORS

+

Default value:

+

None

-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -224,7 +297,6 @@ Content-Length: 617 </CORSRule> </CORSConfiguration>
-

Sample Response

1
@@ -241,7 +313,6 @@ x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSYi6wLC4bkrv
 Date: WED, 01 Jul 2015 03:51:52 GMT
 Content-Length: 0
 
-
diff --git a/docs/obs/api-ref/obs_04_0075.html b/docs/obs/api-ref/obs_04_0075.html index 73089af4..bdcf64b9 100644 --- a/docs/obs/api-ref/obs_04_0075.html +++ b/docs/obs/api-ref/obs_04_0075.html @@ -12,7 +12,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization
-

Request Parameters

This request contains no message parameters.

@@ -43,7 +42,6 @@ Content-Length: length </CORSRule> </CORSConfiguration>
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -87,14 +85,14 @@ Content-Length: length

AllowedOrigin

-

Indicates an origin that is allowed by a CORS rule. It is a character string and can contain a wildcard (*), and allows one wildcard character (*) at most.

+

The origin (domain name) that is allowed by a CORS rule. The value is a string of 0 to 20480 characters. It allows at most one wildcard character (*).

Type: string

Parent: CORSRule

AllowedHeader

-

Indicates which headers are allowed in a PUT Bucket CORS request via the Access-Control-Request-Headers header. If a request contains Access-Control-Request- Headers, only a CORS request that matches the configuration of AllowedHeader is considered as a valid request. Each AllowedHeader can contain at most one wildcard (*) and cannot contain spaces.

+

Headers that can be carried in Access-Control-Request-Headers of CORS requests. The value contains 0 to 20480 characters. If a request contains Access-Control-Request- Headers, only a CORS request that matches the configuration of AllowedHeader is considered as a valid request. Each AllowedHeader can contain at most one wildcard (*) and cannot contain spaces.

Type: string

Parent: CORSRule

@@ -102,7 +100,7 @@ Content-Length: length

MaxAgeSeconds

Response time of CORS that can be cached by a client. It is expressed in seconds.

-

Each CORSRule can contain only one MaxAgeSeconds. It can be set to a negative value.

+

Each CORS rule can contain at most one MaxAgeSeconds.

Type: integer

Parent: CORSRule

@@ -152,7 +150,6 @@ Accept: */* Date: WED, 01 Jul 2015 03:54:36 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:WJGghTrPQQXRuCx5go1fHyE+Wwg=
-

Sample Response

 1
@@ -209,7 +206,6 @@ Content-Length: 825
   </CORSRule>
 </CORSConfiguration>
 
-
diff --git a/docs/obs/api-ref/obs_04_0076.html b/docs/obs/api-ref/obs_04_0076.html index a5478f9a..75086aab 100644 --- a/docs/obs/api-ref/obs_04_0076.html +++ b/docs/obs/api-ref/obs_04_0076.html @@ -12,7 +12,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization -

Request Parameters

This request contains no message parameters.

@@ -29,7 +28,6 @@ Date: date Content-Type: application/xml Content-Length: length
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -50,7 +48,6 @@ Accept: */* Date: WED, 01 Jul 2015 03:56:41 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:mKUs/uIPb8BP0ZhvMd4wEy+EbiI=
-

Sample Response

1
@@ -63,7 +60,6 @@ x-obs-request-id: BF26000001643639F290185BB27F793A
 x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSLWMRFJfckapW+ktT/+1AnAz7XlNU0b
 Date: WED, 01 Jul 2015 03:56:41 GMT
 
-
diff --git a/docs/obs/api-ref/obs_04_0077.html b/docs/obs/api-ref/obs_04_0077.html index ea768474..e1a8132e 100644 --- a/docs/obs/api-ref/obs_04_0077.html +++ b/docs/obs/api-ref/obs_04_0077.html @@ -2,7 +2,7 @@

OPTIONS Bucket

Functions

OPTIONS refers to pre-requests that are sent to servers by clients. Generally, the requests are used to check whether clients have permissions to perform operations on servers. Only after a pre-request is returned successfully, clients start to execute the follow-up requests.

-

The OBS allows buckets to store static web resources. OBS buckets can serve as website resources if the buckets are properly used. In this scenario, buckets in the OBS serve as servers to process OPTIONS pre-requests from clients.

+

OBS allows static web resources to be stored in buckets with appropriate configurations. In this scenario, buckets in the OBS serve as servers to process OPTIONS pre-requests from clients.

OBS can process OPTIONS pre-requests only after CORS is configured for buckets in OBS. For details about CORS, see Configuring Bucket CORS.

Differences Between OPTIONS Bucket and OPTIONS Object

With the OPTIONS Object, you need to specify an object name in the URL, but an object name is not required with the OPTIONS Bucket, which uses the bucket domain name as the URL. The request lines of the two methods are as follows:

@@ -21,7 +21,6 @@ Authorization: authorization Origin: origin Access-Control-Request-Method: method
-

Request Parameters

This request contains no message parameters.

@@ -85,7 +84,6 @@ Access-Control-Expose-Headers: header Date: date Content-Length: length
-

Response Headers

The response uses the following headers as described in Table 2.

@@ -188,7 +186,6 @@ Authorization: OBS H4IPJX0TQTHTHEB Origin: www.example.com Access-Control-Request-Method: PUT
-

Sample Response

 1
@@ -213,7 +210,6 @@ x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCTlYimJvOyJnc
 Date: WED, 01 Jul 2015 04:02:15 GMT
 Content-Length: 0
 
-
diff --git a/docs/obs/api-ref/obs_04_0078.html b/docs/obs/api-ref/obs_04_0078.html index c428444b..a1113b26 100644 --- a/docs/obs/api-ref/obs_04_0078.html +++ b/docs/obs/api-ref/obs_04_0078.html @@ -19,7 +19,6 @@ Authorization: authorization Origin: origin Access-Control-Request-Method: method -

Request Parameters

This request contains no message parameters.

@@ -83,7 +82,6 @@ Access-Control-Expose-Headers: header Date: date Content-Length: length
-

Response Headers

The request uses the headers described in Table 2.

@@ -186,7 +184,6 @@ Authorization: OBS H4IPJX0TQTHTHEB Origin: www.example.com Access-Control-Request-Method: PUT
-

Sample Response

 1
@@ -211,7 +208,6 @@ x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCS+DXV4zZetbT
 Date: WED, 01 Jul 2015 04:02:19 GMT
 Content-Length: 0
 
-
diff --git a/docs/obs/api-ref/obs_04_0079.html b/docs/obs/api-ref/obs_04_0079.html index 3ff57e08..33eb44d4 100644 --- a/docs/obs/api-ref/obs_04_0079.html +++ b/docs/obs/api-ref/obs_04_0079.html @@ -32,6 +32,12 @@ + + + diff --git a/docs/obs/api-ref/obs_04_0080.html b/docs/obs/api-ref/obs_04_0080.html index d1573e98..9409a89f 100644 --- a/docs/obs/api-ref/obs_04_0080.html +++ b/docs/obs/api-ref/obs_04_0080.html @@ -38,200 +38,346 @@ Date: date <Optional Additional Header> <object Content> -

Request Parameters

This request contains no parameters.

-

Request Headers

This request uses common headers. For details, see Table 3. The request can use additional headers, as listed in Table 1.

+

Request Headers

This request uses common headers. For details, see Table 3. The request can use additional headers shown in Table 1.

OBS supports the six HTTP request headers: Cache-Control, Expires, Content-Encoding, Content-Disposition, Content-Type, and Content-Language. If these headers are carried in an object upload request, their values are saved. You can also call the metadata modification API, provided by OBS, to change the values of the six headers. When the object is downloaded or queried, the saved values are set for corresponding HTTP headers and returned to the client.

-
Table 1 Request headers

Header

+
- - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + + + + + + @@ -246,58 +392,102 @@ Date: date Content-Length: length Content-Type: type
Table 1 Request headers

Header

Description

+

Type

Mandatory

+

Mandatory (Yes/No)

+

Description

Content-MD5

+

Content-MD5

Base64-encoded 128-bit MD5 digest of the message according to RFC 1864.

-

Type: string

-

Example: n58IG6hfM7vqI4K0vnWpog==

+

String

No

+

No

+

Explanation:

+

Base64-encoded 128-bit MD5 digest of the message according to RFC 1864.

+

Example: n58IG6hfM7vqI4K0vnWpog==

+

Restrictions:

+

None

+

Value range:

+

None

+

Default value:

+

None

x-obs-acl

+

x-obs-acl

This header can be added to set access control policies for objects when creating the objects. The access control policies are the predefined common policies, including private, public-read, public-read-write.

-

Type: string

-

Note: This header is a predefined policy expressed in a character string.

-

Example: x-obs-acl: public-read

+

String

No

+

No

+

Explanation:

+

When creating an object, you can use this parameter to set a pre-defined ACL.

+

Restrictions:

+

Pre-defined policies must be displayed in character strings.

+

Value range:

+
  • private
  • public-read
  • public-read-write
+

+

Default value:

+

private

x-obs-grant-read

+

x-obs-grant-read

When creating an object, you can use this header to grant all users in an account the permissions to read the object and obtain the object metadata.

-

Type: string

-

Example: x-obs-grant-read: id=domainID. If multiple accounts are authorized, separate them with commas (,).

+

String

No

+

No

+

Explanation:

+

When creating an object, you can use this header to grant all users in a domain the permissions to read the object and obtain the object metadata.

+

Example: x-obs-grant-read: id=domainID

+

Restrictions:

+

If multiple domains are authorized, separate them with commas (,).

+

Value range:

+

The value must be a valid ID. For details, see Obtaining a Domain ID and a User ID.

+

Default value:

+

None

x-obs-grant-read-acp

+

x-obs-grant-read-acp

When creating an object, you can use this header to grant all users in an account the permissions to obtain the object ACL.

-

Type: string

-

Example: x-obs-grant-read-acp: id=domainID. If multiple accounts are authorized, separate them with commas (,).

+

String

No

+

No

+

Explanation:

+

When creating an object, you can use this header to grant all users in a domain the permissions to obtain the object ACL.

+

Example: x-obs-grant-read-acp: id=domainID

+

Restrictions:

+

If multiple domains are authorized, separate them with commas (,).

+

Value range:

+

The value must be a valid ID. For details, see Obtaining a Domain ID and a User ID.

+

Default value:

+

None

x-obs-grant-write-acp

+

x-obs-grant-write-acp

When creating an object, you can use this header to grant all users in an account the permission to write the object ACL.

-

Type: string

-

Example: x-obs-grant-write-acp: id=domainID. If multiple accounts are authorized, separate them with commas (,).

+

String

No

+

No

+

Explanation:

+

When creating an object, you can use this header to grant all users in a domain the permission to write the object ACL.

+

Example: x-obs-grant-write-acp: id=domainID

+

Restrictions:

+

If multiple domains are authorized, separate them with commas (,).

+

Value range:

+

The value must be a valid ID. For details, see Obtaining a Domain ID and a User ID.

+

Default value:

+

None

x-obs-grant-full-control

+

x-obs-grant-full-control

When creating an object, you can use this header to grant all users in an account the permissions to read the object, obtain the object metadata and ACL, and write the object ACL.

-

Type: string

-

Example: x-obs-grant-full-control: id=domainID. If multiple accounts are authorized, separate them with commas (,).

+

String

No

+

No

+

Explanation:

+

When creating an object, you can use this header to grant all users in a domain the permissions to read the object, obtain the object metadata and ACL, and write the object ACL.

+

Example: x-obs-grant-full-control: id=domainID

+

Restrictions:

+

If multiple domains are authorized, separate them with commas (,).

+

Value range:

+

The value must be a valid ID. For details, see Obtaining a Domain ID and a User ID.

+

Default value:

+

None

x-obs-storage-class

+

x-obs-storage-class

When creating an object, you can use this header to specify the storage class for the object. If you do not use this header, the object storage class is the default storage class of the bucket.

-

Type: string

-

Storage class options: STANDARD (Standard), WARM (Warm), COLD (Cold). These values are case sensitive.

-

Example: x-obs-storage-class: STANDARD

+

String

No

+

No

+

Explanation:

+

When creating an object, you can use this header to specify the storage class for the object. If you do not use this header, the object storage class is the default storage class of the bucket.

+

Example: x-obs-storage-class: STANDARD

+

Restrictions:

+

The value is case-sensitive.

+

Value range:

+
  • STANDARD
  • WARM
  • COLD
+

Default value:

+

By default, the storage class of the bucket is inherited.

x-obs-meta-*

+

x-obs-meta-*

When creating an object, you can use a header starting with x-obs-meta- to define object metadata in an HTTP request. The user-defined metadata will be returned in the response when you retrieve the object or query the object metadata.

-

Type: string

-

Example: x-obs-meta-test: test metadata

-

Constraint: Both user-defined metadata keys and their values must conform to US-ASCII standards.

+

String

No

+

No

+

Explanation:

+

When creating an object, you can use a header starting with x-obs-meta- to define object metadata in an HTTP request. The custom metadata will be returned in the response when you retrieve the object or query the object metadata.

+

Example: x-obs-meta-test: test metadata

+

Restrictions:

+

Both custom metadata keys and their values must conform to US-ASCII standards.

+

Value range:

+

None

+

Default value:

+

None

x-obs-website-redirect-location

+

x-obs-website-redirect-location

If a bucket is configured with the static website hosting function, it will redirect requests for this object to another object in the same bucket or to an external URL. OBS stores the value of this header in the object metadata.

-

In the following example, the request header sets the redirection to an object (anotherPage.html) in the same bucket:

-

x-obs-website-redirect-location:/anotherPage.html

-

In the following example, the request header sets the object redirection to an external URL:

-

x-obs-website-redirect-location:http://www.example.com/

-

Type: string

-

Default value: none

-

Constraint: The value must be prefixed by a slash (/), http://, or https://. The length of the value cannot exceed 2 KB.

+

String

No

+

No

+

Explanation:

+

If a bucket is configured with the static website hosting function, it will redirect requests for this object to another object in the same bucket or to an external URL. OBS stores the value of this header in the object metadata.

+

In the following example, the request header sets the redirection to an object (anotherPage.html) in the same bucket:

+

x-obs-website-redirect-location:/anotherPage.html

+

In the following example, the request header sets the object redirection to an external URL:

+

x-obs-website-redirect-location:http://www.example.com/

+

Restrictions:

+

The value must start with a slash (/), http://, or https:// and cannot exceed 2 KB.

+

Value range:

+

None

+

Default value:

+

None

x-obs-server-side-encryption

+

x-obs-server-side-encryption

Indicates that SSE-KMS is used.

-

Type: string

-

Example: x-obs-server-side-encryption: kms

+

String

No. This header is required when SSE-KMS is used.

+

No. This header is required when SSE-KMS is used.

+

Explanation:

+

Indicates that SSE-KMS is used.

+

Example: x-obs-server-side-encryption: kms

+

Restrictions:

+

None

+

Value range:

+

kms, or AES256

+

Default value:

+

None

x-obs-server-side-encryption-kms-key-id

+

x-obs-server-side-encryption-kms-key-id

Explanation:

-

The key used to encrypt objects. This header can be specified using either of the following formats:

-

1. regionID:domainID:key/key_id: regionID indicates the ID of the region where the key belongs. domainID indicates the ID of the tenant where the key belongs. key_id indicates the ID of the key created in KMS on the DEW console. An example is given as follows: x-obs-server-side-encryption-kms-key-id: region:exampledomainid: key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0.

-

2. key_id: It indicates the ID of the key created in KMS on the DEW console. An example is given as follows: x-obs-server-side-encryption-kms-key-id: 4f1cd4de-ab64-4807-920a-47fc42e7f0d0.

-

Restrictions:

-

This header can be used only when you set the x-obs-server-side-encryption header to kms.

-

Default value:

-

If you choose the KMS encryption but do not specify this header, the default master key will be used. If there is no such a default master key, OBS will create one and use it by default.

+

String

No

+

No

+

Explanation:

+

ID of a specified key used for SSE-KMS encryption.

+

Restrictions:

+

This header can only be used when you specify kms for the x-obs-server-side-encryption header.

+

Default value:

+

If you specify kms for encryption but do not specify a key ID, the default master key will be used. If there is not a default master key, OBS will create one and use it.

x-obs-server-side-encryption-customer-algorithm

+

x-obs-server-side-encryption-customer-algorithm

Indicates the encryption algorithm when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-algorithm: AES256

-

Constraint: This header must be used together with x-obs-server-side-encryption-customer-key and x-obs-server-side-encryption-customer-key-MD5.

+

String

No. This header is required when SSE-C is used.

+

No. This header is required when SSE-C is used.

+

Explanation:

+

The algorithm used for encryption.

+

Example: x-obs-server-side-encryption-customer-algorithm: AES256

+

Restrictions:

+
  • This header is used only when SSE-C is used.
  • This header must be used together with x-obs-server-side-encryption-customer-key and x-obs-server-side-encryption-customer-key-MD5.
+

Value range:

+

AES256

+

Default value:

+

None

x-obs-server-side-encryption-customer-key

+

x-obs-server-side-encryption-customer-key

Indicates the key for encrypting objects when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=

-

Constraint: This header is a Base64-encoded 256-bit key and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key-MD5.

+

String

No. This header is required when SSE-C is used.

+

No. This header is required when SSE-C is used.

+

Explanation:

+

The key used for encrypting an object.

+

Example: x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=

+

Restrictions:

+
  • This header is used only when SSE-C is used.
  • This header is a Base64-encoded 256-bit key and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key-MD5.
+

Value range:

+

None

+

Default value:

+

None

x-obs-server-side-encryption-customer-key-MD5

+

x-obs-server-side-encryption-customer-key-MD5

Indicates the MD5 value of the encryption key when SSE-C is used. The MD5 value is used to check whether any error occurs during the transmission of the key.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

-

Constraint: This header is a Base64-encoded 128-bit MD5 value and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key.

+

String

No. This header is required when SSE-C is used.

+

No. This header is required when SSE-C is used.

+

Explanation:

+

The MD5 value of the key used for encryption. The MD5 value is used to check whether any error occurs during the transmission of the key.

+

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

Restrictions:

+
  • This header is used only when SSE-C is used.
  • This header is a Base64-encoded 128-bit MD5 value and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key.
+

Value range:

+

MD5 value of the key.

+

Default value:

+

None

success-action-redirect

+

success-action-redirect

Indicates the address (URL) to which a successfully responded request is redirected.

-
  • If the value is valid and the request is successful, OBS returns status code 303. Location contains success_action_redirect as well as the bucket name, object name, and object ETag.
  • If this parameter value is invalid, OBS ignores this parameter. In such case, the Location header is the object address, and OBS returns the response code based on whether the operation succeeds or fails.
-

Type: string

+

String

No

+

No

+

Explanation:

+

The redirection address used when requests were successfully responded to.

+
  • If the value is valid and the request is successful, OBS returns status code 303. Location contains success_action_redirect as well as the bucket name, object name, and object ETag.
  • If this parameter value is invalid, OBS ignores this parameter. In such case, the Location header is the object address, and OBS returns the response code based on whether the operation succeeds or fails.
+

Restrictions:

+

The value must be a valid URL, for example, http://domainname or https://domainname.

+

Value range:

+

URL

+

Default value:

+

None

x-obs-expires

+

x-obs-expires

Specifies when an object expires. It is measured in days. Once the object expires, it is automatically deleted. (The validity calculates from the object's creation time.)

-

You can configure this field when uploading an object or modify this field by using the metadata modification API after the object is uploaded.

-

Type: integer

-

Example: x-obs-expires:3

+

Integer

No

+

No

+

Explanation:

+

Specifies when an object expires. It is measured in days. Once the object expires, it is automatically deleted. (The validity calculates from the object's creation time.)

+

You can configure this field when uploading an object or modify this field by using the metadata modification API after the object is uploaded.

+

Example: x-obs-expires:3

+

Restrictions:

+

The value must be greater than the number of days that have passed since the object was created. For example, if the object was uploaded 10 days ago, you must specify a value greater than 10.

+

Value range:

+

The value is an integer greater than 0.

+

Default value:

+

None

x-obs-object-lock-mode

+

x-obs-tagging

WORM mode that will be applied to the object. Currently, only COMPLIANCE is supported. This header must be used together with x-obs-object-lock-retain-until-date.

-

Type: string

-

Example: x-obs-object-lock-mode:COMPLIANCE

+

String

No, but required when x-obs-object-lock-retain-until-date is present.

+

No

+

Explanation:

+

Object's tag information in key-value pairs. Multiple tags can be added at the same time.

+

Example: x-obs-tagging:TagA=A&TagB&TagC

+

Restrictions:

+
  • If a tag key or value contains special characters, equal signs (=), or full-width characters, it must be URL-encoded.
  • If there is no equal sign (=) in a configuration, the tag value is considered left blank.
+

Value range:

+

None

+

Default value:

+

None

x-obs-object-lock-retain-until-date

+

x-obs-object-lock-mode

Indicates the expiration time of the Object Lock retention. The value must be a UTC time that complies with ISO 8601, for example, 2015-07-01T04:11:15Z. This header must be used together with x-obs-object-lock-mode.

-

Type: string

-

Example: x-obs-object-lock-retain-until-date:2015-07-01T04:11:15Z

+

String

No, but required when x-obs-object-lock-mode is present.

+

No, but required when x-obs-object-lock-retain-until-date is present

+

Explanation:

+

WORM mode applied to the object.

+

Example: x-obs-object-lock-mode:COMPLIANCE

+

Restrictions:

+
  • Only COMPLIANCE (compliance mode) is supported.
  • This parameter must be used together with x-obs-object-lock-retain-until-date.
+

Value range:

+

COMPLIANCE

+

Default value:

+

None

+

x-obs-object-lock-retain-until-date

+

String

+

No, but required when x-obs-object-lock-mode is present.

+

Explanation:

+

When the WORM policy of the object expires.

+

Example: x-obs-object-lock-retain-until-date:2015-07-01T04:11:15Z

+

Restrictions:

+
  • The value must be a UTC time that complies with the ISO 8601 standard. Example: 2015-07-01T04:11:15Z
  • This parameter must be used together with x-obs-object-lock-mode.
+

Value range:

+

The time must be later than the current time.

+

Default value:

+

None

-

Response Headers

The response to the request uses common headers. For details, see Table 1.

-

In addition to the common response headers, the headers listed in Table 2 may be used.

+

In addition to the common response headers, the headers listed in Table 2 might also be needed.

-
Table 2 Additional response headers

Header

+
- + - - + - - + - - + - - + - - + - - + @@ -328,7 +518,6 @@ Expect: 100-continue [1024 Byte data content]
Table 2 Additional response headers

Header

Description

+

Type

+

Description

x-obs-version-id

+

x-obs-version-id

Object version ID. If versioning is enabled for the bucket, the object version ID will be returned.

-

Type: string

+

String

+

Explanation:

+

Version ID of the object. If versioning is enabled for the bucket, the object version ID will be returned.

+

Restrictions:

+

None

+

Value range:

+

None

+

Default value:

+

None

x-obs-server-side-encryption

+

x-obs-server-side-encryption

This header is included in a response if SSE-KMS is used.

-

Type: string

-

Example: x-obs-server-side-encryption:kms

+

String

+

Explanation:

+

The encryption method used by the server.

+

Example: x-obs-server-side-encryption:kms

+

Restrictions:

+

This header is included in a response if SSE-KMS is used.

+

Value range:

+
  • kms
  • AES256
+

Default value:

+

None

x-obs-server-side-encryption-kms-key-id

+

x-obs-server-side-encryption-kms-key-id

Indicates the master key ID. This header is included in a response when SSE-KMS is used.

-

Type: string

-

Format: regionID:domainID:key/key_id

-

regionID indicates the ID of the region where the key belongs. domainID indicates the ID of the tenant where the key belongs. key_id indicates the key ID used in this encryption.

-

Example: x-obs-server-side-encryption-kms-key-id:region:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0

+

String

+

Explanation:

+

ID of a specified key used for SSE-KMS encryption.

+

Restrictions:

+

This header can only be used when you specify kms for the x-obs-server-side-encryption header.

+

Default value:

+

If you specify kms for encryption but do not specify a key ID, the default master key will be used. If there is not a default master key, OBS will create one and use it.

x-obs-server-side-encryption-customer-algorithm

+

x-obs-server-side-encryption-customer-algorithm

Indicates the encryption algorithm. This header is included in a response when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-algorithm: AES256

+

String

+

Explanation:

+

The algorithm used for encryption.

+

Example: x-obs-server-side-encryption-customer-algorithm: AES256

+

Restrictions:

+

This header is included in a response if SSE-C is used for server-side encryption.

+

Value range:

+

AES256

+

Default value:

+

None

x-obs-server-side-encryption-customer-key-MD5

+

x-obs-server-side-encryption-customer-key-MD5

Indicates the MD5 value of the key for encrypting objects. This header is included in a response when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

String

+

Explanation:

+

The MD5 value of the key used for encryption.

+

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

Restrictions:

+

This header is included in a response if SSE-C is used for server-side encryption.

+

Value range:

+

MD5 value of the key.

+

Default value:

+

None

x-obs-storage-class

+

x-obs-storage-class

This header is returned when the storage class of an object is not Standard. The value can be WARM or COLD.

-

Type: string

+

String

+

Explanation:

+

Storage class of an object

+

Restrictions:

+

This header is returned when the storage class of an object is not Standard.

+

Value range:

+
  • WARM
  • COLD
+

Default value:

+

None

-

Sample Response: Uploading an Object

1
@@ -345,7 +534,6 @@ x-obs-id-2: 32AAAWJAMAABAAAQAAEAABAAAQAAEAABCTzu4Jp2lquWu
 Date: WED, 01 Jul 2015 04:11:15 GMT
 Content-Length: 0
 
-

Sample Request: Uploading an Object (with the ACL Configured)

 1
@@ -370,7 +558,6 @@ Expect: 100-continue
 
 [1024 Byte data content]
 
-

Sample Response: Uploading an Object (with the ACL Configured)

1
@@ -387,7 +574,6 @@ x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCSReVRNuas0kn
 Date: WED, 01 Jul 2015 04:13:55 GMT
 Content-Length: 0
 
-

Sample Request: Uploading an Object to a Versioned Bucket

 1
@@ -412,7 +598,6 @@ Expect: 100-continue
 
 [1024 Byte data content]
 
-

Sample Response: Uploading an Object to a Versioned Bucket

1
@@ -431,7 +616,6 @@ Date: WED, 01  AAABQ4q2M9_c0vycq3gAAAAAVURTRkha
 Content-Length: 0
 
-

Sample Request: Uploading an Object (with Its MD5 Specified)

 1
@@ -456,7 +640,6 @@ Expect: 100-continue
 
 1234567890
 
-

Sample Response: Uploading an Object (with Its MD5 Specified)

1
@@ -473,7 +656,6 @@ ETag: "1072e1b96b47d7ec859710068aa70d57"
 Date: WED, 01 Jul 2015 04:17:50 GMT
 Content-Length: 0
 
-

Sample Request: Uploading an Object (with Website Hosting Configured)

If static website hosting has been configured for a bucket, you can configure parameters as follows when you upload an object. Then, users will be redirected when they download the object.

@@ -499,7 +681,6 @@ Expect: 100-continue [1024 Byte data content]
-

Sample Response: Uploading an Object (with Website Hosting Configured)

1
@@ -518,7 +699,6 @@ Date: WED, 01  AAABQ4q2M9_c0vycq3gAAAAAVURTRkha
 Content-Length: 0
 
-

Sample Request: Uploading an Object Using a Signed URL

PUT /object02?AccessKeyId=H4IPJX0TQTHTHEBQQCEC&Expires=1532688887&Signature=EQmDuOhaLUrzrzRNZxwS72CXeXM%3D HTTP/1.1
@@ -545,7 +725,6 @@ Date: Fri, 27  AAABQ4q2M9_c0vycq3gAAAAAVURTRkha
 Content-Length: 0
 
-

Sample Request: Uploading an Object (with a Storage Class Specified)

 1
@@ -570,7 +749,6 @@ Expect: 100-continue
 
 [1024 Byte data content]
 
-

Sample Response: Uploading an Object (with a Storage Class Specified)

1
@@ -587,7 +765,6 @@ x-obs-id-2: a39E0UgAIAABAAAQAAEAABAAAQAAEAABCTPOUJu5XlNyU
 Date: WED, 01 Jul 2015 04:15:07 GMT
 Content-Length: 0
 
-

Sample Request: Uploading an Object (with a WORM Retention Policy Configured)

PUT /object01 HTTP/1.1
@@ -597,8 +774,8 @@ Accept: */*
 Date: WED, 01 Jul 2015 04:11:15 GMT
 Authorization: OBS H4IPJX0TQTHTHEBQQCEC:gYqplLq30dEX7GMi2qFWyjdFsyw=
 Content-Length: 10240
-x-obs-object-lock-mode:COMPLIANCE
-x-obs-object-lock-retain-until-date:2022-09-24T16:10:25Z
+x-obs-object-lock-mode:COMPLIANCE
+x-obs-object-lock-retain-until-date:2022-09-24T16:10:25Z
 Expect: 100-continue
 
 [1024 Byte data content]
@@ -617,7 +794,6 @@ x-obs-id-2: 32AAAWJAMAABAAAQAAEAABAAAQAAEAABCTzu4Jp2lquWu Date: WED, 01 Jul 2015 04:11:15 GMT Content-Length: 0
- diff --git a/docs/obs/api-ref/obs_04_0081.html b/docs/obs/api-ref/obs_04_0081.html index 9a51050f..c57cc012 100644 --- a/docs/obs/api-ref/obs_04_0081.html +++ b/docs/obs/api-ref/obs_04_0081.html @@ -1,24 +1,24 @@

Uploading an Object - POST

-

Functions

This operation uploads an object to a bucket. To use this operation, you must have the write permission for the bucket.

+

Functions

This API allows you to upload an object to a bucket. This requires the write permission for the bucket.

The name of each object in a bucket must be unique.

-

With versioning not enabled, if an object to be uploaded has the same name as an existing object in the bucket, the newly uploaded object will overwrite the existing one. To protect data from being corrupted during transmission, you can add the Content-MD5 parameter in the form field. After receiving the uploaded object, OBS compares the provided MD5 value to the MD5 value it calculates. If the two values do not match, OBS reports an error. You can also specify the value of the x-obs-acl parameter to configure an access control policy for the object.

+

If a bucket has versioning disabled, and you upload an object that has the same name as an existing object, the new object overwrites the existing one. You can also use Content-MD5 in the form to verify in-transit integrity. OBS calculates an MD5 after the object is uploaded and checks if this MD5 matches the MD5 carried in the form. If they do not match, an error is reported. You can also use x-obs-acl to control access to objects.

You can also upload an object using the POST method.

-

For a single upload, the size of the object to be uploaded ranges [0, 5 GB]. To upload a file greater than 5 GB, see Operations on Multipart Upload.

-

This operation supports server-side encryption.

+

A single upload allows at most 5 GB of objects. To upload more than 5 GB of objects, see Operations on Multipart Upload.

+

This API supports server-side encryption.

-

Differences Between PUT and POST Methods

Parameters are passed through the request header if the PUT method is used to upload objects; if the POST method is used to upload objects, parameters are passed through the form field in the message body.

-

With the PUT method, you need to specify the object name in the URL, but object name is not required with the POST method, which uses the bucket domain name as the URL. Request lines of these two methods are given as follows:

+

Differences Between PUT and POST Methods

PUT requests include parameters in the header; POST requests in the form.

+

In the URL, PUT requests require object names be specified; POST requests only require bucket domain names. Request lines of PUT and POST are as follows:

PUT /ObjectName HTTP/1.1
POST / HTTP/1.1

For details about PUT upload, see Uploading an Object - PUT.

-

Versioning

If versioning is enabled for a bucket, the system automatically generates a unique version ID for the requested object in this bucket and returns the version ID in response header x-obs-version-id. If versioning is suspended for a bucket, the version ID of the requested object in this bucket is null. For details about the versioning statuses of a bucket, see Configuring Versioning for a Bucket.

+

Versioning

If versioning is enabled for a bucket, each object uploaded has a unique version ID. If versioning is suspended, the version ID is null. Version IDs are returned in the x-obs-version-id header of the response. For details about versioning, see Configuring Versioning for a Bucket.

-

WORM

If a bucket has WORM enabled, you can configure retention policies for objects in the bucket. You can specify the x-obs-object-lock-mode and x-obs-object-lock-retain-until-date headers to configure a retention policy when you upload an object. If you do not specify these two headers but have configured a default bucket-level WORM policy, this default policy automatically applies to the object newly uploaded. You can also configure or update a WORM retention policy for an existing object.

-

When you enable WORM for a bucket, OBS automatically enables versioning for the bucket. WORM protects objects based on the object version IDs. Only object versions with any WORM retention policy configured will be protected. Assume that object test.txt 001 is protected by WORM. If another file with the same name is uploaded, a new object version test.txt 002 with no WORM policy configured will be generated. In such case, test.txt 002 is not protected and can be deleted. When you download an object without specifying a version ID, the current object version (test.txt 002) will be downloaded.

+

WORM

If a bucket has WORM enabled, you can configure WORM for its objects. To do so, use x-obs-object-lock-mode and x-obs-object-lock-retain-until-date in the request when uploading an object. If these two elements are not specified, objects uploaded use the default bucket WORM policy (if any). You can also configure or update WORM after an object was uploaded.

+

If WORM is enabled, versioning is automatically enabled. WORM is based on the object version. Versions of an object not protected by WORM can be deleted. For example, assume version test.txt 001 of an object is protected by WORM. You upload a new version test.txt 002 for the same object with no WORM configured. In such case, test.txt 002 is not protected and can be deleted. If you download an object without specifying a version ID, the latest version — test.txt 002 — is downloaded.

Request Syntax

 1
@@ -131,311 +131,575 @@ Content-Disposition: form-data; na
 Upload to OBS 
 --9431149156168--
 
-

Request Parameters

This request contains no parameters.

Request Headers

This request uses common headers. For details, see Table 3.

-

If you want to get CORS configuration information, you must use the headers in Table 1.

+

If you want to get CORS settings, use the headers in Table 1.

-
Table 1 Request headers for obtaining CORS configuration

Header

+
- - + - - - + - - - +
Table 1 Request headers for obtaining CORS configuration

Header

Description

+

Type

Mandatory

+

Mandatory (Yes/No)

+

Description

Origin

+

Origin

Origin of the cross-domain request specified by the pre-request. Generally, it is a domain name.

-

Type: string

+

String

Yes

+

Yes

+

Explanation:

+

Where a cross-domain request is from (usually a domain name), specified in a preflight request

+

Restrictions:

+

None

+

Value range:

+

An HTTP-compliant header value

+

Default value:

+

None

Access-Control-Request-Headers

+

Access-Control-Request-Headers

Indicates the HTTP headers of a request. The request can use multiple HTTP headers.

-

Type: string

+

String

No

+

No

+

Explanation:

+

HTTP headers in a request. Multiple headers can be included.

+

Restrictions:

+

None

+

Value range:

+

An HTTP-compliant header value

+

Default value:

+

None

-

Request Elements

This request uses form elements. Table 2 describes the form elements.

+

Request Elements

This request uses form elements. Table 2 describes the form elements.

-
Table 2 Form elements

Parameter

+
- - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + + + + + + + + + + + + + + + + + + + + + @@ -452,83 +716,158 @@ Location: location Date: date ETag: etag
Table 2 Form elements

Element

Description

+

Type

Mandatory

+

Mandatory (Yes/No)

+

Description

file

+

file

Specifies the object content uploaded. Both the file name and file path are ignored and will not be used as the object name. The object name is the value of parameter key.

-

Type: binary content or text

-

Constraint: This parameter must be the last parameter in a form. Otherwise, parameters after this parameter will be all discarded. Additionally, each request contains only one file parameter.

+

Binary or text

Yes

+

Yes

+

Explanation:

+

Object content to upload. Both the file name and path are ignored and will not be used as the object name. The object name is the value of parameter key.

+

Restrictions:

+
  • This parameter must be the last to specify. Otherwise, the parameters that follow it will be discarded.
  • A request can contain only one file parameter.
+

Value range:

+

None

+

Default value:

+

None

key

+

key

Indicates the name of the object to be created.

-

Type: string

+

String

Yes

+

Yes

+

Explanation:

+

Name of the object to be created. An object is uniquely identified by an object name in a bucket. An object name is a complete path that does not contain the bucket name.

+

Restrictions:

+

None

+

Value range:

+

1 to 1,024 characters

+

Default value:

+

None

AccessKeyId

+

AccessKeyId

Access key ID (AK) of the requester.

-

Type: string

-

Constraint: This parameter is mandatory if there is security policy parameter policy or signature in the request.

+

String

Yes when the constraint is met.

+

Yes when the restrictions are met

+

Explanation:

+

Access key ID (AK) of the requester.

+

Restrictions:

+

This parameter is mandatory if there is security policy parameter policy or signature in the request.

+

Value range:

+

AK of a user.

+

Default value:

+

None

policy

+

policy

Indicates the security policy in the request. For details about the policy format, see the policy format in Authentication of Signature Carried in the Table Uploaded Through a Browser.

-

Type: string

-

Constraint: This parameter is mandatory if the bucket provides the AccessKeyId (or signature).

+

String

Yes when the constraint is met.

+

Yes when the restrictions are met

+

Explanation:

+

A security policy

+

Restrictions:

+

This parameter is mandatory if AccessKeyId or signature is provided in the form.

+

Value range:

+

For the policy format, see Authentication of Signature Carried in the Table Uploaded Through a Browser.

+

Default value:

+

None

signature

+

signature

Indicates a signature string calculated based on StringToSign.

-

Type: string

-

Constraint: This parameter is mandatory if the bucket provides the AccessKeyId (or policy).

+

String

Yes when the constraint is met.

+

Yes when the restrictions are met

+

Explanation:

+

A signature string calculated based on StringToSign.

+

Restrictions:

+

This parameter is mandatory if AccessKeyId or policy is provided in the form.

+

Value range:

+

None

+

Default value:

+

None

token

+

token

Specifies the AK, signature, and security policy of the request initiator. The priority of a token is higher than that of a specified AK, the request signature, and the security policy of the request initiator.

-

Type: string

-

Example:

-

In HTML: <input type= "text" name="token" value="ak:signature:policy" />

+

String

No

+

No

+

Explanation:

+

Specifies the access key, signature, and security policy of the requester all together.

+

Restrictions:

+

The priority of a token is higher than that of a separately specified AK, signature, or security policy.

+

Example:

+

In HTML: <input type= "text" name="token" value="ak:signature:policy" />

+

Value range:

+

The value must be in the ak:signature:policy format.

+

Default value:

+

None

x-obs-acl

+

x-obs-acl

When creating an object, you can add this header to set the permission control policy for the object. The predefined common policies are as follows: private, public-read, public-read-write, public-read-delivered, and public-read-write-delivered.

-

Type: string

-

Examples:

-

In POLICY: {"acl": "public-read" }

-

In HTML: <input type="text" name="acl" value="public-read" />

+

String

No

+

No

+

Explanation:

+

Used to set a pre-defined ACL when creating an object

+

Examples:

+

In POLICY: {"acl": "public-read" }

+

In HTML: <input type="text" name="acl" value="public-read" />

+

Restrictions:

+

None

+

Value range:

+
  • private
  • public-read
  • public-read-write
  • public-read-delivered
  • public-read-write-delivered
+

+

Default value:

+

private

x-obs-grant-read

+

x-obs-grant-read

When creating an object, you can use this header to grant all users in an account the permissions to read the object and obtain the object metadata.

-

Type: string

-

Examples:

-

In POLICY: {'grant-read': 'id=domainId1' },

-

In HTML: <input type="text" name="grant-read" value="id=domainId1" />

+

String

No

+

No

+

Explanation:

+

Used to — when creating an object — grant all users in a domain the permissions to read the object and obtain the object metadata

+

Examples:

+

In POLICY: {'grant-read': 'id=domainId1' },

+

In HTML: <input type="text" name="grant-read" value="id=domainId1" />

+

Restrictions:

+

Use commas (,) to separate multiple domains.

+

Value range:

+

The value of domainId must be valid. For details about how to obtain the ID, see Obtaining a Domain ID and a User ID.

+

Default value:

+

None

x-obs-grant-read-acp

+

x-obs-grant-read-acp

When creating an object, you can use this header to grant all users in an account the permission to obtain the object ACL.

-

Type: string

-

Examples:

-

In POLICY: {"grant-read-acp": "id=domainId1" },

-

In HTML: <input type="text" name="grant-read-acp" value="id=domainId1" />

+

String

No

+

No

+

Explanation:

+

Used to — when creating an object — grant all users in a domain the permission to obtain the object ACL.

+

Examples:

+

In POLICY: {"grant-read-acp": "id=domainId1" },

+

In HTML: <input type="text" name="grant-read-acp" value="id=domainId1" />

+

Restrictions:

+

None

+

Value range:

+

The value of domainId must be valid. For details about how to obtain the ID, see Obtaining a Domain ID and a User ID.

+

Default value:

+

None

x-obs-grant-write-acp

+

x-obs-grant-write-acp

When creating an object, you can use this header to grant all users in an account the permission to write the object ACL.

-

Type: string

-

Examples:

-

In POLICY: {"grant-write-acp": "id=domainId1" },

-

In HTML: <input type="text" name="grant-write-acp" value="id=domainId1" />

+

String

No

+

No

+

Explanation:

+

Used to — when creating an object — grant all users in a domain the permission to write the object ACL.

+

Examples:

+

In POLICY: {"grant-write-acp": "id=domainId1" },

+

In HTML: <input type="text" name="grant-write-acp" value="id=domainId1" />

+

Restrictions:

+

None

+

Value range:

+

The value of domainId must be valid. For details about how to obtain the ID, see Obtaining a Domain ID and a User ID.

+

Default value:

+

None

x-obs-grant-full-control

+

x-obs-grant-full-control

When creating an object, you can use this header to grant all users in an account the permissions to read the object, obtain the object metadata and ACL, and write the object ACL.

-

Type: string

-

Examples:

-

In POLICY: {"grant-full-control": "id=domainId1" },

-

In HTML: <input type="text" name="grant-full-control" value="id=domainId1" />

+

String

No

+

No

+

Explanation:

+

When creating an object, you can use this header to grant all users in an account the permissions to read the object, obtain the object metadata and ACL, and write the object ACL.

+

Examples:

+

In POLICY: {"grant-full-control": "id=domainId1" },

+

In HTML: <input type="text" name="grant-full-control" value="id=domainId1" />

+

Restrictions:

+

None

+

Value range:

+

The value of domainId must be valid. For details about how to obtain the ID, see Obtaining a Domain ID and a User ID.

+

Default value:

+

None

x-obs-storage-class

+

x-obs-storage-class

When creating an object, you can use this header to specify the storage class for the object. If you do not use this header, the object storage class is the default storage class of the bucket.

-

Type: string

-

Storage class options: STANDARD (Standard), WARM (Warm), COLD (Cold). These values are case sensitive.

-

Examples:

-

In POLICY: {"storage-class": "STANDARD" },

-

In HTML: <input type="text" name="x-obs-storage-class" value="STANDARD" />

+

String

No

+

No

+

Explanation:

+

Used to — when creating an object — specify its storage class.

+

Examples:

+

In POLICY: {"storage-class": "STANDARD" },

+

In HTML: <input type="text" name="x-obs-storage-class" value="STANDARD" />

+

Restrictions:

+

The value is case-sensitive.

+

Value range:

+
  • STANDARD
  • WARM
  • COLD
+

Default value:

+

If you do not use this header, the object storage class is the default storage class of the bucket.

Cache-Control,

-

Content-Type,

-

Content-Disposition,

-

Content-Encoding

-

Expires

+

Cache-Control

Standard HTTP headers. OBS records those headers. If you download the object or send the HEAD Object request, those parameter values are returned.

-

Type: string

-

Examples:

-

In POLICY: ["starts-with", "$Content-Type", "text/"],

-

In HTML: <input type="text" name="content-type" value="text/plain" />

+

String

No

+

No

+

Explanation:

+

Standard HTTP header, returned in the response if a user downloads the object or makes a Head Object request.

+

Restrictions:

+

None

+

Value range:

+

See the HTTP requirements for the Cache-Control header.

+

Default value:

+

None

success_action_redirect

+

Content-Type

Indicates the address (URL) to which a successfully responded request is redirected.

-
  • If the value is valid and the request is successful, OBS returns status code 303. Location contains success_action_redirect as well as the bucket name, object name, and object ETag.
  • If this parameter value is invalid, OBS ignores this parameter. In such case, the Location header is the object address, and OBS returns the response code based on whether the operation succeeds or fails.
-

Type: string

-

Examples:

-

In POLICY: {"success_action_redirect": "http://123458.com"},

-

In HTML: <input type="text" name="success_action_redirect" value="http://123458.com" />

+

String

No

+

No

+

Explanation:

+

Standard HTTP header, returned in the response if a user downloads the object or makes a Head Object request.

+

Example:

+

In POLICY: ["starts-with", "$Content-Type", "text/"],

+

In HTML: <input type="text" name="content-type" value="text/plain" />

+

Restrictions:

+

None

+

Value range:

+

See the HTTP requirements for the Content-Type header.

+

Default value:

+

None

x-obs-meta-*

+

Content-Disposition

Indicates user-defined metadata. When creating an object, you can use this header or a header starting with x-obs-meta- to define object metadata in an HTTP request. The user-defined metadata will be returned in the response when you retrieve the object or query the object metadata.

-

Type: string

-

Examples:

-

In POLICY: {" x-obs-meta-test ": " test metadata " },

-

In HTML: <input type="text" name=" x-obs-meta-test " value=" test metadata " />

+

String

No

+

No

+

Explanation:

+

Standard HTTP header, returned in the response if a user downloads the object or makes a Head Object request.

+

Restrictions:

+

None

+

Value range:

+

See the HTTP requirements for the Content-Disposition header.

+

Default value:

+

None

success_action_status

+

Content-Encoding

Indicates the status code returned after the request is successfully received. Possible values are 200, 201, and 204.

-
  • If this parameter is set to 200 or 204, the body in the OBS response message is empty.
  • If this parameter is set to 201, the OBS response message contains an XML document that describes the response to the request.
  • If the request does not include this parameter or the parameter value is invalid, OBS returns status code 204.
-

Type: string

-

Examples:

-

In POLICY: ["starts-with", "$success_action_status", ""],

-

In HTML: <input type="text" name="success_action_status" value="200" />

+

String

No

+

No

+

Explanation:

+

Standard HTTP header, returned in the response if a user downloads the object or makes a Head Object request.

+

Restrictions:

+

None

+

Value range:

+

See the HTTP requirements for the Content-Encoding header.

+

Default value:

+

None

x-obs-website-redirect-location

+

Expires

If a bucket is configured with the static website hosting function, it will redirect requests for this object to another object in the same bucket or to an external URL. OBS stores the value of this header in the object metadata.

-

Default value: none

-

Constraint: The value must be prefixed by a slash (/), http://, or https://. The length of the value cannot exceed 2 KB.

+

String

No

+

No

+

Explanation:

+

Standard HTTP header, returned in the response if a user downloads the object or makes a Head Object request.

+

Restrictions:

+

None

+

Value range:

+

See the HTTP requirements for the Expires header.

+

Default value:

+

None

x-obs-server-side-encryption

+

success_action_redirect

Indicates that SSE-KMS is used.

-

Type: string

-

Example: x-obs-server-side-encryption:kms

+

String

No. This header is required when SSE-KMS is used.

+

No

+

Explanation:

+

Where a successful request is redirected

+
  • If the value is valid and the request is successful, OBS returns status code 303. Location contains success_action_redirect as well as the bucket name, object name, and object ETag.
  • If the value is invalid, OBS ignores this parameter. Location contains the object address, and OBS returns the response code based on the actual result.
+

Examples:

+

In POLICY: {"success_action_redirect": "http://123458.com"},

+

In HTML: <input type="text" name="success_action_redirect" value="http://123458.com" />

+

Restrictions:

+

The value must start with http or https.

+

Value range:

+

URL

+

Default value:

+

None

x-obs-server-side-encryption-kms-key-id

+

x-obs-meta-*

Indicates the master key when SSE-KMS is used. If this header is not provided, the default master key will be used. If there is no such a default master key, OBS will create one and use it by default.

-

Type: string

-

The following two formats are supported:

-

- regionID:domainID:key/key_id

-

2. key_id

-

regionID indicates the ID of the region where the key belongs. domainID indicates the ID of the tenant where the key belongs. key_id indicates the ID of the key created in KMS.

-

Examples:

-

- x-obs-server-side-encryption-kms-key-id: region:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0

-

- x-obs-server-side-encryption-kms-key-id:4f1cd4de-ab64-4807-920a-47fc42e7f0d0

+

String

No

+

No

+

Explanation:

+

Used when creating an object to define metadata. The defined metadata is returned in the response when you obtain the object or query its metadata.

+

Examples:

+

In POLICY: {" x-obs-meta-test ": " test metadata " },

+

In HTML: <input type="text" name=" x-obs-meta-test " value=" test metadata " />

+

Restrictions:

+

None

+

Value range:

+

For details, see Object Metadata.

+

Default value:

+

None

x-obs-server-side-encryption-customer-algorithm

+

success_action_status

Indicates the encryption algorithm when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-algorithm:AES256

-

Constraint: This header must be used together with x-obs-server-side-encryption-customer-key and x-obs-server-side-encryption-customer-key-MD5.

+

String

No. This header is required when SSE-C is used.

+

No

+

Explanation:

+

The status code returned for a successful request.

+

Examples:

+

In POLICY: ["starts-with", "$success_action_status", ""],

+

In HTML: <input type="text" name="success_action_status" value="200" />

+

Restrictions:

+
  • If this parameter is set to 200 or 204, the response body is left blank.
  • If this parameter is set to 201, the response message contains an XML document that describes the response.
  • If this parameter is not specified or is invalid, the status code is 204.
+

Value range:

+
  • 200
  • 201
  • 204
+

Default value:

+

None

x-obs-server-side-encryption-customer-key

+

x-obs-website-redirect-location

Indicates the key for encrypting objects when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=

-

Constraint: This header is a Base64-encoded 256-bit key and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key-MD5.

+

String

No. This header is required when SSE-C is used.

+

No

+

Explanation:

+

If a bucket is configured with static website hosting, requests for one object in this bucket can be redirected to another object in the same bucket or to an external URL. OBS stores the value of this header in the object metadata.

+

Restrictions:

+

The value must start with a slash (/), http://, or https:// and cannot exceed 2K.

+

Value range:

+

None

+

Default value:

+

None

x-obs-server-side-encryption-customer-key-MD5

+

x-obs-server-side-encryption

Indicates the MD5 value of the encryption key when SSE-C is used. The MD5 value is used to check whether any error occurs during the transmission of the key.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

-

Constraint: This header is a Base64-encoded 128-bit MD5 value and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key.

+

String

No. This header is required when SSE-C is used.

+

No. This header is required when SSE-KMS is used.

+

Explanation:

+

Indicates that SSE-KMS is used for server-side encryption.

+

Example: x-obs-server-side-encryption:kms

+

Restrictions:

+

None

+

Value range:

+
  • kms
  • AES256
+

Default value:

+

None

x-obs-expires

+

x-obs-server-side-encryption-kms-key-id

Specifies when an object expires. It is measured in days. Once the object expires, it is automatically deleted. (The calculation starts from when the object was last modified).

-

Type: integer

-

Example: x-obs-expires:3

+

String

No

+

No

+

Explanation:

+

ID of a specified key used for SSE-KMS encryption.

+

Restrictions:

+

This header can only be used when you specify kms for the x-obs-server-side-encryption header.

+

Default value:

+

If you specify kms for encryption but do not specify a key ID, the default master key will be used. If there is not a default master key, OBS will create one and use it.

x-obs-object-lock-mode

+

x-obs-server-side-encryption-customer-algorithm

WORM mode that will be applied to the object. Currently, only COMPLIANCE is supported. This header must be used together with x-obs-object-lock-retain-until-date.

-

Type: string

-

Example: x-obs-object-lock-mode:COMPLIANCE

+

String

No, but required when x-obs-object-lock-retain-until-date is present.

+

No. This header is required when SSE-C is used.

+

Explanation:

+

The algorithm used for encryption.

+

Example: x-obs-server-side-encryption-customer-algorithm:AES256

+

Restrictions:

+
  • This header is used only when SSE-C is used.
  • This header must be used with x-obs-server-side-encryption-customer-key and x-obs-server-side-encryption-customer-key-MD5.
+

Value range:

+

AES256

+

Default value:

+

None

x-obs-object-lock-retain-until-date

+

x-obs-server-side-encryption-customer-key

Indicates the expiration time of the Object Lock retention. The value must be a UTC time that complies with ISO 8601, for example, 2015-07-01T04:11:15Z. This header must be used together with x-obs-object-lock-mode.

-

Type: string

-

Example: x-obs-object-lock-retain-until-date:2015-07-01T04:11:15Z

+

String

No, but required when x-obs-object-lock-mode is present.

+

No. This header is required when SSE-C is used.

+

Explanation:

+

The key used for encrypting an object.

+

Example: x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=

+

Restrictions:

+
  • This header is used only when SSE-C is used.
  • This header is a Base64-encoded 256-bit key. It must be used with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key-MD5.
+

Value range:

+

None

+

Default value:

+

None

+

x-obs-server-side-encryption-customer-key-MD5

+

String

+

No. This header is required when SSE-C is used.

+

Explanation:

+

The MD5 value of the key used for encryption. Used to check whether any error occurs during the key transmission.

+

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

Restrictions:

+
  • This header is used only when SSE-C is used.
  • This header is a Base64-encoded 128-bit MD5 value. It must be used with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key.
+

Value range:

+

MD5 value of the key.

+

Default value:

+

None

+

x-obs-expires

+

Integer

+

No

+

Explanation:

+

When an object expires and is deleted (how many days after the last update).

+

You can configure this parameter when uploading an object. You can also modify it after the object is uploaded by using the metadata modification API.

+

Example: x-obs-expires:3

+

Restrictions:

+

The value must be greater than the number of days that have passed since the object was created. For example, if the object was uploaded 10 days ago, you must specify a value greater than 10.

+

Value range:

+

The value is an integer greater than 0.

+

Default value:

+

None

+

x-obs-object-lock-mode

+

String

+

No, but required when x-obs-object-lock-retain-until-date is present.

+

Explanation:

+

WORM mode applied to the object.

+

Example: x-obs-object-lock-mode:COMPLIANCE

+

Restrictions:

+

Currently, only COMPLIANCE (compliance mode) is supported.

+

This parameter must be used with x-obs-object-lock-retain-until-date.

+

Value range:

+

COMPLIANCE

+

Default value:

+

None

+

x-obs-object-lock-retain-until-date

+

String

+

No, but required when x-obs-object-lock-mode is present.

+

Explanation:

+

When the WORM policy of the object expires.

+

Example: x-obs-object-lock-retain-until-date:2015-07-01T04:11:15Z

+

Restrictions:

+

The value must be a UTC time that complies with the ISO 8601 standard. Example: 2015-07-01T04:11:15Z

+

This parameter must be used with x-obs-object-lock-mode.

+

Value range:

+

The time must be later than the current time.

+

Default value:

+

None

-

Response Headers

The response to the request uses common headers. For details, see Table 1.

-

In addition to the common response headers, the headers listed in Table 3 may be used.

+

In addition to the common response headers, the headers listed in Table 3 may be used.

-
Table 3 Additional response headers

Header

+
- + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + @@ -663,7 +1002,6 @@ Content-Disposition: form-data; na Upload --7db143f50da2--
Table 3 Additional response headers

Header

Description

+

Type

+

Description

x-obs-version-id

+

x-obs-version-id

Object version ID. If versioning is enabled for the bucket, the object version ID will be returned. A string null will be returned if the bucket housing the object has versioning suspended.

-

Type: string

+

String

+

Explanation:

+

Object version ID.

+

Restrictions:

+
  • If versioning is enabled for the bucket, the object version ID will be returned.
  • If versioning is suspended for the bucket, a string null is returned.
+

Value range:

+

The value is automatically generated by the server.

+

Default value:

+

None

Access-Control-Allow-Origin

+

Access-Control-Allow-Origin

Indicates that the origin is included in the response if the origin in the request meets the CORS configuration requirements when CORS is configured for buckets.

-

Type: string

+

String

+

Explanation:

+

Returned if the request origin meets the CORS configured on the server.

+

Restrictions:

+

None

+

Value range:

+

The value that complies with the CORS

+

Default value:

+

None

Access-Control-Allow-Headers

+

Access-Control-Allow-Headers

Indicates that the headers are included in the response if headers in the request meet the CORS configuration requirements when CORS is configured for buckets.

-

Type: string

+

String

+

Explanation:

+

Returned if the request headers meet the CORS configured on the server.

+

Restrictions:

+

None

+

Value range:

+

The value that complies with the CORS

+

Default value:

+

None

Access-Control-Max-Age

+

Access-Control-Max-Age

Indicates MaxAgeSeconds in the CORS configuration of the server when CORS is configured for buckets.

-

Type: integer

+

Integer

+

Explanation:

+

Value of MaxAgeSeconds in the CORS configuration on the server when CORS is configured for buckets.

+

Restrictions:

+

None

+

Value range:

+

An integer greater than or equal to 0, in seconds

+

Default value:

+

3000

Access-Control-Allow-Methods

+

Access-Control-Allow-Methods

Indicates that methods in the rule are included in the response if Access-Control-Request-Method in the request meets the CORS configuration requirements when CORS is configured for buckets.

-

Type: string

-

Value options: GET, PUT, HEAD, POST, DELETE

+

String

+

Explanation:

+

If a bucket has CORS configured, and Access-Control-Request-Method in the request meets the CORS configuration on the server, the specified methods in the rule are returned.

+

Restrictions:

+

None

+

Value range:

+
  • GET
  • PUT
  • HEAD
  • POST
  • DELETE
+

Default value:

+

None

Access-Control-Expose-Headers

+

Access-Control-Expose-Headers

Value of ExposeHeader in the CORS configuration of a server when CORS is configured for buckets.

-

Type: string

+

String

+

Explanation:

+

ExposeHeader in the CORS rules of the bucket. It specifies additional headers allowed in the response by a CORS rule. These headers provide extra information to clients. By default, a browser can access only headers Content-Length and Content-Type. If the browser needs to access other headers, you need to configure them as additional headers.

+

Restrictions:

+

Spaces, asterisks (*), ampersands (&), colons (:), less-than signs (<), and full-width characters are not allowed.

+

Value range:

+

None

+

Default value:

+

None

x-obs-server-side-encryption

+

x-obs-server-side-encryption

This header is included in a response if SSE-KMS is used.

-

Type: string

-

Example: x-obs-server-side-encryption:kms

+

String

+

Explanation:

+

The encryption method used by the server.

+

Example: x-obs-server-side-encryption:kms

+

Restrictions:

+

This header is included in a response if SSE-KMS is used.

+

Value range:

+
  • kms
  • AES256
+

Default value:

+

None

x-obs-server-side-encryption-kms-key-id

+

x-obs-server-side-encryption-kms-key-id

Indicates the master key ID. This header is included in a response when SSE-KMS is used.

-

Type: string

-

Format: regionID:domainID:key/key_id

-

regionID indicates the ID of the region where the key belongs. domainID indicates the ID of the tenant where the key belongs. key_id indicates the key ID used in this encryption.

-

Example: x-obs-server-side-encryption-kms-key-id:region:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0

+

String

+

Explanation:

+

ID of a specified key used for SSE-KMS encryption.

+

Restrictions:

+

This header can only be used when you specify kms for the x-obs-server-side-encryption header.

+

Default value:

+

If you specify kms for encryption but do not specify a key ID, the default master key will be used. If there is not a default master key, OBS will create one and use it.

x-obs-server-side-encryption-customer-algorithm

+

x-obs-server-side-encryption-customer-algorithm

Indicates the encryption algorithm. This header is included in a response when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-algorithm:AES256

+

String

+

Explanation:

+

The algorithm used for encryption.

+

Example: x-obs-server-side-encryption-customer-algorithm:AES256

+

Restrictions:

+

Only for SSE-C server-side encryption.

+

Value range:

+

AES256

+

Default value:

+

None

x-obs-server-side-encryption-customer-key-MD5

+

x-obs-server-side-encryption-customer-key-MD5

Indicates the MD5 value of the key for encrypting objects. This header is included in a response when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

String

+

Explanation:

+

The MD5 value of the key used for encryption.

+

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

Restrictions:

+

Only for SSE-C server-side encryption.

+

Value range:

+

MD5 value of the key.

+

Default value:

+

None

-

Sample Response: Uploading an Object Using POST

After CORS is configured for a bucket, the response contains the Access-Control-* information.

@@ -691,7 +1029,6 @@ Location: http://examplebucket.obs.region.example.com/obj Date: WED, 01 Jul 2015 04:15:23 GMT ETag: "ab7abb0da4bca5323ab6119bb5dcd296"
-

Sample Request: Uploading an Object (with x-obs-acl and a Storage Class Specified)

Upload an object with the x-obs-acl, storage class, and redirection header fields carried in the request message.

@@ -750,7 +1087,6 @@ ETag: "ab7abb0da4bca5323ab6119bb5dcd296" ] }
-

Sample request:

 1
@@ -831,7 +1167,6 @@ c2c6cd0f-898e-11e8-aab6-e567c91fb541
 
 --9431149156168--
 
-

Sample Response: Uploading an Object (with x-obs-acl and a Storage Class Specified)

1
@@ -848,7 +1183,6 @@ x-obs-request-id: 5DEB00000164A728A7C7F4E032214CFA
 x-obs-id-2: 32AAAUJAIAABAAAQAAEAABAAAQAAEAABCSwj2PcBE0YcoLHUDO7GSj+rVByzjflA
 Date: Tue, 17 Jul 2018 07:33:36 GMT
 
-

Sample Request: Using a Token for Authentication

 1
@@ -893,7 +1227,6 @@ Content-Type: text/plain
 Content-Disposition: form-data; name="submit"
 Upload to OBS
 
-

Sample Response: Using a Token for Authentication

1
@@ -910,7 +1243,6 @@ x-obs-request-id: 000001832010443D80F30B649B969C47
 x-obs-id-2: 32AAAUgAIAABAAAQAAEAABAAAQAAEAABCTj0yO9KJd5In+i9pzTgCDVG9vMnk7O/
 Date: Fri,09Sep 2022 02: 24:40 GMT
 
-

Sample Request: Specifying an Object Expiration Time

POST / HTTP/1.1 
diff --git a/docs/obs/api-ref/obs_04_0082.html b/docs/obs/api-ref/obs_04_0082.html
index 4103ae2e..02ab7282 100644
--- a/docs/obs/api-ref/obs_04_0082.html
+++ b/docs/obs/api-ref/obs_04_0082.html
@@ -18,6 +18,11 @@
 

In a copy operation, the object protection status is not copied, so the protection status of an object copy is independent of that of the source object. After the copy is complete, WORM retention changes made on the source object does not affect the object copy.

+

Object Tags

You can use the x-obs-tagging-directive header to specify how object tags will be processed during a copy. You can also configure tags for the object copy after the copy is complete.

+

To copy tags of a source object, you must have the GetObjectTagging permission for the source object. To copy tags of a source object version, you must have the GetObjectTagging and GetObjectVersionTagging permissions for the source object version. These permissions can be granted using object ACLs or bucket policies.

+

To add tags to an object copy, you must have the PutObjectTagging permission for the object copy. To add tags to an object copy version, you must have the PutObjectTagging and PutObjectVersionTagging permissions for the object copy version. These permissions can be granted using bucket ACLs or bucket policies.

+
+

Cold Objects

If source objects are in the Cold storage class, ensure that these objects have been restored before you copy them. If a source object is not restored or is being restored, its copy will fail and error 403 Forbidden will be returned. The fault is described as follows:

ErrorCode: InvalidObjectState

ErrorMessage: Operation is not valid for the source object's storage class

@@ -42,259 +47,460 @@ x-obs-copy-source-if-modified-since: time_stamp Authorization: signature Date: date
-

Request Parameters

This request contains no parameters.

Request Headers

You can add optional headers to specify the object to be copied. Table 3 describes the optional headers.

-
Table 1 Request headers

Header

+
- - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + + + + + + + + + + + @@ -324,94 +530,173 @@ Content-Length: length <ETag>etagValue</ETag> </CopyObjectResult>
Table 1 Request headers

Header

Description

+

Type

Mandatory

+

Mandatory (Yes/No)

+

Description

x-obs-acl

+

x-obs-acl

When copying an object, you can add this header to configure the object ACL using the predefined common policies, including private, public-read, and public-read-write.

-

Type: string

-

Example: x-obs-acl: acl

+

String

No

+

No

+

Explanation:

+

When copying an object, you can use this parameter to set a pre-defined ACL.

+

Example: x-obs-acl: acl

+

Restrictions:

+

Use character strings.

+

Value range:

+
  • private
  • public-read
  • public-read-write
+

+

Default value:

+

private

x-obs-grant-read

+

x-obs-grant-read

When creating an object, you can use this header to grant all users in an account the permissions to read the object and obtain the object metadata.

-

Type: string

+

String

No

+

No

+

Explanation:

+

When copying an object, you can use this header to grant all users in a domain the permissions to read the object and obtain the object metadata.

+

Restrictions:

+

None

+

Value range:

+

None

+

Default value:

+

None

x-obs-grant-read-acp

+

x-obs-grant-read-acp

When creating an object, you can use this header to grant all users in an account the permission to obtain the object ACL.

-

Type: string

+

String

No

+

No

+

Explanation:

+

When copying an object, you can use this header to grant all users in a domain the permissions to obtain the object ACL.

+

Restrictions:

+

None

+

Value range:

+

None

+

Default value:

+

None

x-obs-grant-write-acp

+

x-obs-grant-write-acp

When creating an object, you can use this header to grant all users in an account the permission to write the object ACL.

-

Type: string

+

String

No

+

No

+

Explanation:

+

When copying an object, you can use this header to grant all users in a domain the permissions to write the object ACL.

+

Restrictions:

+

None

+

Value range:

+

None

+

Default value:

+

None

x-obs-grant-full-control

+

x-obs-grant-full-control

When creating an object, you can use this header to grant all users in an account the permissions to read the object, obtain the object metadata and ACL, and write the object ACL.

-

Type: string

+

String

No

+

No

+

Explanation:

+

When copying an object, you can use this header to grant the following permissions to all users in a domain:

+

Permissions to read objects, obtain object metadata, obtain object ACLs, and write object ACLs.

+

Restrictions:

+

None

+

Value range:

+

None

+

Default value:

+

None

x-obs-copy-source

+

x-obs-copy-source

Indicates names of the source bucket and the source object. If the source object has multiple versions, the versionId parameter can be used to specify the desired version.

-

Type: string

-

Constraint: URL encoding is required for handling full-width characters and %.

-

Example: x-obs-copy-source: /source_bucket/sourceObject

+

String

Yes

+

Yes

+

Explanation:

+

Indicates names of the source bucket and the source object. If the source object has multiple versions, the versionId parameter can be used to specify the desired version.

+

Example: x-obs-copy-source: /source_bucket/sourceObject

+

Restrictions:

+

Full-width characters and percent signs (%) must be URL-encoded.

+

Value range:

+

None

+

Default value:

+

None

x-obs-metadata-directive

+

x-obs-metadata-directive

Indicates whether the metadata of the target object is copied from the source object or replaced with the metadata contained in the request.

-

Type: string

-

Valid values: COPY and REPLACE

-

Default value: COPY

-

Example: x-obs-metadata-directive: metadata_directive

-

Constraints: Values other than COPY or REPLACE result in an immediate 400-based error response. If you need to modify the metadata (the same for both the source and target objects), this parameter must be set to REPLACE, otherwise, the request is invalid and the server returns a 400 HTTP status code error. This parameter cannot be used to change an encrypted object to a non-encrypted object (the same for both the source and target objects). If you use this parameter to change the encrypted object, the system returns 400.

+

String

No

+

No

+

Explanation:

+

Indicates whether the metadata of the target object is copied from the source object or replaced with the metadata contained in the request.

+

Example: x-obs-metadata-directive: metadata_directive

+

Restrictions:

+

Values other than COPY or REPLACE result in an immediate 400-based error response. If you need to modify the metadata (the same for both the source and target objects), this parameter must be set to REPLACE. Otherwise, the request is invalid and the server returns a 400 HTTP status code error. This parameter cannot change an encrypted object to a non-encrypted one (for both the source and target objects). If you use this parameter to change the encryption of an object, OBS returns a 400 error.

+

Value range:

+
  • COPY
  • REPLACE
+

Default value:

+

COPY

x-obs-copy-source-if-match

+

x-obs-copy-source-if-match

Indicates that the source object is copied only if its ETag matches the one specified in this header. Otherwise, a 412 status code (failed precondition) is returned.

-

Type: string

-

Example: x-obs-copy-source-if-match: etag

-

Constraint: This header can be used with x-obs-copy-source-if-unmodified-since but not other conditional copy headers.

+

String

No

+

No

+

Explanation:

+

Indicates that the source object is copied only if its ETag matches the one specified in this header. Otherwise, a 412 status code (failed precondition) is returned.

+

Example: x-obs-copy-source-if-match: etag

+

Restrictions:

+

This parameter can be used with x-obs-copy-source-if-unmodified-since but cannot with other conditional copy headers.

+

Value range:

+

None

+

Default value:

+

None

x-obs-copy-source-if-none-match

+

x-obs-copy-source-if-none-match

Indicates that the source object is copied only if its ETag does not match the one specified in this header. Otherwise, a 412 status code (failed precondition) is returned.

-

Type: string

-

Example: x-obs-copy-source-if-none-match: etag

-

Constraint: This parameter can be used with x-obs-copy-source-if-modified-since but not other conditional copy parameters.

+

String

No

+

No

+

Explanation:

+

Indicates that the source object is copied only if its ETag does not match the one specified in this header. Otherwise, a 412 status code (failed precondition) is returned.

+

Example: x-obs-copy-source-if-none-match: etag

+

Restrictions:

+

This parameter can be used with x-obs-copy-source-if-modified-since but cannot with other conditional copy headers.

+

Value range:

+

None

+

Default value:

+

None

x-obs-copy-source-if-unmodified-since

+

x-obs-copy-source-if-unmodified-since

Indicates that the source object is copied only if it has not been modified since the time specified by this header. Otherwise, error code 412 (failed precondition) is returned. This header can be used with x-obs-copy-source-if-match, but cannot be used with other conditional copy headers.

-

Type: string

-

Format: HTTP time string complying with the format specified at http://www.ietf.org/rfc/rfc2616.txt, which can be any of the following:

-
  1. EEE, dd MMM yyyy HH:mm:ss z
  2. EEEE, dd-MMM-yy HH:mm:ss z
  3. EEE MMM dd HH:mm:ss yyyy
-

Examples:

-
  1. x-obs-copy-source-if-unmodified-since: Sun, 06 Nov 1994 08:49:37 GMT
  2. x-obs-copy-source-if-unmodified-since: Sunday, 06-Nov-94 08:49:37 GMT
  3. x-obs-copy-source-if-unmodified-since: Sun Nov 6 08:49:37 1994
-

Constraint: The time specified by this header cannot be later than the current server time (GMT time), or this header does not take effect.

+

String

No

+

No

+

Explanation:

+

The source object is copied only if the source object has not been modified since the time specified by this parameter. Otherwise, a 412 status code (precondition failed) is returned.

+

Restrictions:

+
  • The time specified by this parameter cannot be later than the current server time (GMT time), or this parameter does not take effect.
  • This parameter can be used with x-obs-copy-source-if-match but cannot with other conditional copy parameters.
  • Format: HTTP time string complying with the format specified at http://www.ietf.org/rfc/rfc2616.txt, which can be any of the following:
    1. EEE, dd MMM yyyy HH:mm:ss z
    2. EEEE, dd-MMM-yy HH:mm:ss z
    3. EEE MMM dd HH:mm:ss yyyy
    +

    Examples:

    +
    1. x-obs-copy-source-if-unmodified-since: Sun, 06 Nov 1994 08:49:37 GMT
    2. x-obs-copy-source-if-unmodified-since: Sunday, 06-Nov-94 08:49:37 GMT
    3. x-obs-copy-source-if-unmodified-since: Sun Nov 6 08:49:37 1994
    +
+

Value range:

+

None

+

Default value:

+

None

x-obs-copy-source-if-modified-since

+

x-obs-copy-source-if-modified-since

Indicates that the source object is copied only if it has been modified since the time specified by this header. Otherwise, error code 412 (failed precondition) is returned. This header can be used with x-obs-copy-source-if-none-match, but cannot be used with other conditional copy headers.

-

Type: string

-

Format: HTTP time string complying with the format specified at http://www.ietf.org/rfc/rfc2616.txt, which can be any of the following:

-
  1. EEE, dd MMM yyyy HH:mm:ss z
  2. EEEE, dd-MMM-yy HH:mm:ss z
  3. EEE MMM dd HH:mm:ss yyyy
-

Examples:

-
  1. x-obs-copy-source-if-unmodified-since: Sun, 06 Nov 1994 08:49:37 GMT
  2. x-obs-copy-source-if-unmodified-since: Sunday, 06-Nov-94 08:49:37 GMT
  3. x-obs-copy-source-if-unmodified-since: Sun Nov 6 08:49:37 1994
-

Constraint: The time specified by this header cannot be later than the current server time (GMT time), or this header does not take effect.

+

String

No

+

No

+

Explanation:

+

The source object is copied only if the source object has been modified since the time specified by this parameter. Otherwise, a 412 status code (precondition failed) is returned.

+

Restrictions:

+
  • The time specified by this parameter cannot be later than the current server time (GMT time), or this parameter does not take effect.
  • This parameter can be used with x-obs-copy-source-if-none-match but cannot with other conditional copy parameters.
  • Format: HTTP time string complying with the format specified at http://www.ietf.org/rfc/rfc2616.txt, which can be any of the following:
    1. EEE, dd MMM yyyy HH:mm:ss z
    2. EEEE, dd-MMM-yy HH:mm:ss z
    3. EEE MMM dd HH:mm:ss yyyy
    +

    Examples:

    +
    1. x-obs-copy-source-if-modified-since: Sun, 06 Nov 1994 08:49:37 GMT
    2. x-obs-copy-source-if-modified-since: Sunday, 06-Nov-94 08:49:37 GMT
    3. x-obs-copy-source-if-modified-since: Sun Nov 6 08:49:37 1994
    +
+

Value range:

+

None

+

Default value:

+

None

x-obs-storage-class

+

x-obs-storage-class

When copying an object, you can use this header to specify the storage class for the object. If you do not use this header, the object storage class is the default storage class of the destination bucket where the object is copied to.

-

Type: string

-

Storage class options: STANDARD (Standard), WARM (Warm), COLD (Cold). These values are case sensitive.

-

Example: x-obs-storage-class: STANDARD

+

String

No

+

No

+

Explanation:

+

When copying an object, you can use this header to specify the storage class for the object. If you do not use this header, the object storage class is the default storage class of the destination bucket where the object is copied to.

+

Example: x-obs-storage-class: STANDARD

+

Restrictions:

+

The value is case-sensitive.

+

Value range:

+
  • STANDARD
  • WARM
  • COLD
+

Default value:

+

By default, the storage class of the bucket is inherited.

x-obs-website-redirect-location

+

x-obs-website-redirect-location

If a bucket is configured with the static website hosting function, it will redirect requests for this object to another object in the same bucket or to an external URL. OBS stores the value of this header in the object metadata.

-

Type: string

-

Default value: none

-

Constraint: The value must be prefixed by a slash (/), http://, or https://. The length of the value cannot exceed 2 KB.

+

String

No

+

No

+

Explanation:

+

If a bucket is configured with the static website hosting function, it will redirect requests for this object to another object in the same bucket or to an external URL. OBS stores the value of this header in the object metadata.

+

Restrictions:

+

The value must start with a slash (/), http://, or https:// and cannot exceed 2K.

+

Value range:

+

None

+

Default value:

+

None

x-obs-server-side-encryption

+

x-obs-server-side-encryption

Indicates that SSE-KMS is used. Objects are encrypted using SSE-KMS.

-

Type: string

-

Example: x-obs-server-side-encryption: kms

+

String

No. This header is required when SSE-KMS is used.

+

No. This header is required when SSE-KMS is used.

+

Explanation:

+

Indicates that SSE-KMS is used for server-side encryption. Objects are encrypted using SSE-KMS.

+

Example: x-obs-server-side-encryption: kms

+

Restrictions:

+

None

+

Value range:

+
  • kms
  • AES256
+

Default value:

+

None

x-obs-server-side-encryption-kms-key-id

+

x-obs-server-side-encryption-kms-key-id

Indicates the master key for encrypting the object copy when SSE-KMS is used. If this header is not provided, the default master key will be used. If there is no such a default master key, OBS will create one and use it by default.

-

Type: string

-

The following two formats are supported:

-

- regionID:domainID:key/key_id

-

2. key_id

-

regionID indicates the ID of the region where the key belongs. domainID indicates the ID of the tenant where the key belongs. key_id indicates the ID of the key created in KMS.

-

Example:

-

- x-obs-server-side-encryption-kms-key-id: region:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0

-

- x-obs-server-side-encryption-kms-key-id: 4f1cd4de-ab64-4807-920a-47fc42e7f0d0

+

String

No

+

No

+

Explanation:

+

ID of a specified key used for SSE-KMS encryption.

+

Restrictions:

+

This header can only be used when you specify kms for the x-obs-server-side-encryption header.

+

Default value:

+

If you specify kms for encryption but do not specify a key ID, the default master key will be used. If there is not a default master key, OBS will create one and use it.

x-obs-server-side-encryption-customer-algorithm

+

x-obs-server-side-encryption-customer-algorithm

Indicates the encryption algorithm for the object copy when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-algorithm: AES256

-

Constraint: This header must be used together with x-obs-server-side-encryption-customer-key and x-obs-server-side-encryption-customer-key-MD5.

+

String

No. This header is required when SSE-C is used.

+

No. This header is required when SSE-C is used.

+

Explanation:

+

The algorithm used to encrypt a target object.

+

Example: x-obs-server-side-encryption-customer-algorithm: AES256

+

Restrictions:

+
  • This header is used only when SSE-C is used.
  • This header must be used together with x-obs-server-side-encryption-customer-key and x-obs-server-side-encryption-customer-key-MD5.
+

Value range:

+

AES256

+

Default value:

+

None

x-obs-server-side-encryption-customer-key

+

x-obs-server-side-encryption-customer-key

Indicates the key for encrypting the object copy when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=

-

Constraint: This header is a Base64-encoded 256-bit key and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key-MD5.

+

String

No. This header is required when SSE-C is used.

+

No. This header is required when SSE-C is used.

+

Explanation:

+

The key used to encrypt a target object.

+

Example: x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=

+

Restrictions:

+
  • This header is used only when SSE-C is used.
  • This header is a Base64-encoded 256-bit key and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key-MD5.
+

Value range:

+

None

+

Default value:

+

None

x-obs-server-side-encryption-customer-key-MD5

+

x-obs-server-side-encryption-customer-key-MD5

Indicates the MD5 value of the key for encrypting the object copy when SSE-C is used. The MD5 value is used to check whether any error occurs during the transmission of the key.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

-

Constraint: This header is a Base64-encoded 128-bit MD5 value and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key.

+

String

No. This header is required when SSE-C is used.

+

No. This header is required when SSE-C is used.

+

Explanation:

+

The MD5 value of the key used to encrypt a target object. The MD5 value is used to check whether any error occurs during the transmission of the key.

+

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

Restrictions:

+
  • This header is used only when SSE-C is used.
  • This header is a Base64-encoded 128-bit MD5 value and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key.
+

Value range:

+

MD5 value of the key.

+

Default value:

+

None

x-obs-copy-source-server-side-encryption-customer-algorithm

+

x-obs-copy-source-server-side-encryption-customer-algorithm

Indicates the algorithm for decrypting the source object when SSE-C is used.

-

Type: string

-

Example: x-obs-copy-source-server-side-encryption-customer-algorithm: AES256

-

Constraint: This header must be used together with x-obs-copy-source-server-side-encryption-customer-key and x-obs-copy-source-server-side-encryption-customer-key-MD5.

+

String

No. This header is required when SSE-C is used to copy a source object.

+

No. This header is required when SSE-C is used to copy a source object.

+

Explanation:

+

Indicates the algorithm used to decrypt a source object.

+

Example: x-obs-copy-source-server-side-encryption-customer-algorithm: AES256

+

Restrictions:

+
  • This header is used only when SSE-C is used.
  • This header must be used together with x-obs-copy-source-server-side-encryption-customer-key and x-obs-copy-source-server-side-encryption-customer-key-MD5.
+

Value range:

+

AES256

+

Default value:

+

None

x-obs-copy-source-server-side-encryption-customer-key

+

x-obs-copy-source-server-side-encryption-customer-key

Indicates the key for decrypting the source object when SSE-C is used.

-

Type: string

-

Example: x-obs-copy-source-server-side-encryption-customer-key: K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=

-

Constraint: This header is a Base64-encoded 256-bit key and must be used together with x-obs-copy-source-server-side-encryption-customer-algorithm and x-obs-copy-source-server-side-encryption-customer-key-MD5.

+

String

No. This header is required when SSE-C is used to copy a source object.

+

No. This header is required when SSE-C is used to copy a source object.

+

Explanation:

+

Indicates the key used to decrypt a source object.

+

Example: x-obs-copy-source-server-side-encryption-customer-key: K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=

+

Restrictions:

+
  • This header is used only when SSE-C is used.
  • This header is a Base64-encoded 256-bit key and must be used together with x-obs-copy-source-server-side-encryption-customer-algorithm and x-obs-copy-source-server-side-encryption-customer-key-MD5.
+

Value range:

+

None

+

Default value:

+

None

x-obs-copy-source-server-side-encryption-customer-key-MD5

+

x-obs-copy-source-server-side-encryption-customer-key-MD5

Indicates the MD5 value of the key for decrypting the source object when SSE-C is used. The MD5 value is used to check whether any error occurs during the transmission of the key.

-

Type: string

-

Example: x-obs-copy-source-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

-

Constraint: This header is a Base64-encoded 128-bit MD5 value and must be used together with x-obs-copy-source-server-side-encryption-customer-algorithm and x-obs-copy-source-server-side-encryption-customer-key.

+

String

No. This header is required when SSE-C is used to copy a source object.

+

No. This header is required when SSE-C is used to copy a source object.

+

Explanation:

+

Indicates the MD5 value of the key used to decrypt a source object. The MD5 value is used to check whether any error occurs during the transmission of the key.

+

Example: x-obs-copy-source-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

Restrictions:

+
  • This header is used only when SSE-C is used.
  • This header is a Base64-encoded 128-bit MD5 value and must be used together with x-obs-copy-source-server-side-encryption-customer-algorithm and x-obs-copy-source-server-side-encryption-customer-key.
+

Value range:

+

MD5 value of the key.

+

Default value:

+

None

success_action_redirect

+

success-action-redirect

Indicates the address (URL) to which a successfully responded request is redirected.

-
  • If the value is valid and the request is successful, OBS returns status code 303. Location contains success_action_redirect as well as the bucket name, object name, and object ETag.
  • If this parameter value is invalid, OBS ignores this parameter. In such case, the Location header is the object address, and OBS returns the response code based on whether the operation succeeds or fails.
-

Type: string

+

String

No

+

No

+

Explanation:

+

The redirection address used when requests were successfully responded to.

+
  • If the value is valid and the request is successful, OBS returns status code 303. Location contains success_action_redirect as well as the bucket name, object name, and object ETag.
  • If this parameter value is invalid, OBS ignores this parameter. In such case, the Location header is the object address, and OBS returns the response code based on whether the operation succeeds or fails.
+

Restrictions:

+

The value must be a valid URL, for example, http://domainname or https://domainname.

+

Value range:

+

URL

+

Default value:

+

None

x-obs-object-lock-mode

+

x-obs-tagging-directive

WORM mode that will be applied to the object. Currently, only COMPLIANCE is supported. This header must be used together with x-obs-object-lock-retain-until-date.

-

Type: string

-

Example: x-obs-object-lock-mode:COMPLIANCE

+

String

No, but required when x-obs-object-lock-retain-until-date is present.

+

No

+

Explanation:

+

Used to specify how object tags are copied. If this header is not contained, tags are not copied from source objects to destination ones.

+

Example: x-obs-tagging-directive:COPY

+

Restrictions:

+

None

+

Value range:

+
  • COPY: Tags of source objects are copied to the target objects.
  • REPLACE: The tags specified in the request are added to the target objects.
+

Default value:

+

REPLACE

x-obs-object-lock-retain-until-date

+

x-obs-object-lock-mode

Indicates the expiration time of the Object Lock retention. The value must be a UTC time that complies with ISO 8601, for example, 2015-07-01T04:11:15Z. This header must be used together with x-obs-object-lock-mode.

-

Type: string

-

Example: x-obs-object-lock-retain-until-date:2015-07-01T04:11:15Z

+

String

No, but required when x-obs-object-lock-mode is present.

+

No, but required when x-obs-object-lock-retain-until-date is present

+

Explanation:

+

WORM mode applied to the object.

+

Example: x-obs-object-lock-mode:COMPLIANCE

+

Restrictions:

+

This parameter must be used together with x-obs-object-lock-retain-until-date.

+

Value range:

+

COMPLIANCE

+

Default value:

+

None

+

x-obs-object-lock-retain-until-date

+

String

+

No, but required when x-obs-object-lock-mode is present.

+

Explanation:

+

When the WORM policy of the object expires.

+

Example: x-obs-object-lock-retain-until-date:2015-07-01T04:11:15Z

+

Restrictions:

+
  • The value must be a UTC time that complies with the ISO 8601 standard. Example: 2015-07-01T04:11:15Z
  • This parameter must be used together with x-obs-object-lock-mode.
+

Value range:

+

The time must be later than the current time.

+

Default value:

+

None

+

x-obs-tagging

+

String

+

No

+

Explanation:

+

Object's tag information in key-value pairs. Multiple tags can be added at the same time.

+

Example: x-obs-tagging:TagA=A&TagB&TagC

+

Restrictions:

+
  • If a tag key or value contains special characters, equal signs (=), or full-width characters, it must be URL-encoded.
  • If there is no equal sign (=) in a configuration, the tag value is considered left blank.
+

Value range:

+

None

+

Default value:

+

None

-

Response Headers

The response to the request uses common headers. For details, see Table 1.

-

In addition to the common response headers, the headers listed in Table 2 may be used.

+

In addition to the common response headers, the headers listed in Table 2 may be used.

-
Table 2 Additional response headers

Header

+
- + - - + - - + - - + - - + - - + - - + - - +
Table 2 Additional response headers

Header

Description

+

Type

+

Description

x-obs-copy-source-version-id

+

x-obs-copy-source-version-id

Version ID of the source object

-

Type: string

+

String

+

Explanation:

+

Version ID of the source object

+

Restrictions:

+

None

+

Value range:

+

None

+

Default value:

+

None

x-obs-version-id

+

x-obs-version-id

Version ID of the target object

-

Type: string

+

String

+

Explanation:

+

Version ID of the target object

+

Restrictions:

+

None

+

Value range:

+

None

+

Default value:

+

None

x-obs-server-side-encryption

+

x-obs-server-side-encryption

This header is included in a response if SSE-KMS is used.

-

Type: string

-

Example: x-obs-server-side-encryption: kms

+

String

+

Explanation:

+

The encryption method used by the server.

+

Example: x-obs-server-side-encryption: kms

+

Restrictions:

+

This header is included in a response if SSE-KMS is used.

+

Value range:

+
  • kms
  • AES256
+

Default value:

+

None

x-obs-server-side-encryption-kms-key-id

+

x-obs-server-side-encryption-kms-key-id

Indicates the master key ID. This header is included in a response when SSE-KMS is used.

-

Type: string

-

Format: regionID:domainID:key/key_id

-

regionID indicates the ID of the region where the key belongs. domainID indicates the ID of the tenant where the key belongs. key_id indicates the key ID used in this encryption.

-

Example: x-obs-server-side-encryption-kms-key-id: region:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0

+

String

+

Explanation:

+

ID of a specified key used for SSE-KMS encryption.

+

Restrictions:

+

This header can only be used when you specify kms for the x-obs-server-side-encryption header.

+

Default value:

+

If you specify kms for encryption but do not specify a key ID, the default master key will be used. If there is not a default master key, OBS will create one and use it.

x-obs-server-side-encryption-customer-algorithm

+

x-obs-server-side-encryption-customer-algorithm

Indicates the encryption algorithm. This header is included in a response when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-algorithm: AES256

+

String

+

Explanation:

+

The algorithm used for encryption.

+

Example: x-obs-server-side-encryption-customer-algorithm: AES256

+

Restrictions:

+

This header is included in a response if SSE-C is used for server-side encryption.

+

Value range:

+

AES256

+

Default value:

+

None

x-obs-server-side-encryption-customer-key-MD5

+

x-obs-server-side-encryption-customer-key-MD5

Indicates the MD5 value of the key for encrypting objects. This header is included in a response when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

String

+

Explanation:

+

The MD5 value of the key used for encryption.

+

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

Restrictions:

+

This header is included in a response if SSE-C is used for server-side encryption.

+

Value range:

+

Base64-encoded MD5 value of the key ID.

+

Default value:

+

None

x-obs-storage-class

+

x-obs-storage-class

This header is returned when the storage class of an object is not Standard. The value can be WARM or COLD.

-

Type: string

+

String

+

Explanation:

+

Storage class of an object.

+

Restrictions:

+

This header is returned when the storage class of an object is not Standard.

+

Value range:

+
  • WARM
  • COLD
+

Default value:

+

Storage class of an object.

-

Response Elements

This response contains elements of a copy result. Table 3 describes the elements.

+

Response Elements

This response contains elements of a copy result. Table 3 describes the elements.

-
Table 3 Response elements

Element

+
- + - - + - - + - - + @@ -435,7 +720,6 @@ Date: WED, 01 OBS H4IPJX0TQTHTHEBQQCEC:2rZR+iaH8xUewvUKuicLhLHpNoU= x-obs-copy-source: /bucket/srcobject
Table 3 Response elements

Element

Description

+

Type

+

Description

CopyObjectResult

+

CopyObjectResult

Container for the copy result

-

Type: XML

+

XML

+

Explanation:

+

The copy results

+

Restrictions:

+

None

+

Value range:

+

None

+

Default value:

+

None

LastModified

+

LastModified

Latest time when the object was modified

-

Type: string

+

String

+

Explanation:

+

Time (UTC) when an object was last modified

+

Restrictions:

+

The date is in the ISO8601 format.

+

Example: 2018-01-01T00:00:00.000Z

+

Value range:

+

None

+

Default value:

+

None

ETag

+

ETag

128-bit MD5 digest of the Base64 code of a new object. ETag is the unique identifier of the object content. It can be used to determine whether the object content is changed. For example, if the ETag value is A when an object is uploaded, but this value has changed to B when the object is downloaded, it indicates that the object content has been changed.

-

Type: string

+

String

+

Explanation:

+

128-bit MD5 digest of the Base64 code of a new object. ETag is the unique identifier of the object content. It can be used to determine whether the object content is changed. For example, if the ETag value is A when an object is uploaded, but this value has changed to B when the object is downloaded, it indicates that the object content has been changed.

+

Restrictions:

+

If an object is encrypted using server-side encryption, the ETag is not the MD5 value of the object.

+

Value range:

+

The value must contain 32 characters.

+

Default value:

+

None

-

Sample Response: Copying an Object

 1
@@ -462,7 +746,6 @@ Content-Length: 249
   <ETag>"507e3fff69b69bf57d303e807448560b"</ETag> 
 </CopyObjectResult>
 
-

Sample Request: Copying an Object Version

Copy a multi-version object and copy the object srcobject whose version number is AAABQ4uBLdLc0vycq3gAAAAEVURTRkha in bucket bucket to the destobject object in bucket examplebucket.

@@ -480,7 +763,6 @@ Date: WED, 01 OBS H4IPJX0TQTHTHEBQQCEC:4BLYv+1UxfRSHBMvrhVLDszxvcY= x-obs-copy-source: /bucket/srcobject?versionId=AAABQ4uBLdLc0vycq3gAAAAEVURTRkha
-

Sample Response: Copying an Object Version

 1
@@ -513,7 +795,6 @@ Transfer-Encoding: chunked
   <ETag>"507e3fff69b69bf57d303e807448560b"</ETag> 
 </CopyObjectResult>
 
-
diff --git a/docs/obs/api-ref/obs_04_0083.html b/docs/obs/api-ref/obs_04_0083.html index 00163538..db2b2115 100644 --- a/docs/obs/api-ref/obs_04_0083.html +++ b/docs/obs/api-ref/obs_04_0083.html @@ -7,7 +7,7 @@

Versioning

By default, the GET operation returns the current version of an object. If the current version of the object is a delete marker, OBS returns a code meaning that the object does not exist. To obtain an object of a specified version, the versionId parameter can be used to specify the desired version.

-

Cold Objects

If the object you want to download is in the Cold storage class, ensure that this object has been restored before you download it. The response varies depending on the object's restore state. If an object has been restored, the x-obs-restore header (indicating the expiry date of the object) is returned when the object is successfully downloaded. If you send a request to download Cold objects that are not restored or are being restored, a 403 Forbidden error will be returned.

+

Cold Objects

If the object you want to download is in the Cold storage class, ensure that this object has been restored before you download it. The response varies depending on the object's restore state. If an object has been restored, the x-obs-restore header (indicating the expiry date of the object) is returned when the object is successfully downloaded. If you send a request to download Cold objects that have not been restored or are being restored, a 403 Forbidden error will be returned.

Request Syntax

1
 2
@@ -21,184 +21,315 @@ Authorization: authorization
 Range:bytes=byte_range 
 <Optional Additional Header>
 
-

The field is optional. If it does not exist, you can obtain the whole content.

-

Request Parameters

In a GET request, you can override values for a set of message headers using the request parameters. Message headers that you can override are Content-Type, Content-Language, Expires, Cache-Control, Content-Disposition, and Content-Encoding. If the target object has multiple versions, use the versionId parameter to specify the version to be downloaded. For details, see Table 1.

+

Request Parameters

In a GET request, you can override values for a set of message headers using the request parameters. Message headers that you can override are Content-Type, Content-Language, Expires, Cache-Control, Content-Disposition, and Content-Encoding. If the target object has multiple versions, use the versionId parameter to specify the version to be downloaded. For details, see Table 1.

OBS does not process Accept-Encoding carried in a request or compress or decompress the uploaded data. The client determines whether to compress or decompress the data. Some HTTP clients may decompress data based on the Content-Encoding returned by the server. The client program needs to determine whether to decompress and how to decompress the data. To decompress the data, it can modify Content-Encoding (the object metadata stored in OBS) or rewrite Content-Encoding the object is downloaded. If an object download request specifies the rewrite header, the standard HTTP message header returned by OBS is subject to the rewrite content specified in the request.

-
Table 1 Request parameters

Parameter

+
- - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - +
Table 1 Request parameters

Parameter

Description

+

Type

Mandatory

+

Mandatory (Yes/No)

+

Description

response-content-type

+

response-content-type

Rewrites the Content-Type header in the response.

-

Type: string

+

String

No

+

No

+

Explanation:

+

Content-Type is rewritten in the response.

+

Restrictions:

+

None

+

Value range:

+

See the Content-Type values defined in HTTP.

+

Default value:

+

None

response-content-language

+

response-content-language

Rewrites the Content-Language header in the response.

-

Type: string

+

String

No

+

No

+

Explanation:

+

Content-Language is rewritten in the response.

+

Restrictions:

+

None

+

Value range:

+

See the Content-Language values defined in HTTP.

+

Default value:

+

None

response-expires

+

response-expires

Rewrites the Expires header in the response.

-

Type: string

+

String

No

+

No

+

Explanation:

+

Expires is rewritten in the response.

+

Restrictions:

+

None

+

Value range:

+

See the Expires values defined in HTTP.

+

Default value:

+

None

response-cache-control

+

response-cache-control

Rewrites the Cache-Control header in the response.

-

Type: string

+

String

No

+

No

+

Explanation:

+

Cache-Control is rewritten in the response.

+

Restrictions:

+

None

+

Value range:

+

See the Cache-control values defined in HTTP.

+

Default value:

+

None

response-content-disposition

-

+

response-content-disposition

Rewrites the Content-Disposition header in the response.

-

Type: string

-

Example:

-

response-content-disposition=attachment; filename*=utf-8''name1

-

In this example, the downloaded object is renamed name1. If the new name contains full-width characters, it must be URL-encoded.

+

String

No

+

No

+

Explanation:

+

Content-Disposition is rewritten in the response.

+

Example:

+

response-content-disposition=attachment; filename*=utf-8''name1

+

In this example, the downloaded object is renamed name1. If the new name contains any full-width characters, such characters must be URL-encoded.

+

Restrictions:

+

None

+

Value range:

+

None

+

Default value:

+

None

response-content-encoding

+

response-content-encoding

Rewrites the Content-Encoding header in the response.

-

Type: string

+

String

No

+

No

+

Explanation:

+

Content-Encoding is rewritten in the response.

+

Restrictions:

+

None

+

Value range:

+

See the Content-Encoding values defined in HTTP.

+

Default value:

+

None

versionId

+

versionId

Indicates the version ID of the object whose content is obtained.

-

Type: string

+

String

No

+

No

+

Explanation:

+

Indicates the version ID of the object to be obtained.

+

Restrictions:

+

None

+

Value range:

+

The value must contain 32 characters.

+

Default value:

+

None. If this parameter is not configured, the latest version of the object is obtained.

attname

+

attname

Rewrites the Content-Disposition header in the response.

-

Type: string

-

Example:

-

attname=name1

-

Rename the downloaded object as name1.

+

String

No

+

No

+

Explanation:

+

Content-Disposition is rewritten in the response.

+

Example:

+

attname=name1

+

This example renames the downloaded object as name1.

+

Restrictions:

+

None

+

Value range:

+

None

+

Default value:

+

None

-

Request Headers

This request uses common headers. In addition, you can add additional headers to this request. Table 2 describes the additional headers.

+

Request Headers

This request uses common headers. In addition, you can add additional headers to this request. Table 2 describes the additional headers.

-
Table 2 Request headers

Header

+
- - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + @@ -223,85 +354,173 @@ Last-Modified: time <Object Content>
Table 2 Request headers

Header

Description

+

Type

Mandatory

+

Mandatory (Yes/No)

+

Description

Range

+

Range

Obtains the object content within the scope defined by Range. If the parameter value is invalid, the entire object is obtained.

-

Range value starts from 0, and the maximum value equals the object length minus 1. The start value of Range is mandatory. If only the start value is specified, the system obtains the object content from the start value to default maximum value.

-

After the Range header field is carried, the value of ETag in the response message is the ETag of the object instead of the ETag of the object in the Range field.

-

Type: string

-

bytes=byte_range

-

Example 1: bytes=0-4

-

Example 2: bytes=1024

-

Example 3: bytes=10-20, 30-40 (multiple ranges)

+

String

No

+

No

+

Explanation:

+

Obtains the object content within the scope defined by Range. If the parameter value is invalid, the entire object is obtained.

+

Restrictions:

+
  • Range value starts from 0, and the maximum value equals the object length minus 1. The start value of Range is mandatory. If only the start value is specified, the system obtains the object content from the start value to default maximum value.

    bytes=byte_range

    +

    Example 1: bytes=0-4

    +

    Example 2: bytes=1024

    +

    Example 3: bytes=10-20, 30-40 (multiple ranges)

    +
  • After the Range header field is carried, the value of ETag in the response message is the ETag of the object instead of the ETag of the object in the Range field.
+

Value range:

+

Range value starts from 0, and the maximum value equals the object length minus 1.

+

Default value:

+

None

If-Modified-Since

+

If-Modified-Since

Returns the object only if it has been modified since the time specified by this header. Otherwise, 304 Not Modified is returned.

-

Type: HTTP time character string complying with the format specified at http://www.ietf.org/rfc/rfc2616.txt

+

HTTP time string complying with the format specified at http://www.ietf.org/rfc/rfc2616.txt.

No

+

No

+

Explanation:

+

Returns the object only if it has been modified since the time specified by this header. Otherwise, 304 Not Modified is returned.

+

Restrictions:

+

The time specified by this parameter cannot be later than the current server time (GMT time), or this parameter does not take effect.

+

Value range:

+

HTTP time string complying with the format specified at http://www.ietf.org/rfc/rfc2616.txt.

+
  1. EEE, dd MMM yyyy HH:mm:ss z
  2. EEEE, dd-MMM-yy HH:mm:ss z
  3. EEE MMM dd HH:mm:ss yyyy
+

Examples:

+
  1. if-modified-since: Sun, 06 Nov 1994 08:49:37 GMT
  2. if-modified-since: Sunday, 06-Nov-94 08:49:37 GMT
  3. if-modified-since: Sun Nov 6 08:49:37 1994
+

Default value:

+

None

If-Unmodified-Since

+

If-Unmodified-Since

Returns the object only if it has not been modified since the time specified by this header. Otherwise, 412 Precondition Failed is returned.

-

Type: HTTP time character string complying with the format specified at http://www.ietf.org/rfc/rfc2616.txt

+

HTTP time string complying with the format specified at http://www.ietf.org/rfc/rfc2616.txt.

No

+

No

+

Explanation:

+

If the object has not been modified since the time specified by this header, it is returned. Otherwise, 412 (precondition failed) is returned.

+

Restrictions:

+

The time specified by this parameter cannot be later than the current server time (GMT time), or this parameter does not take effect.

+

Value range:

+

HTTP time string complying with the format specified at http://www.ietf.org/rfc/rfc2616.txt.

+
  1. EEE, dd MMM yyyy HH:mm:ss z
  2. EEEE, dd-MMM-yy HH:mm:ss z
  3. EEE MMM dd HH:mm:ss yyyy
+

Examples:

+
  1. if-unmodified-since: Sun, 06 Nov 1994 08:49:37 GMT
  2. if-unmodified-since: Sunday, 06-Nov-94 08:49:37 GMT
  3. if-unmodified-since: Sun Nov 6 08:49:37 1994
+

Default value:

+

None

If-Match

+

If-Match

Returns the object only if its ETag is the same as the one specified by this header. Otherwise, 412 Precondition Failed is returned.

-

Type: string

-

ETag example: 0f64741bf7cb1089e988e4585d0d3434

+

String

No

+

No

+

Explanation:

+

Returns the object only if its ETag is the same as the one specified by this header. Otherwise, 412 Precondition Failed is returned.

+

ETag example: 0f64741bf7cb1089e988e4585d0d3434

+

Restrictions:

+

None

+

Value range:

+

Object ETag

+

Default value:

+

None

If-None-Match

+

If-None-Match

Returns the object only if its ETag is different from the one specified by this header. Otherwise, 304 Not Modified is returned.

-

Type: string

-

ETag example: 0f64741bf7cb1089e988e4585d0d3434

+

String

No

+

No

+

Explanation:

+

Returns the object only if its ETag is different from the one specified by this header. Otherwise, 304 Not Modified is returned.

+

ETag example: 0f64741bf7cb1089e988e4585d0d3434

+

Restrictions:

+

None

+

Value range:

+

Object ETag

+

Default value:

+

None

x-obs-server-side-encryption-customer-algorithm

+

x-obs-server-side-encryption-customer-algorithm

Indicates the encryption algorithm when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-algorithm:AES256

-

Constraint: This header must be used together with x-obs-server-side-encryption-customer-key and x-obs-server-side-encryption-customer-key-MD5.

+

String

No. This header is required when SSE-C is used.

+

No. This header is required when SSE-C is used.

+

Explanation:

+

Indicates the encryption algorithm used when SSE-C is used.

+

Example: x-obs-server-side-encryption-customer-algorithm:AES256

+

Restrictions:

+

This header must be used together with x-obs-server-side-encryption-customer-key and x-obs-server-side-encryption-customer-key-MD5.

+

Value range:

+

AES256

+

Default value:

+

None

x-obs-server-side-encryption-customer-key

+

x-obs-server-side-encryption-customer-key

Indicates the key for decrypting objects when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=

-

Constraint: This header is a Base64-encoded 256-bit key and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key-MD5.

+

String

No. This header is required when SSE-C is used.

+

No. This header is required when SSE-C is used.

+

Explanation:

+

Indicates the encryption key used when SSE-C is used. This key is used to decrypt objects.

+

Example: x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=

+

Restrictions:

+

This header is a Base64-encoded 256-bit key and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key-MD5.

+

Value range:

+

None

+

Default value:

+

None

x-obs-server-side-encryption-customer-key-MD5

+

x-obs-server-side-encryption-customer-key-MD5

Indicates the MD5 value of the encryption key when SSE-C is used. The MD5 value is used to check whether any error occurs during the transmission of the key.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

-

Constraint: This header is a Base64-encoded 128-bit MD5 value and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key.

+

String

No. This header is required when SSE-C is used.

+

No. This header is required when SSE-C is used.

+

Explanation:

+

Indicates the MD5 value of the encryption key when SSE-C is used. The MD5 value is used to check whether any error occurs during the transmission of the key.

+

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

Restrictions:

+

This header is a Base64-encoded 128-bit MD5 value and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key.

+

Value range:

+

Base64-encoded MD5 value of the key ID.

+

Default value:

+

None

-

Response Headers

The response to the request uses common headers. For details, see Table 1.

-

In addition to the common response headers, the headers listed in Table 3 may be used.

+

In addition to the common response headers, the headers listed in Table 3 may be used.

-
Table 3 Additional response headers

Header

+
- + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + + + + + @@ -324,7 +543,6 @@ Accept: */* Date: WED, 01 Jul 2015 04:24:33 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:NxtSMS0jaVxlLnxlO9awaMTn47s=
Table 3 Additional response headers

Header

Description

+

Type

+

Description

x-obs-expiration

+

x-obs-expiration

When an object has its lifecycle rule, the object expiration time is subject to its lifecycle rule. This header field is use expiry-date to describe the object expiration date. If the lifecycle rule is configured only for the entire bucket not individual objects, the object expiration time is subject to the bucket lifecycle rule. This header field uses the expiry-date and rule-id to describe the detailed expiration information of objects. If no lifecycle rule is configured, this header field is not contained in the response.

-

Type: string

+

String

+

Explanation:

+

Expiration time of an object.

+

Restrictions:

+

When an object has its lifecycle rule, the object expiration time is subject to its lifecycle rule. This header field is use expiry-date to describe the object expiration date. If the lifecycle rule is configured only for the entire bucket not individual objects, the object expiration time is subject to the bucket lifecycle rule. This header field uses the expiry-date and rule-id to describe the detailed expiration information of objects. If no lifecycle rule is configured, this header field is not contained in the response.

+

Value range:

+

The time format is EEE, dd MMM yyyy HH:mm:ss z.

+

Example: expiry-date=Sun, 06 Nov 1994 08:49:37 GMT

+

Default value:

+

None

x-obs-website-redirect-location

+

x-obs-website-redirect-location

Indicates the redirected-to location. If the bucket is configured with website information, this parameter can be set for the object metadata so that the website endpoint will evaluate the request for the object as a 301 redirect to another object in the same bucket or an external URL.

-

Type: string

+

String

+

Explanation:

+

Indicates where an object request is redirected. If the bucket that contains the object is configured with Website settings, this parameter can be set in the object metadata so that the request for the object can be redirected to another object in the same bucket or an external URL after the website returns a 301 redirect response.

+

To another object in the same bucket:

+

x-obs-website-redirect-location:/anotherPage.html

+

To an external URL:

+

x-obs-website-redirect-location:http://www.example.com/

+

OBS obtains the specified value from the header and stores it in the object metadata WebsiteRedirectLocation.

+

Restrictions:

+
  • The value must start with a slash (/), http://, or https:// and cannot exceed 2 KB.
  • OBS supports redirection for objects in the root directory of a bucket, not for those in folders.
+

Default value:

+

None

x-obs-delete-marker

+

x-obs-delete-marker

Indicates whether an object is a delete marker. If the object is not marked as deleted, the response does not contain this header.

-

Type: boolean

-

Value options: true, false

-

The default value is false.

+

Boolean

+

Explanation:

+

Whether the deleted object is a delete marker. If the object is not marked as deleted, the response does not contain this header.

+

Value range:

+
  • true: The deleted object is a delete marker.
  • false: The deleted object is not a delete marker.
+

Default value:

+

false

x-obs-version-id

+

x-obs-version-id

Object version ID. If the object has no version number specified, the response does not contain this header.

-

Valid value: string

-

Default value: none

+

String

+

Explanation:

+

Object version ID.

+

Restrictions:

+

If the object has no version number specified, the response does not contain this header.

+

Value range:

+

The value must contain 32 characters.

+

Default value:

+

None

x-obs-server-side-encryption

+

x-obs-server-side-encryption

This header is included in a response if SSE-KMS is used.

-

Type: string

-

Example: x-obs-server-side-encryption:kms

+

String

+

Explanation:

+

The encryption method used by the server.

+

Example: x-obs-server-side-encryption:kms

+

Restrictions:

+

This header is included in a response if SSE-KMS is used.

+

Value range:

+
  • kms
  • AES256
+

Default value:

+

None

x-obs-server-side-encryption-kms-key-id

+

x-obs-server-side-encryption-kms-key-id

Indicates the master key ID. This header is included in a response when SSE-KMS is used.

-

Type: string

-

Format: regionID:domainID:key/key_id

-

regionID indicates the ID of the region where the key belongs. domainID indicates the ID of the tenant where the key belongs. key_id indicates the key ID used in this encryption.

-

Example: x-obs-server-side-encryption-kms-key-id:region:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0

+

String

+

Explanation:

+

ID of a specified key used for SSE-KMS encryption.

+

Restrictions:

+

This header can only be used when you specify kms for the x-obs-server-side-encryption header.

+

Default value:

+

If you specify kms for encryption but do not specify a key ID, the default master key will be used. If there is not a default master key, OBS will create one and use it.

x-obs-server-side-encryption-customer-algorithm

+

x-obs-server-side-encryption-customer-algorithm

Indicates a decryption algorithm. This header is included in a response if SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-algorithm:AES256

+

String

+

Explanation:

+

Indicates a decryption algorithm. This header is included in a response if SSE-C is used.

+

Example: x-obs-server-side-encryption-customer-algorithm:AES256

+

Restrictions:

+

None

+

Value range:

+

AES256

+

Default value:

+

None

x-obs-server-side-encryption-customer-key-MD5

+

x-obs-server-side-encryption-customer-key-MD5

Indicates the MD5 value of a key used to decrypt objects. This header is included in a response if SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

String

+

Explanation:

+

Indicates the MD5 value of a key used to decrypt objects. This header is included in a response if SSE-C is used.

+

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

Value range:

+

Base64-encoded MD5 value of the key ID.

+

Default value:

+

None

x-obs-object-type

+

x-obs-object-type

If the object is not a normal one, this header field is returned. The value can be Appendable.

-

Type: string

+

String

+

Explanation:

+

Object type

+

Restrictions:

+

This header is returned when the object is not a Normal object.

+

Value range:

+

Appendable

+

Default value:

+

None

x-obs-next-append-position

+

x-obs-next-append-position

This header field is returned when the object is an appendable object.

-

Type: integer

+

Integer

+

Explanation:

+

Indicates the position that should be provided in the next request.

+

Restrictions:

+

This header field is returned when the object is an appendable object.

+

Value range:

+

None

+

Default value:

+

None

+

x-obs-tagging-count

+

String

+

Explanation:

+

Number of tags associated with an object.

+

Example: x-obs-tagging-count:1

+

Restrictions:

+

This parameter is returned only when the user has the permission to read tags.

+

Value range:

+

None

+

Default value:

+

None

-

Sample Response: Downloading an Object

 1
@@ -351,7 +569,6 @@ Content-Length: 4572
 
 [4572 Bytes object content]
 
-

Sample Request: Downloading a Specified Range of an Object

Download the specified range of an object (download a range of an object).

@@ -369,7 +586,6 @@ Date: Mon, 14 OBS H4IPJX0TQTHTHEBQQCEC:mNPLWQMDWg30PTkAWiqJaLl3ALg=
-

Download the specified range of an object (download multiple ranges of an object).

@@ -387,7 +603,6 @@ Date: Mon, 14 OBS H4IPJX0TQTHTHEBQQCEC:ZwM7Vk2d7sD9o8zRsRKehgKQDkk=
-

Sample Response: Downloading a Specified Range of an Object

Download the specified range of an object (download a range of an object).

 1
@@ -416,7 +631,6 @@ Content-Length: 11
 
 [ 11 Bytes object content]
 
-

Download the specified range of an object (download multiple ranges of an object).

@@ -460,7 +674,6 @@ Content-range: bytes 40-50/4583 [ 11 Bytes object content] --35bcf444-e65f-4c76-9430-7e4a68dd3d26
-

Sample Request: Checking the ETag Value of an Object

Download an object if its ETag value is matched.

1
@@ -477,7 +690,6 @@ Date: WED, 01  682e760adb130c60c120da3e333a8b09
 Authorization: OBS H4IPJX0TQTHTHEBQQCEC:NxtSMS0jaVxlLnxlO9awaMTn47s=
 
-

Sample Response: Checking the ETag Value of an Object (ETag Mismatch)

If the object's ETag value is not 682e760adb130c60c120da3e333a8b09, the system displays a download failure message.

@@ -511,7 +723,6 @@ Date: WED, 01 <Condition>If-Match</Condition> </Error>
-

Sample Response: Checking the ETag Value of an Object (ETag Matched)

If the object's ETag value is 682e760adb130c60c120da3e333a8b09, the download is successful.

@@ -539,7 +750,6 @@ Content-Length: 8 [ 8 Bytes object content]
-

Sample Request: Downloading an Object Using a Signed URL

GET /object02?AccessKeyId=H4IPJX0TQTHTHEBQQCEC&Expires=1532688887&Signature=EQmDuOhaLUrzrzRNZxwS72CXeXM%3D HTTP/1.1
@@ -570,7 +780,6 @@ Content-Length: 8
 
 [ 8 Bytes object content]
 
-

Sample Request: Downloading an Object and Renaming It (with response-content-disposition Used)

Use the response-content-disposition parameter to download and rename an object.

@@ -586,7 +795,6 @@ Accept: */* Date: WED, 01 Jul 2015 04:24:33 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:NxtSMS0jaVxlLnxlO9awaMTn47s=
-

Sample Response: Downloading an Object and Renaming It (with response-content-disposition Used)

 1
@@ -613,7 +821,6 @@ Content-Disposition: attachment; f
 
 [ 8 Bytes object content]
 
-

Sample Request: Downloading an Object and Renaming It (with attname Used)

Use the attname parameter to download and rename an object.

@@ -629,7 +836,6 @@ Accept: */* Date: WED, 01 Jul 2015 04:24:33 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:NxtSMS0jaVxlLnxlO9awaMTn47s=
-

Sample Response: Downloading an Object and Renaming It (with attname Used)

 1
@@ -656,7 +862,6 @@ Content-Disposition: attachment; f
 
 [ 8 Bytes object content]
 
-
diff --git a/docs/obs/api-ref/obs_04_0084.html b/docs/obs/api-ref/obs_04_0084.html index 76de5349..0a9dfdf3 100644 --- a/docs/obs/api-ref/obs_04_0084.html +++ b/docs/obs/api-ref/obs_04_0084.html @@ -2,7 +2,7 @@

Querying Object Metadata

Functions

Users with the read permission on objects can perform the HeadObject operation to obtain metadata of objects. The object metadata is included in the response.

-

This operation supports server-side encryption.

+

SSE-C headers are required if you want to obtain the metadata of an object encrypted using SSE-C. For details, see Table 2.

Versioning

By default, this operation returns the latest metadata of an object. If the object has a delete marker, status code 404 is returned. To obtain the object metadata of a specified version, the versionId parameter can be used to specify the desired version.

@@ -14,25 +14,34 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization
- -

Request Parameters

Table 1 describes the request parameters.

+

Request Parameters

Table 1 describes the request parameters.

-
Table 1 Request parameters

Parameter

+
- - + - - - + @@ -40,60 +49,99 @@ Authorization: authorization

Request Headers

This request uses common headers. For details, see Table 3.

-

In addition, the request can use additional headers, as shown in Table 2.

+

In addition, the request can use additional headers shown in Table 2.

-
Table 1 Request parameters

Parameter

Description

+

Type

Mandatory

+

Mandatory (Yes/No)

+

Description

versionId

+

versionId

Object version ID

-

Type: string

+

String

No

+

No

+

Explanation:

+

Version ID of the object.

+

Restrictions:

+

None

+

Value range:

+

The value must contain 32 characters.

+

Default value:

+

None

Table 2 Request headers

Header

+
- - + - - - + - - - + - - - + - - - + - - - + @@ -114,139 +162,301 @@ Content-Length: length Etag: etag Last-Modified: time
Table 2 Request headers

Header

Description

+

Type

Mandatory

+

Mandatory (Yes/No)

+

Description

Origin

+

Origin

Origin of the cross-domain request specified by the pre-request. Generally, it is a domain name.

-

Type: string

+

String

No

+

No

+

Explanation:

+

Origin specified in a preflight request that makes a cross-domain request, usually as a domain name.

+

Restrictions:

+

You can enter multiple origins, with one separated from another using a line break. Each origin can contain at most one wildcard character (*).

+

Value range:

+

The value that complies with the CORS

+

Default value:

+

None

Access-Control-Request-Headers

+

Access-Control-Request-Headers

Indicates the HTTP headers of a request. The request can use multiple HTTP headers.

-

Type: string

+

String

No

+

No

+

Explanation:

+

Indicates the HTTP headers that are allowed in a request. The request can use multiple HTTP headers.

+

Restrictions:

+

You can enter multiple allowed headers, with one separated from another using a line break. Each header can contain at most one wildcard character (*). Spaces, ampersands (&), colons (:), less-than signs (<), and full-width characters are not allowed.

+

Value range:

+

The value that complies with the CORS

+

Default value:

+

None

x-obs-server-side-encryption-customer-algorithm

+

x-obs-server-side-encryption-customer-algorithm

Indicates the decryption algorithm when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-algorithm:AES256

-

Constraint: This header must be used together with x-obs-server-side-encryption-customer-key and x-obs-server-side-encryption-customer-key-MD5.

+

String

No. This header is required when SSE-C is used.

+

No. This header is required when SSE-C is used.

+

Explanation:

+

Indicates the decryption algorithm used when SSE-C is used.

+

Example: x-obs-server-side-encryption-customer-algorithm:AES256

+

Restrictions:

+

This header must be used together with x-obs-server-side-encryption-customer-key and x-obs-server-side-encryption-customer-key-MD5.

+

Value range:

+

AES256

+

Default value:

+

None

x-obs-server-side-encryption-customer-key

+

x-obs-server-side-encryption-customer-key

Indicates the decryption key when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=

-

Constraint: This header is a Base64-encoded 256-bit key and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key-MD5.

+

String

No. This header is required when SSE-C is used.

+

No. This header is required when SSE-C is used.

+

Explanation:

+

Indicates the decryption key used when SSE-C is used.

+

Example: x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=

+

Restrictions:

+

This header is a Base64-encoded 256-bit key and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key-MD5.

+

Value range:

+

None

+

Default value:

+

None

x-obs-server-side-encryption-customer-key-MD5

+

x-obs-server-side-encryption-customer-key-MD5

Indicates the MD5 value of the decryption key when SSE-C is used. The MD5 value is used to check whether any error occurs during the transmission of the key.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

-

Constraint: This header is a Base64-encoded 128-bit MD5 value and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key.

+

String

No. This header is required when SSE-C is used.

+

No. This header is required when SSE-C is used.

+

Explanation:

+

Indicates the MD5 value of the decryption key when SSE-C is used. The MD5 value is used to check whether any error occurs during the transmission of the key.

+

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

Restrictions:

+

This header is a Base64-encoded 128-bit MD5 value and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key.

+

Value range:

+

Base64-encoded MD5 value of the key ID.

+

Default value:

+

None

-

Response Headers

The response to the request uses common headers. For details, see Table 1.

-

In addition to the common response headers, the headers listed in Table 3 may be used.

+

In addition to the common response headers, the headers listed in Table 3 may be used.

-
Table 3 Additional response headers

Header

+
- + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + + + + + @@ -269,7 +479,6 @@ Accept: */* Date: WED, 01 Jul 2015 04:19:25 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:/cARjk81l2iExMfQqn6iT3qEZ74=
Table 3 Additional response headers

Header

Description

+

Type

+

Description

x-obs-expiration

+

x-obs-expiration

When an object has its lifecycle rule, the object expiration time is subject to its lifecycle rule. This header field is use expiry-date to describe the object expiration date. If the lifecycle rule is configured only for the entire bucket not individual objects, the object expiration time is subject to the bucket lifecycle rule. This header field uses the expiry-date and rule-id to describe the detailed expiration information of objects. If no lifecycle rule is configured, this header field is not contained in the response.

-

Type: string

+

String

+

Explanation:

+

Expiration details

+

Restrictions:

+

None

+

Value range:

+

When an object has its lifecycle rule, the object expiration time is subject to its lifecycle rule. This header field is use expiry-date to describe the object expiration date. If the lifecycle rule is configured only for the entire bucket not individual objects, the object expiration time is subject to the bucket lifecycle rule. This header field uses the expiry-date and rule-id to describe the detailed expiration information of objects. If no lifecycle rule is configured, this header field is not contained in the response.

+

Default value:

+

None

x-obs-website-redirect-location

+

x-obs-website-redirect-location

Indicates the redirected-to location. If the bucket is configured with website information, this parameter can be set for the object metadata so that the website endpoint will evaluate the request for the object as a 301 redirect to another object in the same bucket or an external URL.

-

Type: string

+

String

+

Explanation:

+

Indicates where an object request is redirected. If the bucket that contains the object is configured with Website settings, this parameter can be set in the object metadata so that the request for the object can be redirected to another object in the same bucket or an external URL after the website returns a 301 redirect response.

+

To another object in the same bucket:

+

x-obs-website-redirect-location:/anotherPage.html

+

To an external URL:

+

x-obs-website-redirect-location:http://www.example.com/

+

OBS obtains the specified value from the header and stores it in the object metadata WebsiteRedirectLocation.

+

Restrictions:

+
  • The value must start with a slash (/), http://, or https:// and cannot exceed 2 KB.
  • OBS supports redirection for objects in the root directory of a bucket, not for those in folders.
+

Default value:

+

None

x-obs-version-id

+

x-obs-version-id

Object version ID. If the object has no version number specified, the response does not contain this header.

-

Type: string

-

Default value: none

+

String

+

Explanation:

+

Version ID of the object. If the object has no version number specified, the response does not contain this header.

+

Restrictions:

+

The value must contain 32 characters.

+

Value range:

+

None

+

Default value:

+

None

Access-Control-Allow-Origin

+

Access-Control-Allow-Origin

Indicates that the origin is included in the response if the origin in the request meets the CORS configuration requirements when CORS is configured for buckets.

-

Type: string

+

String

+

Explanation:

+

Returned if the request origin meets the CORS configured on the server.

+

Restrictions:

+

None

+

Value range:

+

The value that complies with the CORS

+

Default value:

+

None

Access-Control-Allow-Headers

+

Access-Control-Allow-Headers

Indicates that the headers are included in the response if headers in the request meet the CORS configuration requirements when CORS is configured for buckets.

-

Type: string

+

String

+

Explanation:

+

Returned if the request headers meet the CORS configured on the server.

+

Restrictions:

+

At most one asterisk (*) is allowed. Spaces, ampersands (&), colons (:), less-than signs (<), and full-width characters are not allowed.

+

Value range:

+

The value that complies with the CORS

+

Default value:

+

None

Access-Control-Max-Age

+

Access-Control-Max-Age

Value of MaxAgeSeconds in the CORS configuration of the server when CORS is configured for buckets.

-

Type: integer

+

Integer

+

Explanation:

+

MaxAgeSeconds in the CORS rules of the bucket. It specifies the time your client can cache the response for a cross-origin request.

+

Restrictions:

+

Each CORS rule can contain at most one MaxAgeSeconds.

+

Value range:

+

An integer greater than or equal to 0, in seconds

+

Default value:

+

3000

Access-Control-Allow-Methods

+

Access-Control-Allow-Methods

Indicates that methods in the rule are included in the response if Access-Control-Request-Method in the request meets the CORS configuration requirements when CORS is configured for buckets.

-

Type: string

-

Value options: GET, PUT, HEAD, POST, DELETE

+

String

+

Explanation:

+

Indicates that methods in the rule are included in the response if Access-Control-Request-Method in the request meets the CORS configuration requirements when CORS is configured for buckets.

+

Value range:

+
  • GET
  • PUT
  • HEAD
  • POST
  • DELETE

Access-Control-Expose-Headers

+

Access-Control-Expose-Headers

Value of ExposeHeader in the CORS configuration of a server when CORS is configured for buckets.

-

Type: string

+

String

+

Explanation:

+

ExposeHeader in the CORS rules of the bucket. It specifies additional headers allowed in the response by a CORS rule, which are used to provide extra information to clients. By default, a browser can access only headers Content-Length and Content-Type. If the browser needs to access other headers, you need to configure them as additional headers.

+

Restrictions:

+

Spaces, asterisks (*), ampersands (&), colons (:), less-than signs (<), and full-width characters are not allowed.

+

Value range:

+

None

+

Default value:

+

None

x-obs-server-side-encryption

+

x-obs-server-side-encryption

This header is included in a response if SSE-KMS is used.

-

Type: string

-

Example: x-obs-server-side-encryption:kms

+

String

+

Explanation:

+

The encryption method used by the server.

+

Example: x-obs-server-side-encryption:kms

+

Restrictions:

+

This header is included in a response if SSE-KMS is used.

+

Value range:

+
  • kms
  • AES256
+

Default value:

+

None

x-obs-server-side-encryption-kms-key-id

+

x-obs-server-side-encryption-kms-key-id

Indicates the master key ID. This header is included in a response when SSE-KMS is used.

-

Type: string

-

Format: regionID:domainID:key/key_id regionID indicates the ID of the region where the key belongs. domainID indicates the ID of the tenant where the key belongs. key_id indicates the key ID used in this encryption.

-

Example: x-obs-server-side-encryption-kms-key-id:region:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0

+

String

+

Explanation:

+

ID of a specified key used for SSE-KMS encryption.

+

Restrictions:

+

This header can only be used when you specify kms for the x-obs-server-side-encryption header.

+

Default value:

+

If you specify kms for encryption but do not specify a key ID, the default master key will be used. If there is not a default master key, OBS will create one and use it.

x-obs-server-side-encryption-customer-algorithm

+

x-obs-server-side-encryption-customer-algorithm

Indicates a decryption algorithm. This header is included in a response if SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-algorithm:AES256

+

String

+

Explanation:

+

Indicates a decryption algorithm. This header is included in a response if SSE-C is used.

+

Example: x-obs-server-side-encryption-customer-algorithm:AES256

+

Restrictions:

+

None

+

Value range:

+

AES256

+

Default value:

+

None

x-obs-server-side-encryption-customer-key-MD5

+

x-obs-server-side-encryption-customer-key-MD5

Indicates the MD5 value of a key used to decrypt objects. This header is included in a response if SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

String

+

Explanation:

+

Indicates the MD5 value of a key used to decrypt objects. This header is included in a response if SSE-C is used.

+

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

Restrictions:

+

Base64-encoded MD5 value of the key, for example, 4XvB3tbNTN+tIEVa0/fGaQ==.

+

Value range:

+

Base64-encoded MD5 value of the key ID.

+

Default value:

+

None

x-obs-storage-class

+

x-obs-storage-class

This header is returned when the storage class of an object is not Standard. The value can be WARM or COLD.

-

Type: string

+

String

+

Explanation:

+

Storage class of an object.

+

Restrictions:

+

This header is returned only when the storage class of an object is not Standard.

+

Value range:

+
  • WARM
  • COLD
+

Default value:

+

None

x-obs-restore

+

x-obs-restore

This header is returned when a Cold object is being restored or has been restored. It represents the object's restore status, which can be ongoing-request="true" (the object is being restored) or ongoing-request="false", expiry-date="Wed, 7 Nov 2012 00:00:00 GMT" (the object has been restored). In these statuses, expiry-date indicates when the restored object will expire.

-

Type: string

+

String

+

Explanation:

+

Restore status of an object.

+

For example, ongoing-request="true" indicates that the object is being restored. ongoing-request="false", expiry-date="Wed, 7 Nov 2012 00:00:00 GMT" indicates that the object has been restored, where expiry-date indicates when the restored object expires.

+

Restrictions:

+

This header is returned only when a Cold object is being restored or has been restored.

+

Value range:

+

None

+

Default value:

+

None

x-obs-object-type

+

x-obs-object-type

If the object is not a normal one, this header field is returned. The value can be Appendable

-

Type: string

+

String

+

Explanation:

+

Object type

+

Restrictions:

+

This header is returned only when the object is not a Normal object.

+

Value range:

+

Appendable

+

Default value:

+

None

x-obs-next-append-position

+

x-obs-next-append-position

This header field is returned when the object is an appendable object.

-

Type: integer

+

Integer

+

Explanation:

+

Indicates the position that should be provided in the next request.

+

Restrictions:

+

This header is returned only when the object is an Appendable object.

+

Value range:

+

None

+

Default value:

+

None

x-obs-uploadId

+

x-obs-uploadId

This header is returned if the object is a combination of multiple parts. The header value indicates the ID of the corresponding multipart upload task.

-

Type: string

+

String

+

Explanation:

+

Indicates the ID of a multipart task.

+

Restrictions:

+

This header is returned only when the object is created from a multipart upload.

+

Value range:

+

None

+

Default value:

+

None

x-obs-object-lock-mode

+

x-obs-tagging-count

WORM mode that will be applied to the object. Currently, only COMPLIANCE is supported. This header is returned only when the object has any object-level retention policy configured or has the default bucket-level WORM policy applied. To configure this header, the GetObjectRetention permission is required.

-

Type: string

-

Example: x-obs-object-lock-mode:COMPLIANCE

+

String

+

Explanation:

+

Number of tags associated with an object.

+

Example: x-obs-tagging-count:1

+

Restrictions:

+

This header is returned only when you have the permission to read tags.

+

Value range:

+

None

+

Default value:

+

None

x-obs-object-lock-retain-until-date

+

x-obs-object-lock-mode

Indicates the expiration time of the WORM retention. The value must be a UTC time that complies with ISO 8601, for example, 2015-07-01T04:11:15Z. This header is returned only when the object has any object-level retention policy configured or has the default bucket-level WORM policy applied. To configure this header, the GetObjectRetention permission is required.

-

Type: string

-

Example: x-obs-object-lock-retain-until-date:2015-07-01T04:11:15Z

+

String

+

Explanation:

+

WORM mode applied to the object.

+

Example: x-obs-object-lock-mode:COMPLIANCE

+

Restrictions:

+
  • This parameter is returned only when the object has any object-level WORM retention policy configured or has a default bucket-level WORM policy applied.
  • The user must have the GetObjectRetention permission.
+

Value range:

+

Currently, only COMPLIANCE (compliance mode) is supported.

+

Default value:

+

None

+

x-obs-object-lock-retain-until-date

+

String

+

Explanation:

+

When an object lock expires.

+

Example: x-obs-object-lock-retain-until-date:2015-07-01T04:11:15Z

+

Restrictions:

+
  • The value must be a UTC time that complies with the ISO 8601 standard. Example: 2015-07-01T04:11:15Z
  • This parameter is returned only when the object has any object-level WORM retention policy configured or has a default bucket-level WORM policy applied.
  • The user must have the GetObjectRetention permission.
+

Value range:

+

The value must be later than the current time.

+

Default value:

+

None

-

Sample Response

 1
@@ -292,7 +501,6 @@ x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCSD3nAiTaBoey
 Date: WED, 01 Jul 2015 04:19:21 GMT
 Content-Length: 4572
 
-
diff --git a/docs/obs/api-ref/obs_04_0085.html b/docs/obs/api-ref/obs_04_0085.html index cfd51fca..ad5c3b39 100644 --- a/docs/obs/api-ref/obs_04_0085.html +++ b/docs/obs/api-ref/obs_04_0085.html @@ -17,7 +17,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization
-

Request Parameters

Table 1 describes the request parameters.

@@ -52,7 +51,6 @@ Authorization: authorization 2
HTTP/1.1 status_code
 Date: date
 
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -99,7 +97,6 @@ Accept: */* Date: WED, 01 Jul 2015 04:19:21 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:MfK9JCnSFHCrJmjv7iRkRrrce2s=
-

Sample Response

1
@@ -112,7 +109,6 @@ x-obs-request-id: 8DF400000163D3F51DEA05AC9CA066F1
 x-obs-id-2: 32AAAUgAIAABAAAQAAEAABAAAQAAEAABCSgkM4Dij80gAeFY8pAZIwx72QhDeBZ5
 Date: WED, 01 Jul 2015 04:19:21 GMT
 
-

Sample Request: Specifying versionId to Delete a Specific Object Version

DELETE /object2?versionId=G001118A49821905FFFFD28739D419DA HTTP/1.1
diff --git a/docs/obs/api-ref/obs_04_0086.html b/docs/obs/api-ref/obs_04_0086.html
index 38d16d41..c8e735dd 100644
--- a/docs/obs/api-ref/obs_04_0086.html
+++ b/docs/obs/api-ref/obs_04_0086.html
@@ -41,7 +41,6 @@ Content-Length: length
     </Object> 
 </Delete>
 
-

Request Parameters

This request involves no parameters.

@@ -136,7 +135,6 @@ Content-Length: length </Error> </DeleteResult>
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -209,8 +207,8 @@ Content-Length: length
-

Error Responses

1. If the resolution result of an XML request contains more than 1000 objects, OBS returns 400 Bad Request.

-

2. If the object key in an XML request is invalid (for example, containing more than 1024 characters), OBS returns 400 Bad Request.

+

Error Responses

1. If the resolution result of an XML request contains more than 1,000 objects, OBS returns 400 Bad Request.

+

2. If the object key in an XML request is invalid (for example, containing more than 1,024 characters after being encoded with UTF-8), OBS returns 400 Bad Request.

3. If the request header does not contain Content-MD5, OBS returns 400 Bad Request.

Other errors are included in Table 2.

@@ -252,7 +250,6 @@ Content-Length: 188 </Object> </Delete>
-

Sample Response

 1
@@ -275,7 +272,6 @@ Content-Length: 120
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <DeleteResult xmlns="http://obs.example.com/doc/2015-06-30/"/>
 
-
diff --git a/docs/obs/api-ref/obs_04_0087.html b/docs/obs/api-ref/obs_04_0087.html index 276c7099..d8572681 100644 --- a/docs/obs/api-ref/obs_04_0087.html +++ b/docs/obs/api-ref/obs_04_0087.html @@ -1,7 +1,7 @@

Restoring Cold Objects

-

Functions

To obtain the content of an object in the Cold storage class, you need to restore the object first and then you can download it. After an object is restored, a copy of the object is saved in the Standard storage class. By doing so, the object in the Cold storage class and its copy in the Standard storage class co-exist in the bucket. The copy will be automatically deleted once its retention period expires.

+

Functions

To obtain the content of an object in the Cold storage class, you need to restore the object first and then you can download it. After an object is restored, a copy of the object is saved in the Standard storage class. By doing so, the object in the Cold storage class and its copy in the Standard storage class co-exist in the bucket. The copy will be automatically deleted once its retention period ends.

Versioning

By default, this operation returns the latest version of an object. If the object has a delete marker, status code 404 is returned. To restore an object of a specified version, the versionId parameter can be used to specify the desired version.

@@ -19,20 +19,30 @@ Content-MD5: MD5 </RestoreRequest>

Request Parameters

-

Parameter

+
- - + - - - + @@ -42,47 +52,76 @@ Content-MD5: MD5

Request Headers

This request uses common headers. For details, see Table 3.

Request Elements

-

Parameter

Description

+

Type

Mandatory

+

Mandatory (Yes/No)

+

Description

versionId

+

versionId

Version ID of the Cold object to be restored

-

Type: string

+

String

No

+

No

+

Explanation:

+

Version ID of the Cold object to be restored

+

Restrictions:

+

None

+

Value range:

+

None

+

Default value:

+

None. If this parameter is not configured, the latest version of the object is specified.

- - - -
Table 1 Request elements

Element

+
- - + - - - + - - - + - - - + - - - + @@ -93,7 +132,6 @@ Content-MD5: MD52
Table 1 Request elements

Element

Description

+

Type

Mandatory

+

Mandatory (Yes/No)

+

Description

RestoreRequest

+

RestoreRequest

Container for the restore information

-

Type: container

+

Container

Yes

+

Yes

+

Explanation:

+

Container for the restore information

+

Restrictions:

+

None

+

Value range:

+

None

+

Default value:

+

None

Days

+

Days

Indicates the storage duration of the restored object. The minimum value is 1 and the maximum value is 30.

-

Type: integer

+

Integer

Yes

+

Yes

+

Explanation:

+

After an object is restored, a Standard copy of it is generated. This parameter specifies how long the Standard copy can be retained, that is, the validity period of the restored object.

+

Restrictions:

+

None

+

Value range:

+

The value ranges from 1 to 30, in days.

+

Default value:

+

None

RestoreJob

+

RestoreJob

Container for the restore options

-

Type: container

+

Container

No

+

No

+

Explanation:

+

Container for the restore options

+

Restrictions:

+

None

+

Value range:

+

None

+

Default value:

+

None

Tier

+

Tier

Restore options: Expedited | Standard

-

Expedited indicates that objects can be quickly restored from Archive storage within 1 to 5 minutes.

-

Standard indicates that objects can be restored from Archive storage within 3 to 5 hours.

-

The default value is Standard.

-

Type: string

+

String

No

+

No

+

Explanation:

+

Retrieval speed tier. You can select a tier that suits your retrieval needs.

+

Value range:

+
  • Expedited indicates that objects can be quickly restored from Archive storage within 1 to 5 minutes.
  • Standard indicates that objects can be restored from Archive storage within 3 to 5 hours.
+

Default value:

+

Standard

HTTP/1.1 status_code
 Date: date
 
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -101,60 +139,66 @@ Date: date

Response Elements

This response contains no elements.

Error Responses

-
Table 2 List of OBS access error codes

Error Code

+
- - - - - - - - - - - - - - - - - - - - @@ -187,7 +231,6 @@ Content-Length: 183 </RestoreJob> </RestoreRequest>
Table 2 List of OBS access error codes

Error Code

Description

+

Description

HTTP Status Code

+

HTTP Status Code

RestoreAlreadyInProgress

+

RestoreAlreadyInProgress

The object is being restored. The request conflicts with another.

-

ErrorMessage: Object restore is already in progress

+

Explanation:

+

The object is being restored. The request conflicts with another.

+

ErrorMessage: Object restore is already in progress

409 Conflict

+

409 Conflict

ObjectHasAlreadyRestored

+

ObjectHasAlreadyRestored

The objects have been restored and the retention period of the objects cannot be shortened.

-

ErrorMessage: After restoring an archived object, you cannot shorten the restoration period of the archived object

+

Explanation:

+

The objects have been restored and the retention period of the objects cannot be shortened.

+

ErrorMessage: After restoring an archived object, you cannot shorten the restoration period of the archived object

409 Conflict

+

409 Conflict

MalformedXML

+

MalformedXML

Invalid value for the Days field (not an integer)

-

ErrorMessage: The XML you provided was not well-formed or did not validate against our published schema

+

Explanation:

+

Invalid value for the Days field (supposed to be an integer)

+

ErrorMessage: The XML you provided was not well-formed or did not validate against our published schema

400 Bad Request

+

400 Bad Request

InvalidArgument

+

InvalidArgument

The value of the Days field is not within the range of 1 to 30.

-

ErrorMessage: restoration days should be at least 1 and at most 30

+

Explanation:

+

Invalid value for the Days field (valid range: 1 to 30).

+

ErrorMessage: restoration days should be at least 1 and at most 30

400 Bad Request

+

400 Bad Request

MalformedXML

+

MalformedXML

Invalid value for the Tier field.

-

ErrorMessage: The XML you provided was not well-formed or did not validate against our published schema

+

Explanation:

+

Invalid value for the Tier field.

+

ErrorMessage: The XML you provided was not well-formed or did not validate against our published schema

400 Bad Request

+

400 Bad Request

InvalidObjectState

+

InvalidObjectState

The restored object is not in the Cold storage.

-

ErrorMessage: Restore is not allowed, as object's storage class is not COLD

+

Explanation:

+

The restored object is not in the Cold storage.

+

ErrorMessage: Restore is not allowed, as object's storage class is not COLD

403 Forbidden

+

403 Forbidden

-

Sample Response

1
@@ -202,7 +245,6 @@ x-obs-id-2: 32AAAUgAIAABAAAQAAEAABAAAQAAEAABCSLbWIs23RR95
 Date: WED, 01 Jul 2015 04:39:46 GMT
 Content-Length: 0
 
-
diff --git a/docs/obs/api-ref/obs_04_0089.html b/docs/obs/api-ref/obs_04_0089.html index 097c82ce..1a45b942 100644 --- a/docs/obs/api-ref/obs_04_0089.html +++ b/docs/obs/api-ref/obs_04_0089.html @@ -45,7 +45,6 @@ Authorization: authorization </AccessControlList> </AccessControlPolicy>
-

Request Parameters

Table 1 describes the request parameters.

@@ -60,7 +59,7 @@ Authorization: authorization

versionId

Object version ID. Object ACL of a specified version is to be changed.

+

Object version ID. The ACL of the specified object version is to be changed.

Type: string

No

@@ -106,7 +105,7 @@ Authorization: authorization

No

Grantee

+

Grantee

Container for the details about the grantee.

Type: XML

@@ -114,7 +113,7 @@ Authorization: authorization

No

Canned

+

Canned

Grants permissions to all users.

Value range: Everyone

@@ -141,7 +140,7 @@ Authorization: authorization

No

AccessControlList

+

AccessControlList

Indicates an ACL, which consists of three elements: Grant, Grantee, and Permission.

Type: XML

@@ -159,7 +158,6 @@ Authorization: authorization Content-Length: length Content-Type: application/xml
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -253,7 +251,6 @@ Content-Length: 727 </AccessControlList> </AccessControlPolicy>
-

Sample Response

1
@@ -268,7 +265,6 @@ x-obs-id-2: 32AAAUgAIAABAAAQAAEAABAAAQAAEAABCTjCqTmsA1XRp
 Date: WED, 01 Jul 2015 04:42:34 GMT
 Content-Length: 0
 
-
diff --git a/docs/obs/api-ref/obs_04_0090.html b/docs/obs/api-ref/obs_04_0090.html index d395cecf..fccde165 100644 --- a/docs/obs/api-ref/obs_04_0090.html +++ b/docs/obs/api-ref/obs_04_0090.html @@ -13,7 +13,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization -

Request Parameters

The request parameter specifies the object ACL to be obtained. For details about the parameters, see Table 1.

@@ -82,7 +81,6 @@ Content-Type: application/xml </AccessControlList> </AccessControlPolicy>
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -167,7 +165,6 @@ Accept: */* Date: WED, 01 Jul 2015 04:45:55 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:YcmvNQxItGjFeeC1K2HeUEp8MMM=
-

Sample Response

 1
@@ -240,7 +237,6 @@ Content-Length: 769
   </AccessControlList> 
 </AccessControlPolicy>
 
-
diff --git a/docs/obs/api-ref/obs_04_0091.html b/docs/obs/api-ref/obs_04_0091.html index d803a941..fe7fba5f 100644 --- a/docs/obs/api-ref/obs_04_0091.html +++ b/docs/obs/api-ref/obs_04_0091.html @@ -19,24 +19,33 @@ Date: date <Optional Additional Header> <object Content> -

Request Parameters

-
Table 1 Request parameters

Parameter

+
- - + - - - + @@ -46,103 +55,200 @@ Date: date

Request Headers

OBS supports the six HTTP request headers: Cache-Control, Expires, Content-Encoding, Content-Disposition, Content-Type, and Content-Language. It saves these header values in the metadata of the object. When the object is downloaded or queried, the saved values are set for corresponding HTTP headers and returned to the client.

-
Table 1 Request parameters

Parameter

Description

+

Type

Mandatory

+

Mandatory (Yes/No)

+

Description

versionId

+

versionId

Object version ID

-

Type: string

+

String

No

+

No

+

Explanation:

+

Version ID of the object.

+

Restrictions:

+

None

+

Value range:

+

The value must contain 32 characters.

+

Default value:

+

None

Table 2 Request headers

Header

+
- - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + + + + + + @@ -161,69 +267,144 @@ Content-Length: length Etag: etag Last-Modified: time
Table 2 Request headers

Header

Description

+

Type

Mandatory

+

Mandatory (Yes/No)

+

Description

x-obs-metadata-directive

+

x-obs-metadata-directive

Metadata operation indicator.

-

The value can be REPLACE_NEW or REPLACE.

-

REPLACE_NEW: The metadata that has an existing value is replaced. A value is assigned to the metadata that does not have a value. The metadata that is not specified remains unchanged. (Note: a header with custom metadata is replaced.)

-

REPLACE: Use the header field carried in the current request to replace the original metadata. The metadata that is not specified (except x-obs-storage-class) will be deleted.

-

Type: string

+

String

Yes

+

Yes

+

Explanation:

+

Metadata operation directive.

+

Restrictions:

+

None

+

Value range:

+
  • REPLACE_NEW: The metadata that has an existing value is replaced. A value is assigned to the metadata that does not have a value. The metadata that is not specified remains unchanged. Custom metadata is replaced.
  • REPLACE: All original metadata is replaced by metadata specified in the request. Metadata that is not specified (except for x-obs-storage-class) is deleted.
+

Default value:

+

None

Cache-Control

+

Cache-Control

Specifies the cache behavior of the web page when the object is downloaded.

-

Type: string

+

String

No

+

No

+

Explanation:

+

It specifies the cache behavior of the web page when an object is downloaded.

+

Restrictions:

+

None

+

Value range:

+

See the Cache-Control values defined in HTTP.

+

Default value:

+

None

Content-Disposition

+

Content-Disposition

Specifies the name of the object when it is downloaded.

-

Type: string

+

String

No

+

No

+

Explanation:

+

It specifies the name of an object when it is downloaded.

+

Restrictions:

+

None

+

Value range:

+

See the Content-Disposition values defined in HTTP.

+

Default value:

+

None

Content-Encoding

+

Content-Encoding

Specifies the content encoding format when an object is being downloaded.

-

Type: string

+

String

No

+

No

+

Explanation:

+

It specifies the content encoding format when an object is downloaded.

+

Restrictions:

+

None

+

Value range:

+

See the Content-Encoding values defined in HTTP.

+

Default value:

+

None

Content-Language

+

Content-Language

Specifies the content language format when an object is downloaded.

-

Type: string

+

String

No

+

No

+

Explanation:

+

It specifies the content language format when an object is downloaded.

+

Restrictions:

+

None

+

Value range:

+

See the Content-Language values defined in HTTP.

+

Default value:

+

None

Content-Type

+

Content-Type

Object file type.

-

Type: string

+

String

No

+

No

+

Explanation:

+

It specifies the file type of an object when it is downloaded.

+

Restrictions:

+

None

+

Value range:

+

See the Content-Type values defined in HTTP.

+

Default value:

+

None

Expires

+

Expires

Specifies the cache expiration time of the web page when the object is downloaded.

-

Type: string

+

String

No

+

No

+

Explanation:

+

It specifies the expiration time of a cached web page when an object is downloaded.

+
CAUTION:

This parameter is not used to set the object expiration time.

+
+

Restrictions:

+

None

+

Value range:

+

See the Expires values defined in HTTP.

+

Default value:

+

None

x-obs-website-redirect-location

+

x-obs-website-redirect-location

When the bucket is configured with the website redirection, the request for obtaining the object can be redirected to another object or an external URL in the bucket.

-

In the following example, the request header sets the redirection to an object (anotherPage.html) in the same bucket:

-

x-obs-website-redirect-location:/anotherPage.html

-

In the following example, the request header sets the object redirection to an external URL:

-

x-obs-website-redirect-location:http://www.example.com/

-

Type: string

-

Constraint: The value must be prefixed by a slash (/), http://, or https://. The length of the value cannot exceed 2 KB.

+

String

No

+

No

+

Explanation:

+

If the bucket is configured with website hosting, the request for obtaining the object can be redirected to another object in the bucket or an external URL.

+

In the following example, the request header sets the redirection to an object (anotherPage.html) in the same bucket:

+

x-obs-website-redirect-location:/anotherPage.html

+

In the following example, the request header sets the object redirection to an external URL:

+

x-obs-website-redirect-location:http://www.example.com/

+

Restrictions:

+

The value must start with a slash (/), http://, or https:// and cannot exceed 2 KB.

+

Value range:

+

None

+

Default value:

+

None

x-obs-storage-class

+

x-obs-storage-class

Specifies the storage class of an object.

-

Type: string

-

Storage class options: STANDARD (Standard), WARM (Warm), COLD (Cold). These values are case sensitive.

-

Example: x-obs-storage-class: STANDARD

+

String

No

+

No

+

Explanation:

+

Specifies the storage class of an object.

+

Example: x-obs-storage-class: STANDARD

+

Restrictions:

+

The value is case-sensitive.

+

Value range:

+
  • STANDARD
  • WARM
  • COLD
+ +

Default value:

+

None

x-obs-meta-*

+

x-obs-meta-*

A message header starting with x-obs-meta- can be added to a request to add custom metadata for object management. Custom metadata will be returned in the response header when you retrieve or query the metadata of the object.

-

Type: string

-

Example: x-obs-meta-test: test metadata

+

String

No

+

No

+

Explanation:

+

Custom metadata of the object. You can add a header starting with x-obs-meta- in the request to define metadata. The custom metadata will be returned in the response when you retrieve the object or query the object metadata.

+

Example: x-obs-meta-test: test metadata

+

Restrictions:

+
  • The total size of all custom metadata cannot exceed 8K. To measure the size, calculate the sum of bytes of all UTF-8 encoded keys and values.
  • The custom metadata keys are case-insensitive, but are stored in lowercase by OBS. The key values are case-sensitive.
  • Both custom metadata keys and their values must conform to US-ASCII standards. If non-ASCII or unrecognizable characters are required, they must be encoded and decoded in URL or Base64 on the client, because the server does not perform such operations.
+

Value range:

+

None

+

Default value:

+

None

+

x-obs-tagging

+

String

+

No

+

Explanation:

+

An object's tag information in key-value pairs. Multiple tags can be added at the same time.

+

Example: x-obs-tagging:TagA=A&TagB&TagC

+

Restrictions:

+
  • If a tag key or value contains special characters, equal signs (=), or full-width characters, it must be URL-encoded.
  • If there is no equal sign (=) in a configuration, the tag value is considered left blank.
+

Value range:

+

None

+

Default value:

+

None

-

Response Headers

-
Table 3 Additional response headers

Header

+
- + - - + - - + - - + - - + - - + - - + - - + - - + - - + @@ -253,7 +434,6 @@ x-obs-metadata-directive:REPLACE_NEW Content-Type:application/zip x-obs-meta-test:meta
Table 3 Additional response headers

Header

Description

+

Type

+

Description

x-obs-metadata-directive

+

x-obs-metadata-directive

Metadata operation indicator.

-

The value can be REPLACE_NEW or REPLACE.

-

Type: string

+

String

+

Explanation:

+

Metadata operation directive.

+

Value range:

+
  • REPLACE_NEW: The metadata that has an existing value is replaced. A value is assigned to the metadata that does not have a value. The metadata that is not specified remains unchanged. Custom metadata is replaced.
  • REPLACE: All original metadata is replaced by metadata specified in the request. Metadata that is not specified (except for x-obs-storage-class) is deleted.
+

Default value:

+

None

Cache-Control

+

Cache-Control

Specifies the cache behavior of the web page when the object is downloaded. If a request carries this header field, the response message must contain this header field.

-

Type: string

+

String

+

Explanation:

+

It specifies the cache behavior of the web page when an object is downloaded.

+

Restrictions:

+

If a request carries this header field, the response message must contain this header field.

+

Value range:

+

See the Cache-control values defined in HTTP.

+

Default value:

+

None

Content-Disposition

+

Content-Disposition

Specifies the name of the object when it is downloaded. If a request carries this header field, the response message must contain this header field.

-

Type: string

+

String

+

Explanation:

+

It specifies the name of an object when it is downloaded.

+

Restrictions:

+

If a request carries this header field, the response message must contain this header field.

+

Value range:

+

See the Content-Disposition values defined in HTTP.

+

Default value:

+

None

Content-Encoding

+

Content-Encoding

Specifies the content encoding format when an object is being downloaded. If a request carries this header field, the response message must contain this header field.

-

Type: string

+

String

+

Explanation:

+

It specifies the content encoding format when an object is downloaded.

+

Restrictions:

+

If a request carries this header field, the response message must contain this header field.

+

Value range:

+

See the Content-Encoding values defined in HTTP.

+

Default value:

+

None

Content-Language

+

Content-Language

Specifies the content language format when an object is downloaded. If a request carries this header field, the response message must contain this header field.

-

Type: string

+

String

+

Explanation:

+

It specifies the content language format when an object is downloaded.

+

Restrictions:

+

If a request carries this header field, the response message must contain this header field.

+

Value range:

+

See the Content-Language values defined in HTTP.

+

Default value:

+

None

Expires

+

Expires

Specifies the cache expiration time of the web page when the object is downloaded. If a request carries this header field, the response message must contain this header field.

-

Type: string

+

String

+

Explanation:

+

It specifies the expiration time of a cached web page when an object is downloaded.

+

Restrictions:

+

If a request carries this header field, the response message must contain this header field.

+

Value range:

+

See the Expires values defined in HTTP.

+

Default value:

+

None

x-obs-website-redirect-location

+

x-obs-website-redirect-location

When the bucket is configured with the website redirection, the request for obtaining the object can be redirected to another object or an external URL in the bucket. If a request carries this header field, the response message must contain this header field.

-

Type: string

+

String

+

Explanation:

+

If the bucket is configured with website hosting, the request for obtaining the object can be redirected to another object in the bucket or an external URL.

+

In the following example, the request header sets the redirection to an object (anotherPage.html) in the same bucket:

+

x-obs-website-redirect-location:/anotherPage.html

+

In the following example, the request header sets the object redirection to an external URL:

+

x-obs-website-redirect-location:http://www.example.com/

+

Restrictions:

+
  • If a request carries this header field, the response message must contain this header field.
  • The value must start with a slash (/), http://, or https:// and cannot exceed 2 KB.
+

Value range:

+

None

+

Default value:

+

None

x-obs-storage-class

+

x-obs-storage-class

Specifies the storage class of an object. If a request carries this header field, the response message must contain this header field.

-

Type: string

+

String

+

Explanation:

+

It specifies the storage class of an object.

+

Restrictions:

+
  • If a request carries this header field, the response message must contain this header field.
  • The value is case-sensitive.
+

Value range:

+
  • STANDARD
  • WARM
  • COLD
+ +

Default value:

+

None

x-obs-meta-*

+

x-obs-meta-*

Custom metadata is used to manage objects in a customized manner. If a request carries this header field, the response message must contain this header field.

-

Type: string

+

String

+

Explanation:

+

Custom metadata of the object. You can add custom metadata headers that start with x-obs-meta- for easy object management. When you retrieve or query the metadata of the object, the added custom metadata headers will be returned in the response.

+

Restrictions:

+
  • If a request carries this header field, the response message must contain this header field.
  • The total size of all custom metadata cannot exceed 8K. To measure the size, calculate the sum of bytes of all UTF-8 encoded keys and values.
  • The custom metadata keys are case-insensitive, but are stored in lowercase by OBS. The key values are case-sensitive.
  • Both custom metadata keys and their values must conform to US-ASCII standards. If non-ASCII or unrecognizable characters are required, they must be encoded and decoded in URL or Base64 on the client, because the server does not perform such operations.
+

Value range:

+

None

+

Default value:

+

None

-

Sample Response: Adding Metadata for an Object

1
@@ -274,7 +454,6 @@ Content-Length: 0
 x-obs-metadata-directive:REPLACE_NEW
 x-obs-meta-test:meta
 
-

Sample Request: Editing Metadata of an Object

If metadata x-obs-meta-test:testmeta exists in the object and the value of x-obs-storage-class is WARM, change the metadata x-obs-meta-test of the object to newmeta and change x-obs-storage-class to COLD.

@@ -296,7 +475,6 @@ x-obs-metadata-directive:REPLACE_NEW x-obs-meta-test:newmeta x-obs-storage-class:COLD
-

Sample Response: Editing Metadata of an Object

 1
@@ -319,7 +497,6 @@ x-obs-metadata-directive:REPLACE_NEW
 x-obs-meta-test:newmeta
 x-obs-storage-class:COLD
 
-

Sample Request: Deleting Metadata of an Object

Metadata x-obs-meta-test:newmeta and Content-Type:application/zip exist in the object, and delete x-obs-meta-test.

@@ -339,7 +516,6 @@ Authorization: OBS H4IPJX0TQTHTHEB x-obs-metadata-directive:REPLACE Content-Type:application/zip
-

Sample Response: Deleting Metadata of an Object

1
@@ -358,7 +534,6 @@ Date: WED, 01  0
 x-obs-metadata-directive:REPLACE
 
-
diff --git a/docs/obs/api-ref/obs_04_0092.html b/docs/obs/api-ref/obs_04_0092.html index 47f4a16f..5f0f5761 100644 --- a/docs/obs/api-ref/obs_04_0092.html +++ b/docs/obs/api-ref/obs_04_0092.html @@ -61,7 +61,6 @@ Server: OBS x-obs-request-id: request-id x-obs-id-2: id
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -93,7 +92,6 @@ Server: OBS x-obs-request-id: 8DF400000163D3F0FD2A03D2D30B0542 x-obs-id-2: 32AAAUgAIAABAAAQAAEAABAAAQAAEAABCTjCqTmsA1XRpIrmrJdvcEWvZyjbztd
- diff --git a/docs/obs/api-ref/obs_04_0093.html b/docs/obs/api-ref/obs_04_0093.html index 8a1ad359..9510f29a 100644 --- a/docs/obs/api-ref/obs_04_0093.html +++ b/docs/obs/api-ref/obs_04_0093.html @@ -55,7 +55,6 @@ x-obs-request-id: request-id x-obs-id-2: id Date: Date -

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -80,7 +79,6 @@ x-obs-request-id: 8DF400000163D3F51DEA05AC9CA066F1 x-obs-id-2: 32AAAUgAIAABAAAQAAEAABAAAQAAEAABCSgkM4Dij80gAeFY8pAZIwx72QhDeBZ5 Date: WED, 01 Jul 2015 04:19:21 GMT
- diff --git a/docs/obs/api-ref/obs_04_0094.html b/docs/obs/api-ref/obs_04_0094.html index 5f916a9a..4e65997e 100644 --- a/docs/obs/api-ref/obs_04_0094.html +++ b/docs/obs/api-ref/obs_04_0094.html @@ -54,7 +54,6 @@ x-obs-request-id: request-id x-obs-id-2: id Date: Date -

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -78,7 +77,6 @@ x-obs-request-id: 8DF400000163D3F51DEA05AC9CA066F1 x-obs-id-2: 32AAAUgAIAABAAAQAAEAABAAAQAAEAABCSgkM4Dij80gAeFY8pAZIwx72QhDeBZ5 Date: WED, 01 Jul 2015 04:19:21 GMT
- diff --git a/docs/obs/api-ref/obs_04_0096.html b/docs/obs/api-ref/obs_04_0096.html index 891ca393..a6e95cf3 100644 --- a/docs/obs/api-ref/obs_04_0096.html +++ b/docs/obs/api-ref/obs_04_0096.html @@ -12,7 +12,7 @@ - diff --git a/docs/obs/api-ref/obs_04_0097.html b/docs/obs/api-ref/obs_04_0097.html index f97c2239..539223f7 100644 --- a/docs/obs/api-ref/obs_04_0097.html +++ b/docs/obs/api-ref/obs_04_0097.html @@ -1,7 +1,7 @@

Listing Initiated Multipart Uploads in a Bucket

-

Functions

This operation queries all the multipart upload tasks that are initialized but have not been merged or canceled in a bucket.

+

Functions

You can use this API to query all initiated multipart uploads that have not been completed or canceled in a bucket.

Request Syntax

GET /?uploads&max-uploads=max HTTP/1.1 
 Host: bucketname.obs.region.example.com
@@ -118,7 +118,6 @@ Content-Length: length
     </Upload> 
 </ListMultipartUploadsResult>
 
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -294,7 +293,6 @@ Accept: */* Date: WED, 01 Jul 2015 04:51:21 GMT Authorization: OBS UDSIAMSTUBTEST000008:XdmZgYQ+ZVy1rjxJ9/KpKq+wrU0=
-

Sample Response: Listing Initiated Multipart Uploads

 1
@@ -357,7 +355,6 @@ Content-Length: 681
   </Upload>
 </ListMultipartUploadsResult>
 
-

Sample Request: Listing Initiated Multipart Uploads (with a Prefix and Delimiter Specified)

The following example describes how to list two initiated multipart uploads (with objects multipart-object001 and part2-key02 in bucket examplebucket. In this listing operation, prefix is set to multipart and object001 is set to delimiter.

@@ -410,7 +407,6 @@ Content-Length: 681 </CommonPrefixes> </ListMultipartUploadsResult>
- diff --git a/docs/obs/api-ref/obs_04_0098.html b/docs/obs/api-ref/obs_04_0098.html index 88c66045..4badbcdc 100644 --- a/docs/obs/api-ref/obs_04_0098.html +++ b/docs/obs/api-ref/obs_04_0098.html @@ -1,7 +1,7 @@

Initiating a Multipart Upload

-

Functions

Before using this operation, make an API operation call to create a multipart upload task. The system will return a globally unique upload ID as the multipart upload identifier. This identifier can be used in subsequent requests including UploadPart, CompleteMultipartUpload, and ListParts. Create a multipart upload task does not affect the object that has the same name as object to be uploaded in multiple parts. You can create more than one multipart upload tasks for an object. This operation request can contain headers x-obs-acl, x-obs-meta-*, Content-Type, and Content-Encoding. The headers are recorded in the multipart upload metadata.

+

Functions

Before using this operation, make an API operation call to create a multipart upload task. The system will return a globally unique upload ID as the multipart upload identifier. You can use this ID to upload, assemble, and list parts. Create a multipart upload task does not affect the object that has the same name as object to be uploaded in multiple parts. You can create more than one multipart upload tasks for an object. This operation request can contain headers x-obs-acl, x-obs-meta-*, Content-Type, and Content-Encoding. The headers are recorded in the multipart upload metadata.

This operation supports server-side encryption.

WORM

If a bucket has WORM enabled, you can configure object-level retention policies when initiating multipart uploads. You can specify the x-obs-object-lock-mode and x-obs-object-lock-retain-until-date headers when you initiate a multipart upload to protect the object assembled. If you do not specify these two headers but have configured a default bucket-level WORM policy, this default policy automatically applies to the object newly assembled. You can also configure or update a WORM retention policy after the object is assembled.

@@ -15,198 +15,341 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization
-
-

Request Parameters

This request uses parameters to specify a multipart upload. Table 1 describes the parameters.

+

Request Parameters

This request uses parameters to specify a multipart upload. Table 1 describes the parameters.

-
-
Table 1 Request parameters

Parameter

+
- - + - - - +
Table 1 Request parameters

Parameter

Description

+

Type

Mandatory

+

Mandatory (Yes/No)

+

Description

uploads

+

uploads

Indicates a multipart upload.

-

Type: string

-
NOTE:
  • This parameter is an empty string.
  • If this parameter is not contained in a request, the request performs a common upload using POST.
-
+

String

Yes

+

Yes

+

Explanation:

+

Indicates a multipart upload.

+

Restrictions:

+
  • This parameter is an empty string.
  • If this parameter is not included, the request is treated as an ordinary POST upload.
+

Value range:

+

An empty string.

+

Default value:

+

None

-

Request Headers

The request can use additional headers, as shown in Table 2.

+

Request Headers

The request can use additional headers shown in Table 2.

-
+ + + + + - @@ -593,7 +601,7 @@ QUFBQUFBYmJiYmJiYmJD</HostId> - @@ -816,6 +824,15 @@ QUFBQUFBYmJiYmJiYmJD</HostId>

Contact technical support.

+ + + + +
Table 2 Request headers

Header

+
- - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + + + + + + @@ -238,90 +381,151 @@ Connection: status <UploadId>uploadID</UploadId> </InitiateMultipartUploadResult>
Table 2 Request headers

Header

Description

+

Type

Mandatory

+

Mandatory (Yes/No)

+

Description

x-obs-acl

+

x-obs-acl

When initiating a multipart upload, you can add this message header to set the permission control policy for the object. The predefined common policies are as follows: private, public-read, and public-read-write.

-

Type: string

-

Note: This header is a predefined policy expressed in a character string.

-

Example: x-obs-acl: public-read-write

+

String

No

+

No

+

Explanation:

+

When initiating a multipart upload, you can add this header to set an object ACL.

+

Example: x-obs-acl: public-read-write

+

Restrictions:

+

Use character strings.

+

Value range:

+
  • private
  • public-read
  • public-read-write
+

+

Default value:

+

private

x-obs-grant-read

+

x-obs-grant-read

When initiating a multipart upload, you can use this header to grant all users in an account the permissions to read the object and obtain the object metadata.

-

Type: string

-

Example: x-obs-grant-read: ID=domainID. If multiple accounts are authorized, separate them with commas (,).

+

String

No

+

No

+

Explanation:

+

When initiating a multipart upload, you can use this header to grant all users in a domain the permissions to read the object and obtain the object metadata.

+

Example: x-obs-grant-read: ID=domainID.

+

Restrictions:

+

If multiple accounts are authorized, separate them with commas (,).

+

Value range:

+

None

+

Default value:

+

None

x-obs-grant-read-acp

+

x-obs-grant-read-acp

When initiating a multipart upload, you can use this header to grant all users in an account the permission to obtain the object ACL.

-

Type: string

-

Example: x-obs-grant-read-acp: ID=domainID. If multiple accounts are authorized, separate them with commas (,).

+

String

No

+

No

+

Explanation:

+

When initiating a multipart upload, you can use this header to grant all users in a domain the permissions to obtain the object ACL.

+

Example: x-obs-grant-read-acp: ID=domainID.

+

Restrictions:

+

If multiple accounts are authorized, separate them with commas (,).

+

Value range:

+

None

+

Default value:

+

None

x-obs-grant-write-acp

+

x-obs-grant-write-acp

When initiating a multipart upload, you can use this header to grant all users in an account the permission to write the object ACL.

-

Type: string

-

Example: x-obs-grant-write-acp: ID=domainID. If multiple accounts are authorized, separate them with commas (,).

+

String

No

+

No

+

Explanation:

+

When initiating a multipart upload, you can use this header to grant all users in a domain the permissions to write the object ACL.

+

Example: x-obs-grant-write-acp: ID=domainID

+

Restrictions:

+

If multiple accounts are authorized, separate them with commas (,).

+

Value range:

+

None

+

Default value:

+

None

x-obs-grant-full-control

+

x-obs-grant-full-control

When initiating a multipart upload, you can use this header to grant all users in an account the permissions to read the object, obtain the object metadata and ACL, and write the object ACL.

-

Type: string

-

Example: x-obs-grant-full-control: ID=domainID. If multiple accounts are authorized, separate them with commas (,).

+

String

No

+

No

+

Explanation:

+

When initiating a multipart upload, you can use this header to grant all users in a domain the following permissions:

+

Permissions to read objects, obtain object metadata, obtain object ACLs, and write object ACLs.

+

Example: x-obs-grant-full-control: ID=domainID.

+

Restrictions:

+

If multiple accounts are authorized, separate them with commas (,).

+

Value range:

+

None

+

Default value:

+

None

x-obs-storage-class

+

x-obs-storage-class

When initiating a multipart upload, you can add this header to specify the storage class for the object. If you do not use this header, the object storage class is the default storage class of the bucket.

-

Type: string

-

Storage class options: STANDARD (Standard), WARM (Warm), COLD (Cold). These values are case sensitive.

-

Example: x-obs-storage-class: STANDARD

+

String

No

+

No

+

Explanation:

+

When initiating a multipart upload, you can add this header to specify the storage class for the object.

+

Example: x-obs-storage-class: STANDARD

+

Restrictions:

+
  • If you do not use this header, the object storage class is the default storage class of the bucket.
  • The value is case-sensitive.
+

Value range:

+
  • STANDARD
  • WARM
  • COLD
+ +

Default value:

+

By default, the storage class of the bucket is inherited.

x-obs-website-redirect-location

+

x-obs-website-redirect-location

If a bucket is configured with the static website hosting function, it will redirect requests for this object to another object in the same bucket or to an external URL. OBS stores the value of this header in the object metadata.

-

Type: string

-

Default value: none

-

Constraint: The value must be prefixed by a slash (/), http://, or https://. The length of the value cannot exceed 2 KB.

+

String

No

+

No

+

Explanation:

+

If the bucket is configured with website hosting, the request for obtaining the object can be redirected to another object in the bucket or an external URL.

+

To another object in the same bucket:

+

x-obs-website-redirect-location:/anotherPage.html

+

To an external URL:

+

x-obs-website-redirect-location:http://www.example.com/

+

OBS obtains the specified value from the header and stores it in the object metadata WebsiteRedirectLocation.

+

Restrictions:

+
  • The value must start with a slash (/), http://, or https:// and cannot exceed 2 KB.
  • OBS supports redirection for objects in the root directory of a bucket, not for those in folders.
+

Default value:

+

None

x-obs-server-side-encryption

+

x-obs-server-side-encryption

Indicates that SSE-KMS is used.

-

Type: string

-

Example: x-obs-server-side-encryption: kms

+

String

No. This header is required when SSE-KMS is used.

+

No. This header is required when SSE-KMS is used.

+

Explanation:

+

Indicates that SSE-KMS is used.

+

Example: x-obs-server-side-encryption: kms

+

Restrictions:

+

None

+

Value range:

+
  • kms
  • AES256
+

Default value:

+

None

x-obs-server-side-encryption-kms-key-id

+

x-obs-server-side-encryption-kms-key-id

Indicates the master key when SSE-KMS is used. If this header is not provided, the default master key will be used. If there is no such a default master key, OBS will create one and use it by default.

-

Type: string

-

The following two formats are supported:

-

- regionID:domainID:key/key_id

-

- key_id

-

regionID indicates the ID of the region where the key belongs. domainID indicates the ID of the tenant where the key belongs. key_id indicates the ID of the key created in KMS.

-

Examples:

-

1. x-obs-server-side-encryption-kms-key-id: region:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0

-

or

-

2. x-obs-server-side-encryption-kms-key-id: 4f1cd4de-ab64-4807-920a-47fc42e7f0d0

+

String

No

+

No

+

Explanation:

+

ID of a specified key used for SSE-KMS encryption.

+

Restrictions:

+

This header can only be used when you specify kms for the x-obs-server-side-encryption header.

+

Default value:

+

If you specify kms for encryption but do not specify a key ID, the default master key will be used. If there is not a default master key, OBS will create one and use it.

x-obs-server-side-encryption-customer-algorithm

+

x-obs-server-side-encryption-customer-algorithm

Indicates the encryption algorithm when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-algorithm: AES256

-

Constraint: This header must be used together with x-obs-server-side-encryption-customer-key and x-obs-server-side-encryption-customer-key-MD5.

+

String

No. This header is required when SSE-C is used.

+

No. This header is required when SSE-C is used.

+

Explanation:

+

The algorithm used for encryption.

+

Example: x-obs-server-side-encryption-customer-algorithm: AES256

+

Restrictions:

+
  • This header is used only when SSE-C is used.
  • This header must be used together with x-obs-server-side-encryption-customer-key and x-obs-server-side-encryption-customer-key-MD5.
+

Value range:

+

AES256

+

Default value:

+

None

x-obs-server-side-encryption-customer-key

+

x-obs-server-side-encryption-customer-key

Indicates the key for encrypting objects when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=

-

Constraint: This header is a Base64-encoded 256-bit key and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key-MD5.

+

String

No. This header is required when SSE-C is used.

+

No. This header is required when SSE-C is used.

+

Explanation:

+

The key used for encrypting an object.

+

Example: x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=

+

Restrictions:

+
  • This header is used only when SSE-C is used.
  • This header is a Base64-encoded 256-bit key and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key-MD5.
+

Value range:

+

None

+

Default value:

+

None

x-obs-server-side-encryption-customer-key-MD5

+

x-obs-server-side-encryption-customer-key-MD5

Indicates the MD5 value of the encryption key when SSE-C is used. The MD5 value is used to check whether any error occurs during the transmission of the key.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

-

Constraint: This header is a Base64-encoded 128-bit MD5 value and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key.

+

String

No. This header is required when SSE-C is used.

+

No. This header is required when SSE-C is used.

+

Explanation:

+

The MD5 value of the encryption key. The MD5 value is used to check whether any error occurs during the transmission of the key.

+

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

Restrictions:

+
  • This header is used only when SSE-C is used.
  • This header is a Base64-encoded 128-bit MD5 value and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key.
+

Value range:

+

Base64-encoded MD5 value of the key ID.

+

Default value:

+

None

x-obs-expires

+

x-obs-expires

Specifies when an object expires. It is measured in days. Once the object expires, it is automatically deleted. (The calculation starts from when the object was last modified).

-

Type: integer

-

Example: x-obs-expires:3

+

Integer

No

+

No

+

Explanation:

+

Specifies when an object expires. It is measured in days. Once the object expires, it is automatically deleted. (The calculation starts from when the object was last modified).

+

Example: x-obs-expires:3

+

Restrictions:

+

This parameter can be configured only when uploading the object. It cannot be modified by calling a metadata modification API.

+

Value range:

+

An integer greater than or equal to 0, in days

+

Default value:

+

None

x-obs-object-lock-mode

+

x-obs-tagging

WORM mode that will be applied to the object. Currently, only COMPLIANCE is supported. This header must be used together with x-obs-object-lock-retain-until-date.

-

Type: string

-

Example: x-obs-object-lock-mode:COMPLIANCE

+

String

No, but required when x-obs-object-lock-retain-until-date is present.

+

No

+

Explanation:

+

An object's tag information in key-value pairs. Multiple tags can be added at the same time.

+

Example: x-obs-tagging:TagA=A&TagB&TagC

+

Restrictions:

+
  • If a tag key or value contains special characters, equal signs (=), or full-width characters, it must be URL-encoded.
  • If there is no equal sign (=) in a configuration, the tag value is considered left blank.
+

Value range:

+

None

+

Default value:

+

None

x-obs-object-lock-retain-until-date

+

x-obs-object-lock-mode

Indicates the expiration time of the Object Lock retention. The value must be a UTC time that complies with ISO 8601, for example, 2015-07-01T04:11:15Z. This header must be used together with x-obs-object-lock-mode.

-

Type: string

-

Example: x-obs-object-lock-retain-until-date:2015-07-01T04:11:15Z

+

String

No, but required when x-obs-object-lock-mode is present.

+

No, but required when x-obs-object-lock-retain-until-date is present.

+

Explanation:

+

WORM mode to be applied to an object.

+

Example: x-obs-object-lock-mode:COMPLIANCE

+

Restrictions:

+

This parameter must be used together with x-obs-object-lock-retain-until-date.

+

Value range:

+

Only COMPLIANCE (compliance mode) is supported.

+

Default value:

+

None

x-obs-meta-*

+

x-obs-object-lock-retain-until-date

When initiating a multipart upload, you can use a header starting with x-obs-meta- in the HTTP request to define object metadata for easy management. The user-defined metadata will be returned in the response when you retrieve the object or query the object metadata.

-

Type: string

-

Example: x-obs-meta-test: test metadata

+

String

No

+

No, but required when x-obs-object-lock-mode is present.

+

Explanation:

+

When the WORM policy of the object expires.

+

Example: x-obs-object-lock-retain-until-date:2015-07-01T04:11:15Z

+

Restrictions:

+
  • The value must be a UTC time that complies with the ISO 8601 standard. Example: 2015-07-01T04:11:15Z
  • This parameter must be used together with x-obs-object-lock-mode.
+

Value range:

+

The time must be later than the current time.

+

Default value:

+

None

+

x-obs-meta-*

+

String

+

No

+

Explanation:

+

When initiating a multipart upload, you can use a header starting with x-obs-meta- in the HTTP request to define object metadata for easy management. The custom metadata will be returned in the response when you retrieve the object or query the object metadata.

+

Example: x-obs-meta-test: test metadata

+

Restrictions:

+

This parameter can only be passed in HTTP request headers and cannot exceed 8 KB.

+

Value range:

+

None

+

Default value:

+

None

-

Response Headers

The response to the request uses common headers. For details, see Table 1.

-
Table 3 Additional response headers

Header

+
- + - - + - - + - - + - - +
Table 3 Additional response headers

Header

Description

+

Type

+

Description

x-obs-server-side-encryption

+

x-obs-server-side-encryption

This header is included in a response if SSE-KMS is used.

-

Type: string

-

Example: x-obs-server-side-encryption: kms

+

String

+

Explanation:

+

The encryption method used by the server.

+

Example: x-obs-server-side-encryption: kms

+

Restrictions:

+

This header is included in a response if SSE-KMS is used.

+

Value range:

+
  • kms
  • AES256
+

Default value:

+

None

x-obs-server-side-encryption-kms-key-id

+

x-obs-server-side-encryption-kms-key-id

Indicates the master key ID. This header is included in a response when SSE-KMS is used.

-

Type: string

-

Format: regionID:domainID:key/key_id

-

regionID indicates the ID of the region where the key belongs. domainID indicates the ID of the tenant where the key belongs. key_id indicates the key ID used in this encryption.

-

Example: x-obs-server-side-encryption-kms-key-id: region:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0

+

String

+

Explanation:

+

ID of a specified key used for SSE-KMS encryption.

+

Restrictions:

+

This header can only be used when you specify kms for the x-obs-server-side-encryption header.

+

Default value:

+

If you specify kms for encryption but do not specify a key ID, the default master key will be used. If there is not a default master key, OBS will create one and use it.

x-obs-server-side-encryption-customer-algorithm

+

x-obs-server-side-encryption-customer-algorithm

Indicates the encryption algorithm. This header is included in a response when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-algorithm: AES256

+

String

+

Explanation:

+

The algorithm used for encryption.

+

Example: x-obs-server-side-encryption-customer-algorithm: AES256

+

Restrictions:

+

This header is included in a response if SSE-C is used for server-side encryption.

+

Value range:

+

AES256

+

Default value:

+

None

x-obs-server-side-encryption-customer-key-MD5

+

x-obs-server-side-encryption-customer-key-MD5

Indicates the MD5 value of a key used to encrypt objects. This header is included in a response if SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

String

+

Explanation:

+

The MD5 value of the encryption key.

+

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

Restrictions:

+

This header is included in a response if SSE-C is used for server-side encryption.

+

Value range:

+

Base64-encoded MD5 value of the key ID.

+

Default value:

+

None

-

Response Elements

This response contains elements to indicate the upload ID and the key (name) of the object (bucket) for which the multipart upload was initiated. The returned information is used in the subsequent operations. Table 4 describes the elements.

+

Response Elements

This response contains elements that indicate the multipart upload ID and the bucket and object names, which are used for uploading and assembling parts. Table 4 describes the elements.

-
Table 4 Response elements

Element

+
- + - - + - - + - - + - - +
Table 4 Response elements

Element

Description

+

Type

+

Description

InitiateMultipartUploadResult

+

InitiateMultipartUploadResult

Container of a multipart upload task.

-

Type: XML

+

XML

+

Explanation:

+

Container of a multipart upload task.

+

Restrictions:

+

None

+

Value range:

+

None

+

Default value:

+

None

Bucket

+

Bucket

Indicates the name of the bucket to which the multipart upload was initiated.

-

Type: string

+

String

+

Explanation:

+

Indicates the bucket name in the multipart upload.

+

Restrictions:

+
  • A bucket name must be unique across all accounts and regions.
  • A bucket name:
    • Must be 3 to 63 characters long and start with a digit or letter. Lowercase letters, digits, hyphens (-), and periods (.) are allowed.
    • Cannot be formatted as an IP address.
    • Cannot start or end with a hyphen (-) or period (.).
    • Cannot contain two consecutive periods (..), for example, my..bucket.
    • Cannot contain a period (.) and a hyphen (-) adjacent to each other, for example, my-.bucket or my.-bucket.
    +
  • If you repeatedly create buckets of the same name in the same region, no error will be reported and the bucket attributes comply with those set in the first creation request.
+

Value range:

+

None

+

Default value:

+

None

Key

+

Key

Indicates the object key in a multipart upload.

-

Type: string

+

String

+

Explanation:

+

Name of the object in the multipart upload. An object is uniquely identified by an object name in a bucket. An object name is a complete path that does not contain the bucket name.

+

Restrictions:

+

None

+

Value range:

+

The value must contain 1 to 1,024 characters.

+

Default value:

+

None

UploadId

+

UploadId

Indicates the ID for the initiated multipart upload. This ID is used for the subsequent operation.

-

Type: string

+

String

+

Explanation:

+

ID of the multipart upload, which is used to specify a multipart upload in uploading parts

+

Restrictions:

+

None

+

Value range:

+

The value must contain 1 to 32 characters.

+

Default value:

+

None

-

Error Responses

1. If the AK or signature is invalid, OBS returns 403 Forbidden and the error code is AccessDenied.

-

2. If the bucket is not found, OBS returns 404 Not Found and the error code is NoSuchBucket.

-

3. Check whether the user has the write permission for the specified bucket. If not, OBS returns 403 Forbidden and the error code is AccessDenied.

+

Error Responses

  1. If the AK or signature was invalid, OBS returns 403 Forbidden and the error code is AccessDenied.
  2. If the bucket was not found, OBS returns 404 Not Found and the error code is NoSuchBucket.
  3. If the user did not have the write permission for the specified bucket, OBS returns 403 Forbidden and the error code is AccessDenied.

Other errors are included in Table 2.

Sample Request: Initiating a Multipart Upload

1
@@ -332,7 +536,6 @@ Host: examplebucket.obs.region.example.com
 Date: WED, 01 Jul 2015 05:14:52 GMT 
 Authorization: OBS AKIAIOSFODNN7EXAMPLE:VGhpcyBtZXNzYWdlIHNpZ25lZGGieSRlbHZpbmc=
 
-

Sample Response: Initiating a Multipart Upload

 1
@@ -361,7 +564,6 @@ Content-Length: 303
   <UploadId>DCD2FC98B4F70000013DF578ACA318E7</UploadId> 
 </InitiateMultipartUploadResult>
 
-

Sample Request: Initiating a Multipart Upload (with the ACL Configured)

1
@@ -374,7 +576,6 @@ Date: WED, 01  OBS AKIAIOSFODNN7EXAMPLE:VGhpcyBtZXNzYWdlIHNpZ25lZGGieSRlbHZpbmc=
 
-

Sample Response: Initiating a Multipart Upload (with the ACL Configured)

 1
@@ -403,7 +604,6 @@ Content-Length: 303
   <UploadId>000001648453845DBB78F2340DD460D8</UploadId> 
 </InitiateMultipartUploadResult>
 
-
diff --git a/docs/obs/api-ref/obs_04_0099.html b/docs/obs/api-ref/obs_04_0099.html index 638efccf..f05e44f3 100644 --- a/docs/obs/api-ref/obs_04_0099.html +++ b/docs/obs/api-ref/obs_04_0099.html @@ -1,7 +1,7 @@

Uploading Parts

-

Functions

After initiating a multipart upload, you can use this operation to upload parts for the multipart upload using its task ID. When parts are uploaded in a multipart upload of an object, the upload sequence does not affect part merging, namely, multiple parts can be uploaded concurrently.

+

Functions

After a multipart upload task is created, you can upload parts for this task using the obtained multipart upload ID. When parts are uploaded in a multipart upload of an object, the upload sequence does not affect part merging, namely, multiple parts can be uploaded concurrently.

Part sizes range from 100 KB to 5 GB. However, when parts are being merged, the size of the last uploaded part ranges from 0 to 5 GB. The upload part ID ranges from 1 to 10,000.

This operation supports server-side encryption.

The value of partNumber in a multipart task is unique. If you upload a part of the same partNumber repeatedly, the last part uploaded will overwrite the previous one. When multiple concurrent uploading of the same partNumber part of the same object is performed, the Last Write Win policy is applied. The time of Last Write is defined as the time when the metadata of the part is created. To ensure data accuracy, the client must be locked to ensure concurrent upload of the same part of the same object. Concurrent upload of different parts of the same object does not need to be locked.

@@ -15,30 +15,48 @@ Authorization: authorization Content-MD5:md5 <object Content>
-

Request Parameters

This request uses parameters to specify the upload task ID and part number. Table 1 describes the parameters.

+

Request Parameters

This request uses parameters to specify the upload task ID and part number. Table 1 describes the parameters.

-
Table 1 Request parameters

Parameter

+
- - + - - - + - - - + @@ -47,42 +65,66 @@ Content-MD5:md5

Request Headers

This request uses common headers. For details, see Table 3.

-
Table 1 Request parameters

Parameter

Description

+

Type

Mandatory

+

Mandatory (Yes/No)

+

Description

partNumber

+

partNumber

Indicates the ID of a part to be uploaded. The value is an integer from 1 to 10000.

-

Type: integer

+

Integer

Yes

+

Yes

+

Explanation:

+

Indicates the ID of a part to be uploaded.

+

Restrictions:

+

None

+

Value range:

+

An integer ranging from 1 to 10000.

+

Default value:

+

None

uploadId

+

uploadId

Indicates a multipart upload ID.

-

Type: string

+

String

Yes

+

Yes

+

Explanation:

+

Indicates a multipart upload ID.

+

Restrictions:

+

None

+

Value range:

+

None

+

Default value:

+

None

Table 2 Server encryption request headers

Header

+
- - + - - - + - - - + - - - + @@ -99,45 +141,73 @@ Date: date ETag: etag Content-Length: length
Table 2 Server-side encryption request headers

Header

Description

+

Type

Mandatory

+

Mandatory (Yes/No)

+

Description

x-obs-server-side-encryption-customer-algorithm

+

x-obs-server-side-encryption-customer-algorithm

Indicates the encryption algorithm when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-algorithm:AES256

-

Constraint: This header must be used together with x-obs-server-side-encryption-customer-key and x-obs-server-side-encryption-customer-key-MD5.

+

String

No. This header is required when SSE-C is used. The encryption algorithm must be the same as that used to initiate multipart upload tasks.

+

No. This header is required when SSE-C is used. The encryption algorithm must be the same as that used to initiate multipart upload tasks.

+

Explanation:

+

The algorithm used for encryption.

+

Example: x-obs-server-side-encryption-customer-algorithm:AES256

+

Restrictions:

+
  • Indicates the encryption algorithm used when SSE-C is used.
  • This header must be used together with x-obs-server-side-encryption-customer-key and x-obs-server-side-encryption-customer-key-MD5.
+

Value range:

+

AES256

+

Default value:

+

None

x-obs-server-side-encryption-customer-key

+

x-obs-server-side-encryption-customer-key

Indicates the key for encrypting objects when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=

-

Constraint: This header is a Base64-encoded 256-bit key and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key-MD5.

+

String

No. This header is required when SSE-C is used. The key must be the same as that used to initiate multipart upload tasks.

+

No. This header is required when SSE-C is used. The key must be the same as that used to initiate multipart upload tasks.

+

Explanation:

+

The key used for encrypting an object.

+

Example: x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=

+

Restrictions:

+
  • This header is used only when SSE-C is used for encryption.
  • This header is a Base64-encoded 256-bit key and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key-MD5.
+

Value range:

+

None

+

Default value:

+

None

x-obs-server-side-encryption-customer-key-MD5

+

x-obs-server-side-encryption-customer-key-MD5

Indicates the MD5 value of the encryption key when SSE-C is used. The MD5 value is used to check whether any error occurs during the transmission of the key.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

-

Constraint: This header is a Base64-encoded 128-bit MD5 value and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key.

+

String

No. This header is required when SSE-C is used. The MD5 value must be the same as that used to initiate multipart upload tasks.

+

No. This header is required when SSE-C is used. The MD5 value must be the same as that used to initiate multipart upload tasks.

+

Explanation:

+

The MD5 value of the encryption key. The MD5 value is used to check whether any error occurs during the transmission of the key.

+

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

Restrictions:

+

This header is used only when SSE-C is used for encryption.

+

This header is a Base64-encoded 128-bit MD5 value and must be used together with x-obs-server-side-encryption-customer-algorithm and x-obs-server-side-encryption-customer-key.

+

Value range:

+

Base64-encoded MD5 value of the key ID.

+

Default value:

+

None

-

Response Headers

The response to the request uses common headers. For details, see Table 1.

-
-
Table 3 Additional response headers

Header

+
- + - - + - - + - - + - - + @@ -173,7 +243,6 @@ x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCUQu/EOEVSMa0 Date: WED, 01 Jul 2015 05:15:55 GMT Content-Length: 0
Table 3 Additional response headers

Header

Description

+

Type

+

Description

x-obs-server-side-encryption

+

x-obs-server-side-encryption

This header is included in a response if SSE-KMS is used.

-

Type: string

-

Example: x-obs-server-side-encryption:kms

+

String

+

Explanation:

+

The encryption method used by the server.

+

Example: x-obs-server-side-encryption:kms

+

Restrictions:

+

This header is included in a response if SSE-KMS is used.

+

Value range:

+
  • kms
  • AES256
+

Default value:

+

None

x-obs-server-side-encryption-kms-key-id

+

x-obs-server-side-encryption-kms-key-id

Indicates the master key ID. This header is included in a response when SSE-KMS is used.

-

Type: string

-

Format: regionID:domainID:key/key_id

-

regionID indicates the ID of the region where the key belongs. domainID indicates the ID of the tenant where the key belongs. key_id indicates the key ID used in this encryption.

-

Example: x-obs-server-side-encryption-kms-key-id:region:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0

+

String

+

Explanation:

+

ID of a specified key used for SSE-KMS encryption.

+

Restrictions:

+

This header can only be used when you specify kms for the x-obs-server-side-encryption header.

+

Default value:

+

If you specify kms for encryption but do not specify a key ID, the default master key will be used. If there is not a default master key, OBS will create one and use it.

x-obs-server-side-encryption-customer-algorithm

+

x-obs-server-side-encryption-customer-algorithm

Indicates the encryption algorithm. This header is included in a response when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-algorithm:AES256

+

String

+

Explanation:

+

The algorithm used for encryption.

+

Example: x-obs-server-side-encryption-customer-algorithm:AES256

+

Restrictions:

+

This header is included in a response if SSE-C is used for server-side encryption.

+

Value range:

+

AES256

+

Default value:

+

None

x-obs-server-side-encryption-customer-key-MD5

+

x-obs-server-side-encryption-customer-key-MD5

Indicates the MD5 value of the key for encrypting objects. This header is included in a response when SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

String

+

Explanation:

+

The MD5 value of the encryption key.

+

Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

+

Restrictions:

+

This header is included in a response if SSE-C is used for server-side encryption.

+

Value range:

+

Base64-encoded MD5 value of the key ID.

+

Default value:

+

None

- diff --git a/docs/obs/api-ref/obs_04_0100.html b/docs/obs/api-ref/obs_04_0100.html index ab7aacf7..e000bf0e 100644 --- a/docs/obs/api-ref/obs_04_0100.html +++ b/docs/obs/api-ref/obs_04_0100.html @@ -1,7 +1,7 @@

Copying Parts

-

Functions

After creating a multipart upload job, you can specify its upload ID and upload a part to the job in OBS. Alternatively, you can make an API call to add a part (part of an object or the whole object).

+

Functions

After a multipart upload task is created, you can upload parts for this task using the obtained multipart upload ID. Alternatively, you can make an API call to add a part (part of an object or the whole object).

This operation supports server-side encryption.

You cannot determine whether a request is successful only based on the status_code in the returned HTTP header. If 200 is returned for status_code, the server has received the request and started to process the request. The copy is successful only when the body in the response contains ETag.

@@ -213,11 +213,12 @@ Date: date

x-obs-server-side-encryption-kms-key-id

Indicates the master key ID. This header is included in a response when SSE-KMS is used.

-

Type: string

-

Format: regionID:domainID:key/key_id

-

regionID indicates the ID of the region where the key belongs. domainID indicates the ID of the tenant where the key belongs. key_id indicates the key ID used in this encryption.

-

Example: x-obs-server-side-encryption-kms-key-id:region:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0

+

Explanation:

+

ID of a specified key used for SSE-KMS encryption.

+

Restrictions:

+

This header can only be used when you specify kms for the x-obs-server-side-encryption header.

+

Default value:

+

If you specify kms for encryption but do not specify a key ID, the default master key will be used. If there is not a default master key, OBS will create one and use it.

x-obs-server-side-encryption-customer-algorithm

@@ -299,7 +300,6 @@ Transfer-Encoding: chunked <ETag>"3b46eaf02d3b6b1206078bb86a7b7013"</ETag> </CopyPartResult>
-
diff --git a/docs/obs/api-ref/obs_04_0101.html b/docs/obs/api-ref/obs_04_0101.html index 38863a52..31edb31a 100644 --- a/docs/obs/api-ref/obs_04_0101.html +++ b/docs/obs/api-ref/obs_04_0101.html @@ -1,7 +1,7 @@ -

Listing Uploaded Parts

-

Functions

You can perform this operation to query all parts associated to a multipart upload. The size of each part listed by this API is the same as the size of the part uploaded.

+

Listing Uploaded Parts that Have Not Been Assembled

+

Functions

You can use this API to query all parts of an uncompleted multipart upload task. The size of each part listed by this API is the same as the size of the part uploaded.

Request Syntax

GET /ObjectName?uploadId=uploadid&max-parts=max&part-number-marker=marker HTTP/1.1 
 Host: bucketname.obs.region.example.com
@@ -108,7 +108,6 @@ Content-Length: length
     </Part> 
 </ListPartsResult>
 
-

Response Headers

The response to the request uses common headers. For details, see Table 1.

@@ -265,7 +264,6 @@ Accept: */* Date: WED, 01 Jul 2015 05:20:35 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:xkABdSrBPrz5yqzuZdJnK5oL/yU=
-

Sample Response

 1
@@ -342,7 +340,6 @@ Content-Length: 888
   </Part>
 </ListPartsResult>
 
-
diff --git a/docs/obs/api-ref/obs_04_0102.html b/docs/obs/api-ref/obs_04_0102.html index 1954cb62..6a3abe6c 100644 --- a/docs/obs/api-ref/obs_04_0102.html +++ b/docs/obs/api-ref/obs_04_0102.html @@ -1,12 +1,12 @@

Completing a Multipart Upload

-

Functions

After uploading all parts for a multipart upload, you can use this operation to complete the multipart upload. Before performing this operation, you cannot download the uploaded data. When merging parts, you need to copy the additional message header information recorded during the initialization of the multipart upload task to the object metadata. The processing process is the same as that of the common upload object with these message headers. In the case of merging parts concurrently, the Last Write Win policy must be followed but the time for initiating Last Write is specified as the time when a part multipart upload is initiated.

+

Functions

After all parts are uploaded, you can call this API to assemble specified parts into an object. Before performing this operation, you cannot download the uploaded data. When merging parts, you need to copy the additional message header information recorded during the initialization of the multipart upload task to the object metadata. The processing process is the same as that of the common upload object with these message headers. In the case of merging parts concurrently, the Last Write Win policy must be followed but the time for initiating Last Write is specified as the time when a part multipart upload is initiated.

If a multipart upload has not been aborted, the uploaded parts occupy your storage quota. After all parts in the multipart upload are merged to an object, only the object occupies your storage quota. If a part uploaded in a multipart upload is not used in any merging parts multipart uploads, the part will be deleted to release storage quota.

You can send a request for downloading all or some data of the generated multipart by specifying a range.

You can send a request for deleting all parts uploaded in a multipart upload. Deleted data cannot be restored.

The merged parts do not use the MD5 value of entire object as the ETag. Their ETag is calculated as follows: MD5(M1M2...MN)-N, where Mn is the MD5 value of part n (N is the total number of parts). As described in the Sample Request, there are three parts and each part has an MD5 value. The MD5 values of the three parts are recalculated to obtain a new MD5 value. Then -N is added to the right of the MD5 value to get the ETag of the combined parts. In this example, -N is -3.

-

If the response to an object merge request times out and error 500 or 503 is returned, you can first obtain the object metadata of the multipart upload task. Then, check whether the value of header x-obs-uploadId in the response is the same as the ID of this multipart upload task. If they are the same, object parts have been successfully merged on the server and you do not need to try again. For details, see Consistency of Concurrent Operations.

+

If the response to an object assembling request timed out and error 500 or 503 was returned, you can first obtain the object metadata of the multipart upload task. Then, check whether the value of header x-obs-uploadId in the response is the same as the ID of the current multipart upload task. If they are, it means the object parts have been successfully assembled on the server and you do not need to try again. For details, see Consistency of Concurrent Operations.

WORM

If a bucket has WORM enabled, the WORM protection will be automatically applied to the object generated after a multipart upload is complete. If you specify WORM headers and a retention expiration date when you initiate a multipart upload, the protection for the assembled object ends on the specified date. If you do not specify WORM headers during the initiation, but have configured the default bucket-level retention policy, this default policy is automatically applied and the protection starts when the multipart upload is complete. After a multipart upload is complete, you can still configure object-level WORM retention policies for the assembled object.

@@ -52,25 +52,32 @@ Authorization: authorization </Part> </CompleteMultipartUpload>
-
-

Request Parameters

This request uses parameters to specify the ID of a multipart upload whose parts will be merged. Table 1 describes the parameters.

+

Request Parameters

This request uses parameters to specify the ID of a multipart upload whose parts will be assembled. Table 1 describes the parameters.

-
- @@ -444,7 +444,7 @@ - diff --git a/docs/obs/api-ref/obs_04_0112.html b/docs/obs/api-ref/obs_04_0112.html index d25f04a9..c7070d37 100644 --- a/docs/obs/api-ref/obs_04_0112.html +++ b/docs/obs/api-ref/obs_04_0112.html @@ -122,7 +122,7 @@ - @@ -142,7 +142,7 @@ - @@ -156,6 +156,33 @@ + + + + + + + + + + + + + + +
Table 1 Request parameters

Parameter

+
- - + - - - + @@ -79,38 +86,64 @@ Authorization: authorization

Request Headers

This request uses common headers. For details, see Table 3.

-

Request Elements

This request uses elements to specify the list of parts to be merged. Table 2 describes the elements.

+

Request Elements

This request uses elements to specify the list of parts to be assembled. Table 2 describes the elements.

-
Table 1 Request parameters

Parameter

Description

+

Type

Mandatory

+

Mandatory (Yes/No)

+

Description

uploadId

+

uploadId

Indicates a multipart upload.

-

Type: string

+

String

Yes

+

Yes

+

Explanation:

+

Multipart upload ID.

+

Value range:

+

The value must contain 32 characters.

+

Default value:

+

None

Table 2 Request Elements

Element

+
- - + - - - + - - - + - - - + @@ -135,81 +168,145 @@ Date: date <ETag>ETag</ETag> </CompleteMultipartUploadResult>
Table 2 Request elements

Element

Description

+

Type

Mandatory

+

Mandatory (Yes/No)

+

Description

CompleteMultipartUpload

+

CompleteMultipartUpload

List of parts to be combined

-

Type: XML

+

XML

Yes

+

Yes

+

Explanation:

+

List of parts to be assembled

+

Restrictions:

+

None

+

Value range:

+

None

+

Default value:

+

None

PartNumber

+

PartNumber

Part number

-

Type: integer

+

Integer

Yes

+

Yes

+

Explanation:

+

Part number

+

Restrictions:

+

None

+

Value range:

+

[1,10000]

+

Default value:

+

None

ETag

+

ETag

ETag value returned upon successful upload of a part. It is the unique identifier of the part content. This parameter is used to verify data consistency when parts are merged.

-

Type: string

+

String

Yes

+

Yes

+

Explanation:

+

ETag value returned upon successful upload of a part. It is the unique identifier of the part content. This parameter is used to verify data consistency when parts are merged.

+

Restrictions:

+

None

+

Value range:

+

The value must contain 32 characters.

+

Default value:

+

None

-

Response Headers

The response to the request uses common headers. For details, see Table 1.

-

In addition to the common response headers, the message headers listed in Table 3 may be used.

+

In addition to the common response headers, the message headers listed in Table 3 may be used.

-
-
Table 3 Additional response headers

Header

+
- + - - + - - + - - + - - +
Table 3 Additional response headers

Header

Description

+

Type

+

Description

x-obs-version-id

+

x-obs-version-id

Version of the object after parts being merged.

-

Type: string

+

String

+

Explanation:

+

Version of the object after parts are assembled.

+

Restrictions:

+

None

+

Value range:

+

The value must contain 32 characters.

+

Default value:

+

None

x-obs-server-side-encryption

+

x-obs-server-side-encryption

This header is included in a response if SSE-KMS is used.

-

Type: string

-

Example: x-obs-server-side-encryption:kms

+

String

+

Explanation:

+

The encryption method used by the server.

+

Example: x-obs-server-side-encryption:kms

+

Restrictions:

+

This header is included in a response if SSE-KMS is used.

+

Value range:

+
  • kms
  • AES256
+

Default value:

+

None

x-obs-server-side-encryption-kms-key-id

+

x-obs-server-side-encryption-kms-key-id

Indicates the master key ID. This header is included in a response if SSE-KMS is used.

-

Type: string

-

Format: regionID:domainID:key/key_id

-

regionID indicates the ID of the region where the key belongs. domainID indicates the ID of the tenant where the key belongs. key_id indicates the key ID used in this encryption.

-

Example: x-obs-server-side-encryption-kms-key-id:region:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0

+

String

+

Explanation:

+

ID of a specified key used for SSE-KMS encryption.

+

Restrictions:

+

This header can only be used when you specify kms for the x-obs-server-side-encryption header.

+

Default value:

+

If you specify kms for encryption but do not specify a key ID, the default master key will be used. If there is not a default master key, OBS will create one and use it.

x-obs-server-side-encryption-customer-algorithm

+

x-obs-server-side-encryption-customer-algorithm

Indicates an encryption algorithm. This header is included in a response if SSE-C is used.

-

Type: string

-

Example: x-obs-server-side-encryption-customer-algorithm:AES256

+

String

+

Explanation:

+

The algorithm used for encryption.

+

Example: x-obs-server-side-encryption-customer-algorithm:AES256

+

Restrictions:

+

This header is included in a response if SSE-C is used for server-side encryption.

+

Value range:

+

AES256

+

Default value:

+

None

-

Response Elements

This response uses elements to return the result of merging parts. Table 4 describes the elements.

+

Response Elements

This response uses elements to return the result of assembling parts. Table 4 describes the elements.

-
Table 4 Response elements

Element

+
- + - - + - - + - - + - - + @@ -265,7 +362,6 @@ Content-Length: 422 </Part></CompleteMultipartUpload>
Table 4 Response elements

Element

Description

+

Type

+

Description

Location

+

Location

Path of the object after parts have been merged.

-

Type: string

+

String

+

Explanation:

+

Path of the object after parts are assembled.

+

Restrictions:

+

Format: /bucketName/objectName

+

Value range:

+

None

+

Default value:

+

None

Bucket

+

Bucket

Bucket in which parts are merged.

-

Type: string

+

String

+

Explanation:

+

Bucket where parts are assembled

+

Restrictions:

+
  • A bucket name must be unique across all accounts and regions.
  • A bucket name:
    • Must be 3 to 63 characters long and start with a digit or letter. Lowercase letters, digits, hyphens (-), and periods (.) are allowed.
    • Cannot be formatted as an IP address.
    • Cannot start or end with a hyphen (-) or period (.).
    • Cannot contain two consecutive periods (..), for example, my..bucket.
    • Cannot contain a period (.) and a hyphen (-) adjacent to each other, for example, my-.bucket or my.-bucket.
    +
  • If you repeatedly create buckets of the same name in the same region, no error will be reported and the bucket attributes comply with those set in the first creation request.
+

Value range:

+

None

+

Default value:

+

None

Key

+

Key

Indicates the key of the generated object.

-

Type: string

+

String

+

Explanation:

+

Object name obtained after part assembling.

+

An object is uniquely identified by an object name in a bucket. An object name is a complete path that does not contain the bucket name.

+

Restrictions:

+

None

+

Value range:

+

The value must contain 1 to 1,024 characters.

+

Default value:

+

None

ETag

+

ETag

The result calculated based on the ETag of each part is the unique identifier of the object content.

-

Type: string

+

String

+

Explanation:

+

The ETag that uniquely identifies the object after its parts were assembled, calculated based on the ETag of each part.

+

Restrictions:

+

If an object is encrypted using server-side encryption, the ETag is not the MD5 value of the object.

+

Value range:

+

The value must contain 32 characters.

+

Default value:

+

None

-

Sample Response

 1
@@ -298,7 +394,6 @@ Content-Length: 326
   <ETag>"03f814825e5a691489b947a2e120b2d3-3"</ETag>
 </CompleteMultipartUploadResult>
 
-
diff --git a/docs/obs/api-ref/obs_04_0103.html b/docs/obs/api-ref/obs_04_0103.html index 9a68f431..9611df2e 100644 --- a/docs/obs/api-ref/obs_04_0103.html +++ b/docs/obs/api-ref/obs_04_0103.html @@ -1,7 +1,7 @@

Canceling a Multipart Upload Task

-

Functions

You can perform this operation to abort a multipart upload. You cannot upload or list parts after operations to merge parts or abort a multipart upload are performed.

+

Functions

You can call this API to cancel a multipart upload task. You cannot upload or list parts after operations to merge parts or abort a multipart upload are performed.

Request Syntax

1
 2
@@ -11,7 +11,6 @@ Host: bucketname.obs.region.example.com
 Date: date
 Authorization: auth
 
-

Request Parameters

This request uses message parameters to specify the multipart upload task number of the segment task. Table 1 describes the parameters.

@@ -62,7 +61,6 @@ Accept: */* Date: WED, 01 Jul 2015 05:28:27 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:QmM2d1DBXZ/b8drqtEv1QJHPbM0=
-

Sample Response

1
@@ -75,7 +73,6 @@ x-obs-request-id: 8DF400000163D463E02A07EC2295674C
 x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCTp5YDlzn0UgqG3laRfkHLGyz7RpR9ON
 Date: WED, 01 Jul 2015 05:28:27 GMT
 
-
diff --git a/docs/obs/api-ref/obs_04_0106.html b/docs/obs/api-ref/obs_04_0106.html index 849fa5d3..0b048f78 100644 --- a/docs/obs/api-ref/obs_04_0106.html +++ b/docs/obs/api-ref/obs_04_0106.html @@ -6,34 +6,43 @@

When a custom KMS key in a non-default IAM project is used to encrypt objects, only the key owner can upload or download the encrypted objects.

When the default KMS key in a region is used to encrypt an object, this default key belongs to the object owner. Only the key owner (also the object owner) can upload or download this object.

-

Newly Added Headers

Two headers are added for SSE-KMS. You can configure the headers listed in Table 1 to enable SSE-KMS.

+

Newly Added Headers

Two headers are added for SSE-KMS. You can configure the headers listed in Table 1 to use SSE-KMS.

You can also configure the default encryption for a bucket to encrypt objects you upload to the bucket. After default encryption is enabled for a bucket, any object upload request without encryption header included will inherit the bucket's encryption settings. For details, see Configuring Bucket Encryption.

-
Table 1 Header fields used in SSE-KMS mode

Element

+
- + - - + - - + @@ -81,7 +90,6 @@ Expect: 100-continue [5242 Byte object contents]
Table 1 Headers used in SSE-KMS

Header

Description

+

Type

+

Description

x-obs-server-side-encryption

+

x-obs-server-side-encryption

Indicates that SSE-KMS is used for encrypting objects.

-

Type: string

-

Example: x-obs-server-side-encryption:kms

+

String

+

Explanation:

+

Indicates that SSE-KMS is used for server-side encryption.

+

Example: x-obs-server-side-encryption:kms

+

Restrictions:

+

None

+

Value range:

+
  • kms
  • AES256
+

Default value:

+

kms

x-obs-server-side-encryption-kms-key-id

+

x-obs-server-side-encryption-kms-key-id

Indicates the master key for encrypting the object when SSE-KMS is used. If this header is not provided, the default master key will be used. If there is no such a default master key, OBS will create one and use it by default.

-

Type: string

-

The following two formats are supported:

-

- regionID:domainID:key/key_id

-

- key_id

-

regionID indicates the ID of the region where the key belongs. domainID indicates the ID of the tenant where the key belongs. key_id indicates the ID of the key created in KMS.

-

Examples:

-

- x-obs-server-side-encryption-kms-key-id:region:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0

-

- x-obs-server-side-encryption-kms-key-id:4f1cd4de-ab64-4807-920a-47fc42e7f0d0

+

String

+

Explanation:

+

ID of a specified key used for SSE-KMS encryption.

+

Restrictions:

+

This header can only be used when you specify kms for the x-obs-server-side-encryption header.

+

Default value:

+

If you specify kms for encryption but do not specify a key ID, the default master key will be used. If there is not a default master key, OBS will create one and use it.

-

Sample Response: Using the Default Key to Encrypt an Object

1
@@ -102,7 +110,6 @@ x-obs-id-2: 32AAAUJAIAABAAAQAAEAABAAAQAAEAABCTv7cHmAnGfBA
 Date: Wed, 06 Jun 2018 09:08:21 GMT
 Content-Length: 0
 
-

Sample Request: Using a Custom Key to Encrypt an Object

 1
@@ -129,7 +136,6 @@ Expect: 100-continue
 
 [5242 Byte object contents]
 
-

Sample Response: Using a Custom Key to Encrypt an Object

1
@@ -150,7 +156,6 @@ x-obs-id-2: 32AAAUJAIAABAdiAEAABA09AEAABCTv7cHmAn12BAG83i
 Date: Wed, 06 Jun 2018 09:08:50 GMT
 Content-Length: 0
 
-

Sample Request: Using a Key to Encrypt an Object Copy

1
@@ -171,7 +176,6 @@ Date: Wed, 06  OBS H4IPJX0TQTHTHEBQQCEC:SH3uTrElaGWarVI1uTq325kTVCI=
 x-obs-copy-source: /bucket/srcobject1
 
-

Sample Response: Using a Key to Encrypt an Object Copy

1
@@ -192,7 +196,6 @@ x-obs-id-2: oRAXhgwdaLc9wKVHqTLSmQB7I35D+32AAAUJAIAABAAAQ
 Date: Wed, 06 Jun 2018 09:10:29 GMT
 Content-Length: 0
 
-

Sample Request: Uploading an Encrypted Object Using a Signed URL

PUT /destobject?AccessKeyId=UI3SN1SRUQE14OYBKTZB&Expires=1534152518&x-obs-server-side-encryption=kms&Signature=chvmG7%2FDA%2FDCQmTRJu3xngldJpg%3D HTTP/1.1
@@ -219,7 +222,6 @@ x-obs-id-2: oRAXhgwdaLc9wKVHqTLSmQB7I35D+32AAAUJAIAABAAAQ
 Date: Wed, 06 Jun 2018 09:10:29 GMT
 Content-Length: 0
 
-
diff --git a/docs/obs/api-ref/obs_04_0107.html b/docs/obs/api-ref/obs_04_0107.html index 273f1781..7aebf7b5 100644 --- a/docs/obs/api-ref/obs_04_0107.html +++ b/docs/obs/api-ref/obs_04_0107.html @@ -13,7 +13,7 @@

x-obs-server-side-encryption-customer-algorithm

+

x-obs-server-side-encryption-customer-algorithm

Indicates the encryption algorithm for the object when SSE-C is used.

Example: x-obs-server-side-encryption-customer-algorithm: AES256

@@ -90,7 +90,6 @@ Content-Length: 5242 [5242 Byte object contents]
-

Sample Response: Uploading an Object Encrypted with SSE-C

1
@@ -111,7 +110,6 @@ x-obs-id-2: 32AAAUgAIAABAAAQAAEAABAAAQAAEAABCSSAJ8bTNJV0X
 Date: Wed, 06 Jun 2018 09:12:00 GMT
 Content-Length: 0
 
-

Sample Request: Copying an SSE-C Encrypted Object and Saving It as a KMS Encrypted Object

 1
@@ -142,7 +140,6 @@ Content-Length: 5242
 
 [5242 Byte object contents]
 
-

Sample Response: Copying an SSE-C Encrypted Object and Saving It as a KMS Encrypted Object

1
@@ -163,7 +160,6 @@ x-obs-id-2: 32AAAUJAIAABAAAQAAEAABAAAQAAEAABCTkkRzQXs9ECz
 Date: Wed, 06 Jun 2018 09:20:10 GMT
 Content-Length: 0
 
-

Sample Request: Uploading an SSE-C Encrypted Object Using a Signed URL

PUT /encrypobject?AccessKeyId=H4IPJX0TQTHTHEBQQCEC&Expires=1532688887&Signature=EQmDuOhaLUrzrzRNZxwS72CXeXM%3D HTTP/1.1
@@ -196,7 +192,6 @@ x-obs-server-side-encryption-customer-key-MD5: 4XvB3tbNTN
 x-obs-id-2: 32AAAUJAIAABAAAQAAEAABAAAQAAEAABCTlpxILjhVK/heKOWIP8Wn2IWmQoerfw
 Content-Length: 0
 
- diff --git a/docs/obs/api-ref/obs_04_0110.html b/docs/obs/api-ref/obs_04_0110.html index c6423ab1..11f88efb 100644 --- a/docs/obs/api-ref/obs_04_0110.html +++ b/docs/obs/api-ref/obs_04_0110.html @@ -3,7 +3,7 @@

Introduction

This section describes fine-grained permissions management for your OBS. If your account does not require individual IAM users, skip this section.

By default, new IAM users do not have any permissions assigned. You need to add a user to one or more groups, and attach IAM policies to these groups. The user then inherits permissions from the groups it is a member of. This process is called authorization. After authorization, the user can perform specified operations on OBS based on the IAM policies.

-

For details about user policies related to OBS, see Permissions Management in the "Service Overview" section of Object Storage Service User Guide. For details about the syntax structure and examples of IAM policies, see IAM Policies in the section "Permission Control" > "Permission Control Mechanisms" in the "Console Operation Guide" of Object Storage Service User Guide.

+

For details about user policies related to OBS, see Permissions Management in the "Service Overview" section of Object Storage Service User Guide. For details about the syntax and examples of IAM policies, see Console Operation Guide > Permissions Control > Permission Control Mechanisms > IAM Policies in the Object Storage Service User Guide. x.x.x indicates the version number.

There are fine-grained policies and role-based access control (RBAC) policies. An RBAC policy consists of permissions for an entire service. Users in a group with such a policy assigned are granted all of the permissions required for that service. A fine-grained policy consists of API-based permissions for operations on specific resource types. Fine-grained policies, as the name suggests, allow for more fine-grained control than RBAC policies.

  • If you want to allow or deny the access to an API, fine-grained authorization is a good choice.
  • Because of the cache, it takes about 10 to 15 minutes for the RBAC policy to take effect after being granted to users and user groups. After a fine-grained OBS policy is granted, it takes about 5 minutes for the policy to take effect.
diff --git a/docs/obs/api-ref/obs_04_0111.html b/docs/obs/api-ref/obs_04_0111.html index d2e17416..c8d0fa2d 100644 --- a/docs/obs/api-ref/obs_04_0111.html +++ b/docs/obs/api-ref/obs_04_0111.html @@ -435,7 +435,7 @@

Configuring a Default WORM Policy for a Bucket

obs:bucket:PutBucketObjectLockConfiguration

+

obs:bucket:PutBucketObjectLockConfiguration

Supported

Obtaining the Default WORM Policy of a Bucket

obs:bucket:GetBucketObjectLockConfiguration

+

obs:bucket:GetBucketObjectLockConfiguration

Supported

Listing uploaded parts

Listing Uploaded Parts

+

Listing Uploaded Parts that Have Not Been Assembled

obs:object:ListMultipartUploadParts

Configuring WORM Retention for an Object

obs:object:PutObjectRetention

+

obs:object:PutObjectRetention

Supported

Supported

Adding object tags

+

Adding Object Tags

+

obs:object:PutObjectTagging

+

Not supported

+

Obtaining object tags

+

Obtaining Object Tags

+

obs:object:GetObjectTagging

+

Not supported

+

Deleting object tags

+

Deleting Object Tags

+

obs:object:DeleteObjectTagging

+

Not supported

+
diff --git a/docs/obs/api-ref/obs_04_0115.html b/docs/obs/api-ref/obs_04_0115.html index e36e6e2c..2e22bc25 100644 --- a/docs/obs/api-ref/obs_04_0115.html +++ b/docs/obs/api-ref/obs_04_0115.html @@ -24,7 +24,6 @@ QUFBQUFBYmJiYmJiYmJD</HostId> </Error>
-

Table 1 describes the meaning of each element.

@@ -517,6 +516,15 @@ QUFBQUFBYmJiYmJiYmJD</HostId>

Contact technical support.

400 Bad Request

+

FileGatewayBucket

+

Bucket inventories cannot be configured for parallel file systems.

+

Use an object bucket.

+

403 Forbidden

AccessDenied

@@ -530,7 +538,7 @@ QUFBQUFBYmJiYmJiYmJD</HostId>

AccessDenied

The object you specified is immutable, can not delete.

+

The object you specified is immutable and cannot be deleted.

Wait until the WORM retention expires and then modify or delete the object.

InvalidObjectState

You need to restore Cold objects first before downloading them.

+

You need to restore Cold objects before downloading them.

Restore the object first.

409 Conflict

+

FsObjectConflict

+

The current and new names of an object in a parallel file system did not indicate the same type of object — file or directory, or the new name has already been used.

+

Ensure the new name indicates a consistent object type (file or directory) and has yet been used.

+

409 ObjectNotAppendable

ObjectNotAppendable

diff --git a/docs/obs/api-ref/obs_04_0116.html b/docs/obs/api-ref/obs_04_0116.html index 2622f1fc..da8f3ece 100644 --- a/docs/obs/api-ref/obs_04_0116.html +++ b/docs/obs/api-ref/obs_04_0116.html @@ -2,7 +2,7 @@

Obtaining Access Keys (AK/SK)

When you call APIs, you need to use the AK and SK for authentication. To obtain the AK and SK, perform the following steps:

-
  1. Log in to the console.
  2. Click on the login username in the upper right corner and choose My Credentials from the drop-down list.
  3. Choose Access Keys.
  4. Click Create Access Key.
  5. Enter an access key description (optional) and click OK.
  6. Enter the verification code your mobile phone, virtual MFA device, or email received, and click OK.

    This step is required only when you have enabled operation protection.

    +
    1. Log in to the console.
    2. Click the login username in the upper right corner and choose My Credentials from the drop-down list.
    3. Choose Access Keys.
    4. Click Create Access Key.
    5. Enter an access key description (optional) and click OK.
    6. Enter the verification code sent to your mobile phone, virtual MFA device, or email, and click OK.

      This step is required only when you have enabled operation protection.

    7. Click Download to obtain the access key file.

      Keep AKs and SKs properly to prevent information leakage.

      diff --git a/docs/obs/api-ref/obs_04_0117.html b/docs/obs/api-ref/obs_04_0117.html index b2341868..a2822d7f 100644 --- a/docs/obs/api-ref/obs_04_0117.html +++ b/docs/obs/api-ref/obs_04_0117.html @@ -1,7 +1,7 @@

      Obtaining a Domain ID and a User ID

      -

      When making API calls, you may need to specify the domain ID (DomainID) and user ID (UserID) in some requests. To obtain them from the console, do as follows:

      +

      When calling certain APIs, you may need to specify the domain ID (DomainID) and user ID (UserID) in the request. To obtain them from the console, do as follows:

      1. Log in to the console.
      2. Click the username and select My Credentials from the drop-down list.

        On the My Credentials page, view the domain ID and user ID.

      diff --git a/docs/obs/api-ref/obs_04_0160.html b/docs/obs/api-ref/obs_04_0160.html index 69d96a0c..46732b63 100644 --- a/docs/obs/api-ref/obs_04_0160.html +++ b/docs/obs/api-ref/obs_04_0160.html @@ -12,7 +12,6 @@ Host: bucketname.obs.region.example.com Date: date Authorization: authorization
-

Request Parameters

This request uses parameters to list some objects in a bucket. Specific parameters are described in the following table.

@@ -25,7 +24,7 @@ Authorization: authorization

list-type

+

list-type

It can be set to 2 only, indicating that the ListObjectV2 API is used.

Type: integer

@@ -276,7 +275,6 @@ Accept: */* Date: WED, 01 Jul 2015 02:28:25 GMT Authorization: OBS H4IPJX0TQTHTHEBQQCEC:KiyoYze4pmRNPYfmlXBfRTVxt8c=
-

Sample Response

 1
@@ -325,7 +323,6 @@ Content-Length: 586
   </Contents>
 </ListBucketResult>
 
-
diff --git a/docs/obs/api-ref/obs_04_0166.html b/docs/obs/api-ref/obs_04_0166.html index bfecda21..505b0473 100644 --- a/docs/obs/api-ref/obs_04_0166.html +++ b/docs/obs/api-ref/obs_04_0166.html @@ -32,7 +32,7 @@ Authorization: authorization

versionId

-

ID of the object version on which this operation will be performed. If this header is not carried, this operation applies to the current object version.

+

ID of the object version requested. If this header is not carried, this operation applies to the current object version.

Type: string

No

@@ -106,31 +106,31 @@ Content-Length: length -

InvalidRequest

+

InvalidRequest

-

The object retention period cannot be configured, because object lock is not enabled for the bucket.

+

The object lock is disabled for the bucket.

400

-

InvalidRequest

+

InvalidRequest

The retention period date must be later than the current or the configured date.

400

-

MalformedObjectLockError

+

MalformedObjectLockError

Invalid format of the Object Lock configuration.

-

The XML you provided was not well-formed or did not validate against our published schema.

+

The XML you provided was not well-formed or did not validate against our published schema.

400

-

NoSuchVersion

+

NoSuchVersion

-

The specified version does not exist.

+

The specified version does not exist.

400

@@ -149,7 +149,7 @@ Content-Type: application/xml Content-Length: 157 <Retention> <Mode>COMPLIANCE</Mode> - <RetainUntilDate>1435728035000</RetainUntilDate> + <RetainUntilDate>1435728035000</RetainUntilDate> </Retention>

Sample Response 1

HTTP/1.1 200 OK
diff --git a/docs/obs/api-ref/obs_04_0167.html b/docs/obs/api-ref/obs_04_0167.html
index d4358230..88da892a 100644
--- a/docs/obs/api-ref/obs_04_0167.html
+++ b/docs/obs/api-ref/obs_04_0167.html
@@ -2,7 +2,7 @@
 
 

Configuring a Default WORM Policy for a Bucket

Functions

This operation allows you to configure the default WORM policy and a retention period for a bucket.

-

With the bucket's default WORM policy, if you do not specify a WORM policy or a retention period when you upload an object to the bucket, the default policy will be automatically applied to the newly uploaded object. In an object-level WORM policy, a specific date is required to make the object protected before the date. In the default bucket-level WORM policy, a retention period is required, and the protection for an object starts when the object is uploaded to the bucket.

+

With the bucket's default WORM policy, if you do not specify a WORM policy or a retention period when you upload an object to the bucket, the default policy will be automatically applied to the newly uploaded object. An object-level WORM policy requires configuring a specific date, which indicates an object will be protected until that date. For a default bucket-level WORM policy, a retention period is required, and the protection for an object starts when the object is uploaded to the bucket.

To perform this operation, you must have the PutBucketObjectLockConfiguration permission. The bucket owner can perform this operation by default and can grant this permission to others by using a bucket policy or a user policy.

  • You can modify or even delete the default WORM policy of a bucket. The change applies only to the objects uploaded after the change, but not to those uploaded before.
  • During a multipart upload, the object parts uploaded are not protected before they are assembled. After object parts are assembled, the new object is protected by the default bucket-level WORM policy. You can also configure an object-level WORM policy for the new object.
  • You can also configure an object-level WORM policy when initializing a multipart upload or for an already assembled multipart object.
@@ -121,17 +121,17 @@ Content-Length: length
-

InvalidRequest

+

InvalidRequest

-

The default object lock rule cannot be configured, because object lock is not enabled for this bucket.

+

The object lock is disabled for the bucket.

400

-

MalformedXML

+

MalformedXML

Invalid format of the Object Lock configuration.

-

The XML you provided was not well-formed or did not validate against our published schema.

+

The XML you provided was not well-formed or did not validate against our published schema.

400

diff --git a/docs/obs/api-ref/obs_04_0168.html b/docs/obs/api-ref/obs_04_0168.html index 6113902e..a7e61b2d 100644 --- a/docs/obs/api-ref/obs_04_0168.html +++ b/docs/obs/api-ref/obs_04_0168.html @@ -24,7 +24,7 @@ Date: date Content-Type: application/xml Content-Length: length -<?xml version="1.0" encoding="UTF-8"?> +<?xml version="1.0" encoding="UTF-8"?> <ObjectLockConfiguration xmlns="http://obs.region.example.com/doc/2015-06-30/"> <ObjectLockEnabled>Enabled</ObjectLockEnabled> <Rule> @@ -106,9 +106,9 @@ Content-Length: length -

InvalidRequest

+

InvalidRequest

-

The default object lock rule cannot be get, because object lock is not enabled for this bucket.

+

The object lock is disabled for the bucket.

400

diff --git a/docs/obs/api-ref/obs_04_0172.html b/docs/obs/api-ref/obs_04_0172.html new file mode 100644 index 00000000..da321b98 --- /dev/null +++ b/docs/obs/api-ref/obs_04_0172.html @@ -0,0 +1,263 @@ + + +

Adding Object Tags

+

Functions

This operation adds or updates the tag information for an object. An object tag is a key-value pair.

+

If you do not specify a version ID in a request, make sure that you have the PutObjectTagging permission. If you do specify a version ID in a request, make sure that you have the PutObjectTagging and PutObjectVersionTagging permissions. By default, only the object owner can perform this operation. The object owner can grant this permission to others by using a bucket or user policy.

+

Tags are added to the current version of an object by default. You can use the versionId parameter to add tags to any other version. If the version you are adding tags to is a delete marker, OBS returns 404 Not Found.

+
  • Tags cannot be set for files in parallel file systems.
  • An object can have up to 10 tags.
  • Constraints on the tag key and value:

    A tag key is case sensitive and must be unique. It cannot be left blank or exceed 128 characters. The following characters are not allowed: =*<>\,|/?!;

    +

    A tag value is case sensitive and can be left blank. It cannot exceed 255 characters. The following characters are not allowed: =*<>\,|?!;

    +
+
+
+

Request Syntax

PUT /objectname?tagging&versionId=versionid HTTP/1.1
+Host: bucketname.obs.region.example.com
+Date: date
+Authorization: authorization string
+Content-MD5: md5
+<?xml version="1.0" encoding="UTF-8">
+<Tagging>
+    <TagSet>
+        <Tag>
+            <Key>Key</Key>
+            <Value>Value</Value>
+        </Tag>
+     </TagSet> 
+</Tagging>
+
+

Request Parameters

Table 1 describes the parameters in the request.

+ +
+ + + + + + + + + + + + + +
Table 1 Request parameters

Parameter

+

Description

+

Mandatory

+

tagging

+

Indicates an object tagging request.

+

Type: string

+

Yes

+

versionId

+

ID of the object version that the tag will be added to. Its response header is x-obs-version-id.

+

Type: string

+

No

+
+
+
+

Request Headers

Table 2 describes the headers in the request.

+ +
+ + + + + + + + + +
Table 2 Request headers

Header

+

Description

+

Mandatory

+

Content-MD5

+

Base64-encoded 128-bit MD5 digest of the message according to RFC 1864. You can also configure the Content-SHA256 header whose value is the Base64-encoded SHA-256 digest of the message. Configure either Content-MD5 or Content-SHA256.

+

Type: string

+

Example: n58IG6hfM7vqI4K0vnWpog==

+

Yes

+
+
+
+

Request Elements

In this request body, you need to configure the object tags in XML. Table 3 describes the tag elements to be configured.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3 Object tag elements

Header

+

Description

+

Mandatory

+

Tagging

+

Root element for TagSet and Tag

+

Type: container

+

Parent: none

+

Yes

+

TagSet

+

A collection for a set of tags.

+

Type: container

+

Parent: Tagging

+

Yes

+

Tag

+

Information element of Tag

+

Type: container

+

Parent: TagSet

+

Yes

+

Key

+

Tag name

+

Type: string

+

Parent: Tag

+

Yes

+

Value

+

Tag value

+

Type: string

+

Parent: Tag

+

Yes

+
+
+
+

Response Syntax

1
+2
+3
+4
+5
HTTP/1.1 status_code
+x-obs-request-id: request id
+x-obs-id-2: id
+Content-Length: length
+Date: date
+
+
+
+

Response Headers

This response uses common headers. For details, see Table 1.

+
+

Response Elements

This response contains no elements.

+
+

Error Responses

In addition to common error codes, this API also returns others. Table 4 lists the common errors and possible causes.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 4 Error codes of object tagging

Error Code

+

Description

+

HTTP Status Code

+

InvalidTag

+

The provided object tag was invalid.

+

400

+

BadRequest

+

The number of object tags exceeded the upper limit.

+

400

+

MalformedXML

+

The XML file was malformed.

+

400

+

EntityTooLarge

+

The request body was too long.

+

400

+

AccessDenied

+

No permission to configure object tags.

+

403

+

MethodNotAllowed

+

Method not allowed, because the corresponding feature was not enabled.

+

405

+
+
+
+

Sample Request

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
PUT /objectname?tagging&versionId=G001018455096CE600005306000000DD HTTP/1.1
+User-Agent: curl/7.29.0
+Host: examplebucket.obs.region.example.com
+Accept: */*
+Date: Wed, 27 Jun 2018 13:22:50 GMT
+Authorization: OBS H4IPJX0TQTHTHEBQQCEC:Pf1ZyGvVYg2BzOjokZ/BAeR1mEQ=
+Content-MD5: MnAEvkfQIGnBpchOE2U6Og==
+Content-Length: 182
+<Tagging xmlns="http://obs.region.example.com/doc/2015-06-30/">
+  <TagSet>
+    <Tag>
+      <Key>TagName1</Key>
+      <Value>TageSetVaule1</Value>
+    </Tag>
+  </TagSet>
+</Tagging>
+
+
+
+

Sample Response

1
+2
+3
+4
+5
HTTP/1.1 200 OK
+Server: OBS
+x-obs-request-id: BF26000001643FEBA09B1ED46932CD07
+x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSEZp87iEirC6DggPB5cN49pSvHBWClg
+Date: Wed, 27 Jun 2018 13:22:50 GMT
+
+
+
+
+
+ +
+