选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

AWS::GameLift::MatchmakingRuleSet

聚焦模式
AWS::GameLift::MatchmakingRuleSet - AWS CloudFormation
此页面尚未翻译为您的语言。 请求翻译
筛选器视图

Creates a new rule set for FlexMatch matchmaking. A rule set describes the type of match to create, such as the number and size of teams. It also sets the parameters for acceptable player matches, such as minimum skill level or character type.

To create a matchmaking rule set, provide unique rule set name and the rule set body in JSON format. Rule sets must be defined in the same Region as the matchmaking configuration they are used with.

Since matchmaking rule sets cannot be edited, it is a good idea to check the rule set syntax.

Learn more

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::GameLift::MatchmakingRuleSet", "Properties" : { "Name" : String, "RuleSetBody" : String, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::GameLift::MatchmakingRuleSet Properties: Name: String RuleSetBody: String Tags: - Tag

Properties

Name

A unique identifier for the matchmaking rule set. A matchmaking configuration identifies the rule set it uses by this name value. Note that the rule set name is different from the optional name field in the rule set body.

Required: Yes

Type: String

Pattern: [a-zA-Z0-9-\.]*

Maximum: 128

Update requires: Replacement

RuleSetBody

A collection of matchmaking rules, formatted as a JSON string. Comments are not allowed in JSON, but most elements support a description field.

Required: Yes

Type: String

Minimum: 1

Maximum: 65535

Update requires: Replacement

Tags

A list of labels to assign to the new matchmaking rule set resource. Tags are developer-defined key-value pairs. Tagging AWS resources are useful for resource management, access management and cost allocation. For more information, see Tagging AWS Resources in the AWS General Reference. Once the resource is created, you can use TagResource, UntagResource, and ListTagsForResource to add, remove, and view tags. The maximum tag limit may be lower than stated. See the AWS General Reference for actual tagging limits.

Required: No

Type: Array of Tag

Minimum: 1

Maximum: 200

Update requires: No interruption

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the rule set name, which is unique within each Region.

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

Arn

The unique Amazon Resource Name (ARN) assigned to the rule set.

CreationTime

A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

Name

The unique name of the rule set.

Examples

Create a Matchmaking Rule Set

The following example creates a matchmaking rule set for GameLift FlexMatch named MyRuleSet. The simple rule set defines a match with one team containing 1 to 20 players. In the YAML example, since RuleSetBody must be in JSON format, the !Sub command is used to specify JSON content within the YAML format.

JSON

{ "Resources": { "MatchmakingRuleSet": { "Type": "AWS::GameLift::MatchmakingRuleSet", "Properties": { "Name": "MyRuleSet", "RuleSetBody": { "Fn::Sub": "{\"name\": \"MyMatchmakingRuleSet\",\"ruleLanguageVersion\": \"1.0\", \"teams\": [{\"name\": \"MyTeam\",\"minPlayers\": 1,\"maxPlayers\": 20}]}" } } } } }

YAML

Resources: MatchmakingRuleSet: Type: "AWS::GameLift::MatchmakingRuleSet" Properties: Name: "MyRuleSet" RuleSetBody: !Sub | { "name": "MyMatchmakingRuleSet", "ruleLanguageVersion": "1.0", "teams": [{ "name": "MyTeam", "minPlayers": 1, "maxPlayers": 20 }] }

See also

下一主题:

Tag

上一主题:

Tag

本页内容

隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。