updateRegionSettings method
Updates the current service opt-in settings for the Region.
Use the DescribeRegionSettings API to determine the resource
types that are supported.
May throw InvalidParameterValueException.
May throw MissingParameterValueException.
May throw ServiceUnavailableException.
Parameter resourceTypeManagementPreference :
Enables or disables full Backup management of backups for a resource type.
To enable full Backup management for DynamoDB along with
Backup's advanced DynamoDB backup features, follow the procedure to
enable advanced DynamoDB backup programmatically.
Parameter resourceTypeOptInPreference :
Updates the list of services along with the opt-in preferences for the
Region.
If resource assignments are only based on tags, then service opt-in settings are applied. If a resource type is explicitly assigned to a backup plan, such as Amazon S3, Amazon EC2, or Amazon RDS, it will be included in the backup even if the opt-in is not enabled for that particular service. If both a resource type and tags are specified in a resource assignment, the resource type specified in the backup plan takes priority over the tag condition. Service opt-in settings are disregarded in this situation.
Implementation
Future<void> updateRegionSettings({
Map<String, bool>? resourceTypeManagementPreference,
Map<String, bool>? resourceTypeOptInPreference,
}) async {
final $payload = <String, dynamic>{
if (resourceTypeManagementPreference != null)
'ResourceTypeManagementPreference': resourceTypeManagementPreference,
if (resourceTypeOptInPreference != null)
'ResourceTypeOptInPreference': resourceTypeOptInPreference,
};
await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/account-settings',
exceptionFnMap: _exceptionFns,
);
}