Amazon VPC Lattice 的操作、资源和条件键 - 服务授权参考

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

Amazon VPC Lattice 的操作、资源和条件键

Amazon VPC Lattice(服务前缀:vpc-lattice)提供以下服务特定的资源、操作和条件上下文键以在 IAM 权限策略中使用。

参考:

Amazon VPC Lattice 定义的操作

您可以在 IAM 策略语句的 Action 元素中指定以下操作。可以使用策略授予在 AWS中执行操作的权限。您在策略中使用一项操作时,通常使用相同的名称允许或拒绝对 API 操作或 CLI 命令的访问。但在某些情况下,单一动作可控制对多项操作的访问。还有某些操作需要多种不同的动作。

操作表的资源类型列指示每项操作是否支持资源级权限。如果该列没有任何值,您必须在策略语句的 Resource 元素中指定策略应用的所有资源(“*”)。通过在 IAM policy 中使用条件来筛选访问权限,以控制是否可以在资源或请求中使用特定标签键。如果操作具有一个或多个必需资源,则调用方必须具有使用这些资源来使用该操作的权限。必需资源在表中以星号 (*) 表示。如果您在 IAM policy 中使用 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 policy 的 Condition 元素中使用的条件键。您可以使用这些键进一步细化应用策略语句的条件。有关下表中各列的详细信息,请参阅条件键表

要查看适用于所有服务的全局条件键,请参阅可用的全局条件键

条件键 描述 类型
aws:RequestTag/${TagKey} 根据在请求中是否具有标签键值对来筛选访问权限 String
aws:ResourceTag/${TagKey} 按附加到资源的标签键值对筛选操作 String
aws:TagKeys 根据在请求中是否具有标签键来筛选访问 ArrayOfString
vpc-lattice:AuthType 按请求中指定的身份验证类型筛选访问权限 String
vpc-lattice:Protocol 按请求中指定的协议筛选访问权限 String
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 筛选访问权限 String