RuleSetContent

class aws_cdk.aws_gamelift_alpha.RuleSetContent(*, content=None)

Bases: object

(experimental) The rule set determines the two key elements of a match: your game’s team structure and size, and how to group players together for the best possible match.

For example, a rule set might describe a match like this:

  • Create a match with two teams of five players each, one team is the defenders and the other team the invaders.

  • A team can have novice and experienced players, but the average skill of the two teams must be within 10 points of each other.

  • If no match is made after 30 seconds, gradually relax the skill requirements.

Stability:

experimental

ExampleMetadata:

infused

Example:

gamelift.MatchmakingRuleSet(self, "RuleSet",
    matchmaking_rule_set_name="my-test-ruleset",
    content=gamelift.RuleSetContent.from_json_file(path.join(__dirname, "my-ruleset", "ruleset.json"))
)
Parameters:

content (Optional[IRuleSetBody]) – (experimental) RuleSet body content. Default: use a default empty RuleSet body

Stability:

experimental

Methods

bind(_scope)

(experimental) Called when the matchmaking ruleSet is initialized to allow this object to bind to the stack and add resources.

Parameters:

_scope (Construct) – The binding scope.

Stability:

experimental

Return type:

RuleSetBodyConfig

Attributes

content

(experimental) RuleSet body content.

Stability:

experimental

Static Methods

classmethod from_inline(body)

(experimental) Inline body for Matchmaking ruleSet.

Parameters:

body (str) – The actual ruleSet body (maximum 65535 characters).

Return type:

IRuleSetContent

Returns:

RuleSetContent with inline code.

Stability:

experimental

classmethod from_json_file(path)

(experimental) Matchmaking ruleSet body from a file.

Parameters:

path (str) – The path to the ruleSet body file.

Return type:

IRuleSetContent

Returns:

RuleSetContentBase based on JSON file content.

Stability:

experimental