翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
次の IAM ポリシーの例では、 Condition
ブロックで指定されたテンプレートに一致する AWS Proton アクションへのアクセスを拒否します。これらの条件キーは、 のアクション、リソース、および条件キー AWS Protonにリストされているアクションでのみサポートされることに注意してください。DeleteEnvironmentTemplate
など、その他のアクションに対する権限を管理するには、リソースレベルのアクセス制御を使用する必要があります。
特定の AWS Proton テンプレートのテンプレートアクションを拒否するポリシーの例:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": ["proton:*"],
"Resource": "*",
"Condition": {
"StringEqualsIfExists": {
"proton:EnvironmentTemplate": ["arn:aws:proton:region_id:123456789012:environment-template/my-environment-template"]
}
}
},
{
"Effect": "Deny",
"Action": ["proton:*"],
"Resource": "*",
"Condition": {
"StringEqualsIfExists": {
"proton:ServiceTemplate": ["arn:aws:proton:region_id:123456789012:service-template/my-service-template"]
}
}
}
]
}
次のポリシー例では、最初のリソースレベルのステートメントは、 Resource
ブロックにリストされているサービス AWS Proton テンプレートに一致する ListServiceTemplates
以外のテンプレートアクションへのアクセスを拒否します。2 番目のステートメントは、 Condition
ブロックにリストされているテンプレートに一致する AWS Proton アクションへのアクセスを拒否します。
特定のテンプレートに一致する AWS Proton アクションを拒否するポリシーの例:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": [
"proton:*"
],
"Resource": "arn:aws:region_id:123456789012:service-template/my-service-template"
},
{
"Effect": "Deny",
"Action": [
"proton:*"
],
"Resource": "*",
"Condition": {
"StringEqualsIfExists": {
"proton:ServiceTemplate": [
"arn:aws:proton:region_id:123456789012:service-template/my-service-template"
]
}
}
}
]
}
最後のポリシー例では、 Condition
ブロックにリストされている特定のサービステンプレートに一致するデベロッパー AWS Proton アクションを許可します。
特定のテンプレートに一致する AWS Proton デベロッパーアクションを許可するポリシーの例:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"proton:ListServiceTemplates",
"proton:ListServiceTemplateVersions",
"proton:ListServices",
"proton:ListServiceInstances",
"proton:ListEnvironments",
"proton:GetServiceTemplate",
"proton:GetServiceTemplateVersion",
"proton:GetService",
"proton:GetServiceInstance",
"proton:GetEnvironment",
"proton:CreateService",
"proton:UpdateService",
"proton:UpdateServiceInstance",
"proton:UpdateServicePipeline",
"proton:DeleteService",
"codestar-connections:ListConnections"
],
"Resource": "*",
"Condition": {
"StringEqualsIfExists": {
"proton:ServiceTemplate": "arn:aws:proton:region_id:123456789012:service-template/my-service-template"
}
}
},
{
"Effect": "Allow",
"Action": [
"codestar-connections:PassConnection"
],
"Resource": "arn:aws:codestar-connections:*:*:connection/*",
"Condition": {
"StringEquals": {
"codestar-connections:PassedToService": "proton.amazonaws.com"
}
}
}
]
}