getStorageLensConfiguration method

Future<GetStorageLensConfigurationResult> getStorageLensConfiguration({
  1. required String accountId,
  2. required String configId,
})

Gets the Amazon S3 Storage Lens configuration. For more information, see Working with Amazon S3 Storage Lens in the Amazon Simple Storage Service Developer Guide.

Parameter accountId : The account ID of the requester.

Parameter configId : The ID of the Amazon S3 Storage Lens configuration.

Implementation

Future<GetStorageLensConfigurationResult> getStorageLensConfiguration({
  required String accountId,
  required String configId,
}) async {
  ArgumentError.checkNotNull(accountId, 'accountId');
  _s.validateStringLength(
    'accountId',
    accountId,
    0,
    64,
    isRequired: true,
  );
  ArgumentError.checkNotNull(configId, 'configId');
  _s.validateStringLength(
    'configId',
    configId,
    1,
    64,
    isRequired: true,
  );
  final headers = <String, String>{
    'x-amz-account-id': accountId.toString(),
  };
  final $result = await _protocol.sendRaw(
    method: 'GET',
    requestUri: '/v20180820/storagelens/${Uri.encodeComponent(configId)}',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  final $elem = await _s.xmlFromResponse($result);
  return GetStorageLensConfigurationResult(
    storageLensConfiguration: StorageLensConfiguration.fromXml($elem),
  );
}