listLicenseConfigurations method

Future<ListLicenseConfigurationsResponse> listLicenseConfigurations({
  1. List<Filter>? filters,
  2. List<String>? licenseConfigurationArns,
  3. int? maxResults,
  4. String? nextToken,
})

Lists the license configurations for your account.

May throw InvalidParameterValueException. May throw ServerInternalException. May throw FilterLimitExceededException. May throw AuthorizationException. May throw AccessDeniedException. May throw RateLimitExceededException.

Parameter filters : Filters to scope the results. The following filters and logical operators are supported:

  • licenseCountingType - The dimension on which licenses are counted. Possible values are vCPU | Instance | Core | Socket. Logical operators are EQUALS | NOT_EQUALS.
  • enforceLicenseCount - A Boolean value that indicates whether hard license enforcement is used. Logical operators are EQUALS | NOT_EQUALS.
  • usagelimitExceeded - A Boolean value that indicates whether the available licenses have been exceeded. Logical operators are EQUALS | NOT_EQUALS.

Parameter licenseConfigurationArns : Amazon Resource Names (ARN) of the license configurations.

Parameter maxResults : Maximum number of results to return in a single call.

Parameter nextToken : Token for the next set of results.

Implementation

Future<ListLicenseConfigurationsResponse> listLicenseConfigurations({
  List<Filter>? filters,
  List<String>? licenseConfigurationArns,
  int? maxResults,
  String? nextToken,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSLicenseManager.ListLicenseConfigurations'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (filters != null) 'Filters': filters,
      if (licenseConfigurationArns != null)
        'LicenseConfigurationArns': licenseConfigurationArns,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListLicenseConfigurationsResponse.fromJson(jsonResponse.body);
}