AAAAAAAAAAA GameLift - 亚马逊 GameLift
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

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

AAAAAAAAAAA GameLift

使用以下示例创建内联Amazon Identity and Access Management (IAM) 策略并为您的 IAM 用户或用户组添加所需的权限。

如果您使用亚马逊 GameLift FleetIQ 作为独立解决方案,请参阅Amazon Web Services 账户为亚马逊 GameLift FleetIQ 设置您的解决方案。

管理员策略示例

这些 IAM 策略示例为用户提供了完整的 Amazon GameLift 管理访问权限。

例 亚马逊 GameLift 资源权限的内联政策

以下策略示例提供对所有亚马逊 GameLift 资源的访问权限。所有管理或查看这些资源的用户都需要这种类型的权限策略。

{ "Version": "2012-10-17", "Statement": { "Effect": "Allow", "Action": "gamelift:*", "Resource": "*" } }
例 亚马逊 GameLift 资源权限的内联政策,支持默认情况下未启用的区域

以下策略示例提供对所有默认情况下未启用的亚马逊 GameLift 资源和Amazon区域的访问权限。有关默认情况下未启用的区域以及如何启用这些区域的更多信息,请参阅Amazon一般参考Amazon Web Services 区域中的管理

{ "Version": "2012-10-17", "Statement": { "Effect": "Allow", "Action": [ "ec2:DescribeRegions", "gamelift:*" ], "Resource": "*" } }
例 亚马逊 GameLift 资源和PassRole权限的内联政策

以下策略示例提供对所有 Amazon GameLift 资源的访问权限,并允许用户将 IAM 服务角色传递给亚马逊 GameLift。此权限允许亚马逊 GameLift 访问其他服务中的资源以代表您访问其他服务中的资源。例如,此权限允许亚马逊在调用时 GameLift访问您在 Amazon S3 中的构建文件CreateBuild。有关该PassRole操作的更多信息,请参阅 IAM 用户指南中的 IAM:将 IAM 角色传递给特定Amazon服务

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "gamelift:*", "Resource": "*" }, { "Effect": "Allow", "Action": "iam:PassRole", "Resource": "*", "Condition": { "StringEquals": { "iam:PassedToService": "gamelift.amazonaws.com" } } } ] }

器 p示例 p示例

这些 IAM 策略示例为游戏客户端和游戏客户端服务提供了让玩家进入游戏会话的功能。这些示例涵盖了游戏可能用来启动新游戏会话和将玩家分配到可用的玩家槽位的关键场景。

例 游戏会话会话置放picicicicic

以下策略示例适用于使用游戏会话队列和位置来启动新游戏会话的游戏客户端服务。您可以在初始放置请求中将玩家添加到游戏会话中,也可以通过为现有游戏会话创建新的玩家会话来添加玩家。

{ "Version": "2012-10-17", "Statement": { "Sid": "PlayerPermissionsForGameSessionPlacements", "Effect": "Allow", "Action": [ "gamelift:StartGameSessionPlacement", "gamelift:DescribeGameSessionPlacement", "gamelift:StopGameSessionPlacement", "gamelift:CreatePlayerSession", "gamelift:CreatePlayerSessions", "gamelift:DescribeGameSessions" ], "Resource": "*" } }
例 配对的在线政策

以下政策示例适用于使用亚马逊 GameLift FlexMatch配对的游戏客户端服务。 FlexMatch 可以匹配玩家并将他们置于新的游戏会话中,或者通过回填过程将他们添加到现有游戏会话中。有关更多信息 FlexMatch,请参阅什么是亚马逊 GameLift FlexMatch?

{ "Version": "2012-10-17", "Statement": { "Sid": "PlayerPermissionsForGameSessionMatchmaking", "Effect": "Allow", "Action": [ "gamelift:StartMatchmaking", "gamelift:DescribeMatchmaking", "gamelift:StopMatchmaking", "gamelift:AcceptMatch", "gamelift:StartMatchBackfill", "gamelift:DescribeGameSessions" ], "Resource": "*" } }
例 手动游戏会话放置的内联政策

以下策略示例允许游戏客户端服务在舰队上创建游戏会话,并在游戏会话中创建玩家会话。此场景支持使用该list-and-pick方法让玩家从可用游戏会话列表中进行选择的游戏。

{ "Version": "2012-10-17", "Statement": { "Sid": "PlayerPermissionsForManualGameSessions", "Effect": "Allow", "Action": [ "gamelift:CreateGameSession", "gamelift:DescribeGameSessions", "gamelift:SearchGameSessions", "gamelift:CreatePlayerSession", "gamelift:CreatePlayerSessions", "gamelift:DescribePlayerSessions" ], "Resource": "*" } }