Difference between revisions of "Aws iam create-policy"
Jump to navigation
Jump to search
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{lc}} | {{lc}} | ||
+ | https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/create-policy.html | ||
[[aws iam]] create-policy | [[aws iam]] create-policy | ||
+ | |||
+ | == Official example == | ||
+ | aws iam create-policy --policy-name my-policy --policy-document file://policy | ||
+ | |||
+ | Output: | ||
+ | { | ||
+ | "Policy": { | ||
+ | "PolicyName": "my-policy", | ||
+ | "PolicyId": "ANPAYAQ3JJAXITP2KM77X", | ||
+ | "Arn": "arn:aws:iam::123456789:policy/my-policy", | ||
+ | "Path": "/", | ||
+ | "DefaultVersionId": "v1", | ||
+ | "AttachmentCount": 0, | ||
+ | "PermissionsBoundaryUsageCount": 0, | ||
+ | "IsAttachable": true, | ||
+ | "CreateDate": "2022-04-11T12:08:56+00:00", | ||
+ | "UpdateDate": "2022-04-11T12:08:56+00:00" | ||
+ | } | ||
+ | } | ||
+ | |||
+ | == Related == | ||
+ | * <code>[[aws iam attach-role-policy]]</code> | ||
+ | * <code>[[aws_iam_policy]]</code> | ||
== See also == | == See also == | ||
* {{aws iam policies}} | * {{aws iam policies}} | ||
+ | * {{AWS managed policies}} | ||
+ | |||
+ | [[Category:AWS]] |
Latest revision as of 15:31, 24 October 2023
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/create-policy.html
aws iam create-policy
Official example[edit]
aws iam create-policy --policy-name my-policy --policy-document file://policy
Output: { "Policy": { "PolicyName": "my-policy", "PolicyId": "ANPAYAQ3JJAXITP2KM77X", "Arn": "arn:aws:iam::123456789:policy/my-policy", "Path": "/", "DefaultVersionId": "v1", "AttachmentCount": 0, "PermissionsBoundaryUsageCount": 0, "IsAttachable": true, "CreateDate": "2022-04-11T12:08:56+00:00", "UpdateDate": "2022-04-11T12:08:56+00:00" } }
Related[edit]
See also[edit]
aws iam [ list-policies | list-attached-user-policies | list-group-policies | list-role-policies | put-group-policy | put-role-policy | put-user-policy | create-policy | attach-role-policy ]
- AWS managed policies:
ReadOnlyAccess, ViewOnlyAccess, AdministratorAccess, SecurityAudit, ViewBilling, AmazonEKSClusterPolicy
, List of AWS policies
Advertising: