将SSO管理员访问用户添加到CodeCommit批准规则模板中。
示例代码:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowSSOAdminAccess",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::111111111111:role/AWSReservedSSO_AdministratorAccess_111111111111"
},
"Action": [
"codecommit:GitPull",
"codecommit:MergePullRequestByFastForward"
],
"Resource": "arn:aws:codecommit:us-east-1:123456789012:my-repo",
"Condition": {
"StringEqualsIfExists": {
"codecommit:References": "refs/heads/master"
}
}
}
]
}