getBasePathMappings method

Future<BasePathMappings> getBasePathMappings({
  1. required String domainName,
  2. String? domainNameId,
  3. int? limit,
  4. String? position,
})

Represents a collection of BasePathMapping resources.

May throw BadRequestException. May throw NotFoundException. May throw TooManyRequestsException. May throw UnauthorizedException.

Parameter domainName : The domain name of a BasePathMapping resource.

Parameter domainNameId : The identifier for the domain name resource. Supported only for private custom domain names.

Parameter limit : The maximum number of returned results per page. The default value is 25 and the maximum value is 500.

Parameter position : The current pagination position in the paged result set.

Implementation

Future<BasePathMappings> getBasePathMappings({
  required String domainName,
  String? domainNameId,
  int? limit,
  String? position,
}) async {
  final $query = <String, List<String>>{
    if (domainNameId != null) 'domainNameId': [domainNameId],
    if (limit != null) 'limit': [limit.toString()],
    if (position != null) 'position': [position],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/domainnames/${Uri.encodeComponent(domainName)}/basepathmappings',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return BasePathMappings.fromJson(response);
}