Amazon Managed Streaming for Apache Kafka 的動作、資源和條件索引鍵 - 服務授權參考

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

Amazon Managed Streaming for Apache Kafka 的動作、資源和條件索引鍵

Amazon Managed Streaming for Apache Kafka (服務字首:kafka) 提供下列服務特定的資源、動作和條件內容金鑰,以供 IAM 許可政策使用。

參考資料:

Amazon Managed Streaming for Apache Kafka 定義的動作

您可在 IAM 政策陳述式的 Action 元素中指定以下動作。使用政策來授予在 AWS 中執行操作的許可。在政策中使用動作時,通常會允許或拒絕存取相同名稱的 API 操作或 CLI 命令。不過,在某些情況下,單一動作可控制對多個操作的存取。或者,某些操作需要多種不同的動作。

「動作」資料表的資源類型欄會指出每個動作是否支援資源層級的許可。如果此欄沒有值,您必須在政策陳述式的 Resource 元素中指定政策適用的所有資源 ("*")。如果此欄包含資源類型,則您可以在包含該動作的陳述式中指定該類型的 ARN。如果動作具有一或多個必要資源,發起人必須具有將動作與這些資源搭配使用的許可。表格中的必要資源會以星號 (*) 表示。如果您使用 IAM 政策中的 Resource 元素限制資源存取,則每種必要的資源類型必須要有 ARN 或模式。某些動作支援多種資源類型。如果資源類型是選用 (未顯示為必要),則您可以選擇使用其中一種選用資源類型。

「動作」資料表的條件索引鍵欄包含您可以在政策陳述式的 Condition 元素中指定的索引鍵。如需有關與服務資源相關聯之條件索引鍵的詳細資訊,請參閱「資源類型」資料表的條件索引鍵欄。

注意

資源條件索引鍵會列在資源類型資料表中。您可以在「動作」資料表的資源類型 (*必填) 欄中找到適用於動作的資源類型連結。「資源類型」資料表中的資源類型包括條件索引鍵欄,其中包含套用至「動作」資料表中動作的資源條件索引鍵。

如需下表各欄的詳細資訊,請參閱動作表

動作 描述 存取層級 資源類型 (*必填項目) 條件索引鍵 相依動作
BatchAssociateScramSecret 准許將一個或多個 Scram 機密與 Amazon MSK 叢集關聯 寫入

cluster*

kms:CreateGrant

kms:RetireGrant

BatchDisassociateScramSecret 准許取消 Amazon MSK 叢集與一個或多個 Scram 機密的關聯 寫入

cluster*

kms:RetireGrant

CreateCluster 准許建立 MSK 叢集 寫入

cluster*

ec2:DescribeSecurityGroups

ec2:DescribeSubnets

ec2:DescribeVpcs

iam:AttachRolePolicy

iam:CreateServiceLinkedRole

iam:PutRolePolicy

kms:CreateGrant

kms:DescribeKey

aws:RequestTag/${TagKey}

aws:TagKeys

CreateClusterV2 准許建立 MSK 叢集 寫入

cluster*

ec2:CreateTags

ec2:CreateVpcEndpoint

ec2:DeleteVpcEndpoints

ec2:DescribeSecurityGroups

ec2:DescribeSubnets

ec2:DescribeVpcAttribute

ec2:DescribeVpcEndpoints

ec2:DescribeVpcs

iam:AttachRolePolicy

iam:CreateServiceLinkedRole

iam:PutRolePolicy

kms:CreateGrant

kms:DescribeKey

aws:RequestTag/${TagKey}

aws:TagKeys

CreateConfiguration 准許建立 MSK 組態 寫入

configuration*

CreateReplicator 准許建立 MSK 複寫器 寫入

replicator*

ec2:DescribeSecurityGroups

ec2:DescribeSubnets

ec2:DescribeVpcs

iam:AttachRolePolicy

iam:CreateServiceLinkedRole

iam:PassRole

iam:PutRolePolicy

kafka:DescribeClusterV2

kafka:GetBootstrapBrokers

aws:RequestTag/${TagKey}

aws:TagKeys

CreateVpcConnection 准許建立 MSK VPC 連線 寫入

cluster*

ec2:CreateTags

ec2:CreateVpcEndpoint

ec2:DescribeSecurityGroups

ec2:DescribeSubnets

ec2:DescribeVpcAttribute

ec2:DescribeVpcEndpoints

ec2:DescribeVpcs

iam:AttachRolePolicy

iam:CreateServiceLinkedRole

iam:PutRolePolicy

vpc-connection*

aws:RequestTag/${TagKey}

aws:TagKeys

DeleteCluster 准許刪除 MSK 叢集 寫入

cluster*

ec2:DeleteVpcEndpoints

ec2:DescribeVpcAttribute

ec2:DescribeVpcEndpoints

DeleteClusterPolicy 准許刪除叢集資源型政策 寫入

cluster*

DeleteConfiguration 准許刪除指定 MSK 組態 寫入

configuration*

DeleteReplicator 准許刪除 MSK 複寫器 寫入

replicator*

DeleteVpcConnection 准許刪除 MSK VPC 連線 寫入

vpc-connection*

ec2:DeleteVpcEndpoints

ec2:DescribeVpcEndpoints

DescribeCluster 准許描述 MSK 叢集 讀取

cluster*

DescribeClusterOperation 准許描述由給定 ARN 指定的叢集操作 讀取
DescribeClusterOperationV2 准許描述由給定 ARN 指定的叢集操作 讀取
DescribeClusterV2 准許描述 MSK 叢集 讀取

cluster*

DescribeConfiguration 准許描述 MSK 組態 讀取

configuration*

DescribeConfigurationRevision 准許描述 MSK 組態修訂版 讀取

configuration*

DescribeReplicator 准許描述 MSK 複寫器 讀取

replicator*

DescribeVpcConnection 准許描述 MSK VPC 連線 讀取

vpc-connection*

GetBootstrapBrokers 准許取得 MSK 叢集之中介裝置的連線詳細資訊。 讀取
GetClusterPolicy 准許描述叢集資源型政策 讀取

cluster*

GetCompatibleKafkaVersions 准許取得 MSK 叢集可以更新到的 Apache Kafka 版本清單 列出
ListClientVpcConnections 准許列出為叢集建立的所有 MSK VPC 連線 列出

cluster*

ListClusterOperations 准許傳回已在指定 MSK 叢集執行的所有操作 列出

cluster*

ListClusterOperationsV2 准許傳回已在指定 MSK 叢集執行的所有操作 列出

cluster*

ListClusters 准許列出此帳戶中的所有 MSK 叢集 列出
ListClustersV2 准許列出此帳戶中的所有 MSK 叢集 列出
ListConfigurationRevisions 准許列出此帳戶中 MSK 組態的所有修訂版本 列出

configuration*

ListConfigurations 准許列出此帳戶中的所有 MSK 組態 列出
ListKafkaVersions 准許列出 Amazon MSK 支援的所有 Apache Kafka 版本 列出
ListNodes 准許列出 MSK 叢集中的中介裝置 列出

cluster*

ListReplicators 准許列出此帳戶中的所有 MSK 複寫器 列出
ListScramSecrets 准許列出與 Amazon MSK 叢集相關聯的 Scram 機密清單 列出

cluster*

ListTagsForResource 准許列出 MSK 的資源標籤 讀取

cluster*

ListVpcConnections 准許列出此帳戶使用的所有 MSK VPC 連線 列出
PutClusterPolicy 准許為叢集建立或更新資源型政策 寫入

cluster*

RebootBroker 准許重新啟動中介裝置 寫入

cluster*

RejectClientVpcConnection 准許拒絕 MSK VPC 連線 寫入

cluster*

vpc-connection*

TagResource 准許標記 MSK 資源。 標記

cluster

vpc-connection

aws:RequestTag/${TagKey}

aws:TagKeys

UntagResource 准許從 MSK 資源移除標籤 標記

cluster

vpc-connection

aws:TagKeys

UpdateBrokerCount 准許更新 MSK 叢集的中介裝置數目 寫入

cluster*

UpdateBrokerStorage 准許更新 MSK 叢集的中介裝置儲存大小 寫入

cluster*

UpdateBrokerType 准許更新 Amazon MSK 叢集的中介裝置類型 寫入

cluster*

UpdateClusterConfiguration 准許更新 MSK 叢集組態 寫入

cluster*

configuration*

UpdateClusterKafkaVersion 准許更新 MSK 叢集到指定的 Apache Kafka 版本 寫入

cluster*

UpdateConfiguration 准許建立 MSK 組態的新修訂版本 寫入

configuration*

UpdateConnectivity 准許更新 MSK 叢集的連線設定 寫入

cluster*

ec2:DescribeRouteTables

ec2:DescribeSubnets

kafka:publicAccessEnabled

UpdateMonitoring 准許更新 MSK 叢集的監控設定 寫入

cluster*

UpdateReplicationInfo 准許更新 MSK 複寫器的複寫資訊 寫入

replicator*

UpdateSecurity 准許更新 MSK 叢集的安全設定 寫入

cluster*

kms:RetireGrant

UpdateStorage 准許更新與 MSK 代理程式關聯的 EBS 儲存體 (大小或佈建輸送量),或將叢集儲存模式設定為分級 寫入

cluster*

Amazon Managed Streaming for Apache Kafka 定義的資源類型

此服務會定義下列資源類型,並可用在 IAM 許可政策陳述式的 Resource 元素中。動作表格中的每個動作都代表可使用該動作指定的資源類型。資源類型也能定義您可以在政策中包含哪些條件索引鍵。這些索引鍵都會顯示在「資源類型」資料表的最後一欄。如需下表各欄的詳細資訊,請參閱資源類型表

資源類型 ARN 條件索引鍵
cluster arn:${Partition}:kafka:${Region}:${Account}:cluster/${ClusterName}/${Uuid}

aws:ResourceTag/${TagKey}

configuration arn:${Partition}:kafka:${Region}:${Account}:configuration/${ConfigurationName}/${Uuid}
vpc-connection arn:${Partition}:kafka:${Region}:${VpcOwnerAccount}:vpc-connection/${ClusterOwnerAccount}/${ClusterName}/${Uuid}

aws:ResourceTag/${TagKey}

replicator arn:${Partition}:kafka:${Region}:${Account}:replicator/${ReplicatorName}/${Uuid}

aws:ResourceTag/${TagKey}

topic arn:${Partition}:kafka:${Region}:${Account}:topic/${ClusterName}/${ClusterUuid}/${TopicName}
group arn:${Partition}:kafka:${Region}:${Account}:group/${ClusterName}/${ClusterUuid}/${GroupName}
transactional-id arn:${Partition}:kafka:${Region}:${Account}:transactional-id/${ClusterName}/${ClusterUuid}/${TransactionalId}

Amazon Managed Streaming for Apache Kafka 的條件索引鍵

Amazon Managed Streaming for Apache Kafka 會定義下列條件金鑰,可用於 IAM 政策的 Condition 元素。您可以使用這些索引鍵來縮小套用政策陳述式的條件。如需下表各欄的詳細資訊,請參閱條件索引鍵表

若要檢視所有服務都可使用的全域條件索引鍵,請參閱可用的全域條件索引鍵

條件索引鍵 描述 類型
aws:RequestTag/${TagKey} 依請求中的標籤鍵值對是否存在篩選存取權 字串
aws:ResourceTag/${TagKey} 依連接到資源的標籤鍵值對篩選存取權 字串
aws:TagKeys 依請求中的標籤索引鍵是否存在來篩選存取 ArrayOfString
kafka:publicAccessEnabled 依請求中是否存在啟用的公開存取權來篩選存取權 Bool