AWS Data Pipeline:拒絕存取使用者沒有建立的 DataPipeline 管道 - AWS Identity and Access Management

AWS Data Pipeline:拒絕存取使用者沒有建立的 DataPipeline 管道

此範例會示範如何建立身分型政策,拒絕存取使用者未建立的管道。如果 PipelineCreator 欄位的值符合 IAM 使用者名稱,則不會拒絕指定的動作。此政策僅會授予從 AWS API 或 AWS CLI 以程式設計方式完成此動作的必要許可。

重要

此政策不允許任何動作。將此政策與允許特定動作的其他政策結合使用。

{ "Version": "2012-10-17", "Statement": [ { "Sid": "ExplicitDenyIfNotTheOwner", "Effect": "Deny", "Action": [ "datapipeline:ActivatePipeline", "datapipeline:AddTags", "datapipeline:DeactivatePipeline", "datapipeline:DeletePipeline", "datapipeline:DescribeObjects", "datapipeline:EvaluateExpression", "datapipeline:GetPipelineDefinition", "datapipeline:PollForTask", "datapipeline:PutPipelineDefinition", "datapipeline:QueryObjects", "datapipeline:RemoveTags", "datapipeline:ReportTaskProgress", "datapipeline:ReportTaskRunnerHeartbeat", "datapipeline:SetStatus", "datapipeline:SetTaskStatus", "datapipeline:ValidatePipelineDefinition" ], "Resource": ["*"], "Condition": { "StringNotEquals": {"datapipeline:PipelineCreator": "${aws:userid}"} } } ] }