Membuat aturan otentikasi layanan.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mse:AddAuthPolicy |
update |
*All Resource
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
Yes |
Nama aturan. |
test |
| Source |
string |
Yes |
Sumber. Atur nilai ke edasmsc. |
edasmsc |
| Region |
string |
Yes |
Wilayah. |
cn-hangzhou |
| Enable |
string |
Yes |
Apakah akan mengaktifkan aturan otentikasi. Nilai valid:
|
true |
| AppId |
string |
No |
ID aplikasi. |
e9clba2xlc@*** |
| Protocol |
string |
Yes |
Jenis Protokol. Nilai valid:
|
SPRING_CLOUD |
| AuthRule |
string |
Yes |
Konten aturan otentikasi layanan. |
[{"all":true,"black":false,"appIds":["dez4qt7weh@***"]}] |
| Namespace |
string |
No |
Namespace MSE tempat aplikasi berada. |
default |
| AuthType |
integer |
No |
Tipe aturan. Nilai valid:
|
0 |
| K8sNamespace |
string |
No |
ID namespace di Kluster Kubernetes. |
c19c6c500e1ff4d7abc7*** |
| AcceptLanguage |
string |
No |
Bahasa tanggapan. Nilai valid: zh-CN (default): Bahasa Tionghoa. en-US: Bahasa Inggris. |
zh |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| RequestId |
string |
The request ID. |
dc63-465d-8ef5-20dc18af**** |
| Message |
string |
The response message. |
OK |
| Data |
string |
The data overview. |
请求处理成功。 |
| Code |
integer |
The response code. Its value is synchronized with the `Success` parameter. |
200 |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
Contoh
Respons sukses
JSONformat
{
"HttpStatusCode": 200,
"RequestId": "dc63-465d-8ef5-20dc18af****",
"Message": "OK",
"Data": "请求处理成功。",
"Code": 200,
"Success": true
}
Kode kesalahan
|
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 |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.