updateRecoveryPointIndexSettings method

Future<UpdateRecoveryPointIndexSettingsOutput> updateRecoveryPointIndexSettings({
  1. required String backupVaultName,
  2. required Index index,
  3. required String recoveryPointArn,
  4. String? iamRoleArn,
})

This operation updates the settings of a recovery point index.

Required: BackupVaultName, RecoveryPointArn, and IAMRoleArn

May throw InvalidParameterValueException. May throw InvalidRequestException. May throw MissingParameterValueException. May throw ResourceNotFoundException. May throw ServiceUnavailableException.

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 Region where they are created.

Accepted characters include lowercase letters, numbers, and hyphens.

Parameter index : Index can have 1 of 2 possible values, either ENABLED or DISABLED.

To create a backup index for an eligible ACTIVE recovery point that does not yet have a backup index, set value to ENABLED.

To delete a backup index, set value to DISABLED.

Parameter recoveryPointArn : An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.

Parameter iamRoleArn : This specifies the IAM role ARN used for this operation.

For example, arn:aws:iam::123456789012:role/S3Access

Implementation

Future<UpdateRecoveryPointIndexSettingsOutput>
    updateRecoveryPointIndexSettings({
  required String backupVaultName,
  required Index index,
  required String recoveryPointArn,
  String? iamRoleArn,
}) async {
  final $payload = <String, dynamic>{
    'Index': index.value,
    if (iamRoleArn != null) 'IamRoleArn': iamRoleArn,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/backup-vaults/${Uri.encodeComponent(backupVaultName)}/recovery-points/${Uri.encodeComponent(recoveryPointArn)}/index',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateRecoveryPointIndexSettingsOutput.fromJson(response);
}