raw draft of policy-manager
This commit is contained in:
34
notes.md
Normal file
34
notes.md
Normal file
@@ -0,0 +1,34 @@
|
||||
## Create Policy
|
||||
|
||||
```
|
||||
curl -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Account: 8715694634136" \
|
||||
-d '{
|
||||
"policyname": "MyReadOnlyPolicy",
|
||||
"policy": {
|
||||
"pid": "p-12345678",
|
||||
"comment": "Allows read-only access to S3 buckets",
|
||||
"effect": "Allow",
|
||||
"actions": [
|
||||
"s3:GetObject",
|
||||
"s3:ListBucket",
|
||||
"s3:GetBucketLocation"
|
||||
],
|
||||
"resources": [
|
||||
"arn:aws:s3:::my-company-data/*",
|
||||
"arn:aws:s3:::my-company-data"
|
||||
]
|
||||
}
|
||||
}' \
|
||||
http://localhost:8080/iam/create-policy
|
||||
```
|
||||
|
||||
## List Policies
|
||||
|
||||
```
|
||||
curl -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Account: 8715694634136" \
|
||||
http://localhost:8080/iam/list-policy
|
||||
```
|
||||
Reference in New Issue
Block a user