putBackupVaultNotifications method
Turns on notifications on a backup vault for the specified topic and events.
May throw InvalidParameterValueException.
May throw MissingParameterValueException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
Parameter backupVaultEvents :
An array of events that indicate the status of jobs to back up resources
to the backup vault. For the list of supported events, common use cases,
and code samples, see Notification
options with Backup.
Parameter backupVaultName :
The name of a logical container where backups are stored. Backup vaults
are identified by names that are unique to the account used to create them
and the Amazon Web Services Region where they are created.
Parameter sNSTopicArn :
The Amazon Resource Name (ARN) that specifies the topic for a backup
vault’s events; for example,
arn:aws:sns:us-west-2:111122223333:MyVaultTopic.
Implementation
Future<void> putBackupVaultNotifications({
required List<BackupVaultEvent> backupVaultEvents,
required String backupVaultName,
required String sNSTopicArn,
}) async {
final $payload = <String, dynamic>{
'BackupVaultEvents': backupVaultEvents.map((e) => e.value).toList(),
'SNSTopicArn': sNSTopicArn,
};
await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/backup-vaults/${Uri.encodeComponent(backupVaultName)}/notification-configuration',
exceptionFnMap: _exceptionFns,
);
}