describeConnectionAliases method

Future<DescribeConnectionAliasesResult> describeConnectionAliases({
  1. List<String>? aliasIds,
  2. int? limit,
  3. String? nextToken,
  4. String? resourceId,
})

Retrieves a list that describes the connection aliases used for cross-Region redirection. For more information, see Cross-Region Redirection for Amazon WorkSpaces.

May throw AccessDeniedException. May throw InvalidParameterValuesException. May throw OperationNotSupportedException.

Parameter aliasIds : The identifiers of the connection aliases to describe.

Parameter limit : The maximum number of connection aliases to return.

Parameter nextToken : If you received a NextToken from a previous call that was paginated, provide this token to receive the next set of results.

Parameter resourceId : The identifier of the directory associated with the connection alias.

Implementation

Future<DescribeConnectionAliasesResult> describeConnectionAliases({
  List<String>? aliasIds,
  int? limit,
  String? nextToken,
  String? resourceId,
}) async {
  _s.validateNumRange(
    'limit',
    limit,
    1,
    25,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    2048,
  );
  _s.validateStringLength(
    'resourceId',
    resourceId,
    1,
    1152921504606846976,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'WorkspacesService.DescribeConnectionAliases'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (aliasIds != null) 'AliasIds': aliasIds,
      if (limit != null) 'Limit': limit,
      if (nextToken != null) 'NextToken': nextToken,
      if (resourceId != null) 'ResourceId': resourceId,
    },
  );

  return DescribeConnectionAliasesResult.fromJson(jsonResponse.body);
}