全部產品
Search
文件中心

API Gateway:ListConsumerAuthorizationRules

更新時間:Jul 08, 2026

取得消費者授權規則清單。

調試

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

調試

授權資訊

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

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

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

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

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

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

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

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

操作

存取層級

資源類型

條件關鍵字

關聯操作

apig:ListConsumerAuthorizationRules

none

*Domain

acs:apig:{#regionId}:{#accountId}:consumer/{#ConsumerId}

請求文法

GET /v1/consumers/{consumerId}/authorization-rules HTTP/1.1

路徑參數

名稱

類型

必填

描述

樣本值

consumerId

string

消費者 ID。

cs-csgdi45lhtggrjcpriug

請求參數

名稱

類型

必填

描述

樣本值

apiNameLike

string

API 名稱模糊搜尋參數。

qwen3

pageNumber

integer

分頁頁碼。

1

pageSize

integer

分頁大小,未填寫時預設為 10。

10

返回參數

名稱

類型

描述

樣本值

object

Schema of Response

requestId

string

Id of the request

294382D9-EE60-5735-A4CD-F2AC2840423D

code

string

回應狀態碼。

Ok

message

string

回應訊息。

success

data

object

回應資料。

totalSize

string

總數量。

9

pageNumber

integer

分頁頁碼。

1

pageSize

integer

分頁大小。

10

items

array<object>

消費者授權資訊清單。

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

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

1721116090326

deployStatus

string

API 在當前環境的發佈狀態。

{}

樣本

正常返回樣本

JSON格式

{
  "requestId": "294382D9-EE60-5735-A4CD-F2AC2840423D",
  "code": "Ok",
  "message": "success",
  "data": {
    "totalSize": "9",
    "pageNumber": 1,
    "pageSize": 10,
    "items": [
      {
        "consumerAuthorizationRuleId": "car-csgeka5lhtggrjcprok0",
        "consumerId": "cs-csheiftlhtgmp0j0hp4g",
        "apiInfo": {
          "httpApiId": "api-xxx",
          "name": "test",
          "basePath": "/v1",
          "description": "测试专用API",
          "versionInfo": {
            "enable": true,
            "scheme": "Query",
            "headerName": "my-version",
            "queryName": "myVersion",
            "version": "v1"
          },
          "ingressInfo": {
            "sourceId": "src-xxx",
            "ingressClass": "mse",
            "watchNamespace": "default",
            "environmentInfo": {
              "environmentId": "env-xxx"
            },
            "k8sClusterInfo": {
              "clusterId": "ca435c77cba1547cca9311957bcxxxxxx"
            },
            "overrideIngressIp": true
          },
          "type": "Rest",
          "resourceGroupId": "rg-xxx",
          "enableAuth": false,
          "authConfig": {
            "authType": "Jwt",
            "authMode": "NoAuth"
          },
          "gatewayId": "gw-cpv4sqdl****",
          "modelCategory": "Text",
          "protocols": [
            "HTTP"
          ],
          "environments": [
            {
              "environmentId": "env-xxx",
              "backendScene": "SingleService",
              "backendType": "Service",
              "serviceConfigs": [
                {
                  "gatewayServiceId": "gs-xxx",
                  "name": "demo-service",
                  "protocol": "HTTP",
                  "port": "8080",
                  "weight": 100,
                  "version": "v1",
                  "match": {
                    "default": true,
                    "conditions": [
                      {
                        "type": "Query",
                        "key": "color",
                        "value": "gray",
                        "operator": "equal"
                      }
                    ]
                  },
                  "serviceId": "svc-xxx"
                }
              ],
              "customDomains": [
                {
                  "domainId": "d-xxx",
                  "name": "www.example.com",
                  "protocol": "HTTP"
                }
              ],
              "name": "test",
              "alias": "test",
              "gatewayInfo": {
                "gatewayId": "gw-xxx",
                "name": "test",
                "gatewayEdition": "MultiTenantServerless"
              },
              "deployStatus": "Deployed",
              "subDomains": [
                {
                  "domainId": "d-xxx",
                  "name": "www.example.com",
                  "protocol": "HTTP",
                  "networkType": "Internet"
                }
              ]
            }
          ],
          "aiProtocols": [
            "OpenAI/v1"
          ],
          "deployConfigs": [
            {
              "environmentId": "env-xxx",
              "backendScene": "SingleService",
              "autoDeploy": true,
              "gatewayId": "gw-xx",
              "routeBackend": {
                "scene": "Single",
                "services": [
                  {
                    "serviceId": "service-cq2bmmdlhtgj***",
                    "name": "item-service",
                    "protocol": "HTTP",
                    "port": 0,
                    "weight": 49,
                    "version": "v1"
                  }
                ]
              },
              "gatewayInfo": {
                "gatewayId": "gw-cq7og15lhtgi6qasrj60",
                "name": "apitest-gw",
                "vpcInfo": {
                  "vpcId": "vpc-uf664nyle5kh***",
                  "name": "商品中心预发环境专有网络"
                },
                "engineVersion": "2.0.7",
                "gatewayEdition": "MultiTenantServerless"
              },
              "mock": {
                "enable": false,
                "responseCode": 200,
                "responseContent": "Mock测试"
              },
              "gatewayType": "API",
              "customDomainIds": [
                "d-xxx"
              ],
              "envDomainIds": [
                "d-xxx"
              ],
              "serviceConfigs": [
                {
                  "serviceId": "svc-xxx",
                  "weight": 100,
                  "modelNamePattern": "qwen-*",
                  "modelName": "qwen-max",
                  "intentCode": "INQUIRY",
                  "match": {
                    "default": true,
                    "conditions": [
                      {
                        "type": "Query",
                        "key": "color",
                        "value": "gray",
                        "operator": "equal"
                      }
                    ]
                  },
                  "port": 80,
                  "protocol": "HTTP",
                  "gatewayServiceId": "gw-svc-abc123",
                  "name": "Qwen-Max-Service",
                  "version": "V2",
                  "multiServiceRouteStrategy": "ByWeight",
                  "observabilityRouteConfig": {
                    "mode": "LeastBusy",
                    "rateLimit": 0.8,
                    "queueSize": 100
                  }
                }
              ],
              "policyConfigs": [
                {}
              ],
              "customDomainInfos": [
                {
                  "domainId": "d-cshee6dlhtgk******",
                  "name": "hello-server.com",
                  "protocol": "HTTP"
                }
              ],
              "envDomainInfos": [
                {
                  "domainId": "d-env-xxx",
                  "name": "api.example.com",
                  "protocol": "HTTPS"
                }
              ],
              "subDomains": [
                {
                  "domainId": "d-csmn42um******",
                  "name": "test",
                  "protocol": "HTTP",
                  "networkType": "Intranet"
                }
              ],
              "builtinRouteNames": [
                "[\"chat\",\"completions\"]"
              ]
            }
          ],
          "deployCntMap": {
            "key": {
              "deployedCnt": 3,
              "cnt": 0
            }
          },
          "agentProtocols": [
            "DashScope"
          ]
        },
        "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",
            "gatewayEdition": "MultiTenantServerless"
          },
          "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",
          "gatewayEdition": "MultiTenantServerless"
        },
        "resourceId": "2351944",
        "resourceType": "HttpApiRoute",
        "expireStatus": "InEffect",
        "expireMode": "ShortTerm",
        "expireTimestamp": 172086834548,
        "createTimestamp": 1719386834548,
        "updateTimestamp": 1721116090326,
        "deployStatus": "{}"
      }
    ]
  }
}

錯誤碼

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

變更歷史

更多資訊,參考變更詳情