security iam policy modify
Modifies an IAM policy.
You can use the iam policy modify command to modify an
IAM policy.
You can run the iam policy modify command on a primary
cluster only.
To create a policy using data content (instead of file), specify the
-is_file false option with a valid JSON
string when you run the command.
You cannot modify an IAM policy for an identity policy with status as
Enforcing or
Disarming.
Syntax
- CLI
-
NOTE
maprcli security iam policy modify -name <Policy Name> -content (<File Path> | <String Content>) [ -is_file ( true | false ) ]
- REST
-
Request Type POST Request URL http[s]://<host>:<port>/rest/iam/policy/modify?<parameters>
Parameters
| Parameter | Description |
|---|---|
name |
(Required) The name of the IAM policy. |
content |
(Required) Use one of the following
option:
|
-is_file false |
(Optional) You can select either
true or false. Default value : False
|
Example
Modify the IAM policy Policy1 based on the content in the specified JSON file
CLI
maprcli security iam policy modify -name Policy1 -content /tmp/newcontent.json -is_file true -json
{
"timestamp":1726216989302,
"timeofday":"2024-09-13 01:43:09.302 GMT-0700 AM",
"status":"OK",
"total":0,
"data":[
],
"messages":[
"Identity Policy 'Policy1' modified successfully"
]
}RESTcurl -u <username> -X POST 'https://server.sj.us:8443/rest/security/iam/policy/modify?name=Policy1&content=/tmp/newcontent.json&is_file=true'