startReportCreation method

Future<void> startReportCreation({
  1. required String s3Bucket,
})

Generates a report that lists all tagged resources in accounts across your organization and tells whether each resource is compliant with the effective tag policy. Compliance data is refreshed daily.

The generated report is saved to the following location:

s3://example-bucket/AwsTagPolicies/o-exampleorgid/YYYY-MM-ddTHH:mm:ssZ/report.csv

You can call this operation only from the organization's master account and from the us-east-1 Region.

May throw ConcurrentModificationException. May throw ConstraintViolationException. May throw InternalServiceException. May throw InvalidParameterException. May throw ThrottledException.

Parameter s3Bucket : The name of the Amazon S3 bucket where the report will be stored; for example:

awsexamplebucket

For more information on S3 bucket requirements, including an example bucket policy, see the example S3 bucket policy on this page.

Implementation

Future<void> startReportCreation({
  required String s3Bucket,
}) async {
  ArgumentError.checkNotNull(s3Bucket, 's3Bucket');
  _s.validateStringLength(
    's3Bucket',
    s3Bucket,
    3,
    63,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'ResourceGroupsTaggingAPI_20170126.StartReportCreation'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'S3Bucket': s3Bucket,
    },
  );
}