describeFileSystemAliases method

Future<DescribeFileSystemAliasesResponse> describeFileSystemAliases({
  1. required String fileSystemId,
  2. String? clientRequestToken,
  3. int? maxResults,
  4. String? nextToken,
})

Returns the DNS aliases that are associated with the specified Amazon FSx for Windows File Server file system. A history of all DNS aliases that have been associated with and disassociated from the file system is available in the list of AdministrativeAction provided in the DescribeFileSystems operation response.

May throw BadRequest. May throw FileSystemNotFound. May throw InternalServerError.

Parameter fileSystemId : The ID of the file system to return the associated DNS aliases for (String).

Parameter maxResults : Maximum number of DNS aliases to return in the response (integer). This parameter value must be greater than 0. The number of items that Amazon FSx returns is the minimum of the MaxResults parameter specified in the request and the service's internal maximum number of items per page.

Parameter nextToken : Opaque pagination token returned from a previous DescribeFileSystemAliases operation (String). If a token is included in the request, the action continues the list from where the previous returning call left off.

Implementation

Future<DescribeFileSystemAliasesResponse> describeFileSystemAliases({
  required String fileSystemId,
  String? clientRequestToken,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(fileSystemId, 'fileSystemId');
  _s.validateStringLength(
    'fileSystemId',
    fileSystemId,
    11,
    21,
    isRequired: true,
  );
  _s.validateStringLength(
    'clientRequestToken',
    clientRequestToken,
    1,
    63,
  );
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    2147483647,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    255,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSSimbaAPIService_v20180301.DescribeFileSystemAliases'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'FileSystemId': fileSystemId,
      'ClientRequestToken':
          clientRequestToken ?? _s.generateIdempotencyToken(),
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return DescribeFileSystemAliasesResponse.fromJson(jsonResponse.body);
}