Modifies a Resource Access Management (RAM) policy for an instance.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
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 | long | Yes | The version of the instance policy. | 2 |
Response parameters
Examples
Sample success responses
JSON
format
{
"requestId": "31D8120C-AC52-5CA9-BE4A-E4C6316E19AD",
"Code": "200",
"Message": "success"
}
Error codes
For a list of error codes, visit the Service error codes.