listAvailableManagementCidrRanges method

Future<ListAvailableManagementCidrRangesResult> listAvailableManagementCidrRanges(
  1. {required String managementCidrRangeConstraint,
  2. int? maxResults,
  3. String? nextToken}
)

Retrieves a list of IP address ranges, specified as IPv4 CIDR blocks, that you can use for the network management interface when you enable Bring Your Own License (BYOL).

This operation can be run only by AWS accounts that are enabled for BYOL. If your account isn't enabled for BYOL, you'll receive an AccessDeniedException error.

The management network interface is connected to a secure Amazon WorkSpaces management network. It is used for interactive streaming of the WorkSpace desktop to Amazon WorkSpaces clients, and to allow Amazon WorkSpaces to manage the WorkSpace.

May throw InvalidParameterValuesException. May throw AccessDeniedException.

Parameter managementCidrRangeConstraint : The IP address range to search. Specify an IP address range that is compatible with your network and in CIDR notation (that is, specify the range as an IPv4 CIDR block).

Parameter maxResults : The maximum number of items 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.

Implementation

Future<ListAvailableManagementCidrRangesResult>
    listAvailableManagementCidrRanges({
  required String managementCidrRangeConstraint,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(
      managementCidrRangeConstraint, 'managementCidrRangeConstraint');
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    5,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    2048,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'WorkspacesService.ListAvailableManagementCidrRanges'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ManagementCidrRangeConstraint': managementCidrRangeConstraint,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListAvailableManagementCidrRangesResult.fromJson(jsonResponse.body);
}