modifyBackupAttributes method
Modifies attributes for CloudHSM backup.
Cross-account use: No. You cannot perform this operation on an CloudHSM backup in a different Amazon Web Services account.
May throw CloudHsmAccessDeniedException.
May throw CloudHsmInternalFailureException.
May throw CloudHsmInvalidRequestException.
May throw CloudHsmResourceNotFoundException.
May throw CloudHsmServiceException.
Parameter backupId :
The identifier (ID) of the backup to modify. To find the ID of a backup,
use the DescribeBackups operation.
Parameter neverExpires :
Specifies whether the service should exempt a backup from the retention
policy for the cluster. True exempts a backup from the
retention policy. False means the service applies the backup
retention policy defined at the cluster.
Implementation
Future<ModifyBackupAttributesResponse> modifyBackupAttributes({
required String backupId,
required bool neverExpires,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'BaldrApiService.ModifyBackupAttributes'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'BackupId': backupId,
'NeverExpires': neverExpires,
},
);
return ModifyBackupAttributesResponse.fromJson(jsonResponse.body);
}