submitMultiRegionAccessPointRoutes method

Future<void> submitMultiRegionAccessPointRoutes({
  1. required String accountId,
  2. required String mrap,
  3. required List<MultiRegionAccessPointRoute> routeUpdates,
})
Submits an updated route configuration for a Multi-Region Access Point. This API operation updates the routing status for the specified Regions from active to passive, or from passive to active. A value of 0 indicates a passive status, which means that traffic won't be routed to the specified Region. A value of 100 indicates an active status, which means that traffic will be routed to the specified Region. At least one Region must be active at all times.

When the routing configuration is changed, any in-progress operations (uploads, copies, deletes, and so on) to formerly active Regions will continue to run to their final completion state (success or failure). The routing configurations of any Regions that aren’t specified remain unchanged. To submit routing control changes and failover requests, use the Amazon S3 failover control infrastructure endpoints in these five Amazon Web Services Regions:

  • us-east-1
  • us-west-2
  • ap-southeast-2
  • ap-northeast-1
  • eu-west-1

Parameter accountId : The Amazon Web Services account ID for the owner of the Multi-Region Access Point.

Parameter mrap : The Multi-Region Access Point ARN.

Parameter routeUpdates : The different routes that make up the new route configuration. Active routes return a value of 100, and passive routes return a value of 0.

Implementation

Future<void> submitMultiRegionAccessPointRoutes({
  required String accountId,
  required String mrap,
  required List<MultiRegionAccessPointRoute> routeUpdates,
}) async {
  final headers = <String, String>{
    'x-amz-account-id': accountId.toString(),
  };
  await _protocol.send(
    method: 'PATCH',
    requestUri:
        '/v20180820/mrap/instances/${mrap.split('/').map(Uri.encodeComponent).join('/')}/routes',
    headers: headers,
    payload: SubmitMultiRegionAccessPointRoutesRequest(
            accountId: accountId, mrap: mrap, routeUpdates: routeUpdates)
        .toXml('SubmitMultiRegionAccessPointRoutesRequest'),
    exceptionFnMap: _exceptionFns,
  );
}