public void SecretsManagerDeleteSecret() { #region to-delete-a-secret-1523996905092 var response = client.DeleteSecret(new DeleteSecretRequest { RecoveryWindowInDays = 7, SecretId = "MyTestDatabaseSecret1" }); string arn = response.ARN; DateTime deletionDate = response.DeletionDate; string name = response.Name; #endregion }
private Amazon.SecretsManager.Model.DeleteSecretResponse CallAWSServiceOperation(IAmazonSecretsManager client, Amazon.SecretsManager.Model.DeleteSecretRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Secrets Manager", "DeleteSecret"); try { #if DESKTOP return(client.DeleteSecret(request)); #elif CORECLR return(client.DeleteSecretAsync(request).GetAwaiter().GetResult()); #else #error "Unknown build edition" #endif } catch (AmazonServiceException exc) { var webException = exc.InnerException as System.Net.WebException; if (webException != null) { throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); } throw; } }