全部產品
Search
文件中心

API Gateway:QueryConsumerAuthorizationRules - 查詢消費者授權規則列表

更新時間:Mar 30, 2026

查詢消費者授權規則列表。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

apig:QueryConsumerAuthorizationRules

none

*全部資源

*

請求文法

GET /v1/authorization-rules HTTP/1.1

請求參數

名稱

類型

必填

描述

樣本值

apiNameLike

string

API 名。

api-xx

pageNumber

integer

分頁頁碼。

1

pageSize

integer

分頁大小。

10

consumerId

string

消費者 ID。

cs-ct21c16m1hkp64hk6qmg

resourceId

string

資源 ID。

ha-cn-li942gy8p03

resourceType

string

資源類型。

HttpApiRoute

environmentId

string

環境 ID。

env-cpqnr6tlhtgubc***

groupByApi

boolean

通過 API 分組。

true

parentResourceId

string

父項資源 ID。

ha-cn-li942gy8p01

consumerNameLike

string

消費者名稱。

consumer-xxx

resourceTypes

string

服務來源類型

K8S

返回參數

名稱

類型

描述

樣本值

object

Schema of Response

requestId

string

Id of the request

A60EE5CA-1294-532A-9775-8D2FD1C6EFBF

code

string

響應狀態代碼。

Ok

message

string

響應訊息。

success

data

object

響應資料。

totalSize

string

總數量。

6

pageNumber

integer

分頁頁碼。

1

pageSize

integer

分頁大小。

10

items

array<object>

消費者規則列表。

array<object>

消費者鑒權規則詳情。

consumerAuthorizationRuleId

string

消費者授權規則 ID。

car-csgeka5lhtggrjcprok0

consumerId

string

消費者 ID。

cs-csheiftlhtgmp0j0hp4g

apiInfo HttpApiApiInfo

API 資訊詳情。

environmentInfo EnvironmentInfo

環境資訊。

gatewayInfo GatewayInfo

網關資訊。

resourceId

string

資源 ID。

2351944

resourceType

string

資源類型。

HttpApiRoute

expireStatus

string

失效狀態。

InEffect

expireMode

string

失效模式。LongTerm、ShortTerm,二選一。

ShortTerm

expireTimestamp

integer

到期時間。

172086834548

createTimestamp

integer

建立時間戳記。單位: 毫秒。

1719386834548

updateTimestamp

integer

更新時間戳記。單位: 毫秒。

1719386834548

deployStatus

string

API 在當前環境的發布狀態

{}

consumerInfo ConsumerInfo

消費者資訊詳情。

resourceInfo

object

資源資訊詳情。

route HttpRoute

路由規則。

operationInfo HttpApiOperationInfo

介面資訊。

樣本

正常返回樣本

JSON格式

{
  "requestId": "A60EE5CA-1294-532A-9775-8D2FD1C6EFBF",
  "code": "Ok",
  "message": "success",
  "data": {
    "totalSize": "6",
    "pageNumber": 1,
    "pageSize": 10,
    "items": [
      {
        "consumerAuthorizationRuleId": "car-csgeka5lhtggrjcprok0",
        "consumerId": "cs-csheiftlhtgmp0j0hp4g",
        "environmentInfo": {
          "environmentId": "env-cq7l5s5lhtgi6qasrdc0",
          "name": "test",
          "alias": "測試環境",
          "description": "這是xxx的xx專案測試環境",
          "gatewayInfo": {
            "gatewayId": "gw-cq7og15lhtgi6qasrj60",
            "name": "apitest-gw",
            "vpcInfo": {
              "vpcId": "vpc-uf664nyle5kh***",
              "name": "商品中心預發環境專用網路"
            },
            "engineVersion": "2.0.7"
          },
          "subDomainInfos": [
            {
              "domainId": "d-cpudb0llhtgl2djvq2sg",
              "name": "abc.com",
              "protocol": "HTTP",
              "networkType": "Intranet"
            }
          ],
          "default": false,
          "createTimestamp": 1721116090326,
          "updateTimestamp": 1721116090326,
          "resourceGroupId": "rg-xxxx"
        },
        "gatewayInfo": {
          "gatewayId": "gw-cq7og15lhtgi6qasrj60",
          "name": "apitest-gw",
          "vpcInfo": {
            "vpcId": "vpc-uf664nyle5kh***",
            "name": "商品中心預發環境專用網路"
          },
          "engineVersion": "2.0.7"
        },
        "resourceId": "2351944",
        "resourceType": "HttpApiRoute",
        "expireStatus": "InEffect",
        "expireMode": "ShortTerm",
        "expireTimestamp": 172086834548,
        "createTimestamp": 1719386834548,
        "updateTimestamp": 1719386834548,
        "deployStatus": "{}",
        "consumerInfo": {
          "consumerId": "cs-ctd4l1um1hkph7ki1k80",
          "name": "test",
          "enable": false
        },
        "resourceInfo": {}
      }
    ]
  }
}

錯誤碼

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情