Amazon VPC Lattice 的動作、資源和條件索引鍵 - 服務授權參考

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

Amazon VPC Lattice 的動作、資源和條件索引鍵

Amazon VPC Lattice (服務字首:vpc-lattice) 提供的下列服務特定資源、動作和條件內容索引鍵,可用於 IAM 許可政策。

參考資料:

Amazon VPC Lattice 定義的動作

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

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

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

注意

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

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

動作 描述 存取層級 資源類型 (*必填項目) 條件索引鍵 相依動作
CreateAccessLogSubscription 准許建立存取日誌訂閱 寫入

AccessLogSubscription*

logs:CreateLogDelivery

logs:GetLogDelivery

aws:TagKeys

aws:RequestTag/${TagKey}

CreateListener 准許建立接聽程式 寫入

Listener*

vpc-lattice:Protocol

vpc-lattice:TargetGroupArns

aws:TagKeys

aws:RequestTag/${TagKey}

CreateRule 准許建立規則 寫入

Rule*

vpc-lattice:TargetGroupArns

aws:TagKeys

aws:RequestTag/${TagKey}

CreateService 准許建立服務 寫入

Service*

iam:CreateServiceLinkedRole

vpc-lattice:AuthType

aws:TagKeys

aws:RequestTag/${TagKey}

CreateServiceNetwork 准許建立服務網路 寫入

ServiceNetwork*

iam:CreateServiceLinkedRole

vpc-lattice:AuthType

aws:TagKeys

aws:RequestTag/${TagKey}

CreateServiceNetworkServiceAssociation 准許建立服務網路和服務關聯 寫入

Service*

ServiceNetwork*

ServiceNetworkServiceAssociation*

vpc-lattice:ServiceNetworkArn

vpc-lattice:ServiceArn

aws:TagKeys

aws:RequestTag/${TagKey}

CreateServiceNetworkVpcAssociation 准許建立服務網路和 VPC 關聯 寫入

ServiceNetwork*

ec2:DescribeVpcs

ServiceNetworkVpcAssociation*

vpc-lattice:VpcId

vpc-lattice:ServiceNetworkArn

vpc-lattice:SecurityGroupIds

aws:TagKeys

aws:RequestTag/${TagKey}

CreateTargetGroup 准許建立目標群組 寫入

TargetGroup*

iam:CreateServiceLinkedRole

vpc-lattice:VpcId

aws:TagKeys

aws:RequestTag/${TagKey}

DeleteAccessLogSubscription 准許刪除存取日誌訂閱 寫入

AccessLogSubscription*

logs:DeleteLogDelivery

logs:GetLogDelivery

aws:ResourceTag/${TagKey}

DeleteAuthPolicy 准許刪除驗證政策 許可管理

Service

ServiceNetwork

DeleteListener 准許刪除接聽程式 寫入

Listener*

aws:ResourceTag/${TagKey}

DeleteResourcePolicy 准許刪除資源政策 寫入

Service

ServiceNetwork

DeleteRule 准許刪除規則 寫入

Rule*

aws:ResourceTag/${TagKey}

DeleteService 准許刪除服務 寫入

Service*

aws:ResourceTag/${TagKey}

DeleteServiceNetwork 准許刪除服務網路 寫入

ServiceNetwork*

aws:ResourceTag/${TagKey}

DeleteServiceNetworkServiceAssociation 准許刪除服務網路和服務關聯 寫入

ServiceNetworkServiceAssociation*

vpc-lattice:ServiceNetworkArn

vpc-lattice:ServiceArn

aws:ResourceTag/${TagKey}

DeleteServiceNetworkVpcAssociation 准許刪除服務網路和 VPC 關聯 寫入

ServiceNetworkVpcAssociation*

vpc-lattice:VpcId

vpc-lattice:ServiceNetworkArn

aws:ResourceTag/${TagKey}

DeleteTargetGroup 准許刪除目標群組 寫入

TargetGroup*

aws:ResourceTag/${TagKey}

DeregisterTargets 准許從目標群組取消註冊目標 寫入

TargetGroup*

GetAccessLogSubscription 准許取得存取日誌訂閱的相關資訊 讀取

AccessLogSubscription*

logs:GetLogDelivery

aws:ResourceTag/${TagKey}

GetAuthPolicy 准許取得驗證政策的相關資訊 讀取

Service

ServiceNetwork

GetListener 准許取得接聽程式的相關資訊 讀取

Listener*

aws:ResourceTag/${TagKey}

GetResourcePolicy 准許取得資源政策的相關資訊 讀取

Service

ServiceNetwork

GetRule 准許取得規則的相關資訊 讀取

Rule*

aws:ResourceTag/${TagKey}

GetService 准許取得服務的相關資訊 讀取

Service*

aws:ResourceTag/${TagKey}

GetServiceNetwork 准許取得服務網路的相關資訊 讀取

ServiceNetwork*

aws:ResourceTag/${TagKey}

GetServiceNetworkServiceAssociation 准許取得服務網路和服務關聯的相關資訊 讀取

ServiceNetworkServiceAssociation*

vpc-lattice:ServiceNetworkArn

vpc-lattice:ServiceArn

aws:ResourceTag/${TagKey}

GetServiceNetworkVpcAssociation 准許取得服務網路和 VPC 關聯的相關資訊 讀取

ServiceNetworkVpcAssociation*

vpc-lattice:VpcId

vpc-lattice:ServiceNetworkArn

aws:ResourceTag/${TagKey}

GetTargetGroup 准許取得目標群組的相關資訊 讀取

TargetGroup*

aws:ResourceTag/${TagKey}

ListAccessLogSubscriptions 准許列出有關服務網路或服務的部分或所有存取日誌訂閱 清單
ListListeners 准許列出部分或所有接聽程式 清單
ListRules 准許列出部分或所有規則 清單
ListServiceNetworkServiceAssociations 准許列出部分或所有服務網路與服務關聯 清單

vpc-lattice:ServiceNetworkArn

vpc-lattice:ServiceArn

ListServiceNetworkVpcAssociations 准許列出部分或所有服務網路和 VPC 關聯 清單

vpc-lattice:VpcId

vpc-lattice:ServiceNetworkArn

ListServiceNetworks 准許列出呼叫者帳戶所擁有或與呼叫者帳戶共用的服務網路 清單
ListServices 准許列出呼叫者帳戶所擁有或與呼叫者帳戶共用的服務 清單
ListTagsForResource 准許列出 vpc-lattice 資源的標籤 讀取
ListTargetGroups 准許列出部分或所有目標群組 清單
ListTargets 准許列出目標群組中部分或所有目標 清單

TargetGroup*

PutAuthPolicy 准許建立或更新服務網路或服務的驗證政策 許可管理

Service

ServiceNetwork

PutResourcePolicy 准許建立服務網路或服務的資源政策 寫入

Service

ServiceNetwork

RegisterTargets 准許將目標註冊至目標群組 寫入

TargetGroup*

TagResource 准許標記 vpc-lattice 資源 標記

AccessLogSubscription

Listener

Rule

Service

ServiceNetwork

ServiceNetworkServiceAssociation

ServiceNetworkVpcAssociation

TargetGroup

aws:TagKeys

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

UntagResource 准許取消標記 vpc-lattice 資源 標記

AccessLogSubscription

Listener

Rule

Service

ServiceNetwork

ServiceNetworkServiceAssociation

ServiceNetworkVpcAssociation

TargetGroup

aws:TagKeys

UpdateAccessLogSubscription 准許更新存取日誌訂閱 寫入

AccessLogSubscription*

logs:GetLogDelivery

logs:UpdateLogDelivery

aws:ResourceTag/${TagKey}

UpdateListener 准許更新接聽程式 寫入

Listener*

vpc-lattice:TargetGroupArns

aws:ResourceTag/${TagKey}

UpdateRule 准許更新規則 寫入

Rule*

vpc-lattice:TargetGroupArns

aws:ResourceTag/${TagKey}

UpdateService 准許更新服務 寫入

Service*

vpc-lattice:AuthType

aws:ResourceTag/${TagKey}

UpdateServiceNetwork 准許更新服務網路 寫入

ServiceNetwork*

vpc-lattice:AuthType

aws:ResourceTag/${TagKey}

UpdateServiceNetworkVpcAssociation 准許更新服務網路和 VPC 關聯 寫入

ServiceNetworkVpcAssociation*

ec2:DescribeSecurityGroups

ec2:DescribeVpcs

vpc-lattice:VpcId

vpc-lattice:ServiceNetworkArn

vpc-lattice:SecurityGroupIds

aws:ResourceTag/${TagKey}

UpdateTargetGroup 准許更新目標群組 寫入

TargetGroup*

aws:ResourceTag/${TagKey}

Amazon VPC Lattice 定義的資源類型

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

資源類型 ARN 條件索引鍵
ServiceNetwork arn:${Partition}:vpc-lattice:${Region}:${Account}:servicenetwork/${ServiceNetworkId}

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

vpc-lattice:AuthType

Service arn:${Partition}:vpc-lattice:${Region}:${Account}:service/${ServiceId}

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

vpc-lattice:AuthType

ServiceNetworkVpcAssociation arn:${Partition}:vpc-lattice:${Region}:${Account}:servicenetworkvpcassociation/${ServiceNetworkVpcAssociationId}

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

vpc-lattice:SecurityGroupIds

vpc-lattice:ServiceNetworkArn

vpc-lattice:VpcId

ServiceNetworkServiceAssociation arn:${Partition}:vpc-lattice:${Region}:${Account}:servicenetworkserviceassociation/${ServiceNetworkServiceAssociationId}

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

vpc-lattice:ServiceArn

vpc-lattice:ServiceNetworkArn

TargetGroup arn:${Partition}:vpc-lattice:${Region}:${Account}:targetgroup/${TargetGroupId}

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

vpc-lattice:VpcId

Listener arn:${Partition}:vpc-lattice:${Region}:${Account}:service/${ServiceId}/listener/${ListenerId}

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

vpc-lattice:Protocol

vpc-lattice:TargetGroupArns

Rule arn:${Partition}:vpc-lattice:${Region}:${Account}:service/${ServiceId}/listener/${ListenerId}/rule/${RuleId}

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

vpc-lattice:TargetGroupArns

AccessLogSubscription arn:${Partition}:vpc-lattice:${Region}:${Account}:accesslogsubscription/${AccessLogSubscriptionId}

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

Amazon VPC Lattice 的條件索引鍵

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

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

條件索引鍵 描述 Type
aws:RequestTag/${TagKey} 依請求中的標籤鍵值對是否存在篩選存取權 字串
aws:ResourceTag/${TagKey} 依連接到資源的標籤鍵值對篩選存取權 字串
aws:TagKeys 依請求中是否存在標籤索引鍵來篩選存取 ArrayOfString
vpc-lattice:AuthType 依請求中指定的驗證類型來篩選存取權 字串
vpc-lattice:Protocol 依請求中指定的通訊協定來篩選存取權 字串
vpc-lattice:SecurityGroupIds 依安全群組的 ID 來篩選存取權 ArrayOfString
vpc-lattice:ServiceArn 依服務的 ARN 來篩選存取權 ARN
vpc-lattice:ServiceNetworkArn 依服務網路的 ARN 來篩選存取權 ARN
vpc-lattice:TargetGroupArns 依目標群組的 ARN 來篩選存取權 ArrayOfARN
vpc-lattice:VpcId 依 Virtual Private Cloud (VPC) 的 ID 篩選存取權 字串