restoreSecret
inline suspend fun SecretsManagerClient.restoreSecret(crossinline block: RestoreSecretRequest.Builder.() -> Unit): RestoreSecretResponse
Cancels the scheduled deletion of a secret by removing the DeletedDate
time stamp. You can access a secret again after it has been restored.
Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.
**Required permissions: **secretsmanager:RestoreSecret
. For more information, see IAM policy actions for Secrets Manager and Authentication and access control in Secrets Manager.
Samples
fun main() {
//sampleStart
// The following example shows how to restore a secret that you previously scheduled for deletion.
val resp = secretsManagerClient.restoreSecret {
secretId = "MyTestDatabaseSecret"
}
//sampleEnd
}