listRegionalBuckets method

Future<ListRegionalBucketsResult> listRegionalBuckets({
  1. required String accountId,
  2. int? maxResults,
  3. String? nextToken,
  4. String? outpostId,
})

Returns a list of all Outposts buckets in an Outpost that are owned by the authenticated sender of the request. For more information, see Using Amazon S3 on Outposts in the Amazon Simple Storage Service Developer Guide.

For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and x-amz-outpost-id in your request, see the Examples section.

Parameter accountId : The AWS account ID of the Outposts bucket.

Parameter maxResults :

Parameter nextToken :

Parameter outpostId : The ID of the AWS Outposts.

Implementation

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