我需要限制对特定用户的访问,然后创建策略,但是创建策略时出现此错误:
此策略不授予任何权限。要授予访问权限,策略必须执行的操作具有适用的资源或条件。有关详细信息,请选择“显示剩余的了解更多信息
这是我的JSON:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": [
"codecommit:GitPush",
"codecommit:DeleteBranch",
"codecommit:PutFile",
"codecommit:MergePullRequestByFastForward"
],
"Resource": "arn:aws:codecommit:sa-east-1:ACCOUNTID:REPO_EXAMPLE",
"Condition": {
"StringEqualsIfExists": {
"codecommit:References": [
"refs/heads/desarrollo",
"refs/heads/qa",
"refs/heads/produccion"
]
},
"Null": {
"codecommit:References": false
}
}
}]
}
我正在关注官方documentation
我还要使用root帐户创建策略,请帮忙!