createMultiRegionAccessPoint method

Future<CreateMultiRegionAccessPointResult> createMultiRegionAccessPoint({
  1. required String accountId,
  2. required CreateMultiRegionAccessPointInput details,
  3. String? clientToken,
})
Creates a Multi-Region Access Point and associates it with the specified buckets. For more information about creating Multi-Region Access Points, see Creating Multi-Region Access Points in the Amazon S3 User Guide.

This action will always be routed to the US West (Oregon) Region. For more information about the restrictions around working with Multi-Region Access Points, see Multi-Region Access Point restrictions and limitations in the Amazon S3 User Guide.

This request is asynchronous, meaning that you might receive a response before the command has completed. When this request provides a response, it provides a token that you can use to monitor the status of the request with DescribeMultiRegionAccessPointOperation.

The following actions are related to CreateMultiRegionAccessPoint:

Parameter accountId : The Amazon Web Services account ID for the owner of the Multi-Region Access Point. The owner of the Multi-Region Access Point also must own the underlying buckets.

Parameter details : A container element containing details about the Multi-Region Access Point.

Parameter clientToken : An idempotency token used to identify the request and guarantee that requests are unique.

Implementation

Future<CreateMultiRegionAccessPointResult> createMultiRegionAccessPoint({
  required String accountId,
  required CreateMultiRegionAccessPointInput details,
  String? clientToken,
}) async {
  clientToken ??= _s.generateIdempotencyToken();
  final headers = <String, String>{
    'x-amz-account-id': accountId.toString(),
  };
  final $result = await _protocol.send(
    method: 'POST',
    requestUri: '/v20180820/async-requests/mrap/create',
    headers: headers,
    payload: CreateMultiRegionAccessPointRequest(
            accountId: accountId, details: details, clientToken: clientToken)
        .toXml('CreateMultiRegionAccessPointRequest'),
    endpoint: _resolveEndpoint(
      requiresAccountId: true,
      accountId: accountId,
    ),
    hostPrefix: '{AccountId}.',
    exceptionFnMap: _exceptionFns,
  );
  return CreateMultiRegionAccessPointResult.fromXml($result.body);
}