Mengubah kebijakan Resource Access Management (RAM) untuk sebuah Instans.
Coba sekarang
Test
RAM authorization
Sintaks permintaan
POST /v2/openapi/updateinstancepolicy HTTP/1.1
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
Badan permintaan. |
|
| InstanceName |
string |
Yes |
The name of the instance. |
my-test-12345 |
| Policy |
string |
Yes |
The instance policy in the JSON format. |
{ "Version": "1", "Statement": [ { "Action": [ "ots:*" ], "Resource": [ "acs:ots:*:13791xxxxxxxxxxx:instance/myinstance*" ], "Principal": [ "*" ], "Effect": "Allow", "Condition": { "StringEquals": { "ots:TLSVersion": [ "1.2" ] }, "IpAddress": { "acs:SourceIp": [ "192.168.0.1", "172.16.0.1" ] } } } ] } |
| PolicyVersion |
integer |
Yes |
The version of the instance policy. |
2 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The returned struct. |
||
| requestId |
string |
The request ID, which can be used to troubleshoot issues. |
31D8120C-AC52-5CA9-BE4A-E4C6316E19AD |
| Code |
string |
The HTTP status code. |
200 |
| Message |
string |
The response message. |
success |
Contoh
Respons sukses
JSONformat
{
"requestId": "31D8120C-AC52-5CA9-BE4A-E4C6316E19AD",
"Code": "200",
"Message": "success"
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.