> **Experimental**
>
> `@aws-cdk/aws-gamelift-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# RuleSetContent

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.

Extends: RuleSetContent
Implements: IRuleSetContent

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/matchmaking-ruleset-body.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-gamelift-alpha/lib/matchmaking-ruleset-body.ts#L59)

## Example

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

## Initializer

```ts
new RuleSetContent(props: RuleSetContentProps)
```

## Properties

- `content`: [IRuleSetBody](/cdk/api/v2/docs/@aws-cdk_aws-gamelift-alpha.IRuleSetBody.html) — RuleSet body content.

## Methods

- `bind(_scope: Construct): RuleSetBodyConfig` — Called when the matchmaking ruleSet is initialized to allow this object to bind to the stack and add resources.

  **Parameters**

  - `_scope` — The binding scope.

- `fromInline(body: string): IRuleSetContent` (static) — Inline body for Matchmaking ruleSet.

  **Parameters**

  - `body` — The actual ruleSet body (maximum 65535 characters).

  **Returns:** `RuleSetContent` with inline code.

- `fromJsonFile(path: string): IRuleSetContent` (static) — Matchmaking ruleSet body from a file.

  **Parameters**

  - `path` — The path to the ruleSet body file.

  **Returns:** `RuleSetContentBase` based on JSON file content.
