Class MatchmakingRuleSet

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.gamelift.alpha.MatchmakingRuleSetBase
software.amazon.awscdk.services.gamelift.alpha.MatchmakingRuleSet
All Implemented Interfaces:
IResource, IMatchmakingRuleSet, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-17T05:10:19.872Z") @Stability(Experimental) public class MatchmakingRuleSet extends MatchmakingRuleSetBase
(experimental) Creates a new rule set for FlexMatch matchmaking.

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.

Rule sets must be defined in the same Region as the matchmaking configuration they are used with.

Example:

 MatchmakingRuleSet.Builder.create(this, "RuleSet")
         .matchmakingRuleSetName("my-test-ruleset")
         .content(RuleSetContent.fromJsonFile(join(__dirname, "my-ruleset", "ruleset.json")))
         .build();
 

See Also:
  • Constructor Details

    • MatchmakingRuleSet

      protected MatchmakingRuleSet(software.amazon.jsii.JsiiObjectRef objRef)
    • MatchmakingRuleSet

      protected MatchmakingRuleSet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • MatchmakingRuleSet

      @Stability(Experimental) public MatchmakingRuleSet(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull MatchmakingRuleSetProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromMatchmakingRuleSetArn

      @Stability(Experimental) @NotNull public static IMatchmakingRuleSet fromMatchmakingRuleSetArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String matchmakingRuleSetArn)
      (experimental) Import a ruleSet into CDK using its ARN.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      matchmakingRuleSetArn - This parameter is required.
    • fromMatchmakingRuleSetAttributes

      @Stability(Experimental) @NotNull public static IMatchmakingRuleSet fromMatchmakingRuleSetAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull MatchmakingRuleSetAttributes attrs)
      (experimental) Import an existing matchmaking ruleSet from its attributes.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      attrs - This parameter is required.
    • fromMatchmakingRuleSetName

      @Stability(Experimental) @NotNull public static IMatchmakingRuleSet fromMatchmakingRuleSetName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String matchmakingRuleSetName)
      (experimental) Import a ruleSet into CDK using its name.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      matchmakingRuleSetName - This parameter is required.
    • getMatchmakingRuleSetArn

      @Stability(Experimental) @NotNull public String getMatchmakingRuleSetArn()
      (experimental) The ARN of the ruleSet.
      Specified by:
      getMatchmakingRuleSetArn in interface IMatchmakingRuleSet
      Specified by:
      getMatchmakingRuleSetArn in class MatchmakingRuleSetBase
    • getMatchmakingRuleSetName

      @Stability(Experimental) @NotNull public String getMatchmakingRuleSetName()
      (experimental) The unique name of the ruleSet.
      Specified by:
      getMatchmakingRuleSetName in interface IMatchmakingRuleSet
      Specified by:
      getMatchmakingRuleSetName in class MatchmakingRuleSetBase