Retrieves the list of consumer authorization rules.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
apig:ListConsumerAuthorizationRules |
none |
*Domain
|
None | None |
Request syntax
GET /v1/consumers/{consumerId}/authorization-rules HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| consumerId |
string |
No |
The consumer ID. |
cs-csgdi45lhtggrjcpriug |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| apiNameLike |
string |
No |
The fuzzy match parameter for the API name. |
qwen3 |
| pageNumber |
integer |
No |
The page number. |
1 |
| pageSize |
integer |
No |
The page size. Default value: 10. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| requestId |
string |
Id of the request |
294382D9-EE60-5735-A4CD-F2AC2840423D |
| code |
string |
The response status code. |
Ok |
| message |
string |
The response message. |
success |
| data |
object |
The response data. |
|
| totalSize |
string |
The total number of entries. |
9 |
| pageNumber |
integer |
The page number. |
1 |
| pageSize |
integer |
The page size. |
10 |
| items |
array<object> |
The list of consumer authorization information. |
|
|
object |
The consumer authorization information. |
||
| consumerAuthorizationRuleId |
string |
The consumer authorization rule ID. |
car-csgeka5lhtggrjcprok0 |
| consumerId |
string |
The consumer ID. |
cs-csheiftlhtgmp0j0hp4g |
| apiInfo | HttpApiApiInfo |
The API information. |
|
| environmentInfo | EnvironmentInfo |
The environment context. |
|
| gatewayInfo | GatewayInfo |
The gateway information. |
|
| resourceId |
string |
The resource ID. |
2351944 |
| resourceType |
string |
The resource type. |
HttpApiRoute |
| expireStatus |
string |
The expiration status. |
InEffect |
| expireMode |
string |
The expiration mode. Valid values:
|
ShortTerm |
| expireTimestamp |
integer |
The expiration time. |
172086834548 |
| createTimestamp |
integer |
The creation timestamp. |
1719386834548 |
| updateTimestamp |
integer |
The update timestamp. Unit: milliseconds. |
1721116090326 |
| deployStatus |
string |
The publish status of the API in the current environment. |
{} |
Examples
Success response
JSON format
{
"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": "{}"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.