@aws-cdk_aws-gamelift-alpha.RuleSetContent

class RuleSetContent ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.GameLift.Alpha.RuleSetContent
Gogithub.com/aws/aws-cdk-go/awscdkgameliftalpha/v2#RuleSetContent
Javasoftware.amazon.awscdk.services.gamelift.alpha.RuleSetContent
Pythonaws_cdk.aws_gamelift_alpha.RuleSetContent
TypeScript (source)@aws-cdk/aws-gamelift-alpha ยป RuleSetContent

Implements IRuleSetContent

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.

Example

new gamelift.MatchmakingRuleSet(this, 'RuleSet', {
  matchmakingRuleSetName: 'my-test-ruleset',
  content: gamelift.RuleSetContent.fromJsonFile(path.join(__dirname, 'my-ruleset/ruleset.json')),
});

Initializer

new RuleSetContent(props: RuleSetContentProps)

Parameters

  • props RuleSetContentProps

Properties

NameTypeDescription
content๐Ÿ”นIRuleSetBodyRuleSet body content.

content๐Ÿ”น

Type: IRuleSetBody

RuleSet body content.

Methods

NameDescription
bind(_scope)๐Ÿ”นCalled when the matchmaking ruleSet is initialized to allow this object to bind to the stack and add resources.
static fromInline(body)๐Ÿ”นInline body for Matchmaking ruleSet.
static fromJsonFile(path)๐Ÿ”นMatchmaking ruleSet body from a file.

bind(_scope)๐Ÿ”น

public bind(_scope: Construct): RuleSetBodyConfig

Parameters

  • _scope Construct โ€” The binding scope.

Returns

  • RuleSetBodyConfig

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


static fromInline(body)๐Ÿ”น

public static fromInline(body: string): IRuleSetContent

Parameters

  • body string โ€” The actual ruleSet body (maximum 65535 characters).

Returns

  • IRuleSetContent

Inline body for Matchmaking ruleSet.


static fromJsonFile(path)๐Ÿ”น

public static fromJsonFile(path: string): IRuleSetContent

Parameters

  • path string โ€” The path to the ruleSet body file.

Returns

  • IRuleSetContent

Matchmaking ruleSet body from a file.