diff --git a/README.md b/README.md index 2afbeb9..b279bf6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # QingStor SDK for Python [![Build Status](https://github.com/qingstor/qingstor-sdk-python/workflows/Unit%20Test/badge.svg?branch=master)](https://github.com/qingstor/qingstor-sdk-python/actions?query=workflow%3A%22Unit+Test%22) -[![API Reference](http://img.shields.io/badge/api-reference-green.svg)](https://docs.qingcloud.com/qingstor/) +[![API Reference](http://img.shields.io/badge/api-reference-green.svg)](https://docsv4.qingcloud.com/user_guide/storage/object_storage/) [![License](http://img.shields.io/badge/license-apache%20v2-blue.svg)](https://github.com/yunify/qingstor-sdk-python/blob/master/LICENSE) [![Join the chat](https://img.shields.io/badge/chat-online-blue?style=flat&logo=zulip)](https://qingstor.zulipchat.com/join/nofzrqd5a5skt5ebnaor5b7d/) @@ -9,9 +9,9 @@ English | [中文](README_zh-CN.md) The official QingStor SDK for the Python programming language. -Before you start using the SDK, make sure you have a basic understanding of the concepts of [QingStor object storage](https://docs.qingcloud.com/qingstor/api/common/overview.html) (such as Zone, Service, Bucket, Object, etc.). +Before you start using the SDK, make sure you have a basic understanding of the concepts of [QingStor object storage](https://docsv4.qingcloud.com/user_guide/storage/object_storage/intro/product/) (such as Zone, Service, Bucket, Object, etc.). -This SDK try to keep a one-to-one correspondence with the methods on the [QingCloud QingStor object storage documentation](https://docs.qingcloud.com/qingstor/api/). For details of each method, please refer to the corresponding chapter in the link. +This SDK try to keep a one-to-one correspondence with the methods on the [QingCloud QingStor object storage documentation](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/). For details of each method, please refer to the corresponding chapter in the link. ## Quick Start @@ -27,9 +27,9 @@ Checkout our [releases](https://github.com/yunify/qingstor-sdk-python/releases) ## Reference Documentations -- [QingStor Documentation](https://docs.qingcloud.com/qingstor/index.html) -- [QingStor Guide](https://docs.qingcloud.com/qingstor/guide/index.html) -- [QingStor APIs](https://docs.qingcloud.com/qingstor/api/index.html) +- [QingStor Documentation](https://docsv4.qingcloud.com/user_guide/storage/object_storage/intro/product/) +- [QingStor Guide](https://docsv4.qingcloud.com/user_guide/storage/object_storage/) +- [QingStor APIs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/) ## Contributing diff --git a/README_zh-CN.md b/README_zh-CN.md index d5c284c..e8a888f 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -1,7 +1,7 @@ # QingStor SDK for Python [![Build Status](https://github.com/qingstor/qingstor-sdk-python/workflows/Unit%20Test/badge.svg?branch=master)](https://github.com/qingstor/qingstor-sdk-python/actions?query=workflow%3A%22Unit+Test%22) -[![API Reference](http://img.shields.io/badge/api-reference-green.svg)](https://docs.qingcloud.com/qingstor/) +[![API Reference](http://img.shields.io/badge/api-reference-green.svg)](https://docsv4.qingcloud.com/user_guide/storage/object_storage/) [![License](http://img.shields.io/badge/license-apache%20v2-blue.svg)](https://github.com/yunify/qingstor-sdk-python/blob/master/LICENSE) [![Join the chat](https://img.shields.io/badge/chat-online-blue?style=flat&logo=zulip)](https://qingstor.zulipchat.com/join/nofzrqd5a5skt5ebnaor5b7d/) @@ -9,9 +9,9 @@ Python 语言版本的 QingStor 官方 SDK. -在开始使用 SDK 之前,请确保你对[青云 QingStor 对象存储基本概念](https://docs.qingcloud.com/qingstor/api/common/overview.html)(如 Zone,Service,Bucket,Object 等)有一定的了解。 +在开始使用 SDK 之前,请确保你对[青云 QingStor 对象存储基本概念](https://docsv4.qingcloud.com/user_guide/storage/object_storage/intro/product/)(如 Zone,Service,Bucket,Object 等)有一定的了解。 -本 SDK 与[青云 QingStor 对象存储帮助文档](https://docs.qingcloud.com/qingstor/api/)上的方法尽量保持一一对应,具体每个方法的详细说明请查看上述链接中的对应章节。 +本 SDK 与[青云 QingStor 对象存储帮助文档](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/)上的方法尽量保持一一对应,具体每个方法的详细说明请查看上述链接中的对应章节。 ## 快速开始 @@ -27,9 +27,9 @@ Python 语言版本的 QingStor 官方 SDK. ## 参考文档 -- [QingStor 文档](https://docs.qingcloud.com/qingstor/index.html) -- [QingStor 指南](https://docs.qingcloud.com/qingstor/guide/index.html) -- [QingStor APIs](https://docs.qingcloud.com/qingstor/api/index.html) +- [QingStor 文档](https://docsv4.qingcloud.com/user_guide/storage/object_storage/intro/product/) +- [QingStor 指南](https://docsv4.qingcloud.com/user_guide/storage/object_storage/) +- [QingStor APIs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/) ## 贡献 diff --git a/docs/example/delete_multiple_object.md b/docs/example/delete_multiple_object.md index cf01208..e5d6756 100644 --- a/docs/example/delete_multiple_object.md +++ b/docs/example/delete_multiple_object.md @@ -26,7 +26,7 @@ Then set the input parameters used by the `delete_multiple_objects` method. `qui objects = [{"key": "file_will_be_delete.jpg"}, {"key": "file_will_be_delete.zip"}] ``` -For parameter details, please refer to [Official API Documentation](https://docs.qingcloud.com/qingstor/api/bucket/delete_multiple). +For parameter details, please refer to [Official API Documentation](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/bucket/basic_opt/delete_multiple/). Then call the `delete_multiple_objects` method to delete the object. object_key Sets the filepath of the object to be deleted (in the current bucket). diff --git a/docs/example/delete_multiple_object_zh-CN.md b/docs/example/delete_multiple_object_zh-CN.md index 3a184ca..84730bd 100644 --- a/docs/example/delete_multiple_object_zh-CN.md +++ b/docs/example/delete_multiple_object_zh-CN.md @@ -26,7 +26,7 @@ bucket_srv = qingstor.Bucket(bucket_name, zone_name) objects = [{"key": "file_will_be_delete.jpg"}, {"key": "file_will_be_delete.zip"}] ``` -想要了解详细的参数信息,可以参考[官方 API 文档](https://docs.qingcloud.com/qingstor/api/bucket/delete_multiple)。 +想要了解详细的参数信息,可以参考[官方 API 文档](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/bucket/basic_opt/delete_multiple/)。 然后调用 `delete_multiple_objects` 方法删除对象。object_key 设置要删除的对象的 filepath(位于当前 bucket 中)。 diff --git a/docs/example/encryption.md b/docs/example/encryption.md index f5a6ba0..22c4f66 100644 --- a/docs/example/encryption.md +++ b/docs/example/encryption.md @@ -4,7 +4,7 @@ You can encrypt data when uploading. -To understand the process of encryption better, visit the link [https://docs.qingcloud.com/qingstor/api/common/encryption.html#object-storage-encryption-headers](https://docs.qingcloud.com/qingstor/api/common/encryption.html#object-storage-encryption-headers) . +To understand the process of encryption better, visit the link [https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/encryption/](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/encryption/) . First, initialize the bucket service. @@ -24,7 +24,7 @@ Encrypt when uploading files. The encryption operation is performed by setting r ```python object_key = "your_file_encrypted" with open("/tmp/your-picture.jpg", "rb") as f: - output = bucket_srv.put_object(object_key=object_key, + output = bucket_srv.put_object(object_key=object_key, x_qs_encryption_customer_algorithm="AES256", x_qs_encryption_customer_key="key", x_qs_encryption_customer_key_md5="MD5 of the key", diff --git a/docs/example/encryption_zh-CN.md b/docs/example/encryption_zh-CN.md index c6fb1cc..dff8a69 100644 --- a/docs/example/encryption_zh-CN.md +++ b/docs/example/encryption_zh-CN.md @@ -4,7 +4,7 @@ 上传时可对数据进行加密。 -访问该链接 [https://docs.qingcloud.com/qingstor/api/common/encryption.html#object-storage-encryption-headers](https://docs.qingcloud.com/qingstor/api/common/encryption.html#object-storage-encryption-headers) . +访问该链接 [https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/encryption/](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/encryption/) . 以更好的理解数据加密解密的过程。 首先,需要初始化 bucket 服务。 @@ -25,7 +25,7 @@ bucket_srv = qingstor.Bucket(bucket_name, zone_name) ```python object_key = "your_file_encrypted" with open("/tmp/your-picture.jpg", "rb") as f: - output = bucket_srv.put_object(object_key=object_key, + output = bucket_srv.put_object(object_key=object_key, x_qs_encryption_customer_algorithm="AES256", x_qs_encryption_customer_key="key", x_qs_encryption_customer_key_md5="MD5 of the key", diff --git a/docs/example/get_object.md b/docs/example/get_object.md index 8d7dd1d..4b572c1 100644 --- a/docs/example/get_object.md +++ b/docs/example/get_object.md @@ -20,7 +20,7 @@ zone_name = "pek3b" bucket_srv = qingstor.Bucket(bucket_name, zone_name) ``` -For parameter details, please refer to [Official API Documentation](https://docs.qingcloud.com/qingstor/api/object/get). +For parameter details, please refer to [Official API Documentation](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/get/). Then call the `get_object` method to download the object. object_key Sets the filepath of the object to be fetched (in the current bucket). diff --git a/docs/example/get_object_by_segment.md b/docs/example/get_object_by_segment.md index 58c2816..bdcfcbf 100644 --- a/docs/example/get_object_by_segment.md +++ b/docs/example/get_object_by_segment.md @@ -20,7 +20,7 @@ zone_name = "pek3b" bucket_srv = qingstor.Bucket(bucket_name, zone_name) ``` -The parameter that must be set manually here is the range parameter. For parameter details, please refer to [Official API Documentation](https://docs.qingcloud.com/qingstor/api/object/get). +The parameter that must be set manually here is the range parameter. For parameter details, please refer to [Official API Documentation](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/get/). Then call the `get_object` method to download the object and set 5M as the segment size. object_key sets the filepath of the object to be fetched (in the current bucket). diff --git a/docs/example/get_object_by_segment_zh-CN.md b/docs/example/get_object_by_segment_zh-CN.md index 4d4201b..abe64a7 100644 --- a/docs/example/get_object_by_segment_zh-CN.md +++ b/docs/example/get_object_by_segment_zh-CN.md @@ -20,7 +20,7 @@ zone_name = "pek3b" bucket_srv = qingstor.Bucket(bucket_name, zone_name) ``` -这里必须手动设置的参数是 Range 参数。想要了解详细的参数信息,可以参考[官方 API 文档](https://docs.qingcloud.com/qingstor/api/object/get)。 +这里必须手动设置的参数是 Range 参数。想要了解详细的参数信息,可以参考[官方 API 文档](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/get/)。 然后调用 `get_object` 方法下载对象,将 5M 设置为分段大小。object_key 设置要获取的对象的 filepath(位于当前 bucket 中)。 diff --git a/docs/example/get_object_url.md b/docs/example/get_object_url.md index a641578..bb72dcf 100644 --- a/docs/example/get_object_url.md +++ b/docs/example/get_object_url.md @@ -20,7 +20,7 @@ zone_name = "pek3b" bucket_srv = qingstor.Bucket(bucket_name, zone_name) ``` -For parameter details, please refer to [Official API Documentation](https://docs.qingcloud.com/qingstor/api/object/get). +For parameter details, please refer to [Official API Documentation](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/get/). Then you can get the signature address of the object. object_key Sets the filepath of the object to be fetched (in the current bucket). diff --git a/docs/example/get_object_url_zh-CN.md b/docs/example/get_object_url_zh-CN.md index 80e488b..7e65d51 100644 --- a/docs/example/get_object_url_zh-CN.md +++ b/docs/example/get_object_url_zh-CN.md @@ -20,7 +20,7 @@ zone_name = "pek3b" bucket_srv = qingstor.Bucket(bucket_name, zone_name) ``` -想要了解详细的参数信息,可以参考[官方 API 文档](https://docs.qingcloud.com/qingstor/api/object/get)。 +想要了解详细的参数信息,可以参考[官方 API 文档](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/get/)。 然后你可以获得该对象的签名地址。object_key 设置要获取的对象的 filepath(位于当前 bucket 中)。 diff --git a/docs/example/get_object_zh-CN.md b/docs/example/get_object_zh-CN.md index 1f96c12..871c266 100644 --- a/docs/example/get_object_zh-CN.md +++ b/docs/example/get_object_zh-CN.md @@ -20,7 +20,7 @@ zone_name = "pek3b" bucket_srv = qingstor.Bucket(bucket_name, zone_name) ``` -想要了解详细的参数信息,可以参考[官方 API 文档](https://docs.qingcloud.com/qingstor/api/object/get)。 +想要了解详细的参数信息,可以参考[官方 API 文档](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/get/)。 然后调用 `get_object` 方法下载对象。object_key 设置要获取的对象的 filepath(位于当前 bucket 中)。 diff --git a/docs/example/head_object.md b/docs/example/head_object.md index e3ec230..e054d67 100644 --- a/docs/example/head_object.md +++ b/docs/example/head_object.md @@ -20,7 +20,7 @@ zone_name = "pek3b" bucket_srv = qingstor.Bucket(bucket_name, zone_name) ``` -For parameter details, please refer to [Official API Documentation](https://docs.qingcloud.com/qingstor/api/object/head). +For parameter details, please refer to [Official API Documentation](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/head/). Then call the `head_object` method to get the object meta information and test if it can be accessed. object_key Sets the filepath of the object to be fetched (in the current bucket). @@ -33,7 +33,7 @@ if output.status_code != 200: bucket_name, str(output.content, 'utf-8'))) else: - # check all useful headers related to object info in: https://docs.qingcloud.com/qingstor/api/object/head + # check all useful headers related to object info in: https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/head/ print(output.headers['ETag']) print(output.headers['Content-Type']) ``` diff --git a/docs/example/head_object_zh-CN.md b/docs/example/head_object_zh-CN.md index 976f487..3e0c6c5 100644 --- a/docs/example/head_object_zh-CN.md +++ b/docs/example/head_object_zh-CN.md @@ -1,4 +1,4 @@ -# 获取文件的元数据 +# 获取文件的元数据 ## 代码片段 @@ -20,7 +20,7 @@ zone_name = "pek3b" bucket_srv = qingstor.Bucket(bucket_name, zone_name) ``` -想要了解详细的参数信息,可以参考[官方 API 文档](https://docs.qingcloud.com/qingstor/api/object/head)。 +想要了解详细的参数信息,可以参考[官方 API 文档](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/head/)。 然后调用 `head_object` 方法获取对象元信息,测试是否可以被访问。object_key 设置要获取的对象的 filepath(位于当前 bucket 中)。 @@ -33,7 +33,7 @@ if output.status_code != 200: bucket_name, str(output.content, 'utf-8'))) else: - # check all useful headers related to object info in: https://docs.qingcloud.com/qingstor/api/object/head + # check all useful headers related to object info in: https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/head/ print(output.headers['ETag']) print(output.headers['Content-Type']) ``` diff --git a/docs/example/image_process.md b/docs/example/image_process.md index c37933f..38c57c4 100644 --- a/docs/example/image_process.md +++ b/docs/example/image_process.md @@ -14,7 +14,7 @@ Currently supported image formats are: > Currently, the encrypted picture is not supported. The maximum size of a single picture is 10M. -For image process parameters' details, Please see [QingStor Image API](https://docs.qingcloud.com/qingstor/data_process/image_process). +For image process parameters' details, Please see [QingStor Image API](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/image_process/). ## Usage @@ -83,43 +83,43 @@ object_key = "your-picture-uploaded.jpg" ```python print(perform_img_action(bucket_srv, object_key, "info")) ``` - + 2. Crop the image (here a 300px wide, 400px image is cropped around the center of the image). ```python print(perform_img_action(bucket_srv, object_key, "crop:w_300,h_400,g_0", True)) ``` - + 3. Rotate the image 90 degrees. ```python print(perform_img_action(bucket_srv, object_key, "rotate:a_90", True)) ``` - + 4. Resize the image. ```python print(perform_img_action(bucket_srv, object_key, "resize:w_300,h_400,m_0", True)) ``` - + 5. Add a text watermark to the image (the text should first be base64 encoded and remove padding, the same with color). ```python import base64 - + color = str.replace("c_" + str(base64.b64encode(bytes('#FF0000', encoding='utf8')), 'utf8'), "=", "") print(perform_img_action(bucket_srv, object_key, "watermark:d_150,p_0.9,t_5rC05Y2w5paH5a2X," + color, True)) ``` - + 6. Add a picture watermark to the image. ```python print(perform_img_action(bucket_srv, object_key, "watermark_image:l_10,t_10,p_2," "u_aHR0cHM6Ly9wZWszYS5xaW5nc3Rvci5jb20vaW1nLWRvYy1lZy9xaW5jbG91ZC5wbmc", True)) ``` - + 7. Format the image as png. ```python print(perform_img_action(bucket_srv, object_key, "format:t_png", True)) ``` - + 8. include operations in pipeline and they will be processed in order. The maximum number of operations in the pipeline is 10. The example ends with a save action to save the image to `img_res.png` in the bucket: `your-bucket-01`. ```python print(perform_img_action(bucket_srv, object_key, diff --git a/docs/example/image_process_zh-CN.md b/docs/example/image_process_zh-CN.md index f57ee7a..242c998 100644 --- a/docs/example/image_process_zh-CN.md +++ b/docs/example/image_process_zh-CN.md @@ -14,7 +14,7 @@ > 目前不支持对加密过后的图片进行处理,单张图片最大为 10M 。 -图片处理的参数详细信息请参考对应文档说明 [API Docs](https://docs.qingcloud.com/qingstor/data_process/image_process) 。 +图片处理的参数详细信息请参考对应文档说明 [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/image_process/) 。 ## 用法 @@ -83,43 +83,43 @@ object_key = "your-picture-uploaded.jpg" ```python print(perform_img_action(bucket_srv, object_key, "info")) ``` - + 2. 裁剪图像(这里围绕图片中心裁剪出宽 300px, 高 400px 的图片)。 ```python print(perform_img_action(bucket_srv, object_key, "crop:w_300,h_400,g_0", True)) ``` - + 3. 旋转图像 90 度。 ```python print(perform_img_action(bucket_srv, object_key, "rotate:a_90", True)) ``` - + 4. 调整图像大小。 ```python print(perform_img_action(bucket_srv, object_key, "resize:w_300,h_400,m_0", True)) ``` - + 5. 为图像添加文字水印(文字应首先进行 base64 编码并去除 padding,颜色也一样)。 ```python import base64 - + color = str.replace("c_" + str(base64.b64encode(bytes('#FF0000', encoding='utf8')), 'utf8'), "=", "") print(perform_img_action(bucket_srv, object_key, "watermark:d_150,p_0.9,t_5rC05Y2w5paH5a2X," + color, True)) ``` - + 6. 为图像添加图片水印。 ```python print(perform_img_action(bucket_srv, object_key, "watermark_image:l_10,t_10,p_2," "u_aHR0cHM6Ly9wZWszYS5xaW5nc3Rvci5jb20vaW1nLWRvYy1lZy9xaW5jbG91ZC5wbmc", True)) ``` - + 7. 格式化图像为 png。 ```python print(perform_img_action(bucket_srv, object_key, "format:t_png", True)) ``` - + 8. 操作管道,图像将按顺序处理。 管道中的最大操作数为10。例子最后使用 save action 将图片保存至 bucket: `your-bucket-01` 中的 `img_res.png`。 ```python print(perform_img_action(bucket_srv, object_key, diff --git a/docs/example/list_multipart_uploads.md b/docs/example/list_multipart_uploads.md index 0fc9503..4ff556f 100644 --- a/docs/example/list_multipart_uploads.md +++ b/docs/example/list_multipart_uploads.md @@ -4,13 +4,13 @@ Get a list of ongoing multipart upload objects. When an object has the segment u Similar to the GET Bucket (List Objects) interface, the user can specify the segment upload that is being performed under a directory by passing the prefix, delimiter request parameter. The list is sorted from small to large in alphanumeric order of object names. If there are multiple segments uploaded by the same-named object, only one part of the page is truncated, and the next page-turning can be obtained by upload_id_marker parameter to obtain the segment upload after the upload_id is sorted by creation time. -If the user only wants to get the segment that an object has uploaded, please refer to [API Docs] (https://docs.qingcloud.com/qingstor/api/object/multipart/list_multipart.html#object-storage-api-list -multipart). +If the user only wants to get the segment that an object has uploaded, please refer to [API Docs] (https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/multipart/list/). ## Request Parameters You can add some filter options when list multipart uploads. -You can set options below in ListMultipartUploadsInput. See controlled [API Docs](https://docs.qingcloud.com/qingstor/api/bucket/list_multipart_uploads.html). +You can set options below in ListMultipartUploadsInput. See controlled [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/multipart/list/). | Parameter name | Type | Description | Required | | :--------------: | :-----: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------: | diff --git a/docs/example/list_multipart_uploads_zh-CN.md b/docs/example/list_multipart_uploads_zh-CN.md index 600f151..613046f 100644 --- a/docs/example/list_multipart_uploads_zh-CN.md +++ b/docs/example/list_multipart_uploads_zh-CN.md @@ -4,13 +4,13 @@ 与 GET Bucket (List Objects) 接口类似,用户可以通过传递 prefix, delimiter 请求参数,指定获取某个目录下面正在进行的分段上传。列表按照对象名称的 alphanumeric 顺序从小到大排序。如果同名对象有多个分段上传,翻页被截断后只显示了一部分,下次翻页可通过 upload_id_marker 参数,获取该 upload_id 往后按创建时间排序后剩下的分段上传。 -如果用户只想获取某个对象已经上传的分段,请查阅 [API Docs](https://docs.qingcloud.com/qingstor/api/object/multipart/list_multipart.html#object-storage-api-list-multipart). +如果用户只想获取某个对象已经上传的分段,请查阅 [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/multipart/list/). ## 请求参数 在 List Bucket Objects 时添加筛选条件 -参考[对应的 API 文档](https://docs.qingcloud.com/qingstor/api/bucket/list_multipart_uploads.html),您可以在对应的 Input 设置并添加如下筛选条件: +参考[对应的 API 文档](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/multipart/list/),您可以在对应的 Input 设置并添加如下筛选条件: | 参数名 | 类型 | 描述 | 是否必要 | | :--------------: | :-----: | :-------------------------------------------------------------------------------------------------- | :------: | diff --git a/docs/example/list_objects.md b/docs/example/list_objects.md index d07b326..3303b86 100644 --- a/docs/example/list_objects.md +++ b/docs/example/list_objects.md @@ -34,7 +34,7 @@ else: Add some options which act as filter when list bucket objects -You can set options below in ListObjectsInput. See controlled [API Docs](https://docs.qingcloud.com/qingstor/api/bucket/get). +You can set options below in ListObjectsInput. See controlled [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/bucket/basic_opt/get/). | Parameter name | Type | Description | Required | | :------------: | :-----: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------: | diff --git a/docs/example/list_objects_zh-CN.md b/docs/example/list_objects_zh-CN.md index 24fe505..57d9aca 100644 --- a/docs/example/list_objects_zh-CN.md +++ b/docs/example/list_objects_zh-CN.md @@ -34,7 +34,7 @@ else: 还可以在 List Bucket Objects 时添加筛选条件 -参考[对应的 API 文档](https://docs.qingcloud.com/qingstor/api/bucket/get),您可以在对应的 Input 设置并添加如下筛选条件: +参考[对应的 API 文档](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/bucket/basic_opt/get/),您可以在对应的 Input 设置并添加如下筛选条件: | 参数名称 | 类型 | 描述 | 是否必须 | |:---------:|:-------:|:-----------------------------------------------------------------------:|:----:| diff --git a/docs/example/multipart_upload.md b/docs/example/multipart_upload.md index 4902dfb..0d65945 100644 --- a/docs/example/multipart_upload.md +++ b/docs/example/multipart_upload.md @@ -67,7 +67,7 @@ list_resp = bucket_srv.list_multipart(object_key=object_key, upload_id=upload_id ``` Once all the segments have been uploaded, you can use the following method to mark the upload completion, all segments will be stitched to the object specified by object_key. -ETag header is not required to be set. For parameter details, please refer to [api docs] (https://docs.qingcloud.com/qingstor/api/object/multipart/complete_multipart_upload.html). +ETag header is not required to be set. For parameter details, please refer to [api docs] (https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/multipart/complete/). ```python if fin_resp.status_code != 201: diff --git a/docs/example/multipart_upload_zh-CN.md b/docs/example/multipart_upload_zh-CN.md index 1578d9c..f3e8c72 100644 --- a/docs/example/multipart_upload_zh-CN.md +++ b/docs/example/multipart_upload_zh-CN.md @@ -64,7 +64,7 @@ list_resp = bucket_srv.list_multipart(object_key=object_key, upload_id=upload_id ``` 当所有分段都已经上传完毕后,您可以使用下面的方法来标记上传完成,所有分段将拼接为 object_key 指定的对象。 -ETag 信息不是必须设置,想要了解详细的参数信息,可以参考 [api docs](https://docs.qingcloud.com/qingstor/api/object/multipart/complete_multipart_upload.html)。 +ETag 信息不是必须设置,想要了解详细的参数信息,可以参考 [api docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/multipart/complete/)。 ```python if fin_resp.status_code != 201: diff --git a/docs/example/options_object.md b/docs/example/options_object.md index 764228e..6639631 100644 --- a/docs/example/options_object.md +++ b/docs/example/options_object.md @@ -8,7 +8,7 @@ | Access-Control-Request-Method | String | Identifies what HTTP method will be used in the actual request. | Yes | | Access-Control-Request-Headers | String | A comma-delimited list of HTTP headers that will be sent in the actual request. | No | -See [API Docs](https://docs.qingcloud.com/qingstor/api/object/options.html) for more information about request headers. +See [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/options_object/) for more information about request headers. ## Response Headers @@ -20,7 +20,7 @@ See [API Docs](https://docs.qingcloud.com/qingstor/api/object/options.html) for | Access-Control-Allow-Headers | String | A comma-delimited list of HTTP headers that the browser can send in the actual request. If any of the requested headers is not allowed, QingStor will not include that header in the response, nor will the response contain any of the headers with the Access-Control prefix. | | Access-Control-Expose-Headers | String | A comma-delimited list of HTTP headers. This header provides the JavaScript client with access to these headers in the response to the actual request. | -See [API Docs](https://docs.qingcloud.com/qingstor/api/object/options.html) for more information about response headers. +See [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/options_object/) for more information about response headers. ## Code Snippet @@ -66,6 +66,6 @@ else: print(header.get('Access-Control-Allow-Origin')) ``` -For parameter details, please refer to [Official API Documentation](https://docs.qingcloud.com/qingstor/api/object/options). +For parameter details, please refer to [Official API Documentation](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/options_object/). The response will return all allowed operations (including header, method, origin) after filtering. diff --git a/docs/example/options_object_zh-CN.md b/docs/example/options_object_zh-CN.md index 26f860f..4b416f7 100644 --- a/docs/example/options_object_zh-CN.md +++ b/docs/example/options_object_zh-CN.md @@ -10,7 +10,7 @@ | Access-Control-Request-Method | String | 跨源请求的 HTTP method 。 | Yes | | Access-Control-Request-Headers | String | 跨源请求中的 HTTP headers (逗号分割的字符串)。 | No | -访问 [API Docs](https://docs.qingcloud.com/qingstor/api/object/options.html) 以查看更多关于请求头的信息。 +访问 [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/options_object/) 以查看更多关于请求头的信息。 ### 响应头(Response Headers) @@ -22,7 +22,7 @@ | Access-Control-Allow-Headers | String | 跨源请求中可以被允许发送的 HTTP headers (逗号分割的字符串)。 | | Access-Control-Expose-Headers | String | 跨源请求的响应中,客户端(如 JavaScript Client) 可以获取到的 HTTP headers (逗号分割的字符串)。 | -访问 [API Docs](https://docs.qingcloud.com/qingstor/api/object/options.html) 以查看更多关于响应头的信息。 +访问 [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/options_object/) 以查看更多关于响应头的信息。 ## 代码片段 @@ -68,6 +68,6 @@ else: print(header.get('Access-Control-Allow-Origin')) ``` -想要了解详细的参数信息,可以参考[官方 API 文档](https://docs.qingcloud.com/qingstor/api/object/options)。 +想要了解详细的参数信息,可以参考[官方 API 文档](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/options_object/)。 响应将返回过滤过后的所有被允许的操作(包括 header, method, origin)。 diff --git a/docs/example/put_bucket_cors.md b/docs/example/put_bucket_cors.md index 5b8c2d0..59e8fb5 100644 --- a/docs/example/put_bucket_cors.md +++ b/docs/example/put_bucket_cors.md @@ -11,7 +11,7 @@ | expose_headers | Array | One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object). | No | | max_age_seconds | Integer | The time in seconds that your browser is to cache the preflight response for the specified resource.(seconds) | No | -See [API Docs](https://docs.qingcloud.com/qingstor/api/bucket/cors/put_cors.html) for more information about request elements. +See [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/bucket/cors/put_cors/) for more information about request elements. ## Code Snippet diff --git a/docs/example/put_bucket_cors_zh-CN.md b/docs/example/put_bucket_cors_zh-CN.md index c4c01f0..7ce1396 100644 --- a/docs/example/put_bucket_cors_zh-CN.md +++ b/docs/example/put_bucket_cors_zh-CN.md @@ -11,7 +11,7 @@ | expose_headers | Array | 设置客户能够从其应用程序(例如,从 JavaScript XMLHttpRequest 对象)进行访问的HTTP 响应头。 | No | | max_age_seconds | Integer | 设置在预检请求(Options)被资源、HTTP 方法和源识别之后,浏览器将为预检请求缓存响应的时间(以秒为单位)。 | No | -访问 [API Docs](https://docs.qingcloud.com/qingstor/api/bucket/cors/put_cors.html) 以查看更多关于请求消息体的信息。 +访问 [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/bucket/cors/put_cors/) 以查看更多关于请求消息体的信息。 ## 代码片段 diff --git a/docs/example/put_bucket_external_mirror.md b/docs/example/put_bucket_external_mirror.md index 27cc9f6..540d302 100644 --- a/docs/example/put_bucket_external_mirror.md +++ b/docs/example/put_bucket_external_mirror.md @@ -6,7 +6,7 @@ | :---------: | :----: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: | | source_site | String | Source site of external mirror source. Source site is like this: `://[:port]/[path]` . Valid values of protocol: “http” or “https”, default “http”. Port defaults to the port corresponding to the protocol. Path can be empty. If the storage space has multiple source sites for many times, the source site of the storage space will use the last setting value. | Yes | -See [API Docs](https://docs.qingcloud.com/qingstor/api/bucket/external_mirror/put_external_mirror.html) for more information about request elements. +See [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/bucket/external_mirror/put_external_mirror/) for more information about request elements. ## Code Snippet diff --git a/docs/example/put_bucket_external_mirror_zh-CN.md b/docs/example/put_bucket_external_mirror_zh-CN.md index bef4e99..350bb7d 100644 --- a/docs/example/put_bucket_external_mirror_zh-CN.md +++ b/docs/example/put_bucket_external_mirror_zh-CN.md @@ -6,7 +6,7 @@ | :---------: | :----: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: | | source_site | String | 外部镜像回源的源站。源站形式为 `://[:port]/[path]` 。 protocol的值可为 “http” 或 “https”,默认为 “http”。port 默认为 protocol 对应的端口。path 可为空。 如果存储空间多次设置不同的源站,该存储空间的源站采用最后一次设置的值。 | Yes | -访问 [API Docs](https://docs.qingcloud.com/qingstor/api/bucket/external_mirror/put_external_mirror.html) 以查看更多关于请求消息体的信息。 +访问 [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/bucket/external_mirror/put_external_mirror/) 以查看更多关于请求消息体的信息。 ## 代码片段 diff --git a/docs/example/put_bucket_lifecycle.md b/docs/example/put_bucket_lifecycle.md index 4d4908b..521cc01 100644 --- a/docs/example/put_bucket_lifecycle.md +++ b/docs/example/put_bucket_lifecycle.md @@ -2,21 +2,21 @@ ## Request Elements -| Name | Type | Description | Required | -| :-------------------------------: | :-----: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: | -| The elements of rule | List | rule are Lifecycle rules. The rules are of type Dict and the valid keys are "id", "status", "filter", "expiration", "abort_incomplete_multipart_upload" and "transition". The total number of rules cannot exceed 100, and only one type of operation is allowed in each rule. The same bucket, prefix and support operations ( expiration, abort_incomplete_multipart_upload, transition) cannot be duplicated, otherwise return 400 invalid_request contains duplicate rule information see [Error Message] (https://docs.qingcloud.com/qingstor/api/common/error_code .html#object-storage-error-code). | Yes | -| id | String | Identifier of the rule. It can be any UTF-8 encoded character and cannot exceed 255 bytes in length. In a Bucket Lifecycle, the rule identifier must be unique. This string can be used to describe the purpose of the policy. If the id is repeated, it returns 400 invalid_request . | Yes | -| status | String | The status of this rule. Its value can be either "enabled" (for effective) or "disabled" (for disabled). | Yes | -| filter | Dict | is used to match the filter condition of Object. The valid key is “prefix”. | Yes | -| prefix | String | The prefix match policy is used to match the Object name, and the empty string means to match the Object in the entire Bucket. The default is an empty string. | No | -| expiration | Dict | The rule for deleting an Object with a valid key of "days". "days" must be a positive integer, otherwise return 400 invalid_request. The object that matches the prefix is ​​deleted after the specified number of days (days) at the last modification time. | No | -| abort_incomplete_multipart_upload | Dict | Rules for canceling unfinished multipart uploads. The valid key is "days_after_initiation". "days_after_initiation" must be a positive integer, otherwise return 400 invalid_request. | No | -| transition | Dict | The rule for changing the storage level. The valid keys are "days", "storage_class". Days must be >= 30, otherwise return 400 invalid_request. For objects that match the prefix (prefix), change to low frequency storage after the specified number of days (days) at the last modification time. | No | -| days | Integer | Executes the operation after the specified number of days of the last modification time of the object. | No | -| days_after_initiation | Integer | Performs after the specified number of days to initialize the segment upload. | Yes | -| storage_class | Integer | The storage_class to be changed to, the supported values ​​are "STANDARD", "STANDARD_IA". | Yes | - -See [API Docs](https://docs.qingcloud.com/qingstor/api/bucket/lifecycle/put_lifecycle.html) for more information about request elements. +| Name | Type | Description | Required | +| :-------------------------------: | :-----: |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| :------: | +| The elements of rule | List | rule are Lifecycle rules. The rules are of type Dict and the valid keys are "id", "status", "filter", "expiration", "abort_incomplete_multipart_upload" and "transition". The total number of rules cannot exceed 100, and only one type of operation is allowed in each rule. The same bucket, prefix and support operations ( expiration, abort_incomplete_multipart_upload, transition) cannot be duplicated, otherwise return 400 invalid_request contains duplicate rule information see [Error Message] (https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/error_code/). | Yes | +| id | String | Identifier of the rule. It can be any UTF-8 encoded character and cannot exceed 255 bytes in length. In a Bucket Lifecycle, the rule identifier must be unique. This string can be used to describe the purpose of the policy. If the id is repeated, it returns 400 invalid_request . | Yes | +| status | String | The status of this rule. Its value can be either "enabled" (for effective) or "disabled" (for disabled). | Yes | +| filter | Dict | is used to match the filter condition of Object. The valid key is “prefix”. | Yes | +| prefix | String | The prefix match policy is used to match the Object name, and the empty string means to match the Object in the entire Bucket. The default is an empty string. | No | +| expiration | Dict | The rule for deleting an Object with a valid key of "days". "days" must be a positive integer, otherwise return 400 invalid_request. The object that matches the prefix is ​​deleted after the specified number of days (days) at the last modification time. | No | +| abort_incomplete_multipart_upload | Dict | Rules for canceling unfinished multipart uploads. The valid key is "days_after_initiation". "days_after_initiation" must be a positive integer, otherwise return 400 invalid_request. | No | +| transition | Dict | The rule for changing the storage level. The valid keys are "days", "storage_class". Days must be >= 30, otherwise return 400 invalid_request. For objects that match the prefix (prefix), change to low frequency storage after the specified number of days (days) at the last modification time. | No | +| days | Integer | Executes the operation after the specified number of days of the last modification time of the object. | No | +| days_after_initiation | Integer | Performs after the specified number of days to initialize the segment upload. | Yes | +| storage_class | Integer | The storage_class to be changed to, the supported values ​​are "STANDARD", "STANDARD_IA". | Yes | + +See [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/bucket/lifecycle/put_lifecycle/) for more information about request elements. ## Code Snippet diff --git a/docs/example/put_bucket_lifecycle_zh-CN.md b/docs/example/put_bucket_lifecycle_zh-CN.md index fdb4c4a..a53f90f 100644 --- a/docs/example/put_bucket_lifecycle_zh-CN.md +++ b/docs/example/put_bucket_lifecycle_zh-CN.md @@ -2,21 +2,21 @@ ## 请求消息体 -| 名称 | 类型 | 描述 | 是否必要 | -| :-------------------------------: | :-----: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: | -| rule | List | rule 的元素为 Lifecycle 规则。规则为 Dict 类型,有效的键为 “id”、”status”、”filter”、”expiration”、”abort_incomplete_multipart_upload” 和 “transition”。规则总数不能超过 100 条,且每条规则中只允许存在一种类型的操作。同一 bucket, prefix 和 支持操作( expiration, abort_incomplete_multipart_upload, transition) 不能有重复,否则返回 400 invalid_request 包含重复的规则信息 [参见错误信息](https://docs.qingcloud.com/qingstor/api/common/error_code.html#object-storage-error-code)。 | Yes | -| id | String | 规则的标识符。可为任意 UTF-8 编码字符,长度不能超过 255 个字节,在一个 Bucket Lifecycle 中,规则的标识符必须唯一。该字符串可用来描述策略的用途。如果 id 有重复,会返回 400 invalid_request 。 | Yes | -| status | String | 该条规则的状态。其值可为 “enabled” (表示生效) 或 “disabled” (表示禁用)。 | Yes | -| filter | Dict | 用于匹配 Object 的过滤条件,有效的键为 “prefix”。 | Yes | -| prefix | String | 前缀匹配策略,用于匹配 Object 名称,空字符串表示匹配整个 Bucket 中的 Object。默认值为空字符串。 | No | -| expiration | Dict | 用于删除 Object 的规则,有效的键为 “days”。”days” 必须是正整数,否则返回 400 invalid_request。对于匹配前缀(prefix) 的对象在最后修改时间的指定天数(days)后删除该对象。 | No | -| abort_incomplete_multipart_upload | Dict | 用于取消未完成的分段上传的规则,有效的键为 “days_after_initiation”。”days_after_initiation” 必须是正整数,否则返回 400 invalid_request。 | No | -| transition | Dict | 用于变更存储级别的规则,有效的键为 “days”, “storage_class”。days 必须 >= 30, 否则返回 400 invalid_request。对于匹配前缀(prefix) 的对象在最后修改时间的指定天数(days)后变更到低频存储。 | No | -| days | Integer | 在对象最后修改时间的指定天数后执行操作。 | No | -| days_after_initiation | Integer | 在初始化分段上传的指定天数后执行操作。 | Yes | -| storage_class | Integer | 要变更至的 storage_class,支持的值为 "STANDARD"、"STANDARD_IA"。 | Yes | - -访问 [API Docs](https://docs.qingcloud.com/qingstor/api/bucket/lifecycle/put_lifecycle.html) 以查看更多关于请求消息体的信息。 +| 名称 | 类型 | 描述 | 是否必要 | +| :-------------------------------: | :-----: |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| :------: | +| rule | List | rule 的元素为 Lifecycle 规则。规则为 Dict 类型,有效的键为 “id”、”status”、”filter”、”expiration”、”abort_incomplete_multipart_upload” 和 “transition”。规则总数不能超过 100 条,且每条规则中只允许存在一种类型的操作。同一 bucket, prefix 和 支持操作( expiration, abort_incomplete_multipart_upload, transition) 不能有重复,否则返回 400 invalid_request 包含重复的规则信息 [参见错误信息](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/error_code/)。 | Yes | +| id | String | 规则的标识符。可为任意 UTF-8 编码字符,长度不能超过 255 个字节,在一个 Bucket Lifecycle 中,规则的标识符必须唯一。该字符串可用来描述策略的用途。如果 id 有重复,会返回 400 invalid_request 。 | Yes | +| status | String | 该条规则的状态。其值可为 “enabled” (表示生效) 或 “disabled” (表示禁用)。 | Yes | +| filter | Dict | 用于匹配 Object 的过滤条件,有效的键为 “prefix”。 | Yes | +| prefix | String | 前缀匹配策略,用于匹配 Object 名称,空字符串表示匹配整个 Bucket 中的 Object。默认值为空字符串。 | No | +| expiration | Dict | 用于删除 Object 的规则,有效的键为 “days”。”days” 必须是正整数,否则返回 400 invalid_request。对于匹配前缀(prefix) 的对象在最后修改时间的指定天数(days)后删除该对象。 | No | +| abort_incomplete_multipart_upload | Dict | 用于取消未完成的分段上传的规则,有效的键为 “days_after_initiation”。”days_after_initiation” 必须是正整数,否则返回 400 invalid_request。 | No | +| transition | Dict | 用于变更存储级别的规则,有效的键为 “days”, “storage_class”。days 必须 >= 30, 否则返回 400 invalid_request。对于匹配前缀(prefix) 的对象在最后修改时间的指定天数(days)后变更到低频存储。 | No | +| days | Integer | 在对象最后修改时间的指定天数后执行操作。 | No | +| days_after_initiation | Integer | 在初始化分段上传的指定天数后执行操作。 | Yes | +| storage_class | Integer | 要变更至的 storage_class,支持的值为 "STANDARD"、"STANDARD_IA"。 | Yes | + +访问 [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/bucket/lifecycle/put_lifecycle/) 以查看更多关于请求消息体的信息。 ## 代码片段 diff --git a/docs/example/put_bucket_notification.md b/docs/example/put_bucket_notification.md index ce6d1fc..83fe149 100644 --- a/docs/example/put_bucket_notification.md +++ b/docs/example/put_bucket_notification.md @@ -17,14 +17,14 @@ When cloudfunc has been set as image, we need cloudfunc_args as below parameters.
Object storage will process the image according to the specified picture processing rules and save the result back to object storage. -| Name | Type | Description | Required | -| :---------: | :----: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: | -| action | String | The specific operation parameters of the picture, see [image basic processing service](https://docs.qingcloud.com/qingstor/data_process/image_process/index.html) for more info. | Yes | -| key_prefix | String | Prefix of the name of the object processed, “gen” is the default. | No | -| key_seprate | String | A separator between key_prefix and object, “_“ is the default. | No | -| save_bucket | String | The target bucket name that is saved as.
The default is the current bucket where the object is located. | No | +| Name | Type | Description | Required | +| :---------: | :----: |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| :------: | +| action | String | The specific operation parameters of the picture, see [image basic processing service](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/image_process/) for more info. | Yes | +| key_prefix | String | Prefix of the name of the object processed, “gen” is the default. | No | +| key_seprate | String | A separator between key_prefix and object, “_“ is the default. | No | +| save_bucket | String | The target bucket name that is saved as.
The default is the current bucket where the object is located. | No | -See [API Docs](https://docs.qingcloud.com/qingstor/api/bucket/notification/put_notification.html) for more information about request elements. +See [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/bucket/notification/put_notification/) for more information about request elements. ## Code Snippet diff --git a/docs/example/put_bucket_notification_zh-CN.md b/docs/example/put_bucket_notification_zh-CN.md index 8b489f9..38fbed3 100644 --- a/docs/example/put_bucket_notification_zh-CN.md +++ b/docs/example/put_bucket_notification_zh-CN.md @@ -16,14 +16,14 @@ 当设置 cloudfunc 为 image 时, 需要设置 cloudfunc_args 为以下参数,对象存储将按照指定的图片处理规则对图片进行处理,并将结果另存回对象存储。 -| 名称 | 类型 | 描述 | 是否必要 | -| :---------: | :----: | :------------------------------------------------------------------------------------------------------------------- | :------: | -| action | String | 图片的具体操作参数, 见 [图片基本处理服务](https://docs.qingcloud.com/qingstor/data_process/image_process/index.html) | Yes | -| key_prefix | String | 处理后 object 名称的前缀, 默认为 “gen” | No | -| key_seprate | String | key_prefix 和 object 之间的分隔符,默认为 “_“ | No | -| save_bucket | String | 另存为的目标 bucket 名称,默认为当前 object 所在 bucket | No | +| 名称 | 类型 | 描述 | 是否必要 | +| :---------: | :----: |:----------------------------------------------------------------------------------------------------------------| :------: | +| action | String | 图片的具体操作参数, 见 [图片基本处理服务](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/image_process/) | Yes | +| key_prefix | String | 处理后 object 名称的前缀, 默认为 “gen” | No | +| key_seprate | String | key_prefix 和 object 之间的分隔符,默认为 “_“ | No | +| save_bucket | String | 另存为的目标 bucket 名称,默认为当前 object 所在 bucket | No | -访问 [API Docs](https://docs.qingcloud.com/qingstor/api/bucket/notification/put_notification.html) 以查看更多关于请求消息体的信息。 +访问 [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/bucket/notification/put_notification/) 以查看更多关于请求消息体的信息。 ## 代码片段 diff --git a/docs/example/put_bucket_policy.md b/docs/example/put_bucket_policy.md index 8b11bed..7e8c2dc 100644 --- a/docs/example/put_bucket_policy.md +++ b/docs/example/put_bucket_policy.md @@ -2,7 +2,7 @@ ## Request Elements -See [API Docs](https://docs.qingcloud.com/qingstor/api/bucket/policy/put_policy.html) for more information about request elements. +See [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/bucket/policy/put_policy/) for more information about request elements. ## Code Snippet diff --git a/docs/example/put_bucket_policy_zh-CN.md b/docs/example/put_bucket_policy_zh-CN.md index 5320858..b93714a 100644 --- a/docs/example/put_bucket_policy_zh-CN.md +++ b/docs/example/put_bucket_policy_zh-CN.md @@ -2,7 +2,7 @@ ## 请求消息体 -访问 [API Docs](https://docs.qingcloud.com/qingstor/api/bucket/policy/put_policy.html) 以查看更多关于请求消息体的信息。 +访问 [API Docs](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/bucket/policy/put_policy/) 以查看更多关于请求消息体的信息。 ## 代码片段 diff --git a/docs/example/put_object.md b/docs/example/put_object.md index b296589..31c72c1 100644 --- a/docs/example/put_object.md +++ b/docs/example/put_object.md @@ -20,7 +20,7 @@ zone_name = "pek3b" bucket_srv = qingstor.Bucket(bucket_name, zone_name) ``` -Then set the input parameters that the PutObject method might use. For parameter details, please refer to [Official API Documentation](https://docs.qingcloud.com/qingstor/api/object/put). +Then set the input parameters that the PutObject method might use. For parameter details, please refer to [Official API Documentation](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/put/). Then call the `put_object` method to upload the object. object_key Sets the filepath after uploading. diff --git a/docs/example/put_object_copy.md b/docs/example/put_object_copy.md index 2774b12..49b95ab 100644 --- a/docs/example/put_object_copy.md +++ b/docs/example/put_object_copy.md @@ -20,8 +20,8 @@ zone_name = "pek3b" bucket_srv = qingstor.Bucket(bucket_name, zone_name) ``` -Then set the input parameters used by the PutObject method (core parameter: XQSCopySource). -For parameter details, please refer to [Official API Documentation](https://docs.qingcloud.com/qingstor/api/object/copy). +Then set the input parameters used by the PutObject method (core parameter: XQSCopySource). +For parameter details, please refer to [Official API Documentation](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/copy/). Then call the PutObject method to copy the object. object_key Sets the copied filepath (located in the current bucket). diff --git a/docs/example/put_object_copy_zh-CN.md b/docs/example/put_object_copy_zh-CN.md index 6c78c2d..9e89d22 100644 --- a/docs/example/put_object_copy_zh-CN.md +++ b/docs/example/put_object_copy_zh-CN.md @@ -20,7 +20,7 @@ zone_name = "pek3b" bucket_srv = qingstor.Bucket(bucket_name, zone_name) ``` -然后设置 PutObject 方法用到的输入参数(核心参数:XQSCopySource)。想要了解详细的参数信息,可以参考[官方 API 文档](https://docs.qingcloud.com/qingstor/api/object/copy)。 +然后设置 PutObject 方法用到的输入参数(核心参数:XQSCopySource)。想要了解详细的参数信息,可以参考[官方 API 文档](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/copy/)。 然后调用 `put_object` 方法拷贝对象。object_key 设置拷贝后的 filepath(位于当前 bucket 中)。 diff --git a/docs/example/put_object_fetch.md b/docs/example/put_object_fetch.md index fcb2d78..3722315 100644 --- a/docs/example/put_object_fetch.md +++ b/docs/example/put_object_fetch.md @@ -21,7 +21,7 @@ bucket_srv = qingstor.Bucket(bucket_name, zone_name) ``` Then set the input parameters used by the PutObject method (core parameter: XQSFetchSource). -For parameter details, please refer to [Official API Documentation](https://docs.qingcloud.com/qingstor/api/object/fetch). +For parameter details, please refer to [Official API Documentation](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/fetch/). Then call the `put_object` method to fetch object. object_key Sets the filepath after put (in the current bucket). diff --git a/docs/example/put_object_fetch_zh-CN.md b/docs/example/put_object_fetch_zh-CN.md index 92a306b..2b1c3b6 100644 --- a/docs/example/put_object_fetch_zh-CN.md +++ b/docs/example/put_object_fetch_zh-CN.md @@ -21,7 +21,7 @@ bucket_srv = qingstor.Bucket(bucket_name, zone_name) ``` 然后设置 PutObject 方法用到的输入参数(核心参数:XQSFetchSource)。 -想要了解详细的参数信息,可以参考[官方 API 文档](https://docs.qingcloud.com/qingstor/api/object/fetch)。 +想要了解详细的参数信息,可以参考[官方 API 文档](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/fetch/)。 然后调用 `put_object` 方法 fetch 对象。object_key 设置 put 后的 filepath(位于当前 bucket 中)。 diff --git a/docs/example/put_object_move.md b/docs/example/put_object_move.md index f990780..fff5942 100644 --- a/docs/example/put_object_move.md +++ b/docs/example/put_object_move.md @@ -21,7 +21,7 @@ bucket_srv = qingstor.Bucket(bucket_name, zone_name) ``` Then set the input parameters used by the PutObject method (core parameter: XQSMoveSource). -For parameter details, please refer to [Official API Documentation](https://docs.qingcloud.com/qingstor/api/object/move). +For parameter details, please refer to [Official API Documentation](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/move/). Then call the `put_object` method to move the object. object_key Sets the filepath after put (in the current bucket). diff --git a/docs/example/put_object_move_zh-CN.md b/docs/example/put_object_move_zh-CN.md index 9062d48..dd7f674 100644 --- a/docs/example/put_object_move_zh-CN.md +++ b/docs/example/put_object_move_zh-CN.md @@ -21,7 +21,7 @@ bucket_srv = qingstor.Bucket(bucket_name, zone_name) ``` 然后设置 PutObject 方法用到的输入参数(核心参数:XQSMoveSource)。 -想要了解详细的参数信息,可以参考[官方 API 文档](https://docs.qingcloud.com/qingstor/api/object/move)。 +想要了解详细的参数信息,可以参考[官方 API 文档](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/move/)。 然后调用 `put_object` 方法移动对象。object_key 设置 put 后的 filepath(位于当前 bucket 中)。 diff --git a/docs/example/put_object_zh-CN.md b/docs/example/put_object_zh-CN.md index 12cc179..9d22a4b 100644 --- a/docs/example/put_object_zh-CN.md +++ b/docs/example/put_object_zh-CN.md @@ -20,7 +20,7 @@ zone_name = "pek3b" bucket_srv = qingstor.Bucket(bucket_name, zone_name) ``` -然后设置 `put_object` 方法可能用到的输入参数。想要了解详细的参数信息,可以参考[官方 API 文档](https://docs.qingcloud.com/qingstor/api/object/put)。 +然后设置 `put_object` 方法可能用到的输入参数。想要了解详细的参数信息,可以参考[官方 API 文档](https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/object/basic_opt/put/)。 然后调用 `put_object` 方法上传对象。object_key 设置上传后的 filepath。 diff --git a/docs/examples.md b/docs/examples.md index 19dcd95..163b630 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -14,7 +14,6 @@ Each API function take an Input struct and return an Output struct. The Input st - [PUT Bucket ACL](example/put_bucket_acl.md) - [GET Bucket ACL](./example/get_bucket_acl.md) - Bucket Policy - - [Bucket Policy Condition](https://docs.qingcloud.com/qingstor/api/bucket/policy/policy_condition.html) - [PUT Bucket Policy](./example/put_bucket_policy.md) - [GET Bucket Policy](./example/get_bucket_policy.md) - [DELETE Bucket Policy](./example/delete_bucket_policy.md) @@ -56,5 +55,3 @@ Each API function take an Input struct and return an Output struct. The Input st - [Encryption](example/encryption.md) - Data Process - [Image Process](./example/image_process.md) - - [Third Party Data](https://docs.qingcloud.com/qingstor/data_process/third_party/) - - [Tupu Porn](https://docs.qingcloud.com/qingstor/data_process/third_party/tupu_porn.html) \ No newline at end of file diff --git a/docs/examples_zh-CN.md b/docs/examples_zh-CN.md index b426d4e..49fd020 100644 --- a/docs/examples_zh-CN.md +++ b/docs/examples_zh-CN.md @@ -15,7 +15,6 @@ Input 对象由请求参数, 请求头和请求体构成, Output 对象包含 HT - [PUT Bucket ACL](example/put_bucket_acl_zh-CN.md) - [GET Bucket ACL](./example/get_bucket_acl_zh-CN.md) - 授权策略(Bucket Policy) - - [策略生效条件(Bucket Policy Condition)](https://docs.qingcloud.com/qingstor/api/bucket/policy/policy_condition.html) - [PUT Bucket Policy](./example/put_bucket_policy_zh-CN.md) - [GET Bucket Policy](./example/get_bucket_policy_zh-CN.md) - [DELETE Bucket Policy](./example/delete_bucket_policy_zh-CN.md) @@ -57,6 +56,3 @@ Input 对象由请求参数, 请求头和请求体构成, Output 对象包含 HT - [数据加密](example/encryption_zh-CN.md) - 数据处理 - [图片处理](./example/image_process_zh-CN.md) - - [第三方数据处理](https://docs.qingcloud.com/qingstor/data_process/third_party/) - - [图普科技鉴黄服务](https://docs.qingcloud.com/qingstor/data_process/third_party/tupu_porn.html) - diff --git a/qingstor/sdk/build.py b/qingstor/sdk/build.py index f34d5fa..6a342f9 100644 --- a/qingstor/sdk/build.py +++ b/qingstor/sdk/build.py @@ -104,7 +104,7 @@ def parse_request_headers(self): # Handle header X-QS-MetaData dict, for example: # {'X-QS-MetaData': {'x': 'vx', 'y': 'vy'}} => {'X-QS-Meta-x': 'vx', 'X-QS-Meta-y': 'vy'} - # https://docs.qingcloud.com/qingstor/api/common/metadata#%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E5%AF%B9%E8%B1%A1%E5%85%83%E6%95%B0%E6%8D%AE + # https://docsv4.qingcloud.com/user_guide/storage/object_storage/api/metadata/ if 'X-QS-MetaData' in parsed_headers: metadata = parsed_headers.get('X-QS-MetaData') if isinstance(metadata, dict) and len(metadata) != 0: