listStorageLensConfigurations method

Future<ListStorageLensConfigurationsResult> listStorageLensConfigurations({
  1. required String accountId,
  2. String? nextToken,
})

Gets a list of Amazon S3 Storage Lens configurations. For more information about S3 Storage Lens, see Working with Amazon S3 Storage Lens in the Amazon Simple Storage Service Developer Guide.

Parameter accountId : The account ID of the requester.

Parameter nextToken : A pagination token to request the next page of results.

Implementation

Future<ListStorageLensConfigurationsResult> listStorageLensConfigurations({
  required String accountId,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(accountId, 'accountId');
  _s.validateStringLength(
    'accountId',
    accountId,
    0,
    64,
    isRequired: true,
  );
  final headers = <String, String>{
    'x-amz-account-id': accountId.toString(),
  };
  final $query = <String, List<String>>{
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final $result = await _protocol.send(
    method: 'GET',
    requestUri: '/v20180820/storagelens',
    queryParams: $query,
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return ListStorageLensConfigurationsResult.fromXml($result.body);
}