You can call the ListAuthPolicy operation to query the list of service authentication rules.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mse:ListAuthPolicy |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Region |
string |
Yes |
Region ID. |
cn-shanghai |
| PageNumber |
string |
Yes |
The page number. |
1 |
| PageSize |
string |
Yes |
The number of entries per page. |
10 |
| Source |
string |
Yes |
The source. |
edasmsc |
| Protocol |
string |
No |
The Protocol Type. Valid values:
|
SPRING_CLOUD |
| Name |
string |
No |
The authentication rule name. |
auto-rule-** |
| AppId |
string |
No |
The application ID. |
jgy4cadmqo@*** |
| Namespace |
string |
No |
The MSE namespace name. |
default |
| AcceptLanguage |
string |
No |
The language in which the response is displayed. Valid values: zh-CN (default): Chinese, en-US: English |
zh |
Response parameters
|
Parameter |
Type |
Description |
Example |
|
object |
|||
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| Message |
string |
The returned message. |
|
| RequestId |
string |
The request ID. |
05A5A150-4A5F-5A8C-97D6-710776CC8408 |
| Data |
object |
The Data Overview. |
|
| Result |
array |
The returned data. |
|
|
object |
The data structure. |
||
| Status |
integer |
The status. |
1 |
| AuthRule |
array |
The list of service authentication rule contents. |
|
|
object |
The service authentication rule content. |
||
| Black |
boolean |
Indicates whether it is a blacklist. |
false |
| Path |
string |
The path. |
/a |
| Method |
object |
The request method. |
|
| Version |
string |
The method version number. |
0.0.1 |
| ParameterTypes |
array |
The list of request parameter types. |
|
|
string |
The request parameter type. |
[\"java.lang.String\",\"java.lang.Object\",\"java.lang.String\"] |
|
| ServiceName |
string |
The service name. |
spring-cloud-a |
| Name |
string |
The method name. |
hello |
| Group |
string |
The group. |
default |
| ReturnType |
string |
The return value type. |
Boolean |
| AppIds |
array |
The application collection. |
|
|
string |
The application ID. |
["dez4qt7weh@***"] |
|
| AuthType |
integer |
The rule type.
|
0 |
| K8sNamespaces |
array |
The namespace list. |
|
|
string |
The namespace. |
acced**** |
|
| NamespaceId |
string |
The namespace ID. |
ced54a95-4e33-4bda-be7e-37e95868*** |
| Protocol |
string |
The Protocol Type. Valid values:
|
SPRING_CLOUD |
| AccountId |
string |
The Alibaba Cloud account ID of the resource owner. |
19039813784*** |
| Source |
string |
The application source. |
edasmsc |
| RegionId |
string |
The region ID. |
cn-hangzhou |
| AppName |
string |
The application name. |
spring-cloud-a |
| AppId |
string |
The application ID. |
hkhon1po62@5f1b08becb***** |
| Name |
string |
The authentication rule name. |
test |
| Id |
integer |
The ID. |
204 |
| Enable |
boolean |
Enable or shutdown.
|
false |
| AuthType |
integer |
The rule type.
|
0 |
| K8sNamespace |
string |
The namespace. |
c19c6c500e1ff4d7abc7bed9b8236*** |
| TotalSize |
integer |
The total number of entries. |
11 |
| PageNumber |
integer |
The page number. |
1 |
| PageSize |
integer |
The page size. |
10 |
| Code |
integer |
The response code. |
200 |
| Success |
boolean |
The request result, with the following values:
|
True |
Examples
Success response
JSON format
{
"HttpStatusCode": 200,
"Message": "",
"RequestId": "05A5A150-4A5F-5A8C-97D6-710776CC8408",
"Data": {
"Result": [
{
"Status": 1,
"AuthRule": [
{
"Black": false,
"Path": "/a",
"Method": {
"Version": "0.0.1",
"ParameterTypes": [
"[\\\"java.lang.String\\\",\\\"java.lang.Object\\\",\\\"java.lang.String\\\"]"
],
"ServiceName": "spring-cloud-a",
"Name": "hello",
"Group": "default",
"ReturnType": "Boolean"
},
"AppIds": [
"[\"dez4qt7weh@***\"]"
],
"AuthType": 0,
"K8sNamespaces": [
"acced****"
]
}
],
"NamespaceId": "ced54a95-4e33-4bda-be7e-37e95868***",
"Protocol": "SPRING_CLOUD",
"AccountId": "19039813784***",
"Source": "edasmsc",
"RegionId": "cn-hangzhou",
"AppName": "spring-cloud-a",
"AppId": "hkhon1po62@5f1b08becb*****",
"Name": "test",
"Id": 204,
"Enable": false,
"AuthType": 0,
"K8sNamespace": "c19c6c500e1ff4d7abc7bed9b8236***"
}
],
"TotalSize": 11,
"PageNumber": 1,
"PageSize": 10
},
"Code": 200,
"Success": true
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalRequest | Invalid request:%s | Invalid request: %s |
| 400 | InvalidParameter | Parameter error:%s | Request parameter error: %s |
| 500 | InternalError | Console error. Try again later:%s | Console error. Try again later: %s |
| 403 | NoPermission | You are not authorized to perform this operation:%s | You do not have the permission to use this interface:%s |
| 404 | NotFound | Not found:%s | The resource does not exist:%s |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.