use of com.amazonaws.services.secretsmanager.model.DeleteSecretRequest in project datarouter by hotpads.
the class AwsSecretClient method delete.
@Override
public final void delete(String name) {
var request = new DeleteSecretRequest().withSecretId(name);
// .withRecoveryWindowInDays(0L);//7-30 days to undelete. default 30
try {
try (var $ = TracerTool.startSpan("AWSSecretsManager deleteSecret", TraceSpanGroupType.CLOUD_STORAGE)) {
TracerTool.appendToSpanInfo(name);
client.deleteSecret(request);
}
} catch (ResourceNotFoundException e) {
throw new SecretNotFoundException(name, e);
}
}
Aggregations