updateZonalAutoshiftConfiguration method
- required String resourceIdentifier,
- required ZonalAutoshiftStatus zonalAutoshiftStatus,
The zonal autoshift configuration for a resource includes the practice run configuration and the status for running autoshifts, zonal autoshift status. When a resource has a practice run configuration, ARC starts weekly zonal shifts for the resource, to shift traffic away from an Availability Zone. Weekly practice runs help you to make sure that your application can continue to operate normally with the loss of one Availability Zone.
You can update the zonal autoshift status to enable or disable zonal
autoshift. When zonal autoshift is ENABLED, you authorize
Amazon Web Services to shift away resource traffic for an application from
an Availability Zone during events, on your behalf, to help reduce time to
recovery. Traffic is also shifted away for the required weekly practice
runs.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter resourceIdentifier :
The identifier for the resource that you want to update the zonal
autoshift configuration for. The identifier is the Amazon Resource Name
(ARN) for the resource.
Parameter zonalAutoshiftStatus :
The zonal autoshift status for the resource that you want to update the
zonal autoshift configuration for. Choose ENABLED to
authorize Amazon Web Services to shift away resource traffic for an
application from an Availability Zone during events, on your behalf, to
help reduce time to recovery.
Implementation
Future<UpdateZonalAutoshiftConfigurationResponse>
updateZonalAutoshiftConfiguration({
required String resourceIdentifier,
required ZonalAutoshiftStatus zonalAutoshiftStatus,
}) async {
final $payload = <String, dynamic>{
'zonalAutoshiftStatus': zonalAutoshiftStatus.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/managedresources/${Uri.encodeComponent(resourceIdentifier)}',
exceptionFnMap: _exceptionFns,
);
return UpdateZonalAutoshiftConfigurationResponse.fromJson(response);
}