Modifies a Resource Access Management (RAM) policy for an instance.
Try it now
Test
RAM authorization
Request syntax
POST /v2/openapi/updateinstancepolicy HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| 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 |
Response elements
|
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 |
Examples
Success response
JSON format
{
"requestId": "31D8120C-AC52-5CA9-BE4A-E4C6316E19AD",
"Code": "200",
"Message": "success"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.