describeMatchmakingConfigurations method

Future<DescribeMatchmakingConfigurationsOutput> describeMatchmakingConfigurations({
  1. int? limit,
  2. List<String>? names,
  3. String? nextToken,
  4. String? ruleSetName,
})

This API works with the following fleet types: EC2, Anywhere, Container

Retrieves the details of FlexMatch matchmaking configurations.

This operation offers the following options: (1) retrieve all matchmaking configurations, (2) retrieve configurations for a specified list, or (3) retrieve all configurations that use a specified rule set name. When requesting multiple items, use the pagination parameters to retrieve results as a set of sequential pages.

If successful, a configuration is returned for each requested name. When specifying a list of names, only configurations that currently exist are returned.

Learn more

Setting up FlexMatch matchmakers

May throw InternalServiceException. May throw InvalidRequestException. May throw UnsupportedRegionException.

Parameter limit : The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. This parameter is limited to 10.

Parameter names : A unique identifier for the matchmaking configuration(s) to retrieve. You can use either the configuration name or ARN value. To request all existing configurations, leave this parameter empty.

Parameter nextToken : A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value.

Parameter ruleSetName : A unique identifier for the matchmaking rule set. You can use either the rule set name or ARN value. Use this parameter to retrieve all matchmaking configurations that use this rule set.

Implementation

Future<DescribeMatchmakingConfigurationsOutput>
    describeMatchmakingConfigurations({
  int? limit,
  List<String>? names,
  String? nextToken,
  String? ruleSetName,
}) async {
  _s.validateNumRange(
    'limit',
    limit,
    1,
    1152921504606846976,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'GameLift.DescribeMatchmakingConfigurations'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (limit != null) 'Limit': limit,
      if (names != null) 'Names': names,
      if (nextToken != null) 'NextToken': nextToken,
      if (ruleSetName != null) 'RuleSetName': ruleSetName,
    },
  );

  return DescribeMatchmakingConfigurationsOutput.fromJson(jsonResponse.body);
}