GetSmartCluster

更新时间:
复制 MD 格式

调用 GetSmartCluster 接口查询指定 SmartCluster 的详细信息,包括聚类规则、消息通知配置以及创建、更新时间。

注意事项

  • 阿里云账号默认拥有查询 SmartCluster 的权限。如需通过 RAM 用户查询,请确保 RAM 用户拥有 oss:MetaQuery 权限。

  • 本接口仅在 OpenMetaQuery 时配置了 RouteRule 启用多 Dataset 路由的场景下可用。

  • objectId 来自 CreateSmartCluster 的响应或 ListSmartClusters 的列表。

  • SmartCluster 详情包裹在响应根元素下的 SmartCluster 子节点中,解析时需要穿过两层 wrapper 取数据。

请求语法

POST /?metaQuery&action=getSmartCluster&datasetName=DatasetName&objectId=ObjectId HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue

请求头

此接口仅涉及公共请求头。更多信息,请参见公共请求头(Common Request Headers)

请求元素

名称

类型

是否必选

示例值

描述

datasetName

字符串

photos-2026

SmartCluster 所在的 Dataset 名。

objectId

字符串

cluster-abc123def456

SmartCluster 的唯一 ID。

响应头

此接口仅涉及公共响应头。更多信息,请参见公共响应头(Common Response Headers)

响应元素

名称

类型

是否必选

示例值

描述

GetSmartClusterResponse

容器

不涉及

响应根元素。

子节点:SmartCluster

SmartCluster

容器

不涉及

SmartCluster 详情容器。详细字段见 SmartCluster 数据结构

父节点:GetSmartClusterResponse

示例

请求示例

POST /?metaQuery&action=getSmartCluster&datasetName=photos-2026&objectId=cluster-abc123def456 HTTP/1.1
Host: examplebucket.oss-cn-hangzhou.aliyuncs.com
Date: Wed, 20 May 2026 11:10:00 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20260520/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e

返回示例

HTTP/1.1 200 OK
x-oss-request-id: 64C8B6F4E7C5A3A8B9D6E7F7
Date: Wed, 20 May 2026 11:10:01 GMT
Content-Type: application/xml
Server: AliyunOSS

<?xml version="1.0" encoding="UTF-8"?>
<GetSmartClusterResponse>
  <SmartCluster>
    <ObjectId>cluster-abc123def456</ObjectId>
    <ClusterType>figure</ClusterType>
    <Name>face-cluster-alice</Name>
    <Description>Cluster faces matching Alice</Description>
    <Rules>
      <Rule>
        <RuleType>face</RuleType>
        <BaseURIs>oss://examplebucket/refs/alice.jpg</BaseURIs>
        <Sensitivity>0.7</Sensitivity>
      </Rule>
    </Rules>
    <Reason></Reason>
    <Notification>
      <MNS>
        <TopicName>imm-cluster-notification</TopicName>
      </MNS>
    </Notification>
    <CreateTime>2026-05-20T11:00:00.000+08:00</CreateTime>
    <UpdateTime>2026-05-20T11:05:00.000+08:00</UpdateTime>
  </SmartCluster>
</GetSmartClusterResponse>