# 查询重分布详情 - ShowClusterRedistribution
#### 功能介绍
该接口用于查看当前集群的重分布模式、重分布进度、数据表重分布详情等监控信息。
查看重分布详情功能DWS 2.0 8.1.1.200及以上集群版本支持，其中数据表重分布进度详情仅DWS 2.0 8.2.1及以上集群版本支持。
#### 调用方法
请参见[如何调用API](https://support.huaweicloud.com/api-dws/dws_02_0062.html)。
#### 授权信息
账号具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权，具体权限要求请参见[权限和授权项](https://support.huaweicloud.com/api-dws/dws_02_0056.html)。
- 如果使用身份策略授权，需具备如下身份策略权限。
  
  | 授权项                           | 访问级别 | 资源类型（\*为必须） | 条件键                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 别名                          | 依赖的授权项 |
  |:---|:---|:---|:---|:---|:---|
  | dws:cluster:getRedistribution | Read | cluster \*  | - g:ResourceTag/\<tag-key\>   - g:EnterpriseProjectId    | dws:redistributionInfo:list | -      |
     
  
 
#### URI
GET /v2/{project_id}/clusters/{cluster_id}/redistribution
表1路径参数 
| 参数         | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|:---|:---|:---|:---|
| project_id | 是    | String | **参数解释**： 项目ID。获取方法请参见[获取项目ID](https://support.huaweicloud.com/api-dws/dws_02_0011.html)。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                |
| cluster_id | 是    | String | **参数解释**： 集群ID。获取方法请参见[获取集群ID](https://support.huaweicloud.com/api-dws/dws_02_00068.html)。 **约束限制**： 必须是有效的dws集群ID。 **取值范围**： 36位UUID。 **默认取值**： 不涉及。 |
   
表2Query参数 
| 参数         | 是否必选 | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|:---|:---|:---|:---|
| limit      | 否    | Integer | **参数解释**： 分页查询，每页大小。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 10                                                                                                                                                                                                                               |
| offset     | 否    | Integer | **参数解释**： 分页偏移量，从0开始，页数减1。 **约束限制**： 不涉及。 **取值范围**： 大于等于0 **默认取值**： 0                                                                                                                                                                                                                         |
| db_name    | 否    | String  | **参数解释**： 数据库名称。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： null                                                                                                                                                                                                                                 |
| table_name | 否    | String  | **参数解释**： 表名称。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： null                                                                                                                                                                                                                                   |
| type       | 否    | String  | **参数解释**： 类型，取值来自public.pgxc_redistb表的redistributed字段。多个可用逗号分割。 **约束限制**： 不涉及。 **取值范围**： i：重分布中； y：已完成； n：未开始； **默认取值**： null，即不过滤。 |
   
#### 请求参数
无
#### 响应参数
**状态码：200**
表3响应Body参数 
| 参数             | 参数类型                                                                                                     | 描述                                                                                                                                                                                                                                                                                                     |
|:---|:---|:---|
| redis_info     | [RdsRedisInfo] object | **参数解释**： 重分布信息。 **取值范围**： 不涉及。                                 |
| schedule_mode  | Boolean                                                                                                  | **参数解释**： 调度模式。 **取值范围**： false：非调度模式；true：调度模式。                |
| pause_enable   | Boolean                                                                                                  | **参数解释**： 是否允许暂停。 **取值范围**： false：不允许暂停；true：允许暂停。              |
| recover_enable | Boolean                                                                                                  | **参数解释**： 是否允许恢复。 **取值范围**： false：不允许恢复；true：允许恢复。              |
| retry_enable   | Boolean                                                                                                  | **参数解释**： 是否允许重试。 **取值范围**： false：不允许重试；true：允许重试。              |
| update_enable  | Boolean                                                                                                  | **参数解释**： 是否允许更新。 **取值范围**： false：不允许更新；true：允许更新，该参数仅仅适用于调度模式。 |
| control_enable | Boolean                                                                                                  | **参数解释**： 是否允许控制。 **取值范围**： false：不允许控制；true：允许控制，该参数仅仅适用于调度模式。 |
   
 表4RdsRedisInfo 
| 参数                 | 参数类型                                                                                                             | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|:---|:---|:---|
| id                 | String                                                                                                           | **参数解释**： 重分布信息ID。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| cluster_id         | String                                                                                                           | **参数解释**： 集群ID。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| start_time         | String                                                                                                           | **参数解释**： 开始时间。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| end_time           | String                                                                                                           | **参数解释**： 结束时间。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| status             | String                                                                                                           | **参数解释**： 状态。 **取值范围**： - PREPARE：准备。   - RUNNING：运行中。   - WAITING：等待中。   - PAUSE：已暂停。   - PAUSING：暂停中。   - SUCCESS：成功。   - FAIL：失败。    |
| redis_conf         | [RedisConf] object               | **参数解释**： 重分布配置。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| redis_progress     | [RedisProgress] object       | **参数解释**： 重分布进度信息。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| redis_table_detail | [RedisTableDetail] object | **参数解释**： 重分布表信息。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
   
 表5RedisConf 
| 参数                | 参数类型                                                                                                           | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|:---|:---|:---|
| redis_mode        | String                                                                                                         | **参数解释**： 重分布模式。 **取值范围**： - online：在线重分布。   - offline：离线重分布。    |
| schedule_conf     | [ScheduleConf] object       | **参数解释**： 调度配置信息，已经废弃。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| parallel_jobs     | Integer                                                                                                        | **参数解释**： 重分布并发数。 **取值范围**： 1\~200。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| parallel_job      | Integer                                                                                                        | **参数解释**： 重分布并发数，已经废弃。 **取值范围**： 1\~200。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| priority_policy   | String                                                                                                         | **参数解释**： 优先级策略。 **取值范围**： large：优先对大表进行重分布。 small：优先对小表进行重分布。 default：默认顺序进行重分布。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| bucket_split_info | [BucketSplitInfo] object | **参数解释**： 桶分裂信息，仅在从集群外部扩容到已有的逻辑集群场景下才会返回。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
   
 表6ScheduleConf 
| 参数             | 参数类型              | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|:---|:---|:---|
| schedule_start | String            | **参数解释**： 调度开始时间。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                  |
| schedule_end   | String            | **参数解释**： 调度结束时间。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                  |
| schedule_type  | String            | **参数解释**： 调度类型。 **取值范围**： - timeRange：时间范围。    |
| schedule_date  | Array of integers | **参数解释**： 调度日期。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                    |
| schedule_time  | Array of strings  | **参数解释**： 调度时间列表。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                  |
   
 表7BucketSplitInfo 
| 参数                               | 参数类型    | 描述                                                                                                                                                                                                                                                                                                         |
|:---|:---|:---|
| current_dn_num                   | Integer | **参数解释**： 当前DN数。 **取值范围**： 不涉及。                                     |
| after_scale_out_dn_num           | Integer | **参数解释**： 扩容后DN数。 **取值范围**： 不涉及。                                    |
| current_bucket_num               | Integer | **参数解释**： 当前bucket数。 **取值范围**： 不涉及。                                 |
| after_scale_out_bucket_num       | Integer | **参数解释**： 扩容后bucket数。 **取值范围**： 不涉及。                                |
| is_bucket_split                  | Boolean | **参数解释**： 扩容是否涉及bucket分裂。 **取值范围**： 不涉及。                            |
| bucket_tilt_rate                 | String  | **参数解释**： bucket DN倾斜率，用于衡量bucket在DN节点上不均衡程度。 **取值范围**： 不涉及。        |
| after_scale_out_bucket_tilt_rate | String  | **参数解释**： 扩容后 bucket DN倾斜率，用于衡量扩容后bucket在DN节点上不均衡程度。 **取值范围**： 不涉及。 |
   
 表8RedisProgress 
| 参数             | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|:---|:---|:---|
| bytes_done     | Long    | **参数解释**： 已完成字节数。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| byte_left      | Long    | **参数解释**： 剩余字节数。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| tables_done    | Integer | **参数解释**： 完成表数量。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| tables_left    | Integer | **参数解释**： 剩余表数量。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| table_progress | Integer | **参数解释**： 表重分布进度，单位为百分比（%）。 **取值范围**： 1\~100。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| total_progress | Integer | **参数解释**： 总进度，单位为百分比（%）。 **取值范围**： 1\~100。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| redis_rate     | String  | **参数解释**： 重分布速度。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| estimated_time | String  | **参数解释**： 预估时间。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| completed      | Boolean | **参数解释**： 是否已完成。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| initialed      | Boolean | **参数解释**： 是否完成初始化。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| fail_count     | Integer | **参数解释**： 失败次数。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| redistributing | Boolean | **参数解释**： cm_ctl查询的重分布结果。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| status         | String  | **参数解释**： 状态。 **取值范围**： - PREPARE：准备。   - RUNNING：运行中。   - WAITING：等待中。   - PAUSE：已暂停。   - PAUSING：暂停中。   - SUCCESS：成功。   - FAIL：失败。    |
| pause_by_user  | Boolean | **参数解释**： 是否用户暂停。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
   
 表9RedisTableDetail 
| 参数    | 参数类型                                                                                                           | 描述                                                                                                                                                                                                                                                                       |
|:---|:---|:---|
| data  | Array of [RedisTable] objects | **参数解释**： 重分布具体数据。 **取值范围**： 不涉及。 |
| total | Integer                                                                                                        | **参数解释**： 重分布表张数。 **取值范围**： 不涉及。  |
   
 表10RedisTable 
| 参数                   | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|:---|:---|:---|
| table_name           | String  | **参数解释**： 表名。 **取值范围**： 不涉及。                                                                                                                                                                                 |
| id                   | Integer | **参数解释**： 表唯一id。 **取值范围**： 不涉及。                                                                                                                                                                              |
| schema_name          | String  | **参数解释**： schema名。 **取值范围**： 不涉及。                                                                                                                                                                            |
| logical_cluster_name | String  | **参数解释**： 逻辑集群名。 **取值范围**： 不涉及。                                                                                                                                                                              |
| size                 | Long    | **参数解释**： 表大小。 **取值范围**： 不涉及。                                                                                                                                                                                |
| status               | String  | **参数解释**： 重分布类型。 **取值范围**： i：重分布中； y：重分布完成； n：未开始。 |
   
#### 请求示例
查询重分布详情
```
GET https://{Endpoint}/v2/89cd04f168b84af6be287f71730fdb4b/clusters/e59d6b86-9072-46eb-a996-13f8b44994c1/redistribution
```
#### 响应示例
**状态码：200**
```
{
  "redis_info" : {
    "id" : "1e1006ae-5243-4989-9452-c0217ad08776",
    "cluster_id" : "37e6956b-17dd-4aef-980d-8ebd9c29f887",
    "start_time" : "2025-05-15 14:04:00",
    "end_time" : "",
    "status" : "PAUSE",
    "redis_conf" : {
      "redis_mode" : "online",
      "schedule_conf" : null,
      "parallel_jobs" : 4,
      "priority_policy" : "default",
      "bucket_split_info" : {
        "current_dn_num" : 3,
        "after_scale_out_dn_num" : 6,
        "current_bucket_num" : 32,
        "after_scale_out_bucket_num" : 32,
        "is_bucket_split" : false,
        "bucket_tilt_rate" : "9.09%",
        "after_scale_out_bucket_tilt_rate" : "16.67%"
      }
    },
    "redis_progress" : {
      "bytes_done" : 7219200,
      "byte_left" : 0,
      "tables_done" : 95,
      "tables_left" : 230,
      "table_progress" : 29,
      "total_progress" : 31,
      "redis_rate" : "21 MB/s",
      "estimated_time" : "00:12:06",
      "completed" : false,
      "initialed" : true,
      "fail_count" : 0,
      "redistributing" : true,
      "status" : "FAIL",
      "pause_by_user" : false
    },
    "redis_table_detail" : {
      "data" : [ {
        "table_name" : "test_69",
        "id" : 2147492808,
        "schema_name" : "public",
        "logical_cluster_name" : "v3_logical",
        "size" : 77815808,
        "status" : "i"
      }, {
        "table_name" : "test_171",
        "id" : 2147493123,
        "schema_name" : "public",
        "logical_cluster_name" : "v3_logical",
        "size" : 77815808,
        "status" : "i"
      }, {
        "table_name" : "test_236",
        "id" : 2147493327,
        "schema_name" : "public",
        "logical_cluster_name" : "v3_logical",
        "size" : 77815808,
        "status" : "i"
      } ],
      "total" : 3
    }
  },
  "schedule_mode" : false,
  "pause_enable" : false,
  "recover_enable" : true,
  "retry_enable" : false,
  "update_enable" : false,
  "control_enable" : false
}
```
#### SDK代码示例
SDK代码示例如下。
- [Java]
  ```
  package com.huaweicloud.sdk.test;
  import com.huaweicloud.sdk.core.auth.ICredential;
  import com.huaweicloud.sdk.core.auth.BasicCredentials;
  import com.huaweicloud.sdk.core.exception.ConnectionException;
  import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
  import com.huaweicloud.sdk.core.exception.ServiceResponseException;
  import com.huaweicloud.sdk.dws.v2.region.DwsRegion;
  import com.huaweicloud.sdk.dws.v2.*;
  import com.huaweicloud.sdk.dws.v2.model.*;
  public class ShowClusterRedistributionSolution {
      public static void main(String[] args) {
          // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
          // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
          String ak = System.getenv("CLOUD_SDK_AK");
          String sk = System.getenv("CLOUD_SDK_SK");
          String projectId = "{project_id}";
          ICredential auth = new BasicCredentials()
                  .withProjectId(projectId)
                  .withAk(ak)
                  .withSk(sk);
          DwsClient client = DwsClient.newBuilder()
                  .withCredential(auth)
                  .withRegion(DwsRegion.valueOf("<YOUR REGION>"))
                  .build();
          ShowClusterRedistributionRequest request = new ShowClusterRedistributionRequest();
          request.withClusterId("{cluster_id}");
          try {
              ShowClusterRedistributionResponse response = client.showClusterRedistribution(request);
              System.out.println(response.toString());
          } catch (ConnectionException e) {
              e.printStackTrace();
          } catch (RequestTimeoutException e) {
              e.printStackTrace();
          } catch (ServiceResponseException e) {
              e.printStackTrace();
              System.out.println(e.getHttpStatusCode());
              System.out.println(e.getRequestId());
              System.out.println(e.getErrorCode());
              System.out.println(e.getErrorMsg());
          }
      }
  }
  ```
- [Python]
  ```
  # coding: utf-8
  import os
  from huaweicloudsdkcore.auth.credentials import BasicCredentials
  from huaweicloudsdkdws.v2.region.dws_region import DwsRegion
  from huaweicloudsdkcore.exceptions import exceptions
  from huaweicloudsdkdws.v2 import *
  if __name__ == "__main__":
      # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
      # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
      ak = os.environ["CLOUD_SDK_AK"]
      sk = os.environ["CLOUD_SDK_SK"]
      projectId = "{project_id}"
      credentials = BasicCredentials(ak, sk, projectId)
      client = DwsClient.new_builder() \
          .with_credentials(credentials) \
          .with_region(DwsRegion.value_of("<YOUR REGION>")) \
          .build()
      try:
          request = ShowClusterRedistributionRequest()
          request.cluster_id = "{cluster_id}"
          response = client.show_cluster_redistribution(request)
          print(response)
      except exceptions.ClientRequestException as e:
          print(e.status_code)
          print(e.request_id)
          print(e.error_code)
          print(e.error_msg)
  ```
- [Go]
  ```
  package main
  import (
  "fmt"
  "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
      dws "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dws/v2"
  "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dws/v2/model"
      region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dws/v2/region"
  )
  func main() {
      // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
      // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
      ak := os.Getenv("CLOUD_SDK_AK")
      sk := os.Getenv("CLOUD_SDK_SK")
      projectId := "{project_id}"
      auth, err := basic.NewCredentialsBuilder().
          WithAk(ak).
          WithSk(sk).
          WithProjectId(projectId).
          SafeBuild()
      if err != nil {
          fmt.Println(err)
          return
      }
      hcClient, err := dws.DwsClientBuilder().
           WithRegion(region.ValueOf("<YOUR REGION>")).
           WithCredential(auth).
           SafeBuild()
      if err != nil {
          fmt.Println(err)
          return
      }
      client := dws.NewDwsClient(hcClient)
      request := &model.ShowClusterRedistributionRequest{}
  request.ClusterId = "{cluster_id}"
  response, err := client.ShowClusterRedistribution(request)
  if err == nil {
          fmt.Printf("%+v\n", response)
      } else {
          fmt.Println(err)
      }
  }
  ```
- [更多]
  更多编程语言的SDK代码示例，请参见[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/DWS/sdk?api=ShowClusterRedistribution)的代码示例页签，可生成自动对应的SDK代码示例。
#### 状态码
| 状态码 | 描述         |
|:---|:---|
| 200 | 查询重分布详情成功。 |
| 400 | 请求错误。      |
| 401 | 鉴权失败。      |
| 403 | 没有操作权限。    |
| 404 | 找不到资源。     |
| 500 | 服务内部错误。    |
| 503 | 服务不可用。     |
   
