GameLift / Client / create_matchmaking_rule_set

create_matchmaking_rule_set#

GameLift.Client.create_matchmaking_rule_set(**kwargs)#

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 using ValidateMatchmakingRuleSet before creating a new rule set.

Learn more

See also: AWS API Documentation

Request Syntax

response = client.create_matchmaking_rule_set(
    Name='string',
    RuleSetBody='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters:
  • Name (string) –

    [REQUIRED]

    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.

  • RuleSetBody (string) –

    [REQUIRED]

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

  • Tags (list) –

    A list of labels to assign to the new matchmaking rule set resource. Tags are developer-defined key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost allocation. For more information, see Tagging Amazon Web Services Resources in the Amazon Web Services General Reference.

    • (dict) –

      A label that you can assign to a Amazon GameLift resource.

      Learn more

      Tagging Amazon Web Services Resources in the Amazon Web Services General Reference

      Amazon Web Services Tagging Strategies

      Related actions

      All APIs by task

      • Key (string) – [REQUIRED]

        The key for a developer-defined key value pair for tagging an Amazon Web Services resource.

      • Value (string) – [REQUIRED]

        The value for a developer-defined key value pair for tagging an Amazon Web Services resource.

Return type:

dict

Returns:

Response Syntax

{
    'RuleSet': {
        'RuleSetName': 'string',
        'RuleSetArn': 'string',
        'RuleSetBody': 'string',
        'CreationTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) –

    • RuleSet (dict) –

      The newly created matchmaking rule set.

      • RuleSetName (string) –

        A unique identifier for the matchmaking rule set

      • RuleSetArn (string) –

        The Amazon Resource Name ( ARN) that is assigned to a Amazon GameLift matchmaking rule set resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::matchmakingruleset/<ruleset name>. In a GameLift rule set ARN, the resource ID matches the RuleSetName value.

      • RuleSetBody (string) –

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

      • CreationTime (datetime) –

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

Exceptions

  • GameLift.Client.exceptions.InvalidRequestException

  • GameLift.Client.exceptions.LimitExceededException

  • GameLift.Client.exceptions.InternalServiceException

  • GameLift.Client.exceptions.UnsupportedRegionException

  • GameLift.Client.exceptions.TaggingFailedException