« blib/lib/Paws/SecretsManager/DeleteResourcePolicyResponse.pm
↑ Summary
blib/lib/Paws/SecretsManager/DeleteSecretResponse.pm »
| 1 | |||
| 2 | package Paws::SecretsManager::DeleteSecret; | ||
| 3 | use Moose; | ||
| 4 | has ForceDeleteWithoutRecovery => (is => 'ro', isa => 'Bool'); | ||
| 5 | has RecoveryWindowInDays => (is => 'ro', isa => 'Int'); | ||
| 6 | has SecretId => (is => 'ro', isa => 'Str', required => 1); | ||
| 7 | |||
| 8 | use MooseX::ClassAttribute; | ||
| 9 | |||
| 10 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'DeleteSecret'); | ||
| 11 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::SecretsManager::DeleteSecretResponse'); | ||
| 12 | class_has _result_key => (isa => 'Str', is => 'ro'); | ||
| 13 | 1; | ||
| 14 | |||
| 15 | ### main pod documentation begin ### | ||
| 16 | |||
| 17 | =head1 NAME | ||
| 18 | |||
| 19 | Paws::SecretsManager::DeleteSecret - Arguments for method DeleteSecret on L<Paws::SecretsManager> | ||
| 20 | |||
| 21 | =head1 DESCRIPTION | ||
| 22 | |||
| 23 | This class represents the parameters used for calling the method DeleteSecret on the | ||
| 24 | L<AWS Secrets Manager|Paws::SecretsManager> service. Use the attributes of this class | ||
| 25 | as arguments to method DeleteSecret. | ||
| 26 | |||
| 27 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to DeleteSecret. | ||
| 28 | |||
| 29 | =head1 SYNOPSIS | ||
| 30 | |||
| 31 | my $secretsmanager = Paws->service('SecretsManager'); | ||
| 32 | # To delete a secret | ||
| 33 | # The following example shows how to delete a secret. The secret stays in your | ||
| 34 | # account in a deprecated and inaccessible state until the recovery window ends. | ||
| 35 | # After the date and time in the DeletionDate response field has passed, you can | ||
| 36 | # no longer recover this secret with restore-secret. | ||
| 37 | my $DeleteSecretResponse = $secretsmanager->DeleteSecret( | ||
| 38 | 'RecoveryWindowInDays' => 7, | ||
| 39 | 'SecretId' => 'MyTestDatabaseSecret1' | ||
| 40 | ); | ||
| 41 | |||
| 42 | # Results: | ||
| 43 | my $ARN = $DeleteSecretResponse->ARN; | ||
| 44 | my $DeletionDate = $DeleteSecretResponse->DeletionDate; | ||
| 45 | my $Name = $DeleteSecretResponse->Name; | ||
| 46 | |||
| 47 | # Returns a L<Paws::SecretsManager::DeleteSecretResponse> object. | ||
| 48 | |||
| 49 | Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. | ||
| 50 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/secretsmanager/DeleteSecret> | ||
| 51 | |||
| 52 | =head1 ATTRIBUTES | ||
| 53 | |||
| 54 | |||
| 55 | =head2 ForceDeleteWithoutRecovery => Bool | ||
| 56 | |||
| 57 | (Optional) Specifies that the secret is to be deleted without any | ||
| 58 | recovery window. You can't use both this parameter and the | ||
| 59 | C<RecoveryWindowInDays> parameter in the same API call. | ||
| 60 | |||
| 61 | An asynchronous background process performs the actual deletion, so | ||
| 62 | there can be a short delay before the operation completes. If you write | ||
| 63 | code to delete and then immediately recreate a secret with the same | ||
| 64 | name, ensure that your code includes appropriate back off and retry | ||
| 65 | logic. | ||
| 66 | |||
| 67 | Use this parameter with caution. This parameter causes the operation to | ||
| 68 | skip the normal waiting period before the permanent deletion that AWS | ||
| 69 | would normally impose with the C<RecoveryWindowInDays> parameter. If | ||
| 70 | you delete a secret with the C<ForceDeleteWithouRecovery> parameter, | ||
| 71 | then you have no opportunity to recover the secret. You lose the secret | ||
| 72 | permanently. | ||
| 73 | |||
| 74 | If you use this parameter and include a previously deleted or | ||
| 75 | nonexistent secret, the operation does not return the error | ||
| 76 | C<ResourceNotFoundException> in order to correctly handle retries. | ||
| 77 | |||
| 78 | |||
| 79 | |||
| 80 | =head2 RecoveryWindowInDays => Int | ||
| 81 | |||
| 82 | (Optional) Specifies the number of days that Secrets Manager waits | ||
| 83 | before Secrets Manager can delete the secret. You can't use both this | ||
| 84 | parameter and the C<ForceDeleteWithoutRecovery> parameter in the same | ||
| 85 | API call. | ||
| 86 | |||
| 87 | This value can range from 7 to 30 days with a default value of 30. | ||
| 88 | |||
| 89 | |||
| 90 | |||
| 91 | =head2 B<REQUIRED> SecretId => Str | ||
| 92 | |||
| 93 | Specifies the secret to delete. You can specify either the Amazon | ||
| 94 | Resource Name (ARN) or the friendly name of the secret. | ||
| 95 | |||
| 96 | If you specify an ARN, we generally recommend that you specify a | ||
| 97 | complete ARN. You can specify a partial ARN tooE<mdash>for example, if | ||
| 98 | you donE<rsquo>t include the final hyphen and six random characters | ||
| 99 | that Secrets Manager adds at the end of the ARN when you created the | ||
| 100 | secret. A partial ARN match can work as long as it uniquely matches | ||
| 101 | only one secret. However, if your secret has a name that ends in a | ||
| 102 | hyphen followed by six characters (before Secrets Manager adds the | ||
| 103 | hyphen and six characters to the ARN) and you try to use that as a | ||
| 104 | partial ARN, then those characters cause Secrets Manager to assume that | ||
| 105 | youE<rsquo>re specifying a complete ARN. This confusion can cause | ||
| 106 | unexpected results. To avoid this situation, we recommend that you | ||
| 107 | donE<rsquo>t create secret names ending with a hyphen followed by six | ||
| 108 | characters. | ||
| 109 | |||
| 110 | If you specify an incomplete ARN without the random suffix, and instead | ||
| 111 | provide the 'friendly name', you I<must> not include the random suffix. | ||
| 112 | If you do include the random suffix added by Secrets Manager, you | ||
| 113 | receive either a I<ResourceNotFoundException> or an | ||
| 114 | I<AccessDeniedException> error, depending on your permissions. | ||
| 115 | |||
| 116 | |||
| 117 | |||
| 118 | |||
| 119 | =head1 SEE ALSO | ||
| 120 | |||
| 121 | This class forms part of L<Paws>, documenting arguments for method DeleteSecret in L<Paws::SecretsManager> | ||
| 122 | |||
| 123 | =head1 BUGS and CONTRIBUTIONS | ||
| 124 | |||
| 125 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 126 | |||
| 127 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 128 | |||
| 129 | =cut | ||
| 130 |