listLicenseSpecificationsForResource method

Future<ListLicenseSpecificationsForResourceResponse> listLicenseSpecificationsForResource({
  1. required String resourceArn,
  2. int? maxResults,
  3. String? nextToken,
})

Describes the license configurations for the specified resource.

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

Parameter resourceArn : Amazon Resource Name (ARN) of a resource that has an associated license configuration.

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

Parameter nextToken : Token for the next set of results.

Implementation

Future<ListLicenseSpecificationsForResourceResponse>
    listLicenseSpecificationsForResource({
  required String resourceArn,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(resourceArn, 'resourceArn');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSLicenseManager.ListLicenseSpecificationsForResource'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ResourceArn': resourceArn,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListLicenseSpecificationsForResourceResponse.fromJson(
      jsonResponse.body);
}