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" } } } ] }