
# 设置托管配置请求参数
表1请求参数列表 
| 字段名                                         | 类型                                                                                                                                    | 约束 | 说明                                                                                                                                                                                                                          |
|:---|:---|:---|:---|
| options                                     | const [obs_options](https://support.huaweicloud.com/sdk-c-devg-obs/obs_20_0085.html#obs_20_0085__table9681927859) \*                  | 必选 | 请求桶的上下文，[配置option(C SDK)](https://support.huaweicloud.com/sdk-c-devg-obs/obs_20_0203.html)，通过obs_options设置AK、SK、endpoint、bucket、超时时间、临时鉴权                                                                                   |
| set_bucket_redirect_all                     | [obs_set_bucket_redirect_all_conf](https://support.huaweicloud.com/sdk-c-devg-obs/obs_20_0120.html#obs_20_0120__table428433811185) \* | 必选 | 描述重定向的配置。                                                                                                                                                                                                                   |
| set_bucket_redirect_all-\>host_name         | const char \*                                                                                                                         | 必选 | 描述重定向的站点名。                                                                                                                                                                                                                  |
| set_bucket_redirect_all-\>protocol          | const char \*                                                                                                                         | 可选 | 描述重定向请求时使用的协议（http，https），默认使用http协议。                                                                                                                                                                                       |
| set_bucket_website_conf                     | [obs_set_bucket_website_conf](https://support.huaweicloud.com/sdk-c-devg-obs/obs_20_0121.html#obs_20_0121__table428433811185) \*      | 必选 | 描述重定向规则website元素的配置。                                                                                                                                                                                                        |
| set_bucket_website_conf-\>suffix            | const char \*                                                                                                                         | 必选 | suffix元素被追加在对文件夹的请求的末尾，例如：suffix配置的是"index.html"，请求的是"samplebucket/images/"，返回的数据将是"samplebucket"桶内名为"images/index.html"的对象的内容。 **约束限制：** suffix元素不能为空或者包含"/"字符。 |
| set_bucket_website_conf-\>key               | const char \*                                                                                                                         | 可选 | 当4XX错误出现时使用的对象的名称。这个元素指定了当错误出现时返回的页面。                                                                                                                                                                                       |
| set_bucket_website_conf-\>routingrule_info  | [bucket_website_routingrule](https://support.huaweicloud.com/sdk-c-devg-obs/obs_20_0122.html#obs_20_0122__table428433811185) \*       | 可选 | 重定向规则的具体描述，请参看下表                                                                                                                                                                                                            |
| set_bucket_website_conf-\>routingrule_count | int                                                                                                                                   | 可选 | set_bucket_website_conf.routingrule_info的总大小                                                                                                                                                                                |
| handler                                     | [obs_response_handler](https://support.huaweicloud.com/sdk-c-devg-obs/obs_20_0087.html#obs_20_0087__table53755070) \*                 | 必选 | 回调结构体，结构体内所有成员都是回调函数的指针，用于设置处理接口响应数据的回调函数。您可以通过设置回调函数，把服务端的响应数据复制到您的自定义回调数据callback_data中。                                                                                                                                  |
| callback_data                               | void \*                                                                                                                               | 可选 | 用户自定义回调数据。                                                                                                                                                                                                                  |
   
重定向规则结构bucket_website_routingrule描述如下表：
表2bucket_website_routingrule 
| **参数名称**                       | **参数类型**      | **是否必选** | **描述**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|:---|:---|:---|:---|
| key_prefix_equals              | const char \* | 必选       | **参数解释** 描述当重定向生效时对象名的前缀。 例如：重定向ExamplePage.html对象的请求，key_prefix_equals设为ExamplePage.html。 **约束限制：** 无 **取值范围：** 无 **默认取值：** 无                                                                                                                                   |
| http_errorcode_returned_equals | const char \* | 必选       | **参数解释** 描述Redirect生效时的HTTP错误码。当发生错误时，如果错误码等于这个值，那么Redirect生效。 例如： 当返回的http错误码为404时重定向到NotFound.html，可以将http_errorcode_returned_equals设置为404，replace_key_with设置为NotFound.html。 **约束限制：** 无 **取值范围：** 无 **默认取值：** 无 |
| protocol                       | const char \* | 必选       | **参数解释** 描述重定向请求时使用的协议（http，https）。 **约束限制：** 无 **取值范围：** 无 **默认取值：** 无                                                                                                                                                                                                                                     |
| host_name                      | const char \* | 必选       | **参数解释** 描述重定向的站点名。 **约束限制：** 无 **取值范围：** 无 **默认取值：** 无                                                                                                                                                                                                                                                      |
| replace_key_prefix_with        | const char \* | 必选       | **参数解释** 描述重定向请求时使用的对象名前缀，请求中的对象名会将key_prefix_equals的内容替换为replace_key_prefix_with的内容。 **约束限制：** 无 **取值范围：** 无 **默认取值：** 无                                                                                                                                                                                    |
| replace_key_with               | const char \* | 必选       | **参数解释** 描述重定向请求时使用的对象名，请求中的整个对象名会被替换为replace_key_with的内容。 **约束限制：** 无 **取值范围：** 无 **默认取值：** 无                                                                                                                                                                                                                 |
| http_redirect_code             | const char \* | 必选       | **参数解释** 描述响应中的HTTP状态码。 **约束限制：** 无 **取值范围：** 无 **默认取值：** 无                                                                                                                                                                                                                                                     |
   
