createLicenseManagerReportGenerator method
Creates a report generator.
May throw AccessDeniedException.
May throw AuthorizationException.
May throw InvalidParameterValueException.
May throw RateLimitExceededException.
May throw ResourceLimitExceededException.
May throw ResourceNotFoundException.
May throw ServerInternalException.
May throw ValidationException.
Parameter clientToken :
Unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
Parameter reportContext :
Defines the type of license configuration the report generator tracks.
Parameter reportFrequency :
Frequency by which reports are generated. Reports can be generated daily,
monthly, or weekly.
Parameter reportGeneratorName :
Name of the report generator.
Parameter type :
Type of reports to generate. The following report types an be generated:
- License configuration report - Reports the number and details of consumed licenses for a license configuration.
- Resource report - Reports the tracked licenses and resource consumption for a license configuration.
Parameter description :
Description of the report generator.
Parameter tags :
Tags to add to the report generator.
Implementation
Future<CreateLicenseManagerReportGeneratorResponse>
createLicenseManagerReportGenerator({
required String clientToken,
required ReportContext reportContext,
required ReportFrequency reportFrequency,
required String reportGeneratorName,
required List<ReportType> type,
String? description,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSLicenseManager.CreateLicenseManagerReportGenerator'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ClientToken': clientToken,
'ReportContext': reportContext,
'ReportFrequency': reportFrequency,
'ReportGeneratorName': reportGeneratorName,
'Type': type.map((e) => e.value).toList(),
if (description != null) 'Description': description,
if (tags != null) 'Tags': tags,
},
);
return CreateLicenseManagerReportGeneratorResponse.fromJson(
jsonResponse.body);
}