| 1 | package Paws::SecretsManager; | ||
| 2 | use Moose; | ||
| 3 | sub service { 'secretsmanager' } | ||
| 4 | sub signing_name { 'secretsmanager' } | ||
| 5 | sub version { '2017-10-17' } | ||
| 6 | sub target_prefix { 'secretsmanager' } | ||
| 7 | sub json_version { "1.1" } | ||
| 8 | has max_attempts => (is => 'ro', isa => 'Int', default => 5); | ||
| 9 | has retry => (is => 'ro', isa => 'HashRef', default => sub { | ||
| 10 | { base => 'rand', type => 'exponential', growth_factor => 2 } | ||
| 11 | }); | ||
| 12 | has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [ | ||
| 13 | ] }); | ||
| 14 | |||
| 15 | with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::JsonCaller'; | ||
| 16 | |||
| 17 | |||
| 18 | sub CancelRotateSecret { | ||
| 19 | my $self = shift; | ||
| 20 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::CancelRotateSecret', @_); | ||
| 21 | return $self->caller->do_call($self, $call_object); | ||
| 22 | } | ||
| 23 | sub CreateSecret { | ||
| 24 | my $self = shift; | ||
| 25 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::CreateSecret', @_); | ||
| 26 | return $self->caller->do_call($self, $call_object); | ||
| 27 | } | ||
| 28 | sub DeleteResourcePolicy { | ||
| 29 | my $self = shift; | ||
| 30 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::DeleteResourcePolicy', @_); | ||
| 31 | return $self->caller->do_call($self, $call_object); | ||
| 32 | } | ||
| 33 | sub DeleteSecret { | ||
| 34 | my $self = shift; | ||
| 35 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::DeleteSecret', @_); | ||
| 36 | return $self->caller->do_call($self, $call_object); | ||
| 37 | } | ||
| 38 | sub DescribeSecret { | ||
| 39 | my $self = shift; | ||
| 40 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::DescribeSecret', @_); | ||
| 41 | return $self->caller->do_call($self, $call_object); | ||
| 42 | } | ||
| 43 | sub GetRandomPassword { | ||
| 44 | my $self = shift; | ||
| 45 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::GetRandomPassword', @_); | ||
| 46 | return $self->caller->do_call($self, $call_object); | ||
| 47 | } | ||
| 48 | sub GetResourcePolicy { | ||
| 49 | my $self = shift; | ||
| 50 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::GetResourcePolicy', @_); | ||
| 51 | return $self->caller->do_call($self, $call_object); | ||
| 52 | } | ||
| 53 | sub GetSecretValue { | ||
| 54 | my $self = shift; | ||
| 55 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::GetSecretValue', @_); | ||
| 56 | return $self->caller->do_call($self, $call_object); | ||
| 57 | } | ||
| 58 | sub ListSecrets { | ||
| 59 | my $self = shift; | ||
| 60 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::ListSecrets', @_); | ||
| 61 | return $self->caller->do_call($self, $call_object); | ||
| 62 | } | ||
| 63 | sub ListSecretVersionIds { | ||
| 64 | my $self = shift; | ||
| 65 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::ListSecretVersionIds', @_); | ||
| 66 | return $self->caller->do_call($self, $call_object); | ||
| 67 | } | ||
| 68 | sub PutResourcePolicy { | ||
| 69 | my $self = shift; | ||
| 70 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::PutResourcePolicy', @_); | ||
| 71 | return $self->caller->do_call($self, $call_object); | ||
| 72 | } | ||
| 73 | sub PutSecretValue { | ||
| 74 | my $self = shift; | ||
| 75 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::PutSecretValue', @_); | ||
| 76 | return $self->caller->do_call($self, $call_object); | ||
| 77 | } | ||
| 78 | sub RemoveRegionsFromReplication { | ||
| 79 | my $self = shift; | ||
| 80 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::RemoveRegionsFromReplication', @_); | ||
| 81 | return $self->caller->do_call($self, $call_object); | ||
| 82 | } | ||
| 83 | sub ReplicateSecretToRegions { | ||
| 84 | my $self = shift; | ||
| 85 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::ReplicateSecretToRegions', @_); | ||
| 86 | return $self->caller->do_call($self, $call_object); | ||
| 87 | } | ||
| 88 | sub RestoreSecret { | ||
| 89 | my $self = shift; | ||
| 90 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::RestoreSecret', @_); | ||
| 91 | return $self->caller->do_call($self, $call_object); | ||
| 92 | } | ||
| 93 | sub RotateSecret { | ||
| 94 | my $self = shift; | ||
| 95 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::RotateSecret', @_); | ||
| 96 | return $self->caller->do_call($self, $call_object); | ||
| 97 | } | ||
| 98 | sub StopReplicationToReplica { | ||
| 99 | my $self = shift; | ||
| 100 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::StopReplicationToReplica', @_); | ||
| 101 | return $self->caller->do_call($self, $call_object); | ||
| 102 | } | ||
| 103 | sub TagResource { | ||
| 104 | my $self = shift; | ||
| 105 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::TagResource', @_); | ||
| 106 | return $self->caller->do_call($self, $call_object); | ||
| 107 | } | ||
| 108 | sub UntagResource { | ||
| 109 | my $self = shift; | ||
| 110 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::UntagResource', @_); | ||
| 111 | return $self->caller->do_call($self, $call_object); | ||
| 112 | } | ||
| 113 | sub UpdateSecret { | ||
| 114 | my $self = shift; | ||
| 115 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::UpdateSecret', @_); | ||
| 116 | return $self->caller->do_call($self, $call_object); | ||
| 117 | } | ||
| 118 | sub UpdateSecretVersionStage { | ||
| 119 | my $self = shift; | ||
| 120 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::UpdateSecretVersionStage', @_); | ||
| 121 | return $self->caller->do_call($self, $call_object); | ||
| 122 | } | ||
| 123 | sub ValidateResourcePolicy { | ||
| 124 | my $self = shift; | ||
| 125 | my $call_object = $self->new_with_coercions('Paws::SecretsManager::ValidateResourcePolicy', @_); | ||
| 126 | return $self->caller->do_call($self, $call_object); | ||
| 127 | } | ||
| 128 | |||
| 129 | sub ListAllSecrets { | ||
| 130 | my $self = shift; | ||
| 131 | |||
| 132 | my $callback = shift @_ if (ref($_[0]) eq 'CODE'); | ||
| 133 | my $result = $self->ListSecrets(@_); | ||
| 134 | my $next_result = $result; | ||
| 135 | |||
| 136 | if (not defined $callback) { | ||
| 137 | while ($next_result->NextToken) { | ||
| 138 | $next_result = $self->ListSecrets(@_, NextToken => $next_result->NextToken); | ||
| 139 | push @{ $result->SecretList }, @{ $next_result->SecretList }; | ||
| 140 | } | ||
| 141 | return $result; | ||
| 142 | } else { | ||
| 143 | while ($result->NextToken) { | ||
| 144 | $callback->($_ => 'SecretList') foreach (@{ $result->SecretList }); | ||
| 145 | $result = $self->ListSecrets(@_, NextToken => $result->NextToken); | ||
| 146 | } | ||
| 147 | $callback->($_ => 'SecretList') foreach (@{ $result->SecretList }); | ||
| 148 | } | ||
| 149 | |||
| 150 | return undef | ||
| 151 | } | ||
| 152 | |||
| 153 | |||
| 154 | sub operations { qw/CancelRotateSecret CreateSecret DeleteResourcePolicy DeleteSecret DescribeSecret GetRandomPassword GetResourcePolicy GetSecretValue ListSecrets ListSecretVersionIds PutResourcePolicy PutSecretValue RemoveRegionsFromReplication ReplicateSecretToRegions RestoreSecret RotateSecret StopReplicationToReplica TagResource UntagResource UpdateSecret UpdateSecretVersionStage ValidateResourcePolicy / } | ||
| 155 | |||
| 156 | 1; | ||
| 157 | |||
| 158 | ### main pod documentation begin ### | ||
| 159 | |||
| 160 | =head1 NAME | ||
| 161 | |||
| 162 | Paws::SecretsManager - Perl Interface to AWS AWS Secrets Manager | ||
| 163 | |||
| 164 | =head1 SYNOPSIS | ||
| 165 | |||
| 166 | use Paws; | ||
| 167 | |||
| 168 | my $obj = Paws->service('SecretsManager'); | ||
| 169 | my $res = $obj->Method( | ||
| 170 | Arg1 => $val1, | ||
| 171 | Arg2 => [ 'V1', 'V2' ], | ||
| 172 | # if Arg3 is an object, the HashRef will be used as arguments to the constructor | ||
| 173 | # of the arguments type | ||
| 174 | Arg3 => { Att1 => 'Val1' }, | ||
| 175 | # if Arg4 is an array of objects, the HashRefs will be passed as arguments to | ||
| 176 | # the constructor of the arguments type | ||
| 177 | Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ], | ||
| 178 | ); | ||
| 179 | |||
| 180 | =head1 DESCRIPTION | ||
| 181 | |||
| 182 | AWS Secrets Manager API Reference | ||
| 183 | |||
| 184 | AWS Secrets Manager provides a service to enable you to store, manage, | ||
| 185 | and retrieve, secrets. | ||
| 186 | |||
| 187 | This guide provides descriptions of the Secrets Manager API. For more | ||
| 188 | information about using this service, see the AWS Secrets Manager User | ||
| 189 | Guide | ||
| 190 | (https://docs.aws.amazon.com/secretsmanager/latest/userguide/introduction.html). | ||
| 191 | |||
| 192 | B<API Version> | ||
| 193 | |||
| 194 | This version of the Secrets Manager API Reference documents the Secrets | ||
| 195 | Manager API version 2017-10-17. | ||
| 196 | |||
| 197 | As an alternative to using the API, you can use one of the AWS SDKs, | ||
| 198 | which consist of libraries and sample code for various programming | ||
| 199 | languages and platforms such as Java, Ruby, .NET, iOS, and Android. The | ||
| 200 | SDKs provide a convenient way to create programmatic access to AWS | ||
| 201 | Secrets Manager. For example, the SDKs provide cryptographically | ||
| 202 | signing requests, managing errors, and retrying requests automatically. | ||
| 203 | For more information about the AWS SDKs, including downloading and | ||
| 204 | installing them, see Tools for Amazon Web Services | ||
| 205 | (http://aws.amazon.com/tools/). | ||
| 206 | |||
| 207 | We recommend you use the AWS SDKs to make programmatic API calls to | ||
| 208 | Secrets Manager. However, you also can use the Secrets Manager HTTP | ||
| 209 | Query API to make direct calls to the Secrets Manager web service. To | ||
| 210 | learn more about the Secrets Manager HTTP Query API, see Making Query | ||
| 211 | Requests | ||
| 212 | (https://docs.aws.amazon.com/secretsmanager/latest/userguide/query-requests.html) | ||
| 213 | in the I<AWS Secrets Manager User Guide>. | ||
| 214 | |||
| 215 | Secrets Manager API supports GET and POST requests for all actions, and | ||
| 216 | doesn't require you to use GET for some actions and POST for others. | ||
| 217 | However, GET requests are subject to the limitation size of a URL. | ||
| 218 | Therefore, for operations that require larger sizes, use a POST | ||
| 219 | request. | ||
| 220 | |||
| 221 | B<Support and Feedback for AWS Secrets Manager> | ||
| 222 | |||
| 223 | We welcome your feedback. Send your comments to | ||
| 224 | awssecretsmanager-feedback@amazon.com | ||
| 225 | (mailto:awssecretsmanager-feedback@amazon.com), or post your feedback | ||
| 226 | and questions in the AWS Secrets Manager Discussion Forum | ||
| 227 | (http://forums.aws.amazon.com/forum.jspa?forumID=296). For more | ||
| 228 | information about the AWS Discussion Forums, see Forums Help | ||
| 229 | (http://forums.aws.amazon.com/help.jspa). | ||
| 230 | |||
| 231 | B<How examples are presented> | ||
| 232 | |||
| 233 | The JSON that AWS Secrets Manager expects as your request parameters | ||
| 234 | and the service returns as a response to HTTP query requests contain | ||
| 235 | single, long strings without line breaks or white space formatting. The | ||
| 236 | JSON shown in the examples displays the code formatted with both line | ||
| 237 | breaks and white space to improve readability. When example input | ||
| 238 | parameters can also cause long strings extending beyond the screen, you | ||
| 239 | can insert line breaks to enhance readability. You should always submit | ||
| 240 | the input as a single JSON text string. | ||
| 241 | |||
| 242 | B<Logging API Requests> | ||
| 243 | |||
| 244 | AWS Secrets Manager supports AWS CloudTrail, a service that records AWS | ||
| 245 | API calls for your AWS account and delivers log files to an Amazon S3 | ||
| 246 | bucket. By using information that's collected by AWS CloudTrail, you | ||
| 247 | can determine the requests successfully made to Secrets Manager, who | ||
| 248 | made the request, when it was made, and so on. For more about AWS | ||
| 249 | Secrets Manager and support for AWS CloudTrail, see Logging AWS Secrets | ||
| 250 | Manager Events with AWS CloudTrail | ||
| 251 | (http://docs.aws.amazon.com/secretsmanager/latest/userguide/monitoring.html#monitoring_cloudtrail) | ||
| 252 | in the I<AWS Secrets Manager User Guide>. To learn more about | ||
| 253 | CloudTrail, including enabling it and find your log files, see the AWS | ||
| 254 | CloudTrail User Guide | ||
| 255 | (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html). | ||
| 256 | |||
| 257 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17> | ||
| 258 | |||
| 259 | |||
| 260 | =head1 METHODS | ||
| 261 | |||
| 262 | =head2 CancelRotateSecret | ||
| 263 | |||
| 264 | =over | ||
| 265 | |||
| 266 | =item SecretId => Str | ||
| 267 | |||
| 268 | |||
| 269 | =back | ||
| 270 | |||
| 271 | Each argument is described in detail in: L<Paws::SecretsManager::CancelRotateSecret> | ||
| 272 | |||
| 273 | Returns: a L<Paws::SecretsManager::CancelRotateSecretResponse> instance | ||
| 274 | |||
| 275 | Disables automatic scheduled rotation and cancels the rotation of a | ||
| 276 | secret if currently in progress. | ||
| 277 | |||
| 278 | To re-enable scheduled rotation, call RotateSecret with | ||
| 279 | C<AutomaticallyRotateAfterDays> set to a value greater than 0. This | ||
| 280 | immediately rotates your secret and then enables the automatic | ||
| 281 | schedule. | ||
| 282 | |||
| 283 | If you cancel a rotation while in progress, it can leave the | ||
| 284 | C<VersionStage> labels in an unexpected state. Depending on the step of | ||
| 285 | the rotation in progress, you might need to remove the staging label | ||
| 286 | C<AWSPENDING> from the partially created version, specified by the | ||
| 287 | C<VersionId> response value. You should also evaluate the partially | ||
| 288 | rotated new version to see if it should be deleted, which you can do by | ||
| 289 | removing all staging labels from the new version C<VersionStage> field. | ||
| 290 | |||
| 291 | To successfully start a rotation, the staging label C<AWSPENDING> must | ||
| 292 | be in one of the following states: | ||
| 293 | |||
| 294 | =over | ||
| 295 | |||
| 296 | =item * | ||
| 297 | |||
| 298 | Not attached to any version at all | ||
| 299 | |||
| 300 | =item * | ||
| 301 | |||
| 302 | Attached to the same version as the staging label C<AWSCURRENT> | ||
| 303 | |||
| 304 | =back | ||
| 305 | |||
| 306 | If the staging label C<AWSPENDING> attached to a different version than | ||
| 307 | the version with C<AWSCURRENT> then the attempt to rotate fails. | ||
| 308 | |||
| 309 | B<Minimum permissions> | ||
| 310 | |||
| 311 | To run this command, you must have the following permissions: | ||
| 312 | |||
| 313 | =over | ||
| 314 | |||
| 315 | =item * | ||
| 316 | |||
| 317 | secretsmanager:CancelRotateSecret | ||
| 318 | |||
| 319 | =back | ||
| 320 | |||
| 321 | B<Related operations> | ||
| 322 | |||
| 323 | =over | ||
| 324 | |||
| 325 | =item * | ||
| 326 | |||
| 327 | To configure rotation for a secret or to manually trigger a rotation, | ||
| 328 | use RotateSecret. | ||
| 329 | |||
| 330 | =item * | ||
| 331 | |||
| 332 | To get the rotation configuration details for a secret, use | ||
| 333 | DescribeSecret. | ||
| 334 | |||
| 335 | =item * | ||
| 336 | |||
| 337 | To list all of the currently available secrets, use ListSecrets. | ||
| 338 | |||
| 339 | =item * | ||
| 340 | |||
| 341 | To list all of the versions currently associated with a secret, use | ||
| 342 | ListSecretVersionIds. | ||
| 343 | |||
| 344 | =back | ||
| 345 | |||
| 346 | |||
| 347 | |||
| 348 | =head2 CreateSecret | ||
| 349 | |||
| 350 | =over | ||
| 351 | |||
| 352 | =item Name => Str | ||
| 353 | |||
| 354 | =item [AddReplicaRegions => ArrayRef[L<Paws::SecretsManager::ReplicaRegionType>]] | ||
| 355 | |||
| 356 | =item [ClientRequestToken => Str] | ||
| 357 | |||
| 358 | =item [Description => Str] | ||
| 359 | |||
| 360 | =item [ForceOverwriteReplicaSecret => Bool] | ||
| 361 | |||
| 362 | =item [KmsKeyId => Str] | ||
| 363 | |||
| 364 | =item [SecretBinary => Str] | ||
| 365 | |||
| 366 | =item [SecretString => Str] | ||
| 367 | |||
| 368 | =item [Tags => ArrayRef[L<Paws::SecretsManager::Tag>]] | ||
| 369 | |||
| 370 | |||
| 371 | =back | ||
| 372 | |||
| 373 | Each argument is described in detail in: L<Paws::SecretsManager::CreateSecret> | ||
| 374 | |||
| 375 | Returns: a L<Paws::SecretsManager::CreateSecretResponse> instance | ||
| 376 | |||
| 377 | Creates a new secret. A secret in Secrets Manager consists of both the | ||
| 378 | protected secret data and the important information needed to manage | ||
| 379 | the secret. | ||
| 380 | |||
| 381 | Secrets Manager stores the encrypted secret data in one of a collection | ||
| 382 | of "versions" associated with the secret. Each version contains a copy | ||
| 383 | of the encrypted secret data. Each version is associated with one or | ||
| 384 | more "staging labels" that identify where the version is in the | ||
| 385 | rotation cycle. The C<SecretVersionsToStages> field of the secret | ||
| 386 | contains the mapping of staging labels to the active versions of the | ||
| 387 | secret. Versions without a staging label are considered deprecated and | ||
| 388 | not included in the list. | ||
| 389 | |||
| 390 | You provide the secret data to be encrypted by putting text in either | ||
| 391 | the C<SecretString> parameter or binary data in the C<SecretBinary> | ||
| 392 | parameter, but not both. If you include C<SecretString> or | ||
| 393 | C<SecretBinary> then Secrets Manager also creates an initial secret | ||
| 394 | version and automatically attaches the staging label C<AWSCURRENT> to | ||
| 395 | the new version. | ||
| 396 | |||
| 397 | =over | ||
| 398 | |||
| 399 | =item * | ||
| 400 | |||
| 401 | If you call an operation to encrypt or decrypt the C<SecretString> or | ||
| 402 | C<SecretBinary> for a secret in the same account as the calling user | ||
| 403 | and that secret doesn't specify a AWS KMS encryption key, Secrets | ||
| 404 | Manager uses the account's default AWS managed customer master key | ||
| 405 | (CMK) with the alias C<aws/secretsmanager>. If this key doesn't already | ||
| 406 | exist in your account then Secrets Manager creates it for you | ||
| 407 | automatically. All users and roles in the same AWS account | ||
| 408 | automatically have access to use the default CMK. Note that if an | ||
| 409 | Secrets Manager API call results in AWS creating the account's | ||
| 410 | AWS-managed CMK, it can result in a one-time significant delay in | ||
| 411 | returning the result. | ||
| 412 | |||
| 413 | =item * | ||
| 414 | |||
| 415 | If the secret resides in a different AWS account from the credentials | ||
| 416 | calling an API that requires encryption or decryption of the secret | ||
| 417 | value then you must create and use a custom AWS KMS CMK because you | ||
| 418 | can't access the default CMK for the account using credentials from a | ||
| 419 | different AWS account. Store the ARN of the CMK in the secret when you | ||
| 420 | create the secret or when you update it by including it in the | ||
| 421 | C<KMSKeyId>. If you call an API that must encrypt or decrypt | ||
| 422 | C<SecretString> or C<SecretBinary> using credentials from a different | ||
| 423 | account then the AWS KMS key policy must grant cross-account access to | ||
| 424 | that other account's user or role for both the kms:GenerateDataKey and | ||
| 425 | kms:Decrypt operations. | ||
| 426 | |||
| 427 | =back | ||
| 428 | |||
| 429 | B<Minimum permissions> | ||
| 430 | |||
| 431 | To run this command, you must have the following permissions: | ||
| 432 | |||
| 433 | =over | ||
| 434 | |||
| 435 | =item * | ||
| 436 | |||
| 437 | secretsmanager:CreateSecret | ||
| 438 | |||
| 439 | =item * | ||
| 440 | |||
| 441 | kms:GenerateDataKey - needed only if you use a customer-managed AWS KMS | ||
| 442 | key to encrypt the secret. You do not need this permission to use the | ||
| 443 | account default AWS managed CMK for Secrets Manager. | ||
| 444 | |||
| 445 | =item * | ||
| 446 | |||
| 447 | kms:Decrypt - needed only if you use a customer-managed AWS KMS key to | ||
| 448 | encrypt the secret. You do not need this permission to use the account | ||
| 449 | default AWS managed CMK for Secrets Manager. | ||
| 450 | |||
| 451 | =item * | ||
| 452 | |||
| 453 | secretsmanager:TagResource - needed only if you include the C<Tags> | ||
| 454 | parameter. | ||
| 455 | |||
| 456 | =back | ||
| 457 | |||
| 458 | B<Related operations> | ||
| 459 | |||
| 460 | =over | ||
| 461 | |||
| 462 | =item * | ||
| 463 | |||
| 464 | To delete a secret, use DeleteSecret. | ||
| 465 | |||
| 466 | =item * | ||
| 467 | |||
| 468 | To modify an existing secret, use UpdateSecret. | ||
| 469 | |||
| 470 | =item * | ||
| 471 | |||
| 472 | To create a new version of a secret, use PutSecretValue. | ||
| 473 | |||
| 474 | =item * | ||
| 475 | |||
| 476 | To retrieve the encrypted secure string and secure binary values, use | ||
| 477 | GetSecretValue. | ||
| 478 | |||
| 479 | =item * | ||
| 480 | |||
| 481 | To retrieve all other details for a secret, use DescribeSecret. This | ||
| 482 | does not include the encrypted secure string and secure binary values. | ||
| 483 | |||
| 484 | =item * | ||
| 485 | |||
| 486 | To retrieve the list of secret versions associated with the current | ||
| 487 | secret, use DescribeSecret and examine the C<SecretVersionsToStages> | ||
| 488 | response value. | ||
| 489 | |||
| 490 | =back | ||
| 491 | |||
| 492 | |||
| 493 | |||
| 494 | =head2 DeleteResourcePolicy | ||
| 495 | |||
| 496 | =over | ||
| 497 | |||
| 498 | =item SecretId => Str | ||
| 499 | |||
| 500 | |||
| 501 | =back | ||
| 502 | |||
| 503 | Each argument is described in detail in: L<Paws::SecretsManager::DeleteResourcePolicy> | ||
| 504 | |||
| 505 | Returns: a L<Paws::SecretsManager::DeleteResourcePolicyResponse> instance | ||
| 506 | |||
| 507 | Deletes the resource-based permission policy attached to the secret. | ||
| 508 | |||
| 509 | B<Minimum permissions> | ||
| 510 | |||
| 511 | To run this command, you must have the following permissions: | ||
| 512 | |||
| 513 | =over | ||
| 514 | |||
| 515 | =item * | ||
| 516 | |||
| 517 | secretsmanager:DeleteResourcePolicy | ||
| 518 | |||
| 519 | =back | ||
| 520 | |||
| 521 | B<Related operations> | ||
| 522 | |||
| 523 | =over | ||
| 524 | |||
| 525 | =item * | ||
| 526 | |||
| 527 | To attach a resource policy to a secret, use PutResourcePolicy. | ||
| 528 | |||
| 529 | =item * | ||
| 530 | |||
| 531 | To retrieve the current resource-based policy attached to a secret, use | ||
| 532 | GetResourcePolicy. | ||
| 533 | |||
| 534 | =item * | ||
| 535 | |||
| 536 | To list all of the currently available secrets, use ListSecrets. | ||
| 537 | |||
| 538 | =back | ||
| 539 | |||
| 540 | |||
| 541 | |||
| 542 | =head2 DeleteSecret | ||
| 543 | |||
| 544 | =over | ||
| 545 | |||
| 546 | =item SecretId => Str | ||
| 547 | |||
| 548 | =item [ForceDeleteWithoutRecovery => Bool] | ||
| 549 | |||
| 550 | =item [RecoveryWindowInDays => Int] | ||
| 551 | |||
| 552 | |||
| 553 | =back | ||
| 554 | |||
| 555 | Each argument is described in detail in: L<Paws::SecretsManager::DeleteSecret> | ||
| 556 | |||
| 557 | Returns: a L<Paws::SecretsManager::DeleteSecretResponse> instance | ||
| 558 | |||
| 559 | Deletes an entire secret and all of the versions. You can optionally | ||
| 560 | include a recovery window during which you can restore the secret. If | ||
| 561 | you don't specify a recovery window value, the operation defaults to 30 | ||
| 562 | days. Secrets Manager attaches a C<DeletionDate> stamp to the secret | ||
| 563 | that specifies the end of the recovery window. At the end of the | ||
| 564 | recovery window, Secrets Manager deletes the secret permanently. | ||
| 565 | |||
| 566 | At any time before recovery window ends, you can use RestoreSecret to | ||
| 567 | remove the C<DeletionDate> and cancel the deletion of the secret. | ||
| 568 | |||
| 569 | You cannot access the encrypted secret information in any secret | ||
| 570 | scheduled for deletion. If you need to access that information, you | ||
| 571 | must cancel the deletion with RestoreSecret and then retrieve the | ||
| 572 | information. | ||
| 573 | |||
| 574 | =over | ||
| 575 | |||
| 576 | =item * | ||
| 577 | |||
| 578 | There is no explicit operation to delete a version of a secret. | ||
| 579 | Instead, remove all staging labels from the C<VersionStage> field of a | ||
| 580 | version. That marks the version as deprecated and allows Secrets | ||
| 581 | Manager to delete it as needed. Versions without any staging labels do | ||
| 582 | not show up in ListSecretVersionIds unless you specify | ||
| 583 | C<IncludeDeprecated>. | ||
| 584 | |||
| 585 | =item * | ||
| 586 | |||
| 587 | The permanent secret deletion at the end of the waiting period is | ||
| 588 | performed as a background task with low priority. There is no guarantee | ||
| 589 | of a specific time after the recovery window for the actual delete | ||
| 590 | operation to occur. | ||
| 591 | |||
| 592 | =back | ||
| 593 | |||
| 594 | B<Minimum permissions> | ||
| 595 | |||
| 596 | To run this command, you must have the following permissions: | ||
| 597 | |||
| 598 | =over | ||
| 599 | |||
| 600 | =item * | ||
| 601 | |||
| 602 | secretsmanager:DeleteSecret | ||
| 603 | |||
| 604 | =back | ||
| 605 | |||
| 606 | B<Related operations> | ||
| 607 | |||
| 608 | =over | ||
| 609 | |||
| 610 | =item * | ||
| 611 | |||
| 612 | To create a secret, use CreateSecret. | ||
| 613 | |||
| 614 | =item * | ||
| 615 | |||
| 616 | To cancel deletion of a version of a secret before the recovery window | ||
| 617 | has expired, use RestoreSecret. | ||
| 618 | |||
| 619 | =back | ||
| 620 | |||
| 621 | |||
| 622 | |||
| 623 | =head2 DescribeSecret | ||
| 624 | |||
| 625 | =over | ||
| 626 | |||
| 627 | =item SecretId => Str | ||
| 628 | |||
| 629 | |||
| 630 | =back | ||
| 631 | |||
| 632 | Each argument is described in detail in: L<Paws::SecretsManager::DescribeSecret> | ||
| 633 | |||
| 634 | Returns: a L<Paws::SecretsManager::DescribeSecretResponse> instance | ||
| 635 | |||
| 636 | Retrieves the details of a secret. It does not include the encrypted | ||
| 637 | fields. Secrets Manager only returns fields populated with a value in | ||
| 638 | the response. | ||
| 639 | |||
| 640 | B<Minimum permissions> | ||
| 641 | |||
| 642 | To run this command, you must have the following permissions: | ||
| 643 | |||
| 644 | =over | ||
| 645 | |||
| 646 | =item * | ||
| 647 | |||
| 648 | secretsmanager:DescribeSecret | ||
| 649 | |||
| 650 | =back | ||
| 651 | |||
| 652 | B<Related operations> | ||
| 653 | |||
| 654 | =over | ||
| 655 | |||
| 656 | =item * | ||
| 657 | |||
| 658 | To create a secret, use CreateSecret. | ||
| 659 | |||
| 660 | =item * | ||
| 661 | |||
| 662 | To modify a secret, use UpdateSecret. | ||
| 663 | |||
| 664 | =item * | ||
| 665 | |||
| 666 | To retrieve the encrypted secret information in a version of the | ||
| 667 | secret, use GetSecretValue. | ||
| 668 | |||
| 669 | =item * | ||
| 670 | |||
| 671 | To list all of the secrets in the AWS account, use ListSecrets. | ||
| 672 | |||
| 673 | =back | ||
| 674 | |||
| 675 | |||
| 676 | |||
| 677 | =head2 GetRandomPassword | ||
| 678 | |||
| 679 | =over | ||
| 680 | |||
| 681 | =item [ExcludeCharacters => Str] | ||
| 682 | |||
| 683 | =item [ExcludeLowercase => Bool] | ||
| 684 | |||
| 685 | =item [ExcludeNumbers => Bool] | ||
| 686 | |||
| 687 | =item [ExcludePunctuation => Bool] | ||
| 688 | |||
| 689 | =item [ExcludeUppercase => Bool] | ||
| 690 | |||
| 691 | =item [IncludeSpace => Bool] | ||
| 692 | |||
| 693 | =item [PasswordLength => Int] | ||
| 694 | |||
| 695 | =item [RequireEachIncludedType => Bool] | ||
| 696 | |||
| 697 | |||
| 698 | =back | ||
| 699 | |||
| 700 | Each argument is described in detail in: L<Paws::SecretsManager::GetRandomPassword> | ||
| 701 | |||
| 702 | Returns: a L<Paws::SecretsManager::GetRandomPasswordResponse> instance | ||
| 703 | |||
| 704 | Generates a random password of the specified complexity. This operation | ||
| 705 | is intended for use in the Lambda rotation function. Per best practice, | ||
| 706 | we recommend that you specify the maximum length and include every | ||
| 707 | character type that the system you are generating a password for can | ||
| 708 | support. | ||
| 709 | |||
| 710 | B<Minimum permissions> | ||
| 711 | |||
| 712 | To run this command, you must have the following permissions: | ||
| 713 | |||
| 714 | =over | ||
| 715 | |||
| 716 | =item * | ||
| 717 | |||
| 718 | secretsmanager:GetRandomPassword | ||
| 719 | |||
| 720 | =back | ||
| 721 | |||
| 722 | |||
| 723 | |||
| 724 | =head2 GetResourcePolicy | ||
| 725 | |||
| 726 | =over | ||
| 727 | |||
| 728 | =item SecretId => Str | ||
| 729 | |||
| 730 | |||
| 731 | =back | ||
| 732 | |||
| 733 | Each argument is described in detail in: L<Paws::SecretsManager::GetResourcePolicy> | ||
| 734 | |||
| 735 | Returns: a L<Paws::SecretsManager::GetResourcePolicyResponse> instance | ||
| 736 | |||
| 737 | Retrieves the JSON text of the resource-based policy document attached | ||
| 738 | to the specified secret. The JSON request string input and response | ||
| 739 | output displays formatted code with white space and line breaks for | ||
| 740 | better readability. Submit your input as a single line JSON string. | ||
| 741 | |||
| 742 | B<Minimum permissions> | ||
| 743 | |||
| 744 | To run this command, you must have the following permissions: | ||
| 745 | |||
| 746 | =over | ||
| 747 | |||
| 748 | =item * | ||
| 749 | |||
| 750 | secretsmanager:GetResourcePolicy | ||
| 751 | |||
| 752 | =back | ||
| 753 | |||
| 754 | B<Related operations> | ||
| 755 | |||
| 756 | =over | ||
| 757 | |||
| 758 | =item * | ||
| 759 | |||
| 760 | To attach a resource policy to a secret, use PutResourcePolicy. | ||
| 761 | |||
| 762 | =item * | ||
| 763 | |||
| 764 | To delete the resource-based policy attached to a secret, use | ||
| 765 | DeleteResourcePolicy. | ||
| 766 | |||
| 767 | =item * | ||
| 768 | |||
| 769 | To list all of the currently available secrets, use ListSecrets. | ||
| 770 | |||
| 771 | =back | ||
| 772 | |||
| 773 | |||
| 774 | |||
| 775 | =head2 GetSecretValue | ||
| 776 | |||
| 777 | =over | ||
| 778 | |||
| 779 | =item SecretId => Str | ||
| 780 | |||
| 781 | =item [VersionId => Str] | ||
| 782 | |||
| 783 | =item [VersionStage => Str] | ||
| 784 | |||
| 785 | |||
| 786 | =back | ||
| 787 | |||
| 788 | Each argument is described in detail in: L<Paws::SecretsManager::GetSecretValue> | ||
| 789 | |||
| 790 | Returns: a L<Paws::SecretsManager::GetSecretValueResponse> instance | ||
| 791 | |||
| 792 | Retrieves the contents of the encrypted fields C<SecretString> or | ||
| 793 | C<SecretBinary> from the specified version of a secret, whichever | ||
| 794 | contains content. | ||
| 795 | |||
| 796 | B<Minimum permissions> | ||
| 797 | |||
| 798 | To run this command, you must have the following permissions: | ||
| 799 | |||
| 800 | =over | ||
| 801 | |||
| 802 | =item * | ||
| 803 | |||
| 804 | secretsmanager:GetSecretValue | ||
| 805 | |||
| 806 | =item * | ||
| 807 | |||
| 808 | kms:Decrypt - required only if you use a customer-managed AWS KMS key | ||
| 809 | to encrypt the secret. You do not need this permission to use the | ||
| 810 | account's default AWS managed CMK for Secrets Manager. | ||
| 811 | |||
| 812 | =back | ||
| 813 | |||
| 814 | B<Related operations> | ||
| 815 | |||
| 816 | =over | ||
| 817 | |||
| 818 | =item * | ||
| 819 | |||
| 820 | To create a new version of the secret with different encrypted | ||
| 821 | information, use PutSecretValue. | ||
| 822 | |||
| 823 | =item * | ||
| 824 | |||
| 825 | To retrieve the non-encrypted details for the secret, use | ||
| 826 | DescribeSecret. | ||
| 827 | |||
| 828 | =back | ||
| 829 | |||
| 830 | |||
| 831 | |||
| 832 | =head2 ListSecrets | ||
| 833 | |||
| 834 | =over | ||
| 835 | |||
| 836 | =item [Filters => ArrayRef[L<Paws::SecretsManager::Filter>]] | ||
| 837 | |||
| 838 | =item [MaxResults => Int] | ||
| 839 | |||
| 840 | =item [NextToken => Str] | ||
| 841 | |||
| 842 | =item [SortOrder => Str] | ||
| 843 | |||
| 844 | |||
| 845 | =back | ||
| 846 | |||
| 847 | Each argument is described in detail in: L<Paws::SecretsManager::ListSecrets> | ||
| 848 | |||
| 849 | Returns: a L<Paws::SecretsManager::ListSecretsResponse> instance | ||
| 850 | |||
| 851 | Lists all of the secrets that are stored by Secrets Manager in the AWS | ||
| 852 | account. To list the versions currently stored for a specific secret, | ||
| 853 | use ListSecretVersionIds. The encrypted fields C<SecretString> and | ||
| 854 | C<SecretBinary> are not included in the output. To get that | ||
| 855 | information, call the GetSecretValue operation. | ||
| 856 | |||
| 857 | Always check the C<NextToken> response parameter when calling any of | ||
| 858 | the C<List*> operations. These operations can occasionally return an | ||
| 859 | empty or shorter than expected list of results even when there more | ||
| 860 | results become available. When this happens, the C<NextToken> response | ||
| 861 | parameter contains a value to pass to the next call to the same API to | ||
| 862 | request the next part of the list. | ||
| 863 | |||
| 864 | B<Minimum permissions> | ||
| 865 | |||
| 866 | To run this command, you must have the following permissions: | ||
| 867 | |||
| 868 | =over | ||
| 869 | |||
| 870 | =item * | ||
| 871 | |||
| 872 | secretsmanager:ListSecrets | ||
| 873 | |||
| 874 | =back | ||
| 875 | |||
| 876 | B<Related operations> | ||
| 877 | |||
| 878 | =over | ||
| 879 | |||
| 880 | =item * | ||
| 881 | |||
| 882 | To list the versions attached to a secret, use ListSecretVersionIds. | ||
| 883 | |||
| 884 | =back | ||
| 885 | |||
| 886 | |||
| 887 | |||
| 888 | =head2 ListSecretVersionIds | ||
| 889 | |||
| 890 | =over | ||
| 891 | |||
| 892 | =item SecretId => Str | ||
| 893 | |||
| 894 | =item [IncludeDeprecated => Bool] | ||
| 895 | |||
| 896 | =item [MaxResults => Int] | ||
| 897 | |||
| 898 | =item [NextToken => Str] | ||
| 899 | |||
| 900 | |||
| 901 | =back | ||
| 902 | |||
| 903 | Each argument is described in detail in: L<Paws::SecretsManager::ListSecretVersionIds> | ||
| 904 | |||
| 905 | Returns: a L<Paws::SecretsManager::ListSecretVersionIdsResponse> instance | ||
| 906 | |||
| 907 | Lists all of the versions attached to the specified secret. The output | ||
| 908 | does not include the C<SecretString> or C<SecretBinary> fields. By | ||
| 909 | default, the list includes only versions that have at least one staging | ||
| 910 | label in C<VersionStage> attached. | ||
| 911 | |||
| 912 | Always check the C<NextToken> response parameter when calling any of | ||
| 913 | the C<List*> operations. These operations can occasionally return an | ||
| 914 | empty or shorter than expected list of results even when there more | ||
| 915 | results become available. When this happens, the C<NextToken> response | ||
| 916 | parameter contains a value to pass to the next call to the same API to | ||
| 917 | request the next part of the list. | ||
| 918 | |||
| 919 | B<Minimum permissions> | ||
| 920 | |||
| 921 | To run this command, you must have the following permissions: | ||
| 922 | |||
| 923 | =over | ||
| 924 | |||
| 925 | =item * | ||
| 926 | |||
| 927 | secretsmanager:ListSecretVersionIds | ||
| 928 | |||
| 929 | =back | ||
| 930 | |||
| 931 | B<Related operations> | ||
| 932 | |||
| 933 | =over | ||
| 934 | |||
| 935 | =item * | ||
| 936 | |||
| 937 | To list the secrets in an account, use ListSecrets. | ||
| 938 | |||
| 939 | =back | ||
| 940 | |||
| 941 | |||
| 942 | |||
| 943 | =head2 PutResourcePolicy | ||
| 944 | |||
| 945 | =over | ||
| 946 | |||
| 947 | =item ResourcePolicy => Str | ||
| 948 | |||
| 949 | =item SecretId => Str | ||
| 950 | |||
| 951 | =item [BlockPublicPolicy => Bool] | ||
| 952 | |||
| 953 | |||
| 954 | =back | ||
| 955 | |||
| 956 | Each argument is described in detail in: L<Paws::SecretsManager::PutResourcePolicy> | ||
| 957 | |||
| 958 | Returns: a L<Paws::SecretsManager::PutResourcePolicyResponse> instance | ||
| 959 | |||
| 960 | Attaches the contents of the specified resource-based permission policy | ||
| 961 | to a secret. A resource-based policy is optional. Alternatively, you | ||
| 962 | can use IAM identity-based policies that specify the secret's Amazon | ||
| 963 | Resource Name (ARN) in the policy statement's C<Resources> element. You | ||
| 964 | can also use a combination of both identity-based and resource-based | ||
| 965 | policies. The affected users and roles receive the permissions that are | ||
| 966 | permitted by all of the relevant policies. For more information, see | ||
| 967 | Using Resource-Based Policies for AWS Secrets Manager | ||
| 968 | (http://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_resource-based-policies.html). | ||
| 969 | For the complete description of the AWS policy syntax and grammar, see | ||
| 970 | IAM JSON Policy Reference | ||
| 971 | (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html) | ||
| 972 | in the I<IAM User Guide>. | ||
| 973 | |||
| 974 | B<Minimum permissions> | ||
| 975 | |||
| 976 | To run this command, you must have the following permissions: | ||
| 977 | |||
| 978 | =over | ||
| 979 | |||
| 980 | =item * | ||
| 981 | |||
| 982 | secretsmanager:PutResourcePolicy | ||
| 983 | |||
| 984 | =back | ||
| 985 | |||
| 986 | B<Related operations> | ||
| 987 | |||
| 988 | =over | ||
| 989 | |||
| 990 | =item * | ||
| 991 | |||
| 992 | To retrieve the resource policy attached to a secret, use | ||
| 993 | GetResourcePolicy. | ||
| 994 | |||
| 995 | =item * | ||
| 996 | |||
| 997 | To delete the resource-based policy attached to a secret, use | ||
| 998 | DeleteResourcePolicy. | ||
| 999 | |||
| 1000 | =item * | ||
| 1001 | |||
| 1002 | To list all of the currently available secrets, use ListSecrets. | ||
| 1003 | |||
| 1004 | =back | ||
| 1005 | |||
| 1006 | |||
| 1007 | |||
| 1008 | =head2 PutSecretValue | ||
| 1009 | |||
| 1010 | =over | ||
| 1011 | |||
| 1012 | =item SecretId => Str | ||
| 1013 | |||
| 1014 | =item [ClientRequestToken => Str] | ||
| 1015 | |||
| 1016 | =item [SecretBinary => Str] | ||
| 1017 | |||
| 1018 | =item [SecretString => Str] | ||
| 1019 | |||
| 1020 | =item [VersionStages => ArrayRef[Str|Undef]] | ||
| 1021 | |||
| 1022 | |||
| 1023 | =back | ||
| 1024 | |||
| 1025 | Each argument is described in detail in: L<Paws::SecretsManager::PutSecretValue> | ||
| 1026 | |||
| 1027 | Returns: a L<Paws::SecretsManager::PutSecretValueResponse> instance | ||
| 1028 | |||
| 1029 | Stores a new encrypted secret value in the specified secret. To do | ||
| 1030 | this, the operation creates a new version and attaches it to the | ||
| 1031 | secret. The version can contain a new C<SecretString> value or a new | ||
| 1032 | C<SecretBinary> value. You can also specify the staging labels that are | ||
| 1033 | initially attached to the new version. | ||
| 1034 | |||
| 1035 | The Secrets Manager console uses only the C<SecretString> field. To add | ||
| 1036 | binary data to a secret with the C<SecretBinary> field you must use the | ||
| 1037 | AWS CLI or one of the AWS SDKs. | ||
| 1038 | |||
| 1039 | =over | ||
| 1040 | |||
| 1041 | =item * | ||
| 1042 | |||
| 1043 | If this operation creates the first version for the secret then Secrets | ||
| 1044 | Manager automatically attaches the staging label C<AWSCURRENT> to the | ||
| 1045 | new version. | ||
| 1046 | |||
| 1047 | =item * | ||
| 1048 | |||
| 1049 | If you do not specify a value for VersionStages then Secrets Manager | ||
| 1050 | automatically moves the staging label C<AWSCURRENT> to this new | ||
| 1051 | version. | ||
| 1052 | |||
| 1053 | =item * | ||
| 1054 | |||
| 1055 | If this operation moves the staging label C<AWSCURRENT> from another | ||
| 1056 | version to this version, then Secrets Manager also automatically moves | ||
| 1057 | the staging label C<AWSPREVIOUS> to the version that C<AWSCURRENT> was | ||
| 1058 | removed from. | ||
| 1059 | |||
| 1060 | =item * | ||
| 1061 | |||
| 1062 | This operation is idempotent. If a version with a C<VersionId> with the | ||
| 1063 | same value as the C<ClientRequestToken> parameter already exists and | ||
| 1064 | you specify the same secret data, the operation succeeds but does | ||
| 1065 | nothing. However, if the secret data is different, then the operation | ||
| 1066 | fails because you cannot modify an existing version; you can only | ||
| 1067 | create new ones. | ||
| 1068 | |||
| 1069 | =back | ||
| 1070 | |||
| 1071 | =over | ||
| 1072 | |||
| 1073 | =item * | ||
| 1074 | |||
| 1075 | If you call an operation to encrypt or decrypt the C<SecretString> or | ||
| 1076 | C<SecretBinary> for a secret in the same account as the calling user | ||
| 1077 | and that secret doesn't specify a AWS KMS encryption key, Secrets | ||
| 1078 | Manager uses the account's default AWS managed customer master key | ||
| 1079 | (CMK) with the alias C<aws/secretsmanager>. If this key doesn't already | ||
| 1080 | exist in your account then Secrets Manager creates it for you | ||
| 1081 | automatically. All users and roles in the same AWS account | ||
| 1082 | automatically have access to use the default CMK. Note that if an | ||
| 1083 | Secrets Manager API call results in AWS creating the account's | ||
| 1084 | AWS-managed CMK, it can result in a one-time significant delay in | ||
| 1085 | returning the result. | ||
| 1086 | |||
| 1087 | =item * | ||
| 1088 | |||
| 1089 | If the secret resides in a different AWS account from the credentials | ||
| 1090 | calling an API that requires encryption or decryption of the secret | ||
| 1091 | value then you must create and use a custom AWS KMS CMK because you | ||
| 1092 | can't access the default CMK for the account using credentials from a | ||
| 1093 | different AWS account. Store the ARN of the CMK in the secret when you | ||
| 1094 | create the secret or when you update it by including it in the | ||
| 1095 | C<KMSKeyId>. If you call an API that must encrypt or decrypt | ||
| 1096 | C<SecretString> or C<SecretBinary> using credentials from a different | ||
| 1097 | account then the AWS KMS key policy must grant cross-account access to | ||
| 1098 | that other account's user or role for both the kms:GenerateDataKey and | ||
| 1099 | kms:Decrypt operations. | ||
| 1100 | |||
| 1101 | =back | ||
| 1102 | |||
| 1103 | B<Minimum permissions> | ||
| 1104 | |||
| 1105 | To run this command, you must have the following permissions: | ||
| 1106 | |||
| 1107 | =over | ||
| 1108 | |||
| 1109 | =item * | ||
| 1110 | |||
| 1111 | secretsmanager:PutSecretValue | ||
| 1112 | |||
| 1113 | =item * | ||
| 1114 | |||
| 1115 | kms:GenerateDataKey - needed only if you use a customer-managed AWS KMS | ||
| 1116 | key to encrypt the secret. You do not need this permission to use the | ||
| 1117 | account's default AWS managed CMK for Secrets Manager. | ||
| 1118 | |||
| 1119 | =back | ||
| 1120 | |||
| 1121 | B<Related operations> | ||
| 1122 | |||
| 1123 | =over | ||
| 1124 | |||
| 1125 | =item * | ||
| 1126 | |||
| 1127 | To retrieve the encrypted value you store in the version of a secret, | ||
| 1128 | use GetSecretValue. | ||
| 1129 | |||
| 1130 | =item * | ||
| 1131 | |||
| 1132 | To create a secret, use CreateSecret. | ||
| 1133 | |||
| 1134 | =item * | ||
| 1135 | |||
| 1136 | To get the details for a secret, use DescribeSecret. | ||
| 1137 | |||
| 1138 | =item * | ||
| 1139 | |||
| 1140 | To list the versions attached to a secret, use ListSecretVersionIds. | ||
| 1141 | |||
| 1142 | =back | ||
| 1143 | |||
| 1144 | |||
| 1145 | |||
| 1146 | =head2 RemoveRegionsFromReplication | ||
| 1147 | |||
| 1148 | =over | ||
| 1149 | |||
| 1150 | =item RemoveReplicaRegions => ArrayRef[Str|Undef] | ||
| 1151 | |||
| 1152 | =item SecretId => Str | ||
| 1153 | |||
| 1154 | |||
| 1155 | =back | ||
| 1156 | |||
| 1157 | Each argument is described in detail in: L<Paws::SecretsManager::RemoveRegionsFromReplication> | ||
| 1158 | |||
| 1159 | Returns: a L<Paws::SecretsManager::RemoveRegionsFromReplicationResponse> instance | ||
| 1160 | |||
| 1161 | Remove regions from replication. | ||
| 1162 | |||
| 1163 | |||
| 1164 | =head2 ReplicateSecretToRegions | ||
| 1165 | |||
| 1166 | =over | ||
| 1167 | |||
| 1168 | =item AddReplicaRegions => ArrayRef[L<Paws::SecretsManager::ReplicaRegionType>] | ||
| 1169 | |||
| 1170 | =item SecretId => Str | ||
| 1171 | |||
| 1172 | =item [ForceOverwriteReplicaSecret => Bool] | ||
| 1173 | |||
| 1174 | |||
| 1175 | =back | ||
| 1176 | |||
| 1177 | Each argument is described in detail in: L<Paws::SecretsManager::ReplicateSecretToRegions> | ||
| 1178 | |||
| 1179 | Returns: a L<Paws::SecretsManager::ReplicateSecretToRegionsResponse> instance | ||
| 1180 | |||
| 1181 | Converts an existing secret to a multi-Region secret and begins | ||
| 1182 | replication the secret to a list of new regions. | ||
| 1183 | |||
| 1184 | |||
| 1185 | =head2 RestoreSecret | ||
| 1186 | |||
| 1187 | =over | ||
| 1188 | |||
| 1189 | =item SecretId => Str | ||
| 1190 | |||
| 1191 | |||
| 1192 | =back | ||
| 1193 | |||
| 1194 | Each argument is described in detail in: L<Paws::SecretsManager::RestoreSecret> | ||
| 1195 | |||
| 1196 | Returns: a L<Paws::SecretsManager::RestoreSecretResponse> instance | ||
| 1197 | |||
| 1198 | Cancels the scheduled deletion of a secret by removing the | ||
| 1199 | C<DeletedDate> time stamp. This makes the secret accessible to query | ||
| 1200 | once again. | ||
| 1201 | |||
| 1202 | B<Minimum permissions> | ||
| 1203 | |||
| 1204 | To run this command, you must have the following permissions: | ||
| 1205 | |||
| 1206 | =over | ||
| 1207 | |||
| 1208 | =item * | ||
| 1209 | |||
| 1210 | secretsmanager:RestoreSecret | ||
| 1211 | |||
| 1212 | =back | ||
| 1213 | |||
| 1214 | B<Related operations> | ||
| 1215 | |||
| 1216 | =over | ||
| 1217 | |||
| 1218 | =item * | ||
| 1219 | |||
| 1220 | To delete a secret, use DeleteSecret. | ||
| 1221 | |||
| 1222 | =back | ||
| 1223 | |||
| 1224 | |||
| 1225 | |||
| 1226 | =head2 RotateSecret | ||
| 1227 | |||
| 1228 | =over | ||
| 1229 | |||
| 1230 | =item SecretId => Str | ||
| 1231 | |||
| 1232 | =item [ClientRequestToken => Str] | ||
| 1233 | |||
| 1234 | =item [RotationLambdaARN => Str] | ||
| 1235 | |||
| 1236 | =item [RotationRules => L<Paws::SecretsManager::RotationRulesType>] | ||
| 1237 | |||
| 1238 | |||
| 1239 | =back | ||
| 1240 | |||
| 1241 | Each argument is described in detail in: L<Paws::SecretsManager::RotateSecret> | ||
| 1242 | |||
| 1243 | Returns: a L<Paws::SecretsManager::RotateSecretResponse> instance | ||
| 1244 | |||
| 1245 | Configures and starts the asynchronous process of rotating this secret. | ||
| 1246 | If you include the configuration parameters, the operation sets those | ||
| 1247 | values for the secret and then immediately starts a rotation. If you do | ||
| 1248 | not include the configuration parameters, the operation starts a | ||
| 1249 | rotation with the values already stored in the secret. After the | ||
| 1250 | rotation completes, the protected service and its clients all use the | ||
| 1251 | new version of the secret. | ||
| 1252 | |||
| 1253 | This required configuration information includes the ARN of an AWS | ||
| 1254 | Lambda function and the time between scheduled rotations. The Lambda | ||
| 1255 | rotation function creates a new version of the secret and creates or | ||
| 1256 | updates the credentials on the protected service to match. After | ||
| 1257 | testing the new credentials, the function marks the new secret with the | ||
| 1258 | staging label C<AWSCURRENT> so that your clients all immediately begin | ||
| 1259 | to use the new version. For more information about rotating secrets and | ||
| 1260 | how to configure a Lambda function to rotate the secrets for your | ||
| 1261 | protected service, see Rotating Secrets in AWS Secrets Manager | ||
| 1262 | (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html) | ||
| 1263 | in the I<AWS Secrets Manager User Guide>. | ||
| 1264 | |||
| 1265 | Secrets Manager schedules the next rotation when the previous one | ||
| 1266 | completes. Secrets Manager schedules the date by adding the rotation | ||
| 1267 | interval (number of days) to the actual date of the last rotation. The | ||
| 1268 | service chooses the hour within that 24-hour date window randomly. The | ||
| 1269 | minute is also chosen somewhat randomly, but weighted towards the top | ||
| 1270 | of the hour and influenced by a variety of factors that help distribute | ||
| 1271 | load. | ||
| 1272 | |||
| 1273 | The rotation function must end with the versions of the secret in one | ||
| 1274 | of two states: | ||
| 1275 | |||
| 1276 | =over | ||
| 1277 | |||
| 1278 | =item * | ||
| 1279 | |||
| 1280 | The C<AWSPENDING> and C<AWSCURRENT> staging labels are attached to the | ||
| 1281 | same version of the secret, or | ||
| 1282 | |||
| 1283 | =item * | ||
| 1284 | |||
| 1285 | The C<AWSPENDING> staging label is not attached to any version of the | ||
| 1286 | secret. | ||
| 1287 | |||
| 1288 | =back | ||
| 1289 | |||
| 1290 | If the C<AWSPENDING> staging label is present but not attached to the | ||
| 1291 | same version as C<AWSCURRENT> then any later invocation of | ||
| 1292 | C<RotateSecret> assumes that a previous rotation request is still in | ||
| 1293 | progress and returns an error. | ||
| 1294 | |||
| 1295 | B<Minimum permissions> | ||
| 1296 | |||
| 1297 | To run this command, you must have the following permissions: | ||
| 1298 | |||
| 1299 | =over | ||
| 1300 | |||
| 1301 | =item * | ||
| 1302 | |||
| 1303 | secretsmanager:RotateSecret | ||
| 1304 | |||
| 1305 | =item * | ||
| 1306 | |||
| 1307 | lambda:InvokeFunction (on the function specified in the secret's | ||
| 1308 | metadata) | ||
| 1309 | |||
| 1310 | =back | ||
| 1311 | |||
| 1312 | B<Related operations> | ||
| 1313 | |||
| 1314 | =over | ||
| 1315 | |||
| 1316 | =item * | ||
| 1317 | |||
| 1318 | To list the secrets in your account, use ListSecrets. | ||
| 1319 | |||
| 1320 | =item * | ||
| 1321 | |||
| 1322 | To get the details for a version of a secret, use DescribeSecret. | ||
| 1323 | |||
| 1324 | =item * | ||
| 1325 | |||
| 1326 | To create a new version of a secret, use CreateSecret. | ||
| 1327 | |||
| 1328 | =item * | ||
| 1329 | |||
| 1330 | To attach staging labels to or remove staging labels from a version of | ||
| 1331 | a secret, use UpdateSecretVersionStage. | ||
| 1332 | |||
| 1333 | =back | ||
| 1334 | |||
| 1335 | |||
| 1336 | |||
| 1337 | =head2 StopReplicationToReplica | ||
| 1338 | |||
| 1339 | =over | ||
| 1340 | |||
| 1341 | =item SecretId => Str | ||
| 1342 | |||
| 1343 | |||
| 1344 | =back | ||
| 1345 | |||
| 1346 | Each argument is described in detail in: L<Paws::SecretsManager::StopReplicationToReplica> | ||
| 1347 | |||
| 1348 | Returns: a L<Paws::SecretsManager::StopReplicationToReplicaResponse> instance | ||
| 1349 | |||
| 1350 | Removes the secret from replication and promotes the secret to a | ||
| 1351 | regional secret in the replica Region. | ||
| 1352 | |||
| 1353 | |||
| 1354 | =head2 TagResource | ||
| 1355 | |||
| 1356 | =over | ||
| 1357 | |||
| 1358 | =item SecretId => Str | ||
| 1359 | |||
| 1360 | =item Tags => ArrayRef[L<Paws::SecretsManager::Tag>] | ||
| 1361 | |||
| 1362 | |||
| 1363 | =back | ||
| 1364 | |||
| 1365 | Each argument is described in detail in: L<Paws::SecretsManager::TagResource> | ||
| 1366 | |||
| 1367 | Returns: nothing | ||
| 1368 | |||
| 1369 | Attaches one or more tags, each consisting of a key name and a value, | ||
| 1370 | to the specified secret. Tags are part of the secret's overall | ||
| 1371 | metadata, and are not associated with any specific version of the | ||
| 1372 | secret. This operation only appends tags to the existing list of tags. | ||
| 1373 | To remove tags, you must use UntagResource. | ||
| 1374 | |||
| 1375 | The following basic restrictions apply to tags: | ||
| 1376 | |||
| 1377 | =over | ||
| 1378 | |||
| 1379 | =item * | ||
| 1380 | |||
| 1381 | Maximum number of tags per secretE<mdash>50 | ||
| 1382 | |||
| 1383 | =item * | ||
| 1384 | |||
| 1385 | Maximum key lengthE<mdash>127 Unicode characters in UTF-8 | ||
| 1386 | |||
| 1387 | =item * | ||
| 1388 | |||
| 1389 | Maximum value lengthE<mdash>255 Unicode characters in UTF-8 | ||
| 1390 | |||
| 1391 | =item * | ||
| 1392 | |||
| 1393 | Tag keys and values are case sensitive. | ||
| 1394 | |||
| 1395 | =item * | ||
| 1396 | |||
| 1397 | Do not use the C<aws:> prefix in your tag names or values because AWS | ||
| 1398 | reserves it for AWS use. You can't edit or delete tag names or values | ||
| 1399 | with this prefix. Tags with this prefix do not count against your tags | ||
| 1400 | per secret limit. | ||
| 1401 | |||
| 1402 | =item * | ||
| 1403 | |||
| 1404 | If you use your tagging schema across multiple services and resources, | ||
| 1405 | remember other services might have restrictions on allowed characters. | ||
| 1406 | Generally allowed characters: letters, spaces, and numbers | ||
| 1407 | representable in UTF-8, plus the following special characters: + - = . | ||
| 1408 | _ : / @. | ||
| 1409 | |||
| 1410 | =back | ||
| 1411 | |||
| 1412 | If you use tags as part of your security strategy, then adding or | ||
| 1413 | removing a tag can change permissions. If successfully completing this | ||
| 1414 | operation would result in you losing your permissions for this secret, | ||
| 1415 | then the operation is blocked and returns an Access Denied error. | ||
| 1416 | |||
| 1417 | B<Minimum permissions> | ||
| 1418 | |||
| 1419 | To run this command, you must have the following permissions: | ||
| 1420 | |||
| 1421 | =over | ||
| 1422 | |||
| 1423 | =item * | ||
| 1424 | |||
| 1425 | secretsmanager:TagResource | ||
| 1426 | |||
| 1427 | =back | ||
| 1428 | |||
| 1429 | B<Related operations> | ||
| 1430 | |||
| 1431 | =over | ||
| 1432 | |||
| 1433 | =item * | ||
| 1434 | |||
| 1435 | To remove one or more tags from the collection attached to a secret, | ||
| 1436 | use UntagResource. | ||
| 1437 | |||
| 1438 | =item * | ||
| 1439 | |||
| 1440 | To view the list of tags attached to a secret, use DescribeSecret. | ||
| 1441 | |||
| 1442 | =back | ||
| 1443 | |||
| 1444 | |||
| 1445 | |||
| 1446 | =head2 UntagResource | ||
| 1447 | |||
| 1448 | =over | ||
| 1449 | |||
| 1450 | =item SecretId => Str | ||
| 1451 | |||
| 1452 | =item TagKeys => ArrayRef[Str|Undef] | ||
| 1453 | |||
| 1454 | |||
| 1455 | =back | ||
| 1456 | |||
| 1457 | Each argument is described in detail in: L<Paws::SecretsManager::UntagResource> | ||
| 1458 | |||
| 1459 | Returns: nothing | ||
| 1460 | |||
| 1461 | Removes one or more tags from the specified secret. | ||
| 1462 | |||
| 1463 | This operation is idempotent. If a requested tag is not attached to the | ||
| 1464 | secret, no error is returned and the secret metadata is unchanged. | ||
| 1465 | |||
| 1466 | If you use tags as part of your security strategy, then removing a tag | ||
| 1467 | can change permissions. If successfully completing this operation would | ||
| 1468 | result in you losing your permissions for this secret, then the | ||
| 1469 | operation is blocked and returns an Access Denied error. | ||
| 1470 | |||
| 1471 | B<Minimum permissions> | ||
| 1472 | |||
| 1473 | To run this command, you must have the following permissions: | ||
| 1474 | |||
| 1475 | =over | ||
| 1476 | |||
| 1477 | =item * | ||
| 1478 | |||
| 1479 | secretsmanager:UntagResource | ||
| 1480 | |||
| 1481 | =back | ||
| 1482 | |||
| 1483 | B<Related operations> | ||
| 1484 | |||
| 1485 | =over | ||
| 1486 | |||
| 1487 | =item * | ||
| 1488 | |||
| 1489 | To add one or more tags to the collection attached to a secret, use | ||
| 1490 | TagResource. | ||
| 1491 | |||
| 1492 | =item * | ||
| 1493 | |||
| 1494 | To view the list of tags attached to a secret, use DescribeSecret. | ||
| 1495 | |||
| 1496 | =back | ||
| 1497 | |||
| 1498 | |||
| 1499 | |||
| 1500 | =head2 UpdateSecret | ||
| 1501 | |||
| 1502 | =over | ||
| 1503 | |||
| 1504 | =item SecretId => Str | ||
| 1505 | |||
| 1506 | =item [ClientRequestToken => Str] | ||
| 1507 | |||
| 1508 | =item [Description => Str] | ||
| 1509 | |||
| 1510 | =item [KmsKeyId => Str] | ||
| 1511 | |||
| 1512 | =item [SecretBinary => Str] | ||
| 1513 | |||
| 1514 | =item [SecretString => Str] | ||
| 1515 | |||
| 1516 | |||
| 1517 | =back | ||
| 1518 | |||
| 1519 | Each argument is described in detail in: L<Paws::SecretsManager::UpdateSecret> | ||
| 1520 | |||
| 1521 | Returns: a L<Paws::SecretsManager::UpdateSecretResponse> instance | ||
| 1522 | |||
| 1523 | Modifies many of the details of the specified secret. If you include a | ||
| 1524 | C<ClientRequestToken> and I<either> C<SecretString> or C<SecretBinary> | ||
| 1525 | then it also creates a new version attached to the secret. | ||
| 1526 | |||
| 1527 | To modify the rotation configuration of a secret, use RotateSecret | ||
| 1528 | instead. | ||
| 1529 | |||
| 1530 | The Secrets Manager console uses only the C<SecretString> parameter and | ||
| 1531 | therefore limits you to encrypting and storing only a text string. To | ||
| 1532 | encrypt and store binary data as part of the version of a secret, you | ||
| 1533 | must use either the AWS CLI or one of the AWS SDKs. | ||
| 1534 | |||
| 1535 | =over | ||
| 1536 | |||
| 1537 | =item * | ||
| 1538 | |||
| 1539 | If a version with a C<VersionId> with the same value as the | ||
| 1540 | C<ClientRequestToken> parameter already exists, the operation results | ||
| 1541 | in an error. You cannot modify an existing version, you can only create | ||
| 1542 | a new version. | ||
| 1543 | |||
| 1544 | =item * | ||
| 1545 | |||
| 1546 | If you include C<SecretString> or C<SecretBinary> to create a new | ||
| 1547 | secret version, Secrets Manager automatically attaches the staging | ||
| 1548 | label C<AWSCURRENT> to the new version. | ||
| 1549 | |||
| 1550 | =back | ||
| 1551 | |||
| 1552 | =over | ||
| 1553 | |||
| 1554 | =item * | ||
| 1555 | |||
| 1556 | If you call an operation to encrypt or decrypt the C<SecretString> or | ||
| 1557 | C<SecretBinary> for a secret in the same account as the calling user | ||
| 1558 | and that secret doesn't specify a AWS KMS encryption key, Secrets | ||
| 1559 | Manager uses the account's default AWS managed customer master key | ||
| 1560 | (CMK) with the alias C<aws/secretsmanager>. If this key doesn't already | ||
| 1561 | exist in your account then Secrets Manager creates it for you | ||
| 1562 | automatically. All users and roles in the same AWS account | ||
| 1563 | automatically have access to use the default CMK. Note that if an | ||
| 1564 | Secrets Manager API call results in AWS creating the account's | ||
| 1565 | AWS-managed CMK, it can result in a one-time significant delay in | ||
| 1566 | returning the result. | ||
| 1567 | |||
| 1568 | =item * | ||
| 1569 | |||
| 1570 | If the secret resides in a different AWS account from the credentials | ||
| 1571 | calling an API that requires encryption or decryption of the secret | ||
| 1572 | value then you must create and use a custom AWS KMS CMK because you | ||
| 1573 | can't access the default CMK for the account using credentials from a | ||
| 1574 | different AWS account. Store the ARN of the CMK in the secret when you | ||
| 1575 | create the secret or when you update it by including it in the | ||
| 1576 | C<KMSKeyId>. If you call an API that must encrypt or decrypt | ||
| 1577 | C<SecretString> or C<SecretBinary> using credentials from a different | ||
| 1578 | account then the AWS KMS key policy must grant cross-account access to | ||
| 1579 | that other account's user or role for both the kms:GenerateDataKey and | ||
| 1580 | kms:Decrypt operations. | ||
| 1581 | |||
| 1582 | =back | ||
| 1583 | |||
| 1584 | B<Minimum permissions> | ||
| 1585 | |||
| 1586 | To run this command, you must have the following permissions: | ||
| 1587 | |||
| 1588 | =over | ||
| 1589 | |||
| 1590 | =item * | ||
| 1591 | |||
| 1592 | secretsmanager:UpdateSecret | ||
| 1593 | |||
| 1594 | =item * | ||
| 1595 | |||
| 1596 | kms:GenerateDataKey - needed only if you use a custom AWS KMS key to | ||
| 1597 | encrypt the secret. You do not need this permission to use the | ||
| 1598 | account's AWS managed CMK for Secrets Manager. | ||
| 1599 | |||
| 1600 | =item * | ||
| 1601 | |||
| 1602 | kms:Decrypt - needed only if you use a custom AWS KMS key to encrypt | ||
| 1603 | the secret. You do not need this permission to use the account's AWS | ||
| 1604 | managed CMK for Secrets Manager. | ||
| 1605 | |||
| 1606 | =back | ||
| 1607 | |||
| 1608 | B<Related operations> | ||
| 1609 | |||
| 1610 | =over | ||
| 1611 | |||
| 1612 | =item * | ||
| 1613 | |||
| 1614 | To create a new secret, use CreateSecret. | ||
| 1615 | |||
| 1616 | =item * | ||
| 1617 | |||
| 1618 | To add only a new version to an existing secret, use PutSecretValue. | ||
| 1619 | |||
| 1620 | =item * | ||
| 1621 | |||
| 1622 | To get the details for a secret, use DescribeSecret. | ||
| 1623 | |||
| 1624 | =item * | ||
| 1625 | |||
| 1626 | To list the versions contained in a secret, use ListSecretVersionIds. | ||
| 1627 | |||
| 1628 | =back | ||
| 1629 | |||
| 1630 | |||
| 1631 | |||
| 1632 | =head2 UpdateSecretVersionStage | ||
| 1633 | |||
| 1634 | =over | ||
| 1635 | |||
| 1636 | =item SecretId => Str | ||
| 1637 | |||
| 1638 | =item VersionStage => Str | ||
| 1639 | |||
| 1640 | =item [MoveToVersionId => Str] | ||
| 1641 | |||
| 1642 | =item [RemoveFromVersionId => Str] | ||
| 1643 | |||
| 1644 | |||
| 1645 | =back | ||
| 1646 | |||
| 1647 | Each argument is described in detail in: L<Paws::SecretsManager::UpdateSecretVersionStage> | ||
| 1648 | |||
| 1649 | Returns: a L<Paws::SecretsManager::UpdateSecretVersionStageResponse> instance | ||
| 1650 | |||
| 1651 | Modifies the staging labels attached to a version of a secret. Staging | ||
| 1652 | labels are used to track a version as it progresses through the secret | ||
| 1653 | rotation process. You can attach a staging label to only one version of | ||
| 1654 | a secret at a time. If a staging label to be added is already attached | ||
| 1655 | to another version, then it is moved--removed from the other version | ||
| 1656 | first and then attached to this one. For more information about staging | ||
| 1657 | labels, see Staging Labels | ||
| 1658 | (https://docs.aws.amazon.com/secretsmanager/latest/userguide/terms-concepts.html#term_staging-label) | ||
| 1659 | in the I<AWS Secrets Manager User Guide>. | ||
| 1660 | |||
| 1661 | The staging labels that you specify in the C<VersionStage> parameter | ||
| 1662 | are added to the existing list of staging labels--they don't replace | ||
| 1663 | it. | ||
| 1664 | |||
| 1665 | You can move the C<AWSCURRENT> staging label to this version by | ||
| 1666 | including it in this call. | ||
| 1667 | |||
| 1668 | Whenever you move C<AWSCURRENT>, Secrets Manager automatically moves | ||
| 1669 | the label C<AWSPREVIOUS> to the version that C<AWSCURRENT> was removed | ||
| 1670 | from. | ||
| 1671 | |||
| 1672 | If this action results in the last label being removed from a version, | ||
| 1673 | then the version is considered to be 'deprecated' and can be deleted by | ||
| 1674 | Secrets Manager. | ||
| 1675 | |||
| 1676 | B<Minimum permissions> | ||
| 1677 | |||
| 1678 | To run this command, you must have the following permissions: | ||
| 1679 | |||
| 1680 | =over | ||
| 1681 | |||
| 1682 | =item * | ||
| 1683 | |||
| 1684 | secretsmanager:UpdateSecretVersionStage | ||
| 1685 | |||
| 1686 | =back | ||
| 1687 | |||
| 1688 | B<Related operations> | ||
| 1689 | |||
| 1690 | =over | ||
| 1691 | |||
| 1692 | =item * | ||
| 1693 | |||
| 1694 | To get the list of staging labels that are currently associated with a | ||
| 1695 | version of a secret, use C< DescribeSecret > and examine the | ||
| 1696 | C<SecretVersionsToStages> response value. | ||
| 1697 | |||
| 1698 | =back | ||
| 1699 | |||
| 1700 | |||
| 1701 | |||
| 1702 | =head2 ValidateResourcePolicy | ||
| 1703 | |||
| 1704 | =over | ||
| 1705 | |||
| 1706 | =item ResourcePolicy => Str | ||
| 1707 | |||
| 1708 | =item [SecretId => Str] | ||
| 1709 | |||
| 1710 | |||
| 1711 | =back | ||
| 1712 | |||
| 1713 | Each argument is described in detail in: L<Paws::SecretsManager::ValidateResourcePolicy> | ||
| 1714 | |||
| 1715 | Returns: a L<Paws::SecretsManager::ValidateResourcePolicyResponse> instance | ||
| 1716 | |||
| 1717 | Validates that the resource policy does not grant a wide range of IAM | ||
| 1718 | principals access to your secret. The JSON request string input and | ||
| 1719 | response output displays formatted code with white space and line | ||
| 1720 | breaks for better readability. Submit your input as a single line JSON | ||
| 1721 | string. A resource-based policy is optional for secrets. | ||
| 1722 | |||
| 1723 | The API performs three checks when validating the secret: | ||
| 1724 | |||
| 1725 | =over | ||
| 1726 | |||
| 1727 | =item * | ||
| 1728 | |||
| 1729 | Sends a call to Zelkova | ||
| 1730 | (https://aws.amazon.com/blogs/security/protect-sensitive-data-in-the-cloud-with-automated-reasoning-zelkova/), | ||
| 1731 | an automated reasoning engine, to ensure your Resource Policy does not | ||
| 1732 | allow broad access to your secret. | ||
| 1733 | |||
| 1734 | =item * | ||
| 1735 | |||
| 1736 | Checks for correct syntax in a policy. | ||
| 1737 | |||
| 1738 | =item * | ||
| 1739 | |||
| 1740 | Verifies the policy does not lock out a caller. | ||
| 1741 | |||
| 1742 | =back | ||
| 1743 | |||
| 1744 | B<Minimum Permissions> | ||
| 1745 | |||
| 1746 | You must have the permissions required to access the following APIs: | ||
| 1747 | |||
| 1748 | =over | ||
| 1749 | |||
| 1750 | =item * | ||
| 1751 | |||
| 1752 | C<secretsmanager:PutResourcePolicy> | ||
| 1753 | |||
| 1754 | =item * | ||
| 1755 | |||
| 1756 | C<secretsmanager:ValidateResourcePolicy> | ||
| 1757 | |||
| 1758 | =back | ||
| 1759 | |||
| 1760 | |||
| 1761 | |||
| 1762 | |||
| 1763 | |||
| 1764 | =head1 PAGINATORS | ||
| 1765 | |||
| 1766 | Paginator methods are helpers that repetively call methods that return partial results | ||
| 1767 | |||
| 1768 | =head2 ListAllSecrets(sub { },[Filters => ArrayRef[L<Paws::SecretsManager::Filter>], MaxResults => Int, NextToken => Str, SortOrder => Str]) | ||
| 1769 | |||
| 1770 | =head2 ListAllSecrets([Filters => ArrayRef[L<Paws::SecretsManager::Filter>], MaxResults => Int, NextToken => Str, SortOrder => Str]) | ||
| 1771 | |||
| 1772 | |||
| 1773 | If passed a sub as first parameter, it will call the sub for each element found in : | ||
| 1774 | |||
| 1775 | - SecretList, passing the object as the first parameter, and the string 'SecretList' as the second parameter | ||
| 1776 | |||
| 1777 | If not, it will return a a L<Paws::SecretsManager::ListSecretsResponse> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory. | ||
| 1778 | |||
| 1779 | |||
| 1780 | |||
| 1781 | |||
| 1782 | |||
| 1783 | =head1 SEE ALSO | ||
| 1784 | |||
| 1785 | This service class forms part of L<Paws> | ||
| 1786 | |||
| 1787 | =head1 BUGS and CONTRIBUTIONS | ||
| 1788 | |||
| 1789 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 1790 | |||
| 1791 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 1792 | |||
| 1793 | =cut | ||
| 1794 |