에 대한 조건 키 기반 정책 예제AWS Proton - AWS Proton

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

에 대한 조건 키 기반 정책 예제AWS Proton

다음 예제 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-level 문은Resource 블록에 나열된 서비스AWS Proton 템플릿과 일치하는 것을 제외한ListServiceTemplates 템플릿 작업에 대한 액세스를 거부합니다. 두 번째 명령문은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" } } } ] }