通過ListAuthPolicy介面查詢服務鑒權規則列表。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
mse:ListAuthPolicy |
get |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| Region |
string |
是 |
地區 ID。 |
cn-shanghai |
| PageNumber |
string |
是 |
當前頁碼。 |
1 |
| PageSize |
string |
是 |
每頁顯示條數。 |
10 |
| Source |
string |
是 |
來源。 |
edasmsc |
| Protocol |
string |
否 |
協議類型。取值:
|
SPRING_CLOUD |
| Name |
string |
否 |
鑒權規則名稱。 |
auto-rule-** |
| AppId |
string |
否 |
應用 ID。 |
jgy4cadmqo@*** |
| Namespace |
string |
否 |
MSE 命名空間名。 |
default |
| AcceptLanguage |
string |
否 |
返回結果顯示的語言。取值:zh-CN(預設值):中文,en-US:英文 |
zh |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| HttpStatusCode |
integer |
HTTP 狀態代碼。 |
200 |
| Message |
string |
返回資訊。 |
請求處理成功 |
| RequestId |
string |
請求 ID。 |
05A5A150-4A5F-5A8C-97D6-710776CC8408 |
| Data |
object |
資料概覽。 |
|
| Result |
array |
返回資料。 |
|
|
object |
資料結構。 |
||
| Status |
integer |
狀態。 |
1 |
| AuthRule |
array |
服務鑒權規則內容列表。 |
|
|
object |
服務鑒權規則內容。 |
||
| Black |
boolean |
是否黑名單。 |
false |
| Path |
string |
路徑。 |
/a |
| Method |
object |
要求方法。 |
|
| Version |
string |
方法版本號碼。 |
0.0.1 |
| ParameterTypes |
array |
請求參數類型列表。 |
|
|
string |
請求參數類型。 |
[\"java.lang.String\",\"java.lang.Object\",\"java.lang.String\"] |
|
| ServiceName |
string |
服務名稱。 |
spring-cloud-a |
| Name |
string |
方法名。 |
hello |
| Group |
string |
分組。 |
default |
| ReturnType |
string |
傳回值類型。 |
Boolean |
| AppIds |
array |
應用集合。 |
|
|
string |
應用 ID。 |
["dez4qt7weh@***"] |
|
| AuthType |
integer |
規則類型。
|
0 |
| K8sNamespaces |
array |
命名空間列表。 |
|
|
string |
命名空間。 |
acced**** |
|
| NamespaceId |
string |
命名空間 ID。 |
ced54a95-4e33-4bda-be7e-37e95868*** |
| Protocol |
string |
協議類型。取值:
|
SPRING_CLOUD |
| AccountId |
string |
資源擁有者的阿里雲帳號 ID。 |
19039813784*** |
| Source |
string |
應用來源。 |
edasmsc |
| RegionId |
string |
地區 ID。 |
cn-hangzhou |
| AppName |
string |
應用程式名稱。 |
spring-cloud-a |
| AppId |
string |
應用 ID。 |
hkhon1po62@5f1b08becb***** |
| Name |
string |
鑒權規則名稱。 |
test |
| Id |
integer |
ID。 |
204 |
| Enable |
boolean |
開啟或關閉。
|
false |
| AuthType |
integer |
規則類型。
|
0 |
| K8sNamespace |
string |
命名空間。 |
c19c6c500e1ff4d7abc7bed9b8236*** |
| TotalSize |
integer |
總條數。 |
11 |
| PageNumber |
integer |
頁碼。 |
1 |
| PageSize |
integer |
頁大小。 |
10 |
| Code |
integer |
響應碼。 |
200 |
| Success |
boolean |
請求結果,取值如下:
|
True |
樣本
正常返回樣本
JSON格式
{
"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
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | IllegalRequest | Invalid request:%s | 非法請求: %s |
| 400 | InvalidParameter | Parameter error:%s | 請求參數錯誤:%s |
| 500 | InternalError | Console error. Try again later:%s | 控制台錯誤.稍後重試:%s |
| 403 | NoPermission | You are not authorized to perform this operation:%s | 沒有許可權使用此介面:%s |
| 404 | NotFound | Not found:%s | 資源不存在:%s |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。