listUsageForLicenseConfiguration method
Lists all license usage records for a license configuration, displaying license consumption details by resource at a selected point in time. Use this action to audit the current license consumption for any license inventory and configuration.
May throw AccessDeniedException.
May throw AuthorizationException.
May throw FilterLimitExceededException.
May throw InvalidParameterValueException.
May throw RateLimitExceededException.
May throw ServerInternalException.
Parameter licenseConfigurationArn :
Amazon Resource Name (ARN) of the license configuration.
Parameter filters :
Filters to scope the results. The following filters and logical operators
are supported:
-
resourceArn- The ARN of the license configuration resource. -
resourceType- The resource type (EC2_INSTANCE|EC2_HOST|EC2_AMI|SYSTEMS_MANAGER_MANAGED_INSTANCE). -
resourceAccount- The ID of the account that owns the resource.
Parameter maxResults :
Maximum number of results to return in a single call.
Parameter nextToken :
Token for the next set of results.
Implementation
Future<ListUsageForLicenseConfigurationResponse>
listUsageForLicenseConfiguration({
required String licenseConfigurationArn,
List<Filter>? filters,
int? maxResults,
String? nextToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSLicenseManager.ListUsageForLicenseConfiguration'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'LicenseConfigurationArn': licenseConfigurationArn,
if (filters != null) 'Filters': filters,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListUsageForLicenseConfigurationResponse.fromJson(jsonResponse.body);
}