updateReportPlan method
Updates the specified report plan.
May throw ConflictException.
May throw InvalidParameterValueException.
May throw MissingParameterValueException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
Parameter reportPlanName :
The unique name of the report plan. This name is between 1 and 256
characters, starting with a letter, and consisting of letters (a-z, A-Z),
numbers (0-9), and underscores (_).
Parameter idempotencyToken :
A customer-chosen string that you can use to distinguish between otherwise
identical calls to UpdateReportPlanInput. Retrying a
successful request with the same idempotency token results in a success
message with no action taken.
Parameter reportDeliveryChannel :
The information about where to deliver your reports, specifically your
Amazon S3 bucket name, S3 key prefix, and the formats of your reports.
Parameter reportPlanDescription :
An optional description of the report plan with a maximum 1,024
characters.
Parameter reportSetting :
The report template for the report. Reports are built using a report
template. The report templates are:
RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT |
BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT
If the report template is RESOURCE_COMPLIANCE_REPORT or
CONTROL_COMPLIANCE_REPORT, this API resource also describes
the report coverage by Amazon Web Services Regions and frameworks.
Implementation
Future<UpdateReportPlanOutput> updateReportPlan({
required String reportPlanName,
String? idempotencyToken,
ReportDeliveryChannel? reportDeliveryChannel,
String? reportPlanDescription,
ReportSetting? reportSetting,
}) async {
final $payload = <String, dynamic>{
'IdempotencyToken': idempotencyToken ?? _s.generateIdempotencyToken(),
if (reportDeliveryChannel != null)
'ReportDeliveryChannel': reportDeliveryChannel,
if (reportPlanDescription != null)
'ReportPlanDescription': reportPlanDescription,
if (reportSetting != null) 'ReportSetting': reportSetting,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/audit/report-plans/${Uri.encodeComponent(reportPlanName)}',
exceptionFnMap: _exceptionFns,
);
return UpdateReportPlanOutput.fromJson(response);
}