github.com/aavshr/aws-sdk-go@v1.41.3/service/secretsmanager/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package secretsmanager 4 5 import ( 6 "fmt" 7 "time" 8 9 "github.com/aavshr/aws-sdk-go/aws" 10 "github.com/aavshr/aws-sdk-go/aws/awsutil" 11 "github.com/aavshr/aws-sdk-go/aws/request" 12 "github.com/aavshr/aws-sdk-go/private/protocol" 13 "github.com/aavshr/aws-sdk-go/private/protocol/jsonrpc" 14 ) 15 16 const opCancelRotateSecret = "CancelRotateSecret" 17 18 // CancelRotateSecretRequest generates a "aws/request.Request" representing the 19 // client's request for the CancelRotateSecret operation. The "output" return 20 // value will be populated with the request's response once the request completes 21 // successfully. 22 // 23 // Use "Send" method on the returned Request to send the API call to the service. 24 // the "output" return value is not valid until after Send returns without error. 25 // 26 // See CancelRotateSecret for more information on using the CancelRotateSecret 27 // API call, and error handling. 28 // 29 // This method is useful when you want to inject custom logic or configuration 30 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 31 // 32 // 33 // // Example sending a request using the CancelRotateSecretRequest method. 34 // req, resp := client.CancelRotateSecretRequest(params) 35 // 36 // err := req.Send() 37 // if err == nil { // resp is now filled 38 // fmt.Println(resp) 39 // } 40 // 41 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CancelRotateSecret 42 func (c *SecretsManager) CancelRotateSecretRequest(input *CancelRotateSecretInput) (req *request.Request, output *CancelRotateSecretOutput) { 43 op := &request.Operation{ 44 Name: opCancelRotateSecret, 45 HTTPMethod: "POST", 46 HTTPPath: "/", 47 } 48 49 if input == nil { 50 input = &CancelRotateSecretInput{} 51 } 52 53 output = &CancelRotateSecretOutput{} 54 req = c.newRequest(op, input, output) 55 return 56 } 57 58 // CancelRotateSecret API operation for AWS Secrets Manager. 59 // 60 // Disables automatic scheduled rotation and cancels the rotation of a secret 61 // if currently in progress. 62 // 63 // To re-enable scheduled rotation, call RotateSecret with AutomaticallyRotateAfterDays 64 // set to a value greater than 0. This immediately rotates your secret and then 65 // enables the automatic schedule. 66 // 67 // If you cancel a rotation while in progress, it can leave the VersionStage 68 // labels in an unexpected state. Depending on the step of the rotation in progress, 69 // you might need to remove the staging label AWSPENDING from the partially 70 // created version, specified by the VersionId response value. You should also 71 // evaluate the partially rotated new version to see if it should be deleted, 72 // which you can do by removing all staging labels from the new version VersionStage 73 // field. 74 // 75 // To successfully start a rotation, the staging label AWSPENDING must be in 76 // one of the following states: 77 // 78 // * Not attached to any version at all 79 // 80 // * Attached to the same version as the staging label AWSCURRENT 81 // 82 // If the staging label AWSPENDING attached to a different version than the 83 // version with AWSCURRENT then the attempt to rotate fails. 84 // 85 // Minimum permissions 86 // 87 // To run this command, you must have the following permissions: 88 // 89 // * secretsmanager:CancelRotateSecret 90 // 91 // Related operations 92 // 93 // * To configure rotation for a secret or to manually trigger a rotation, 94 // use RotateSecret. 95 // 96 // * To get the rotation configuration details for a secret, use DescribeSecret. 97 // 98 // * To list all of the currently available secrets, use ListSecrets. 99 // 100 // * To list all of the versions currently associated with a secret, use 101 // ListSecretVersionIds. 102 // 103 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 104 // with awserr.Error's Code and Message methods to get detailed information about 105 // the error. 106 // 107 // See the AWS API reference guide for AWS Secrets Manager's 108 // API operation CancelRotateSecret for usage and error information. 109 // 110 // Returned Error Types: 111 // * ResourceNotFoundException 112 // We can't find the resource that you asked for. 113 // 114 // * InvalidParameterException 115 // You provided an invalid value for a parameter. 116 // 117 // * InternalServiceError 118 // An error occurred on the server side. 119 // 120 // * InvalidRequestException 121 // You provided a parameter value that is not valid for the current state of 122 // the resource. 123 // 124 // Possible causes: 125 // 126 // * You tried to perform the operation on a secret that's currently marked 127 // deleted. 128 // 129 // * You tried to enable rotation on a secret that doesn't already have a 130 // Lambda function ARN configured and you didn't include such an ARN as a 131 // parameter in this call. 132 // 133 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CancelRotateSecret 134 func (c *SecretsManager) CancelRotateSecret(input *CancelRotateSecretInput) (*CancelRotateSecretOutput, error) { 135 req, out := c.CancelRotateSecretRequest(input) 136 return out, req.Send() 137 } 138 139 // CancelRotateSecretWithContext is the same as CancelRotateSecret with the addition of 140 // the ability to pass a context and additional request options. 141 // 142 // See CancelRotateSecret for details on how to use this API operation. 143 // 144 // The context must be non-nil and will be used for request cancellation. If 145 // the context is nil a panic will occur. In the future the SDK may create 146 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 147 // for more information on using Contexts. 148 func (c *SecretsManager) CancelRotateSecretWithContext(ctx aws.Context, input *CancelRotateSecretInput, opts ...request.Option) (*CancelRotateSecretOutput, error) { 149 req, out := c.CancelRotateSecretRequest(input) 150 req.SetContext(ctx) 151 req.ApplyOptions(opts...) 152 return out, req.Send() 153 } 154 155 const opCreateSecret = "CreateSecret" 156 157 // CreateSecretRequest generates a "aws/request.Request" representing the 158 // client's request for the CreateSecret operation. The "output" return 159 // value will be populated with the request's response once the request completes 160 // successfully. 161 // 162 // Use "Send" method on the returned Request to send the API call to the service. 163 // the "output" return value is not valid until after Send returns without error. 164 // 165 // See CreateSecret for more information on using the CreateSecret 166 // API call, and error handling. 167 // 168 // This method is useful when you want to inject custom logic or configuration 169 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 170 // 171 // 172 // // Example sending a request using the CreateSecretRequest method. 173 // req, resp := client.CreateSecretRequest(params) 174 // 175 // err := req.Send() 176 // if err == nil { // resp is now filled 177 // fmt.Println(resp) 178 // } 179 // 180 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CreateSecret 181 func (c *SecretsManager) CreateSecretRequest(input *CreateSecretInput) (req *request.Request, output *CreateSecretOutput) { 182 op := &request.Operation{ 183 Name: opCreateSecret, 184 HTTPMethod: "POST", 185 HTTPPath: "/", 186 } 187 188 if input == nil { 189 input = &CreateSecretInput{} 190 } 191 192 output = &CreateSecretOutput{} 193 req = c.newRequest(op, input, output) 194 return 195 } 196 197 // CreateSecret API operation for AWS Secrets Manager. 198 // 199 // Creates a new secret. A secret in Secrets Manager consists of both the protected 200 // secret data and the important information needed to manage the secret. 201 // 202 // Secrets Manager stores the encrypted secret data in one of a collection of 203 // "versions" associated with the secret. Each version contains a copy of the 204 // encrypted secret data. Each version is associated with one or more "staging 205 // labels" that identify where the version is in the rotation cycle. The SecretVersionsToStages 206 // field of the secret contains the mapping of staging labels to the active 207 // versions of the secret. Versions without a staging label are considered deprecated 208 // and not included in the list. 209 // 210 // You provide the secret data to be encrypted by putting text in either the 211 // SecretString parameter or binary data in the SecretBinary parameter, but 212 // not both. If you include SecretString or SecretBinary then Secrets Manager 213 // also creates an initial secret version and automatically attaches the staging 214 // label AWSCURRENT to the new version. 215 // 216 // * If you call an operation to encrypt or decrypt the SecretString or SecretBinary 217 // for a secret in the same account as the calling user and that secret doesn't 218 // specify a Amazon Web Services KMS encryption key, Secrets Manager uses 219 // the account's default Amazon Web Services managed customer master key 220 // (CMK) with the alias aws/secretsmanager. If this key doesn't already exist 221 // in your account then Secrets Manager creates it for you automatically. 222 // All users and roles in the same Amazon Web Services account automatically 223 // have access to use the default CMK. Note that if an Secrets Manager API 224 // call results in Amazon Web Services creating the account's Amazon Web 225 // Services-managed CMK, it can result in a one-time significant delay in 226 // returning the result. 227 // 228 // * If the secret resides in a different Amazon Web Services account from 229 // the credentials calling an API that requires encryption or decryption 230 // of the secret value then you must create and use a custom Amazon Web Services 231 // KMS CMK because you can't access the default CMK for the account using 232 // credentials from a different Amazon Web Services account. Store the ARN 233 // of the CMK in the secret when you create the secret or when you update 234 // it by including it in the KMSKeyId. If you call an API that must encrypt 235 // or decrypt SecretString or SecretBinary using credentials from a different 236 // account then the Amazon Web Services KMS key policy must grant cross-account 237 // access to that other account's user or role for both the kms:GenerateDataKey 238 // and kms:Decrypt operations. 239 // 240 // Minimum permissions 241 // 242 // To run this command, you must have the following permissions: 243 // 244 // * secretsmanager:CreateSecret 245 // 246 // * kms:GenerateDataKey - needed only if you use a customer-managed Amazon 247 // Web Services KMS key to encrypt the secret. You do not need this permission 248 // to use the account default Amazon Web Services managed CMK for Secrets 249 // Manager. 250 // 251 // * kms:Decrypt - needed only if you use a customer-managed Amazon Web Services 252 // KMS key to encrypt the secret. You do not need this permission to use 253 // the account default Amazon Web Services managed CMK for Secrets Manager. 254 // 255 // * secretsmanager:TagResource - needed only if you include the Tags parameter. 256 // 257 // Related operations 258 // 259 // * To delete a secret, use DeleteSecret. 260 // 261 // * To modify an existing secret, use UpdateSecret. 262 // 263 // * To create a new version of a secret, use PutSecretValue. 264 // 265 // * To retrieve the encrypted secure string and secure binary values, use 266 // GetSecretValue. 267 // 268 // * To retrieve all other details for a secret, use DescribeSecret. This 269 // does not include the encrypted secure string and secure binary values. 270 // 271 // * To retrieve the list of secret versions associated with the current 272 // secret, use DescribeSecret and examine the SecretVersionsToStages response 273 // value. 274 // 275 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 276 // with awserr.Error's Code and Message methods to get detailed information about 277 // the error. 278 // 279 // See the AWS API reference guide for AWS Secrets Manager's 280 // API operation CreateSecret for usage and error information. 281 // 282 // Returned Error Types: 283 // * InvalidParameterException 284 // You provided an invalid value for a parameter. 285 // 286 // * InvalidRequestException 287 // You provided a parameter value that is not valid for the current state of 288 // the resource. 289 // 290 // Possible causes: 291 // 292 // * You tried to perform the operation on a secret that's currently marked 293 // deleted. 294 // 295 // * You tried to enable rotation on a secret that doesn't already have a 296 // Lambda function ARN configured and you didn't include such an ARN as a 297 // parameter in this call. 298 // 299 // * LimitExceededException 300 // The request failed because it would exceed one of the Secrets Manager internal 301 // limits. 302 // 303 // * EncryptionFailure 304 // Secrets Manager can't encrypt the protected secret text using the provided 305 // KMS key. Check that the customer master key (CMK) is available, enabled, 306 // and not in an invalid state. For more information, see How Key State Affects 307 // Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). 308 // 309 // * ResourceExistsException 310 // A resource with the ID you requested already exists. 311 // 312 // * ResourceNotFoundException 313 // We can't find the resource that you asked for. 314 // 315 // * MalformedPolicyDocumentException 316 // You provided a resource-based policy with syntax errors. 317 // 318 // * InternalServiceError 319 // An error occurred on the server side. 320 // 321 // * PreconditionNotMetException 322 // The request failed because you did not complete all the prerequisite steps. 323 // 324 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CreateSecret 325 func (c *SecretsManager) CreateSecret(input *CreateSecretInput) (*CreateSecretOutput, error) { 326 req, out := c.CreateSecretRequest(input) 327 return out, req.Send() 328 } 329 330 // CreateSecretWithContext is the same as CreateSecret with the addition of 331 // the ability to pass a context and additional request options. 332 // 333 // See CreateSecret for details on how to use this API operation. 334 // 335 // The context must be non-nil and will be used for request cancellation. If 336 // the context is nil a panic will occur. In the future the SDK may create 337 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 338 // for more information on using Contexts. 339 func (c *SecretsManager) CreateSecretWithContext(ctx aws.Context, input *CreateSecretInput, opts ...request.Option) (*CreateSecretOutput, error) { 340 req, out := c.CreateSecretRequest(input) 341 req.SetContext(ctx) 342 req.ApplyOptions(opts...) 343 return out, req.Send() 344 } 345 346 const opDeleteResourcePolicy = "DeleteResourcePolicy" 347 348 // DeleteResourcePolicyRequest generates a "aws/request.Request" representing the 349 // client's request for the DeleteResourcePolicy operation. The "output" return 350 // value will be populated with the request's response once the request completes 351 // successfully. 352 // 353 // Use "Send" method on the returned Request to send the API call to the service. 354 // the "output" return value is not valid until after Send returns without error. 355 // 356 // See DeleteResourcePolicy for more information on using the DeleteResourcePolicy 357 // API call, and error handling. 358 // 359 // This method is useful when you want to inject custom logic or configuration 360 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 361 // 362 // 363 // // Example sending a request using the DeleteResourcePolicyRequest method. 364 // req, resp := client.DeleteResourcePolicyRequest(params) 365 // 366 // err := req.Send() 367 // if err == nil { // resp is now filled 368 // fmt.Println(resp) 369 // } 370 // 371 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteResourcePolicy 372 func (c *SecretsManager) DeleteResourcePolicyRequest(input *DeleteResourcePolicyInput) (req *request.Request, output *DeleteResourcePolicyOutput) { 373 op := &request.Operation{ 374 Name: opDeleteResourcePolicy, 375 HTTPMethod: "POST", 376 HTTPPath: "/", 377 } 378 379 if input == nil { 380 input = &DeleteResourcePolicyInput{} 381 } 382 383 output = &DeleteResourcePolicyOutput{} 384 req = c.newRequest(op, input, output) 385 return 386 } 387 388 // DeleteResourcePolicy API operation for AWS Secrets Manager. 389 // 390 // Deletes the resource-based permission policy attached to the secret. 391 // 392 // Minimum permissions 393 // 394 // To run this command, you must have the following permissions: 395 // 396 // * secretsmanager:DeleteResourcePolicy 397 // 398 // Related operations 399 // 400 // * To attach a resource policy to a secret, use PutResourcePolicy. 401 // 402 // * To retrieve the current resource-based policy attached to a secret, 403 // use GetResourcePolicy. 404 // 405 // * To list all of the currently available secrets, use ListSecrets. 406 // 407 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 408 // with awserr.Error's Code and Message methods to get detailed information about 409 // the error. 410 // 411 // See the AWS API reference guide for AWS Secrets Manager's 412 // API operation DeleteResourcePolicy for usage and error information. 413 // 414 // Returned Error Types: 415 // * ResourceNotFoundException 416 // We can't find the resource that you asked for. 417 // 418 // * InternalServiceError 419 // An error occurred on the server side. 420 // 421 // * InvalidRequestException 422 // You provided a parameter value that is not valid for the current state of 423 // the resource. 424 // 425 // Possible causes: 426 // 427 // * You tried to perform the operation on a secret that's currently marked 428 // deleted. 429 // 430 // * You tried to enable rotation on a secret that doesn't already have a 431 // Lambda function ARN configured and you didn't include such an ARN as a 432 // parameter in this call. 433 // 434 // * InvalidParameterException 435 // You provided an invalid value for a parameter. 436 // 437 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteResourcePolicy 438 func (c *SecretsManager) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error) { 439 req, out := c.DeleteResourcePolicyRequest(input) 440 return out, req.Send() 441 } 442 443 // DeleteResourcePolicyWithContext is the same as DeleteResourcePolicy with the addition of 444 // the ability to pass a context and additional request options. 445 // 446 // See DeleteResourcePolicy for details on how to use this API operation. 447 // 448 // The context must be non-nil and will be used for request cancellation. If 449 // the context is nil a panic will occur. In the future the SDK may create 450 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 451 // for more information on using Contexts. 452 func (c *SecretsManager) DeleteResourcePolicyWithContext(ctx aws.Context, input *DeleteResourcePolicyInput, opts ...request.Option) (*DeleteResourcePolicyOutput, error) { 453 req, out := c.DeleteResourcePolicyRequest(input) 454 req.SetContext(ctx) 455 req.ApplyOptions(opts...) 456 return out, req.Send() 457 } 458 459 const opDeleteSecret = "DeleteSecret" 460 461 // DeleteSecretRequest generates a "aws/request.Request" representing the 462 // client's request for the DeleteSecret operation. The "output" return 463 // value will be populated with the request's response once the request completes 464 // successfully. 465 // 466 // Use "Send" method on the returned Request to send the API call to the service. 467 // the "output" return value is not valid until after Send returns without error. 468 // 469 // See DeleteSecret for more information on using the DeleteSecret 470 // API call, and error handling. 471 // 472 // This method is useful when you want to inject custom logic or configuration 473 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 474 // 475 // 476 // // Example sending a request using the DeleteSecretRequest method. 477 // req, resp := client.DeleteSecretRequest(params) 478 // 479 // err := req.Send() 480 // if err == nil { // resp is now filled 481 // fmt.Println(resp) 482 // } 483 // 484 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteSecret 485 func (c *SecretsManager) DeleteSecretRequest(input *DeleteSecretInput) (req *request.Request, output *DeleteSecretOutput) { 486 op := &request.Operation{ 487 Name: opDeleteSecret, 488 HTTPMethod: "POST", 489 HTTPPath: "/", 490 } 491 492 if input == nil { 493 input = &DeleteSecretInput{} 494 } 495 496 output = &DeleteSecretOutput{} 497 req = c.newRequest(op, input, output) 498 return 499 } 500 501 // DeleteSecret API operation for AWS Secrets Manager. 502 // 503 // Deletes an entire secret and all of the versions. You can optionally include 504 // a recovery window during which you can restore the secret. If you don't specify 505 // a recovery window value, the operation defaults to 30 days. Secrets Manager 506 // attaches a DeletionDate stamp to the secret that specifies the end of the 507 // recovery window. At the end of the recovery window, Secrets Manager deletes 508 // the secret permanently. 509 // 510 // At any time before recovery window ends, you can use RestoreSecret to remove 511 // the DeletionDate and cancel the deletion of the secret. 512 // 513 // You cannot access the encrypted secret information in any secret scheduled 514 // for deletion. If you need to access that information, you must cancel the 515 // deletion with RestoreSecret and then retrieve the information. 516 // 517 // * There is no explicit operation to delete a version of a secret. Instead, 518 // remove all staging labels from the VersionStage field of a version. That 519 // marks the version as deprecated and allows Secrets Manager to delete it 520 // as needed. Versions without any staging labels do not show up in ListSecretVersionIds 521 // unless you specify IncludeDeprecated. 522 // 523 // * The permanent secret deletion at the end of the waiting period is performed 524 // as a background task with low priority. There is no guarantee of a specific 525 // time after the recovery window for the actual delete operation to occur. 526 // 527 // Minimum permissions 528 // 529 // To run this command, you must have the following permissions: 530 // 531 // * secretsmanager:DeleteSecret 532 // 533 // Related operations 534 // 535 // * To create a secret, use CreateSecret. 536 // 537 // * To cancel deletion of a version of a secret before the recovery window 538 // has expired, use RestoreSecret. 539 // 540 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 541 // with awserr.Error's Code and Message methods to get detailed information about 542 // the error. 543 // 544 // See the AWS API reference guide for AWS Secrets Manager's 545 // API operation DeleteSecret for usage and error information. 546 // 547 // Returned Error Types: 548 // * ResourceNotFoundException 549 // We can't find the resource that you asked for. 550 // 551 // * InvalidParameterException 552 // You provided an invalid value for a parameter. 553 // 554 // * InvalidRequestException 555 // You provided a parameter value that is not valid for the current state of 556 // the resource. 557 // 558 // Possible causes: 559 // 560 // * You tried to perform the operation on a secret that's currently marked 561 // deleted. 562 // 563 // * You tried to enable rotation on a secret that doesn't already have a 564 // Lambda function ARN configured and you didn't include such an ARN as a 565 // parameter in this call. 566 // 567 // * InternalServiceError 568 // An error occurred on the server side. 569 // 570 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteSecret 571 func (c *SecretsManager) DeleteSecret(input *DeleteSecretInput) (*DeleteSecretOutput, error) { 572 req, out := c.DeleteSecretRequest(input) 573 return out, req.Send() 574 } 575 576 // DeleteSecretWithContext is the same as DeleteSecret with the addition of 577 // the ability to pass a context and additional request options. 578 // 579 // See DeleteSecret for details on how to use this API operation. 580 // 581 // The context must be non-nil and will be used for request cancellation. If 582 // the context is nil a panic will occur. In the future the SDK may create 583 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 584 // for more information on using Contexts. 585 func (c *SecretsManager) DeleteSecretWithContext(ctx aws.Context, input *DeleteSecretInput, opts ...request.Option) (*DeleteSecretOutput, error) { 586 req, out := c.DeleteSecretRequest(input) 587 req.SetContext(ctx) 588 req.ApplyOptions(opts...) 589 return out, req.Send() 590 } 591 592 const opDescribeSecret = "DescribeSecret" 593 594 // DescribeSecretRequest generates a "aws/request.Request" representing the 595 // client's request for the DescribeSecret operation. The "output" return 596 // value will be populated with the request's response once the request completes 597 // successfully. 598 // 599 // Use "Send" method on the returned Request to send the API call to the service. 600 // the "output" return value is not valid until after Send returns without error. 601 // 602 // See DescribeSecret for more information on using the DescribeSecret 603 // API call, and error handling. 604 // 605 // This method is useful when you want to inject custom logic or configuration 606 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 607 // 608 // 609 // // Example sending a request using the DescribeSecretRequest method. 610 // req, resp := client.DescribeSecretRequest(params) 611 // 612 // err := req.Send() 613 // if err == nil { // resp is now filled 614 // fmt.Println(resp) 615 // } 616 // 617 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DescribeSecret 618 func (c *SecretsManager) DescribeSecretRequest(input *DescribeSecretInput) (req *request.Request, output *DescribeSecretOutput) { 619 op := &request.Operation{ 620 Name: opDescribeSecret, 621 HTTPMethod: "POST", 622 HTTPPath: "/", 623 } 624 625 if input == nil { 626 input = &DescribeSecretInput{} 627 } 628 629 output = &DescribeSecretOutput{} 630 req = c.newRequest(op, input, output) 631 return 632 } 633 634 // DescribeSecret API operation for AWS Secrets Manager. 635 // 636 // Retrieves the details of a secret. It does not include the encrypted fields. 637 // Secrets Manager only returns fields populated with a value in the response. 638 // 639 // Minimum permissions 640 // 641 // To run this command, you must have the following permissions: 642 // 643 // * secretsmanager:DescribeSecret 644 // 645 // Related operations 646 // 647 // * To create a secret, use CreateSecret. 648 // 649 // * To modify a secret, use UpdateSecret. 650 // 651 // * To retrieve the encrypted secret information in a version of the secret, 652 // use GetSecretValue. 653 // 654 // * To list all of the secrets in the Amazon Web Services account, use ListSecrets. 655 // 656 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 657 // with awserr.Error's Code and Message methods to get detailed information about 658 // the error. 659 // 660 // See the AWS API reference guide for AWS Secrets Manager's 661 // API operation DescribeSecret for usage and error information. 662 // 663 // Returned Error Types: 664 // * ResourceNotFoundException 665 // We can't find the resource that you asked for. 666 // 667 // * InternalServiceError 668 // An error occurred on the server side. 669 // 670 // * InvalidParameterException 671 // You provided an invalid value for a parameter. 672 // 673 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DescribeSecret 674 func (c *SecretsManager) DescribeSecret(input *DescribeSecretInput) (*DescribeSecretOutput, error) { 675 req, out := c.DescribeSecretRequest(input) 676 return out, req.Send() 677 } 678 679 // DescribeSecretWithContext is the same as DescribeSecret with the addition of 680 // the ability to pass a context and additional request options. 681 // 682 // See DescribeSecret for details on how to use this API operation. 683 // 684 // The context must be non-nil and will be used for request cancellation. If 685 // the context is nil a panic will occur. In the future the SDK may create 686 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 687 // for more information on using Contexts. 688 func (c *SecretsManager) DescribeSecretWithContext(ctx aws.Context, input *DescribeSecretInput, opts ...request.Option) (*DescribeSecretOutput, error) { 689 req, out := c.DescribeSecretRequest(input) 690 req.SetContext(ctx) 691 req.ApplyOptions(opts...) 692 return out, req.Send() 693 } 694 695 const opGetRandomPassword = "GetRandomPassword" 696 697 // GetRandomPasswordRequest generates a "aws/request.Request" representing the 698 // client's request for the GetRandomPassword operation. The "output" return 699 // value will be populated with the request's response once the request completes 700 // successfully. 701 // 702 // Use "Send" method on the returned Request to send the API call to the service. 703 // the "output" return value is not valid until after Send returns without error. 704 // 705 // See GetRandomPassword for more information on using the GetRandomPassword 706 // API call, and error handling. 707 // 708 // This method is useful when you want to inject custom logic or configuration 709 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 710 // 711 // 712 // // Example sending a request using the GetRandomPasswordRequest method. 713 // req, resp := client.GetRandomPasswordRequest(params) 714 // 715 // err := req.Send() 716 // if err == nil { // resp is now filled 717 // fmt.Println(resp) 718 // } 719 // 720 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetRandomPassword 721 func (c *SecretsManager) GetRandomPasswordRequest(input *GetRandomPasswordInput) (req *request.Request, output *GetRandomPasswordOutput) { 722 op := &request.Operation{ 723 Name: opGetRandomPassword, 724 HTTPMethod: "POST", 725 HTTPPath: "/", 726 } 727 728 if input == nil { 729 input = &GetRandomPasswordInput{} 730 } 731 732 output = &GetRandomPasswordOutput{} 733 req = c.newRequest(op, input, output) 734 return 735 } 736 737 // GetRandomPassword API operation for AWS Secrets Manager. 738 // 739 // Generates a random password of the specified complexity. This operation is 740 // intended for use in the Lambda rotation function. Per best practice, we recommend 741 // that you specify the maximum length and include every character type that 742 // the system you are generating a password for can support. 743 // 744 // Minimum permissions 745 // 746 // To run this command, you must have the following permissions: 747 // 748 // * secretsmanager:GetRandomPassword 749 // 750 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 751 // with awserr.Error's Code and Message methods to get detailed information about 752 // the error. 753 // 754 // See the AWS API reference guide for AWS Secrets Manager's 755 // API operation GetRandomPassword for usage and error information. 756 // 757 // Returned Error Types: 758 // * InvalidParameterException 759 // You provided an invalid value for a parameter. 760 // 761 // * InvalidRequestException 762 // You provided a parameter value that is not valid for the current state of 763 // the resource. 764 // 765 // Possible causes: 766 // 767 // * You tried to perform the operation on a secret that's currently marked 768 // deleted. 769 // 770 // * You tried to enable rotation on a secret that doesn't already have a 771 // Lambda function ARN configured and you didn't include such an ARN as a 772 // parameter in this call. 773 // 774 // * InternalServiceError 775 // An error occurred on the server side. 776 // 777 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetRandomPassword 778 func (c *SecretsManager) GetRandomPassword(input *GetRandomPasswordInput) (*GetRandomPasswordOutput, error) { 779 req, out := c.GetRandomPasswordRequest(input) 780 return out, req.Send() 781 } 782 783 // GetRandomPasswordWithContext is the same as GetRandomPassword with the addition of 784 // the ability to pass a context and additional request options. 785 // 786 // See GetRandomPassword for details on how to use this API operation. 787 // 788 // The context must be non-nil and will be used for request cancellation. If 789 // the context is nil a panic will occur. In the future the SDK may create 790 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 791 // for more information on using Contexts. 792 func (c *SecretsManager) GetRandomPasswordWithContext(ctx aws.Context, input *GetRandomPasswordInput, opts ...request.Option) (*GetRandomPasswordOutput, error) { 793 req, out := c.GetRandomPasswordRequest(input) 794 req.SetContext(ctx) 795 req.ApplyOptions(opts...) 796 return out, req.Send() 797 } 798 799 const opGetResourcePolicy = "GetResourcePolicy" 800 801 // GetResourcePolicyRequest generates a "aws/request.Request" representing the 802 // client's request for the GetResourcePolicy operation. The "output" return 803 // value will be populated with the request's response once the request completes 804 // successfully. 805 // 806 // Use "Send" method on the returned Request to send the API call to the service. 807 // the "output" return value is not valid until after Send returns without error. 808 // 809 // See GetResourcePolicy for more information on using the GetResourcePolicy 810 // API call, and error handling. 811 // 812 // This method is useful when you want to inject custom logic or configuration 813 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 814 // 815 // 816 // // Example sending a request using the GetResourcePolicyRequest method. 817 // req, resp := client.GetResourcePolicyRequest(params) 818 // 819 // err := req.Send() 820 // if err == nil { // resp is now filled 821 // fmt.Println(resp) 822 // } 823 // 824 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetResourcePolicy 825 func (c *SecretsManager) GetResourcePolicyRequest(input *GetResourcePolicyInput) (req *request.Request, output *GetResourcePolicyOutput) { 826 op := &request.Operation{ 827 Name: opGetResourcePolicy, 828 HTTPMethod: "POST", 829 HTTPPath: "/", 830 } 831 832 if input == nil { 833 input = &GetResourcePolicyInput{} 834 } 835 836 output = &GetResourcePolicyOutput{} 837 req = c.newRequest(op, input, output) 838 return 839 } 840 841 // GetResourcePolicy API operation for AWS Secrets Manager. 842 // 843 // Retrieves the JSON text of the resource-based policy document attached to 844 // the specified secret. The JSON request string input and response output displays 845 // formatted code with white space and line breaks for better readability. Submit 846 // your input as a single line JSON string. 847 // 848 // Minimum permissions 849 // 850 // To run this command, you must have the following permissions: 851 // 852 // * secretsmanager:GetResourcePolicy 853 // 854 // Related operations 855 // 856 // * To attach a resource policy to a secret, use PutResourcePolicy. 857 // 858 // * To delete the resource-based policy attached to a secret, use DeleteResourcePolicy. 859 // 860 // * To list all of the currently available secrets, use ListSecrets. 861 // 862 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 863 // with awserr.Error's Code and Message methods to get detailed information about 864 // the error. 865 // 866 // See the AWS API reference guide for AWS Secrets Manager's 867 // API operation GetResourcePolicy for usage and error information. 868 // 869 // Returned Error Types: 870 // * ResourceNotFoundException 871 // We can't find the resource that you asked for. 872 // 873 // * InternalServiceError 874 // An error occurred on the server side. 875 // 876 // * InvalidRequestException 877 // You provided a parameter value that is not valid for the current state of 878 // the resource. 879 // 880 // Possible causes: 881 // 882 // * You tried to perform the operation on a secret that's currently marked 883 // deleted. 884 // 885 // * You tried to enable rotation on a secret that doesn't already have a 886 // Lambda function ARN configured and you didn't include such an ARN as a 887 // parameter in this call. 888 // 889 // * InvalidParameterException 890 // You provided an invalid value for a parameter. 891 // 892 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetResourcePolicy 893 func (c *SecretsManager) GetResourcePolicy(input *GetResourcePolicyInput) (*GetResourcePolicyOutput, error) { 894 req, out := c.GetResourcePolicyRequest(input) 895 return out, req.Send() 896 } 897 898 // GetResourcePolicyWithContext is the same as GetResourcePolicy with the addition of 899 // the ability to pass a context and additional request options. 900 // 901 // See GetResourcePolicy for details on how to use this API operation. 902 // 903 // The context must be non-nil and will be used for request cancellation. If 904 // the context is nil a panic will occur. In the future the SDK may create 905 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 906 // for more information on using Contexts. 907 func (c *SecretsManager) GetResourcePolicyWithContext(ctx aws.Context, input *GetResourcePolicyInput, opts ...request.Option) (*GetResourcePolicyOutput, error) { 908 req, out := c.GetResourcePolicyRequest(input) 909 req.SetContext(ctx) 910 req.ApplyOptions(opts...) 911 return out, req.Send() 912 } 913 914 const opGetSecretValue = "GetSecretValue" 915 916 // GetSecretValueRequest generates a "aws/request.Request" representing the 917 // client's request for the GetSecretValue operation. The "output" return 918 // value will be populated with the request's response once the request completes 919 // successfully. 920 // 921 // Use "Send" method on the returned Request to send the API call to the service. 922 // the "output" return value is not valid until after Send returns without error. 923 // 924 // See GetSecretValue for more information on using the GetSecretValue 925 // API call, and error handling. 926 // 927 // This method is useful when you want to inject custom logic or configuration 928 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 929 // 930 // 931 // // Example sending a request using the GetSecretValueRequest method. 932 // req, resp := client.GetSecretValueRequest(params) 933 // 934 // err := req.Send() 935 // if err == nil { // resp is now filled 936 // fmt.Println(resp) 937 // } 938 // 939 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetSecretValue 940 func (c *SecretsManager) GetSecretValueRequest(input *GetSecretValueInput) (req *request.Request, output *GetSecretValueOutput) { 941 op := &request.Operation{ 942 Name: opGetSecretValue, 943 HTTPMethod: "POST", 944 HTTPPath: "/", 945 } 946 947 if input == nil { 948 input = &GetSecretValueInput{} 949 } 950 951 output = &GetSecretValueOutput{} 952 req = c.newRequest(op, input, output) 953 return 954 } 955 956 // GetSecretValue API operation for AWS Secrets Manager. 957 // 958 // Retrieves the contents of the encrypted fields SecretString or SecretBinary 959 // from the specified version of a secret, whichever contains content. 960 // 961 // Minimum permissions 962 // 963 // To run this command, you must have the following permissions: 964 // 965 // * secretsmanager:GetSecretValue 966 // 967 // * kms:Decrypt - required only if you use a customer-managed Amazon Web 968 // Services KMS key to encrypt the secret. You do not need this permission 969 // to use the account's default Amazon Web Services managed CMK for Secrets 970 // Manager. 971 // 972 // Related operations 973 // 974 // * To create a new version of the secret with different encrypted information, 975 // use PutSecretValue. 976 // 977 // * To retrieve the non-encrypted details for the secret, use DescribeSecret. 978 // 979 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 980 // with awserr.Error's Code and Message methods to get detailed information about 981 // the error. 982 // 983 // See the AWS API reference guide for AWS Secrets Manager's 984 // API operation GetSecretValue for usage and error information. 985 // 986 // Returned Error Types: 987 // * ResourceNotFoundException 988 // We can't find the resource that you asked for. 989 // 990 // * InvalidParameterException 991 // You provided an invalid value for a parameter. 992 // 993 // * InvalidRequestException 994 // You provided a parameter value that is not valid for the current state of 995 // the resource. 996 // 997 // Possible causes: 998 // 999 // * You tried to perform the operation on a secret that's currently marked 1000 // deleted. 1001 // 1002 // * You tried to enable rotation on a secret that doesn't already have a 1003 // Lambda function ARN configured and you didn't include such an ARN as a 1004 // parameter in this call. 1005 // 1006 // * DecryptionFailure 1007 // Secrets Manager can't decrypt the protected secret text using the provided 1008 // KMS key. 1009 // 1010 // * InternalServiceError 1011 // An error occurred on the server side. 1012 // 1013 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetSecretValue 1014 func (c *SecretsManager) GetSecretValue(input *GetSecretValueInput) (*GetSecretValueOutput, error) { 1015 req, out := c.GetSecretValueRequest(input) 1016 return out, req.Send() 1017 } 1018 1019 // GetSecretValueWithContext is the same as GetSecretValue with the addition of 1020 // the ability to pass a context and additional request options. 1021 // 1022 // See GetSecretValue for details on how to use this API operation. 1023 // 1024 // The context must be non-nil and will be used for request cancellation. If 1025 // the context is nil a panic will occur. In the future the SDK may create 1026 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1027 // for more information on using Contexts. 1028 func (c *SecretsManager) GetSecretValueWithContext(ctx aws.Context, input *GetSecretValueInput, opts ...request.Option) (*GetSecretValueOutput, error) { 1029 req, out := c.GetSecretValueRequest(input) 1030 req.SetContext(ctx) 1031 req.ApplyOptions(opts...) 1032 return out, req.Send() 1033 } 1034 1035 const opListSecretVersionIds = "ListSecretVersionIds" 1036 1037 // ListSecretVersionIdsRequest generates a "aws/request.Request" representing the 1038 // client's request for the ListSecretVersionIds operation. The "output" return 1039 // value will be populated with the request's response once the request completes 1040 // successfully. 1041 // 1042 // Use "Send" method on the returned Request to send the API call to the service. 1043 // the "output" return value is not valid until after Send returns without error. 1044 // 1045 // See ListSecretVersionIds for more information on using the ListSecretVersionIds 1046 // API call, and error handling. 1047 // 1048 // This method is useful when you want to inject custom logic or configuration 1049 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1050 // 1051 // 1052 // // Example sending a request using the ListSecretVersionIdsRequest method. 1053 // req, resp := client.ListSecretVersionIdsRequest(params) 1054 // 1055 // err := req.Send() 1056 // if err == nil { // resp is now filled 1057 // fmt.Println(resp) 1058 // } 1059 // 1060 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecretVersionIds 1061 func (c *SecretsManager) ListSecretVersionIdsRequest(input *ListSecretVersionIdsInput) (req *request.Request, output *ListSecretVersionIdsOutput) { 1062 op := &request.Operation{ 1063 Name: opListSecretVersionIds, 1064 HTTPMethod: "POST", 1065 HTTPPath: "/", 1066 Paginator: &request.Paginator{ 1067 InputTokens: []string{"NextToken"}, 1068 OutputTokens: []string{"NextToken"}, 1069 LimitToken: "MaxResults", 1070 TruncationToken: "", 1071 }, 1072 } 1073 1074 if input == nil { 1075 input = &ListSecretVersionIdsInput{} 1076 } 1077 1078 output = &ListSecretVersionIdsOutput{} 1079 req = c.newRequest(op, input, output) 1080 return 1081 } 1082 1083 // ListSecretVersionIds API operation for AWS Secrets Manager. 1084 // 1085 // Lists all of the versions attached to the specified secret. The output does 1086 // not include the SecretString or SecretBinary fields. By default, the list 1087 // includes only versions that have at least one staging label in VersionStage 1088 // attached. 1089 // 1090 // Always check the NextToken response parameter when calling any of the List* 1091 // operations. These operations can occasionally return an empty or shorter 1092 // than expected list of results even when there more results become available. 1093 // When this happens, the NextToken response parameter contains a value to pass 1094 // to the next call to the same API to request the next part of the list. 1095 // 1096 // Minimum permissions 1097 // 1098 // To run this command, you must have the following permissions: 1099 // 1100 // * secretsmanager:ListSecretVersionIds 1101 // 1102 // Related operations 1103 // 1104 // * To list the secrets in an account, use ListSecrets. 1105 // 1106 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1107 // with awserr.Error's Code and Message methods to get detailed information about 1108 // the error. 1109 // 1110 // See the AWS API reference guide for AWS Secrets Manager's 1111 // API operation ListSecretVersionIds for usage and error information. 1112 // 1113 // Returned Error Types: 1114 // * InvalidNextTokenException 1115 // You provided an invalid NextToken value. 1116 // 1117 // * ResourceNotFoundException 1118 // We can't find the resource that you asked for. 1119 // 1120 // * InternalServiceError 1121 // An error occurred on the server side. 1122 // 1123 // * InvalidParameterException 1124 // You provided an invalid value for a parameter. 1125 // 1126 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecretVersionIds 1127 func (c *SecretsManager) ListSecretVersionIds(input *ListSecretVersionIdsInput) (*ListSecretVersionIdsOutput, error) { 1128 req, out := c.ListSecretVersionIdsRequest(input) 1129 return out, req.Send() 1130 } 1131 1132 // ListSecretVersionIdsWithContext is the same as ListSecretVersionIds with the addition of 1133 // the ability to pass a context and additional request options. 1134 // 1135 // See ListSecretVersionIds for details on how to use this API operation. 1136 // 1137 // The context must be non-nil and will be used for request cancellation. If 1138 // the context is nil a panic will occur. In the future the SDK may create 1139 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1140 // for more information on using Contexts. 1141 func (c *SecretsManager) ListSecretVersionIdsWithContext(ctx aws.Context, input *ListSecretVersionIdsInput, opts ...request.Option) (*ListSecretVersionIdsOutput, error) { 1142 req, out := c.ListSecretVersionIdsRequest(input) 1143 req.SetContext(ctx) 1144 req.ApplyOptions(opts...) 1145 return out, req.Send() 1146 } 1147 1148 // ListSecretVersionIdsPages iterates over the pages of a ListSecretVersionIds operation, 1149 // calling the "fn" function with the response data for each page. To stop 1150 // iterating, return false from the fn function. 1151 // 1152 // See ListSecretVersionIds method for more information on how to use this operation. 1153 // 1154 // Note: This operation can generate multiple requests to a service. 1155 // 1156 // // Example iterating over at most 3 pages of a ListSecretVersionIds operation. 1157 // pageNum := 0 1158 // err := client.ListSecretVersionIdsPages(params, 1159 // func(page *secretsmanager.ListSecretVersionIdsOutput, lastPage bool) bool { 1160 // pageNum++ 1161 // fmt.Println(page) 1162 // return pageNum <= 3 1163 // }) 1164 // 1165 func (c *SecretsManager) ListSecretVersionIdsPages(input *ListSecretVersionIdsInput, fn func(*ListSecretVersionIdsOutput, bool) bool) error { 1166 return c.ListSecretVersionIdsPagesWithContext(aws.BackgroundContext(), input, fn) 1167 } 1168 1169 // ListSecretVersionIdsPagesWithContext same as ListSecretVersionIdsPages except 1170 // it takes a Context and allows setting request options on the pages. 1171 // 1172 // The context must be non-nil and will be used for request cancellation. If 1173 // the context is nil a panic will occur. In the future the SDK may create 1174 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1175 // for more information on using Contexts. 1176 func (c *SecretsManager) ListSecretVersionIdsPagesWithContext(ctx aws.Context, input *ListSecretVersionIdsInput, fn func(*ListSecretVersionIdsOutput, bool) bool, opts ...request.Option) error { 1177 p := request.Pagination{ 1178 NewRequest: func() (*request.Request, error) { 1179 var inCpy *ListSecretVersionIdsInput 1180 if input != nil { 1181 tmp := *input 1182 inCpy = &tmp 1183 } 1184 req, _ := c.ListSecretVersionIdsRequest(inCpy) 1185 req.SetContext(ctx) 1186 req.ApplyOptions(opts...) 1187 return req, nil 1188 }, 1189 } 1190 1191 for p.Next() { 1192 if !fn(p.Page().(*ListSecretVersionIdsOutput), !p.HasNextPage()) { 1193 break 1194 } 1195 } 1196 1197 return p.Err() 1198 } 1199 1200 const opListSecrets = "ListSecrets" 1201 1202 // ListSecretsRequest generates a "aws/request.Request" representing the 1203 // client's request for the ListSecrets operation. The "output" return 1204 // value will be populated with the request's response once the request completes 1205 // successfully. 1206 // 1207 // Use "Send" method on the returned Request to send the API call to the service. 1208 // the "output" return value is not valid until after Send returns without error. 1209 // 1210 // See ListSecrets for more information on using the ListSecrets 1211 // API call, and error handling. 1212 // 1213 // This method is useful when you want to inject custom logic or configuration 1214 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1215 // 1216 // 1217 // // Example sending a request using the ListSecretsRequest method. 1218 // req, resp := client.ListSecretsRequest(params) 1219 // 1220 // err := req.Send() 1221 // if err == nil { // resp is now filled 1222 // fmt.Println(resp) 1223 // } 1224 // 1225 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecrets 1226 func (c *SecretsManager) ListSecretsRequest(input *ListSecretsInput) (req *request.Request, output *ListSecretsOutput) { 1227 op := &request.Operation{ 1228 Name: opListSecrets, 1229 HTTPMethod: "POST", 1230 HTTPPath: "/", 1231 Paginator: &request.Paginator{ 1232 InputTokens: []string{"NextToken"}, 1233 OutputTokens: []string{"NextToken"}, 1234 LimitToken: "MaxResults", 1235 TruncationToken: "", 1236 }, 1237 } 1238 1239 if input == nil { 1240 input = &ListSecretsInput{} 1241 } 1242 1243 output = &ListSecretsOutput{} 1244 req = c.newRequest(op, input, output) 1245 return 1246 } 1247 1248 // ListSecrets API operation for AWS Secrets Manager. 1249 // 1250 // Lists all of the secrets that are stored by Secrets Manager in the Amazon 1251 // Web Services account. To list the versions currently stored for a specific 1252 // secret, use ListSecretVersionIds. The encrypted fields SecretString and SecretBinary 1253 // are not included in the output. To get that information, call the GetSecretValue 1254 // operation. 1255 // 1256 // Always check the NextToken response parameter when calling any of the List* 1257 // operations. These operations can occasionally return an empty or shorter 1258 // than expected list of results even when there more results become available. 1259 // When this happens, the NextToken response parameter contains a value to pass 1260 // to the next call to the same API to request the next part of the list. 1261 // 1262 // Minimum permissions 1263 // 1264 // To run this command, you must have the following permissions: 1265 // 1266 // * secretsmanager:ListSecrets 1267 // 1268 // Related operations 1269 // 1270 // * To list the versions attached to a secret, use ListSecretVersionIds. 1271 // 1272 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1273 // with awserr.Error's Code and Message methods to get detailed information about 1274 // the error. 1275 // 1276 // See the AWS API reference guide for AWS Secrets Manager's 1277 // API operation ListSecrets for usage and error information. 1278 // 1279 // Returned Error Types: 1280 // * InvalidParameterException 1281 // You provided an invalid value for a parameter. 1282 // 1283 // * InvalidNextTokenException 1284 // You provided an invalid NextToken value. 1285 // 1286 // * InternalServiceError 1287 // An error occurred on the server side. 1288 // 1289 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecrets 1290 func (c *SecretsManager) ListSecrets(input *ListSecretsInput) (*ListSecretsOutput, error) { 1291 req, out := c.ListSecretsRequest(input) 1292 return out, req.Send() 1293 } 1294 1295 // ListSecretsWithContext is the same as ListSecrets with the addition of 1296 // the ability to pass a context and additional request options. 1297 // 1298 // See ListSecrets for details on how to use this API operation. 1299 // 1300 // The context must be non-nil and will be used for request cancellation. If 1301 // the context is nil a panic will occur. In the future the SDK may create 1302 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1303 // for more information on using Contexts. 1304 func (c *SecretsManager) ListSecretsWithContext(ctx aws.Context, input *ListSecretsInput, opts ...request.Option) (*ListSecretsOutput, error) { 1305 req, out := c.ListSecretsRequest(input) 1306 req.SetContext(ctx) 1307 req.ApplyOptions(opts...) 1308 return out, req.Send() 1309 } 1310 1311 // ListSecretsPages iterates over the pages of a ListSecrets operation, 1312 // calling the "fn" function with the response data for each page. To stop 1313 // iterating, return false from the fn function. 1314 // 1315 // See ListSecrets method for more information on how to use this operation. 1316 // 1317 // Note: This operation can generate multiple requests to a service. 1318 // 1319 // // Example iterating over at most 3 pages of a ListSecrets operation. 1320 // pageNum := 0 1321 // err := client.ListSecretsPages(params, 1322 // func(page *secretsmanager.ListSecretsOutput, lastPage bool) bool { 1323 // pageNum++ 1324 // fmt.Println(page) 1325 // return pageNum <= 3 1326 // }) 1327 // 1328 func (c *SecretsManager) ListSecretsPages(input *ListSecretsInput, fn func(*ListSecretsOutput, bool) bool) error { 1329 return c.ListSecretsPagesWithContext(aws.BackgroundContext(), input, fn) 1330 } 1331 1332 // ListSecretsPagesWithContext same as ListSecretsPages except 1333 // it takes a Context and allows setting request options on the pages. 1334 // 1335 // The context must be non-nil and will be used for request cancellation. If 1336 // the context is nil a panic will occur. In the future the SDK may create 1337 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1338 // for more information on using Contexts. 1339 func (c *SecretsManager) ListSecretsPagesWithContext(ctx aws.Context, input *ListSecretsInput, fn func(*ListSecretsOutput, bool) bool, opts ...request.Option) error { 1340 p := request.Pagination{ 1341 NewRequest: func() (*request.Request, error) { 1342 var inCpy *ListSecretsInput 1343 if input != nil { 1344 tmp := *input 1345 inCpy = &tmp 1346 } 1347 req, _ := c.ListSecretsRequest(inCpy) 1348 req.SetContext(ctx) 1349 req.ApplyOptions(opts...) 1350 return req, nil 1351 }, 1352 } 1353 1354 for p.Next() { 1355 if !fn(p.Page().(*ListSecretsOutput), !p.HasNextPage()) { 1356 break 1357 } 1358 } 1359 1360 return p.Err() 1361 } 1362 1363 const opPutResourcePolicy = "PutResourcePolicy" 1364 1365 // PutResourcePolicyRequest generates a "aws/request.Request" representing the 1366 // client's request for the PutResourcePolicy operation. The "output" return 1367 // value will be populated with the request's response once the request completes 1368 // successfully. 1369 // 1370 // Use "Send" method on the returned Request to send the API call to the service. 1371 // the "output" return value is not valid until after Send returns without error. 1372 // 1373 // See PutResourcePolicy for more information on using the PutResourcePolicy 1374 // API call, and error handling. 1375 // 1376 // This method is useful when you want to inject custom logic or configuration 1377 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1378 // 1379 // 1380 // // Example sending a request using the PutResourcePolicyRequest method. 1381 // req, resp := client.PutResourcePolicyRequest(params) 1382 // 1383 // err := req.Send() 1384 // if err == nil { // resp is now filled 1385 // fmt.Println(resp) 1386 // } 1387 // 1388 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutResourcePolicy 1389 func (c *SecretsManager) PutResourcePolicyRequest(input *PutResourcePolicyInput) (req *request.Request, output *PutResourcePolicyOutput) { 1390 op := &request.Operation{ 1391 Name: opPutResourcePolicy, 1392 HTTPMethod: "POST", 1393 HTTPPath: "/", 1394 } 1395 1396 if input == nil { 1397 input = &PutResourcePolicyInput{} 1398 } 1399 1400 output = &PutResourcePolicyOutput{} 1401 req = c.newRequest(op, input, output) 1402 return 1403 } 1404 1405 // PutResourcePolicy API operation for AWS Secrets Manager. 1406 // 1407 // Attaches the contents of the specified resource-based permission policy to 1408 // a secret. A resource-based policy is optional. Alternatively, you can use 1409 // IAM identity-based policies that specify the secret's Amazon Resource Name 1410 // (ARN) in the policy statement's Resources element. You can also use a combination 1411 // of both identity-based and resource-based policies. The affected users and 1412 // roles receive the permissions that are permitted by all of the relevant policies. 1413 // For more information, see Using Resource-Based Policies for Amazon Web Services 1414 // Secrets Manager (http://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_resource-based-policies.html). 1415 // For the complete description of the Amazon Web Services policy syntax and 1416 // grammar, see IAM JSON Policy Reference (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html) 1417 // in the IAM User Guide. 1418 // 1419 // Minimum permissions 1420 // 1421 // To run this command, you must have the following permissions: 1422 // 1423 // * secretsmanager:PutResourcePolicy 1424 // 1425 // Related operations 1426 // 1427 // * To retrieve the resource policy attached to a secret, use GetResourcePolicy. 1428 // 1429 // * To delete the resource-based policy attached to a secret, use DeleteResourcePolicy. 1430 // 1431 // * To list all of the currently available secrets, use ListSecrets. 1432 // 1433 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1434 // with awserr.Error's Code and Message methods to get detailed information about 1435 // the error. 1436 // 1437 // See the AWS API reference guide for AWS Secrets Manager's 1438 // API operation PutResourcePolicy for usage and error information. 1439 // 1440 // Returned Error Types: 1441 // * MalformedPolicyDocumentException 1442 // You provided a resource-based policy with syntax errors. 1443 // 1444 // * ResourceNotFoundException 1445 // We can't find the resource that you asked for. 1446 // 1447 // * InvalidParameterException 1448 // You provided an invalid value for a parameter. 1449 // 1450 // * InternalServiceError 1451 // An error occurred on the server side. 1452 // 1453 // * InvalidRequestException 1454 // You provided a parameter value that is not valid for the current state of 1455 // the resource. 1456 // 1457 // Possible causes: 1458 // 1459 // * You tried to perform the operation on a secret that's currently marked 1460 // deleted. 1461 // 1462 // * You tried to enable rotation on a secret that doesn't already have a 1463 // Lambda function ARN configured and you didn't include such an ARN as a 1464 // parameter in this call. 1465 // 1466 // * PublicPolicyException 1467 // The BlockPublicPolicy parameter is set to true and the resource policy did 1468 // not prevent broad access to the secret. 1469 // 1470 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutResourcePolicy 1471 func (c *SecretsManager) PutResourcePolicy(input *PutResourcePolicyInput) (*PutResourcePolicyOutput, error) { 1472 req, out := c.PutResourcePolicyRequest(input) 1473 return out, req.Send() 1474 } 1475 1476 // PutResourcePolicyWithContext is the same as PutResourcePolicy with the addition of 1477 // the ability to pass a context and additional request options. 1478 // 1479 // See PutResourcePolicy for details on how to use this API operation. 1480 // 1481 // The context must be non-nil and will be used for request cancellation. If 1482 // the context is nil a panic will occur. In the future the SDK may create 1483 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1484 // for more information on using Contexts. 1485 func (c *SecretsManager) PutResourcePolicyWithContext(ctx aws.Context, input *PutResourcePolicyInput, opts ...request.Option) (*PutResourcePolicyOutput, error) { 1486 req, out := c.PutResourcePolicyRequest(input) 1487 req.SetContext(ctx) 1488 req.ApplyOptions(opts...) 1489 return out, req.Send() 1490 } 1491 1492 const opPutSecretValue = "PutSecretValue" 1493 1494 // PutSecretValueRequest generates a "aws/request.Request" representing the 1495 // client's request for the PutSecretValue operation. The "output" return 1496 // value will be populated with the request's response once the request completes 1497 // successfully. 1498 // 1499 // Use "Send" method on the returned Request to send the API call to the service. 1500 // the "output" return value is not valid until after Send returns without error. 1501 // 1502 // See PutSecretValue for more information on using the PutSecretValue 1503 // API call, and error handling. 1504 // 1505 // This method is useful when you want to inject custom logic or configuration 1506 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1507 // 1508 // 1509 // // Example sending a request using the PutSecretValueRequest method. 1510 // req, resp := client.PutSecretValueRequest(params) 1511 // 1512 // err := req.Send() 1513 // if err == nil { // resp is now filled 1514 // fmt.Println(resp) 1515 // } 1516 // 1517 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutSecretValue 1518 func (c *SecretsManager) PutSecretValueRequest(input *PutSecretValueInput) (req *request.Request, output *PutSecretValueOutput) { 1519 op := &request.Operation{ 1520 Name: opPutSecretValue, 1521 HTTPMethod: "POST", 1522 HTTPPath: "/", 1523 } 1524 1525 if input == nil { 1526 input = &PutSecretValueInput{} 1527 } 1528 1529 output = &PutSecretValueOutput{} 1530 req = c.newRequest(op, input, output) 1531 return 1532 } 1533 1534 // PutSecretValue API operation for AWS Secrets Manager. 1535 // 1536 // Stores a new encrypted secret value in the specified secret. To do this, 1537 // the operation creates a new version and attaches it to the secret. The version 1538 // can contain a new SecretString value or a new SecretBinary value. You can 1539 // also specify the staging labels that are initially attached to the new version. 1540 // 1541 // We recommend you avoid calling PutSecretValue at a sustained rate of more 1542 // than once every 10 minutes. When you update the secret value, Secrets Manager 1543 // creates a new version of the secret. Secrets Manager removes outdated versions 1544 // when there are more than 100, but it does not remove versions created less 1545 // than 24 hours ago. If you call PutSecretValue more than once every 10 minutes, 1546 // you create more versions than Secrets Manager removes, and you will reach 1547 // the quota for secret versions. 1548 // 1549 // * If this operation creates the first version for the secret then Secrets 1550 // Manager automatically attaches the staging label AWSCURRENT to the new 1551 // version. 1552 // 1553 // * If you do not specify a value for VersionStages then Secrets Manager 1554 // automatically moves the staging label AWSCURRENT to this new version. 1555 // 1556 // * If this operation moves the staging label AWSCURRENT from another version 1557 // to this version, then Secrets Manager also automatically moves the staging 1558 // label AWSPREVIOUS to the version that AWSCURRENT was removed from. 1559 // 1560 // * This operation is idempotent. If a version with a VersionId with the 1561 // same value as the ClientRequestToken parameter already exists and you 1562 // specify the same secret data, the operation succeeds but does nothing. 1563 // However, if the secret data is different, then the operation fails because 1564 // you cannot modify an existing version; you can only create new ones. 1565 // 1566 // * If you call an operation to encrypt or decrypt the SecretString or SecretBinary 1567 // for a secret in the same account as the calling user and that secret doesn't 1568 // specify a Amazon Web Services KMS encryption key, Secrets Manager uses 1569 // the account's default Amazon Web Services managed customer master key 1570 // (CMK) with the alias aws/secretsmanager. If this key doesn't already exist 1571 // in your account then Secrets Manager creates it for you automatically. 1572 // All users and roles in the same Amazon Web Services account automatically 1573 // have access to use the default CMK. Note that if an Secrets Manager API 1574 // call results in Amazon Web Services creating the account's Amazon Web 1575 // Services-managed CMK, it can result in a one-time significant delay in 1576 // returning the result. 1577 // 1578 // * If the secret resides in a different Amazon Web Services account from 1579 // the credentials calling an API that requires encryption or decryption 1580 // of the secret value then you must create and use a custom Amazon Web Services 1581 // KMS CMK because you can't access the default CMK for the account using 1582 // credentials from a different Amazon Web Services account. Store the ARN 1583 // of the CMK in the secret when you create the secret or when you update 1584 // it by including it in the KMSKeyId. If you call an API that must encrypt 1585 // or decrypt SecretString or SecretBinary using credentials from a different 1586 // account then the Amazon Web Services KMS key policy must grant cross-account 1587 // access to that other account's user or role for both the kms:GenerateDataKey 1588 // and kms:Decrypt operations. 1589 // 1590 // Minimum permissions 1591 // 1592 // To run this command, you must have the following permissions: 1593 // 1594 // * secretsmanager:PutSecretValue 1595 // 1596 // * kms:GenerateDataKey - needed only if you use a customer-managed Amazon 1597 // Web Services KMS key to encrypt the secret. You do not need this permission 1598 // to use the account's default Amazon Web Services managed CMK for Secrets 1599 // Manager. 1600 // 1601 // Related operations 1602 // 1603 // * To retrieve the encrypted value you store in the version of a secret, 1604 // use GetSecretValue. 1605 // 1606 // * To create a secret, use CreateSecret. 1607 // 1608 // * To get the details for a secret, use DescribeSecret. 1609 // 1610 // * To list the versions attached to a secret, use ListSecretVersionIds. 1611 // 1612 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1613 // with awserr.Error's Code and Message methods to get detailed information about 1614 // the error. 1615 // 1616 // See the AWS API reference guide for AWS Secrets Manager's 1617 // API operation PutSecretValue for usage and error information. 1618 // 1619 // Returned Error Types: 1620 // * InvalidParameterException 1621 // You provided an invalid value for a parameter. 1622 // 1623 // * InvalidRequestException 1624 // You provided a parameter value that is not valid for the current state of 1625 // the resource. 1626 // 1627 // Possible causes: 1628 // 1629 // * You tried to perform the operation on a secret that's currently marked 1630 // deleted. 1631 // 1632 // * You tried to enable rotation on a secret that doesn't already have a 1633 // Lambda function ARN configured and you didn't include such an ARN as a 1634 // parameter in this call. 1635 // 1636 // * LimitExceededException 1637 // The request failed because it would exceed one of the Secrets Manager internal 1638 // limits. 1639 // 1640 // * EncryptionFailure 1641 // Secrets Manager can't encrypt the protected secret text using the provided 1642 // KMS key. Check that the customer master key (CMK) is available, enabled, 1643 // and not in an invalid state. For more information, see How Key State Affects 1644 // Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). 1645 // 1646 // * ResourceExistsException 1647 // A resource with the ID you requested already exists. 1648 // 1649 // * ResourceNotFoundException 1650 // We can't find the resource that you asked for. 1651 // 1652 // * InternalServiceError 1653 // An error occurred on the server side. 1654 // 1655 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutSecretValue 1656 func (c *SecretsManager) PutSecretValue(input *PutSecretValueInput) (*PutSecretValueOutput, error) { 1657 req, out := c.PutSecretValueRequest(input) 1658 return out, req.Send() 1659 } 1660 1661 // PutSecretValueWithContext is the same as PutSecretValue with the addition of 1662 // the ability to pass a context and additional request options. 1663 // 1664 // See PutSecretValue for details on how to use this API operation. 1665 // 1666 // The context must be non-nil and will be used for request cancellation. If 1667 // the context is nil a panic will occur. In the future the SDK may create 1668 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1669 // for more information on using Contexts. 1670 func (c *SecretsManager) PutSecretValueWithContext(ctx aws.Context, input *PutSecretValueInput, opts ...request.Option) (*PutSecretValueOutput, error) { 1671 req, out := c.PutSecretValueRequest(input) 1672 req.SetContext(ctx) 1673 req.ApplyOptions(opts...) 1674 return out, req.Send() 1675 } 1676 1677 const opRemoveRegionsFromReplication = "RemoveRegionsFromReplication" 1678 1679 // RemoveRegionsFromReplicationRequest generates a "aws/request.Request" representing the 1680 // client's request for the RemoveRegionsFromReplication operation. The "output" return 1681 // value will be populated with the request's response once the request completes 1682 // successfully. 1683 // 1684 // Use "Send" method on the returned Request to send the API call to the service. 1685 // the "output" return value is not valid until after Send returns without error. 1686 // 1687 // See RemoveRegionsFromReplication for more information on using the RemoveRegionsFromReplication 1688 // API call, and error handling. 1689 // 1690 // This method is useful when you want to inject custom logic or configuration 1691 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1692 // 1693 // 1694 // // Example sending a request using the RemoveRegionsFromReplicationRequest method. 1695 // req, resp := client.RemoveRegionsFromReplicationRequest(params) 1696 // 1697 // err := req.Send() 1698 // if err == nil { // resp is now filled 1699 // fmt.Println(resp) 1700 // } 1701 // 1702 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RemoveRegionsFromReplication 1703 func (c *SecretsManager) RemoveRegionsFromReplicationRequest(input *RemoveRegionsFromReplicationInput) (req *request.Request, output *RemoveRegionsFromReplicationOutput) { 1704 op := &request.Operation{ 1705 Name: opRemoveRegionsFromReplication, 1706 HTTPMethod: "POST", 1707 HTTPPath: "/", 1708 } 1709 1710 if input == nil { 1711 input = &RemoveRegionsFromReplicationInput{} 1712 } 1713 1714 output = &RemoveRegionsFromReplicationOutput{} 1715 req = c.newRequest(op, input, output) 1716 return 1717 } 1718 1719 // RemoveRegionsFromReplication API operation for AWS Secrets Manager. 1720 // 1721 // Remove regions from replication. 1722 // 1723 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1724 // with awserr.Error's Code and Message methods to get detailed information about 1725 // the error. 1726 // 1727 // See the AWS API reference guide for AWS Secrets Manager's 1728 // API operation RemoveRegionsFromReplication for usage and error information. 1729 // 1730 // Returned Error Types: 1731 // * ResourceNotFoundException 1732 // We can't find the resource that you asked for. 1733 // 1734 // * InvalidRequestException 1735 // You provided a parameter value that is not valid for the current state of 1736 // the resource. 1737 // 1738 // Possible causes: 1739 // 1740 // * You tried to perform the operation on a secret that's currently marked 1741 // deleted. 1742 // 1743 // * You tried to enable rotation on a secret that doesn't already have a 1744 // Lambda function ARN configured and you didn't include such an ARN as a 1745 // parameter in this call. 1746 // 1747 // * InvalidParameterException 1748 // You provided an invalid value for a parameter. 1749 // 1750 // * InternalServiceError 1751 // An error occurred on the server side. 1752 // 1753 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RemoveRegionsFromReplication 1754 func (c *SecretsManager) RemoveRegionsFromReplication(input *RemoveRegionsFromReplicationInput) (*RemoveRegionsFromReplicationOutput, error) { 1755 req, out := c.RemoveRegionsFromReplicationRequest(input) 1756 return out, req.Send() 1757 } 1758 1759 // RemoveRegionsFromReplicationWithContext is the same as RemoveRegionsFromReplication with the addition of 1760 // the ability to pass a context and additional request options. 1761 // 1762 // See RemoveRegionsFromReplication for details on how to use this API operation. 1763 // 1764 // The context must be non-nil and will be used for request cancellation. If 1765 // the context is nil a panic will occur. In the future the SDK may create 1766 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1767 // for more information on using Contexts. 1768 func (c *SecretsManager) RemoveRegionsFromReplicationWithContext(ctx aws.Context, input *RemoveRegionsFromReplicationInput, opts ...request.Option) (*RemoveRegionsFromReplicationOutput, error) { 1769 req, out := c.RemoveRegionsFromReplicationRequest(input) 1770 req.SetContext(ctx) 1771 req.ApplyOptions(opts...) 1772 return out, req.Send() 1773 } 1774 1775 const opReplicateSecretToRegions = "ReplicateSecretToRegions" 1776 1777 // ReplicateSecretToRegionsRequest generates a "aws/request.Request" representing the 1778 // client's request for the ReplicateSecretToRegions operation. The "output" return 1779 // value will be populated with the request's response once the request completes 1780 // successfully. 1781 // 1782 // Use "Send" method on the returned Request to send the API call to the service. 1783 // the "output" return value is not valid until after Send returns without error. 1784 // 1785 // See ReplicateSecretToRegions for more information on using the ReplicateSecretToRegions 1786 // API call, and error handling. 1787 // 1788 // This method is useful when you want to inject custom logic or configuration 1789 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1790 // 1791 // 1792 // // Example sending a request using the ReplicateSecretToRegionsRequest method. 1793 // req, resp := client.ReplicateSecretToRegionsRequest(params) 1794 // 1795 // err := req.Send() 1796 // if err == nil { // resp is now filled 1797 // fmt.Println(resp) 1798 // } 1799 // 1800 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ReplicateSecretToRegions 1801 func (c *SecretsManager) ReplicateSecretToRegionsRequest(input *ReplicateSecretToRegionsInput) (req *request.Request, output *ReplicateSecretToRegionsOutput) { 1802 op := &request.Operation{ 1803 Name: opReplicateSecretToRegions, 1804 HTTPMethod: "POST", 1805 HTTPPath: "/", 1806 } 1807 1808 if input == nil { 1809 input = &ReplicateSecretToRegionsInput{} 1810 } 1811 1812 output = &ReplicateSecretToRegionsOutput{} 1813 req = c.newRequest(op, input, output) 1814 return 1815 } 1816 1817 // ReplicateSecretToRegions API operation for AWS Secrets Manager. 1818 // 1819 // Converts an existing secret to a multi-Region secret and begins replication 1820 // the secret to a list of new regions. 1821 // 1822 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1823 // with awserr.Error's Code and Message methods to get detailed information about 1824 // the error. 1825 // 1826 // See the AWS API reference guide for AWS Secrets Manager's 1827 // API operation ReplicateSecretToRegions for usage and error information. 1828 // 1829 // Returned Error Types: 1830 // * ResourceNotFoundException 1831 // We can't find the resource that you asked for. 1832 // 1833 // * InvalidRequestException 1834 // You provided a parameter value that is not valid for the current state of 1835 // the resource. 1836 // 1837 // Possible causes: 1838 // 1839 // * You tried to perform the operation on a secret that's currently marked 1840 // deleted. 1841 // 1842 // * You tried to enable rotation on a secret that doesn't already have a 1843 // Lambda function ARN configured and you didn't include such an ARN as a 1844 // parameter in this call. 1845 // 1846 // * InvalidParameterException 1847 // You provided an invalid value for a parameter. 1848 // 1849 // * InternalServiceError 1850 // An error occurred on the server side. 1851 // 1852 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ReplicateSecretToRegions 1853 func (c *SecretsManager) ReplicateSecretToRegions(input *ReplicateSecretToRegionsInput) (*ReplicateSecretToRegionsOutput, error) { 1854 req, out := c.ReplicateSecretToRegionsRequest(input) 1855 return out, req.Send() 1856 } 1857 1858 // ReplicateSecretToRegionsWithContext is the same as ReplicateSecretToRegions with the addition of 1859 // the ability to pass a context and additional request options. 1860 // 1861 // See ReplicateSecretToRegions for details on how to use this API operation. 1862 // 1863 // The context must be non-nil and will be used for request cancellation. If 1864 // the context is nil a panic will occur. In the future the SDK may create 1865 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1866 // for more information on using Contexts. 1867 func (c *SecretsManager) ReplicateSecretToRegionsWithContext(ctx aws.Context, input *ReplicateSecretToRegionsInput, opts ...request.Option) (*ReplicateSecretToRegionsOutput, error) { 1868 req, out := c.ReplicateSecretToRegionsRequest(input) 1869 req.SetContext(ctx) 1870 req.ApplyOptions(opts...) 1871 return out, req.Send() 1872 } 1873 1874 const opRestoreSecret = "RestoreSecret" 1875 1876 // RestoreSecretRequest generates a "aws/request.Request" representing the 1877 // client's request for the RestoreSecret operation. The "output" return 1878 // value will be populated with the request's response once the request completes 1879 // successfully. 1880 // 1881 // Use "Send" method on the returned Request to send the API call to the service. 1882 // the "output" return value is not valid until after Send returns without error. 1883 // 1884 // See RestoreSecret for more information on using the RestoreSecret 1885 // API call, and error handling. 1886 // 1887 // This method is useful when you want to inject custom logic or configuration 1888 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1889 // 1890 // 1891 // // Example sending a request using the RestoreSecretRequest method. 1892 // req, resp := client.RestoreSecretRequest(params) 1893 // 1894 // err := req.Send() 1895 // if err == nil { // resp is now filled 1896 // fmt.Println(resp) 1897 // } 1898 // 1899 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RestoreSecret 1900 func (c *SecretsManager) RestoreSecretRequest(input *RestoreSecretInput) (req *request.Request, output *RestoreSecretOutput) { 1901 op := &request.Operation{ 1902 Name: opRestoreSecret, 1903 HTTPMethod: "POST", 1904 HTTPPath: "/", 1905 } 1906 1907 if input == nil { 1908 input = &RestoreSecretInput{} 1909 } 1910 1911 output = &RestoreSecretOutput{} 1912 req = c.newRequest(op, input, output) 1913 return 1914 } 1915 1916 // RestoreSecret API operation for AWS Secrets Manager. 1917 // 1918 // Cancels the scheduled deletion of a secret by removing the DeletedDate time 1919 // stamp. This makes the secret accessible to query once again. 1920 // 1921 // Minimum permissions 1922 // 1923 // To run this command, you must have the following permissions: 1924 // 1925 // * secretsmanager:RestoreSecret 1926 // 1927 // Related operations 1928 // 1929 // * To delete a secret, use DeleteSecret. 1930 // 1931 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1932 // with awserr.Error's Code and Message methods to get detailed information about 1933 // the error. 1934 // 1935 // See the AWS API reference guide for AWS Secrets Manager's 1936 // API operation RestoreSecret for usage and error information. 1937 // 1938 // Returned Error Types: 1939 // * ResourceNotFoundException 1940 // We can't find the resource that you asked for. 1941 // 1942 // * InvalidParameterException 1943 // You provided an invalid value for a parameter. 1944 // 1945 // * InvalidRequestException 1946 // You provided a parameter value that is not valid for the current state of 1947 // the resource. 1948 // 1949 // Possible causes: 1950 // 1951 // * You tried to perform the operation on a secret that's currently marked 1952 // deleted. 1953 // 1954 // * You tried to enable rotation on a secret that doesn't already have a 1955 // Lambda function ARN configured and you didn't include such an ARN as a 1956 // parameter in this call. 1957 // 1958 // * InternalServiceError 1959 // An error occurred on the server side. 1960 // 1961 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RestoreSecret 1962 func (c *SecretsManager) RestoreSecret(input *RestoreSecretInput) (*RestoreSecretOutput, error) { 1963 req, out := c.RestoreSecretRequest(input) 1964 return out, req.Send() 1965 } 1966 1967 // RestoreSecretWithContext is the same as RestoreSecret with the addition of 1968 // the ability to pass a context and additional request options. 1969 // 1970 // See RestoreSecret for details on how to use this API operation. 1971 // 1972 // The context must be non-nil and will be used for request cancellation. If 1973 // the context is nil a panic will occur. In the future the SDK may create 1974 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1975 // for more information on using Contexts. 1976 func (c *SecretsManager) RestoreSecretWithContext(ctx aws.Context, input *RestoreSecretInput, opts ...request.Option) (*RestoreSecretOutput, error) { 1977 req, out := c.RestoreSecretRequest(input) 1978 req.SetContext(ctx) 1979 req.ApplyOptions(opts...) 1980 return out, req.Send() 1981 } 1982 1983 const opRotateSecret = "RotateSecret" 1984 1985 // RotateSecretRequest generates a "aws/request.Request" representing the 1986 // client's request for the RotateSecret operation. The "output" return 1987 // value will be populated with the request's response once the request completes 1988 // successfully. 1989 // 1990 // Use "Send" method on the returned Request to send the API call to the service. 1991 // the "output" return value is not valid until after Send returns without error. 1992 // 1993 // See RotateSecret for more information on using the RotateSecret 1994 // API call, and error handling. 1995 // 1996 // This method is useful when you want to inject custom logic or configuration 1997 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1998 // 1999 // 2000 // // Example sending a request using the RotateSecretRequest method. 2001 // req, resp := client.RotateSecretRequest(params) 2002 // 2003 // err := req.Send() 2004 // if err == nil { // resp is now filled 2005 // fmt.Println(resp) 2006 // } 2007 // 2008 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RotateSecret 2009 func (c *SecretsManager) RotateSecretRequest(input *RotateSecretInput) (req *request.Request, output *RotateSecretOutput) { 2010 op := &request.Operation{ 2011 Name: opRotateSecret, 2012 HTTPMethod: "POST", 2013 HTTPPath: "/", 2014 } 2015 2016 if input == nil { 2017 input = &RotateSecretInput{} 2018 } 2019 2020 output = &RotateSecretOutput{} 2021 req = c.newRequest(op, input, output) 2022 return 2023 } 2024 2025 // RotateSecret API operation for AWS Secrets Manager. 2026 // 2027 // Configures and starts the asynchronous process of rotating this secret. If 2028 // you include the configuration parameters, the operation sets those values 2029 // for the secret and then immediately starts a rotation. If you do not include 2030 // the configuration parameters, the operation starts a rotation with the values 2031 // already stored in the secret. After the rotation completes, the protected 2032 // service and its clients all use the new version of the secret. 2033 // 2034 // This required configuration information includes the ARN of an Amazon Web 2035 // Services Lambda function and optionally, the time between scheduled rotations. 2036 // The Lambda rotation function creates a new version of the secret and creates 2037 // or updates the credentials on the protected service to match. After testing 2038 // the new credentials, the function marks the new secret with the staging label 2039 // AWSCURRENT so that your clients all immediately begin to use the new version. 2040 // For more information about rotating secrets and how to configure a Lambda 2041 // function to rotate the secrets for your protected service, see Rotating Secrets 2042 // in Amazon Web Services Secrets Manager (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html) 2043 // in the Amazon Web Services Secrets Manager User Guide. 2044 // 2045 // Secrets Manager schedules the next rotation when the previous one completes. 2046 // Secrets Manager schedules the date by adding the rotation interval (number 2047 // of days) to the actual date of the last rotation. The service chooses the 2048 // hour within that 24-hour date window randomly. The minute is also chosen 2049 // somewhat randomly, but weighted towards the top of the hour and influenced 2050 // by a variety of factors that help distribute load. 2051 // 2052 // The rotation function must end with the versions of the secret in one of 2053 // two states: 2054 // 2055 // * The AWSPENDING and AWSCURRENT staging labels are attached to the same 2056 // version of the secret, or 2057 // 2058 // * The AWSPENDING staging label is not attached to any version of the secret. 2059 // 2060 // If the AWSPENDING staging label is present but not attached to the same version 2061 // as AWSCURRENT then any later invocation of RotateSecret assumes that a previous 2062 // rotation request is still in progress and returns an error. 2063 // 2064 // Minimum permissions 2065 // 2066 // To run this command, you must have the following permissions: 2067 // 2068 // * secretsmanager:RotateSecret 2069 // 2070 // * lambda:InvokeFunction (on the function specified in the secret's metadata) 2071 // 2072 // Related operations 2073 // 2074 // * To list the secrets in your account, use ListSecrets. 2075 // 2076 // * To get the details for a version of a secret, use DescribeSecret. 2077 // 2078 // * To create a new version of a secret, use CreateSecret. 2079 // 2080 // * To attach staging labels to or remove staging labels from a version 2081 // of a secret, use UpdateSecretVersionStage. 2082 // 2083 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2084 // with awserr.Error's Code and Message methods to get detailed information about 2085 // the error. 2086 // 2087 // See the AWS API reference guide for AWS Secrets Manager's 2088 // API operation RotateSecret for usage and error information. 2089 // 2090 // Returned Error Types: 2091 // * ResourceNotFoundException 2092 // We can't find the resource that you asked for. 2093 // 2094 // * InvalidParameterException 2095 // You provided an invalid value for a parameter. 2096 // 2097 // * InternalServiceError 2098 // An error occurred on the server side. 2099 // 2100 // * InvalidRequestException 2101 // You provided a parameter value that is not valid for the current state of 2102 // the resource. 2103 // 2104 // Possible causes: 2105 // 2106 // * You tried to perform the operation on a secret that's currently marked 2107 // deleted. 2108 // 2109 // * You tried to enable rotation on a secret that doesn't already have a 2110 // Lambda function ARN configured and you didn't include such an ARN as a 2111 // parameter in this call. 2112 // 2113 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RotateSecret 2114 func (c *SecretsManager) RotateSecret(input *RotateSecretInput) (*RotateSecretOutput, error) { 2115 req, out := c.RotateSecretRequest(input) 2116 return out, req.Send() 2117 } 2118 2119 // RotateSecretWithContext is the same as RotateSecret with the addition of 2120 // the ability to pass a context and additional request options. 2121 // 2122 // See RotateSecret for details on how to use this API operation. 2123 // 2124 // The context must be non-nil and will be used for request cancellation. If 2125 // the context is nil a panic will occur. In the future the SDK may create 2126 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2127 // for more information on using Contexts. 2128 func (c *SecretsManager) RotateSecretWithContext(ctx aws.Context, input *RotateSecretInput, opts ...request.Option) (*RotateSecretOutput, error) { 2129 req, out := c.RotateSecretRequest(input) 2130 req.SetContext(ctx) 2131 req.ApplyOptions(opts...) 2132 return out, req.Send() 2133 } 2134 2135 const opStopReplicationToReplica = "StopReplicationToReplica" 2136 2137 // StopReplicationToReplicaRequest generates a "aws/request.Request" representing the 2138 // client's request for the StopReplicationToReplica operation. The "output" return 2139 // value will be populated with the request's response once the request completes 2140 // successfully. 2141 // 2142 // Use "Send" method on the returned Request to send the API call to the service. 2143 // the "output" return value is not valid until after Send returns without error. 2144 // 2145 // See StopReplicationToReplica for more information on using the StopReplicationToReplica 2146 // API call, and error handling. 2147 // 2148 // This method is useful when you want to inject custom logic or configuration 2149 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 2150 // 2151 // 2152 // // Example sending a request using the StopReplicationToReplicaRequest method. 2153 // req, resp := client.StopReplicationToReplicaRequest(params) 2154 // 2155 // err := req.Send() 2156 // if err == nil { // resp is now filled 2157 // fmt.Println(resp) 2158 // } 2159 // 2160 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/StopReplicationToReplica 2161 func (c *SecretsManager) StopReplicationToReplicaRequest(input *StopReplicationToReplicaInput) (req *request.Request, output *StopReplicationToReplicaOutput) { 2162 op := &request.Operation{ 2163 Name: opStopReplicationToReplica, 2164 HTTPMethod: "POST", 2165 HTTPPath: "/", 2166 } 2167 2168 if input == nil { 2169 input = &StopReplicationToReplicaInput{} 2170 } 2171 2172 output = &StopReplicationToReplicaOutput{} 2173 req = c.newRequest(op, input, output) 2174 return 2175 } 2176 2177 // StopReplicationToReplica API operation for AWS Secrets Manager. 2178 // 2179 // Removes the secret from replication and promotes the secret to a regional 2180 // secret in the replica Region. 2181 // 2182 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2183 // with awserr.Error's Code and Message methods to get detailed information about 2184 // the error. 2185 // 2186 // See the AWS API reference guide for AWS Secrets Manager's 2187 // API operation StopReplicationToReplica for usage and error information. 2188 // 2189 // Returned Error Types: 2190 // * ResourceNotFoundException 2191 // We can't find the resource that you asked for. 2192 // 2193 // * InvalidRequestException 2194 // You provided a parameter value that is not valid for the current state of 2195 // the resource. 2196 // 2197 // Possible causes: 2198 // 2199 // * You tried to perform the operation on a secret that's currently marked 2200 // deleted. 2201 // 2202 // * You tried to enable rotation on a secret that doesn't already have a 2203 // Lambda function ARN configured and you didn't include such an ARN as a 2204 // parameter in this call. 2205 // 2206 // * InvalidParameterException 2207 // You provided an invalid value for a parameter. 2208 // 2209 // * InternalServiceError 2210 // An error occurred on the server side. 2211 // 2212 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/StopReplicationToReplica 2213 func (c *SecretsManager) StopReplicationToReplica(input *StopReplicationToReplicaInput) (*StopReplicationToReplicaOutput, error) { 2214 req, out := c.StopReplicationToReplicaRequest(input) 2215 return out, req.Send() 2216 } 2217 2218 // StopReplicationToReplicaWithContext is the same as StopReplicationToReplica with the addition of 2219 // the ability to pass a context and additional request options. 2220 // 2221 // See StopReplicationToReplica for details on how to use this API operation. 2222 // 2223 // The context must be non-nil and will be used for request cancellation. If 2224 // the context is nil a panic will occur. In the future the SDK may create 2225 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2226 // for more information on using Contexts. 2227 func (c *SecretsManager) StopReplicationToReplicaWithContext(ctx aws.Context, input *StopReplicationToReplicaInput, opts ...request.Option) (*StopReplicationToReplicaOutput, error) { 2228 req, out := c.StopReplicationToReplicaRequest(input) 2229 req.SetContext(ctx) 2230 req.ApplyOptions(opts...) 2231 return out, req.Send() 2232 } 2233 2234 const opTagResource = "TagResource" 2235 2236 // TagResourceRequest generates a "aws/request.Request" representing the 2237 // client's request for the TagResource operation. The "output" return 2238 // value will be populated with the request's response once the request completes 2239 // successfully. 2240 // 2241 // Use "Send" method on the returned Request to send the API call to the service. 2242 // the "output" return value is not valid until after Send returns without error. 2243 // 2244 // See TagResource for more information on using the TagResource 2245 // API call, and error handling. 2246 // 2247 // This method is useful when you want to inject custom logic or configuration 2248 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 2249 // 2250 // 2251 // // Example sending a request using the TagResourceRequest method. 2252 // req, resp := client.TagResourceRequest(params) 2253 // 2254 // err := req.Send() 2255 // if err == nil { // resp is now filled 2256 // fmt.Println(resp) 2257 // } 2258 // 2259 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/TagResource 2260 func (c *SecretsManager) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { 2261 op := &request.Operation{ 2262 Name: opTagResource, 2263 HTTPMethod: "POST", 2264 HTTPPath: "/", 2265 } 2266 2267 if input == nil { 2268 input = &TagResourceInput{} 2269 } 2270 2271 output = &TagResourceOutput{} 2272 req = c.newRequest(op, input, output) 2273 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2274 return 2275 } 2276 2277 // TagResource API operation for AWS Secrets Manager. 2278 // 2279 // Attaches one or more tags, each consisting of a key name and a value, to 2280 // the specified secret. Tags are part of the secret's overall metadata, and 2281 // are not associated with any specific version of the secret. This operation 2282 // only appends tags to the existing list of tags. To remove tags, you must 2283 // use UntagResource. 2284 // 2285 // The following basic restrictions apply to tags: 2286 // 2287 // * Maximum number of tags per secret—50 2288 // 2289 // * Maximum key length—127 Unicode characters in UTF-8 2290 // 2291 // * Maximum value length—255 Unicode characters in UTF-8 2292 // 2293 // * Tag keys and values are case sensitive. 2294 // 2295 // * Do not use the aws: prefix in your tag names or values because Amazon 2296 // Web Services reserves it for Amazon Web Services use. You can't edit or 2297 // delete tag names or values with this prefix. Tags with this prefix do 2298 // not count against your tags per secret limit. 2299 // 2300 // * If you use your tagging schema across multiple services and resources, 2301 // remember other services might have restrictions on allowed characters. 2302 // Generally allowed characters: letters, spaces, and numbers representable 2303 // in UTF-8, plus the following special characters: + - = . _ : / @. 2304 // 2305 // If you use tags as part of your security strategy, then adding or removing 2306 // a tag can change permissions. If successfully completing this operation would 2307 // result in you losing your permissions for this secret, then the operation 2308 // is blocked and returns an Access Denied error. 2309 // 2310 // Minimum permissions 2311 // 2312 // To run this command, you must have the following permissions: 2313 // 2314 // * secretsmanager:TagResource 2315 // 2316 // Related operations 2317 // 2318 // * To remove one or more tags from the collection attached to a secret, 2319 // use UntagResource. 2320 // 2321 // * To view the list of tags attached to a secret, use DescribeSecret. 2322 // 2323 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2324 // with awserr.Error's Code and Message methods to get detailed information about 2325 // the error. 2326 // 2327 // See the AWS API reference guide for AWS Secrets Manager's 2328 // API operation TagResource for usage and error information. 2329 // 2330 // Returned Error Types: 2331 // * ResourceNotFoundException 2332 // We can't find the resource that you asked for. 2333 // 2334 // * InvalidRequestException 2335 // You provided a parameter value that is not valid for the current state of 2336 // the resource. 2337 // 2338 // Possible causes: 2339 // 2340 // * You tried to perform the operation on a secret that's currently marked 2341 // deleted. 2342 // 2343 // * You tried to enable rotation on a secret that doesn't already have a 2344 // Lambda function ARN configured and you didn't include such an ARN as a 2345 // parameter in this call. 2346 // 2347 // * InvalidParameterException 2348 // You provided an invalid value for a parameter. 2349 // 2350 // * InternalServiceError 2351 // An error occurred on the server side. 2352 // 2353 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/TagResource 2354 func (c *SecretsManager) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { 2355 req, out := c.TagResourceRequest(input) 2356 return out, req.Send() 2357 } 2358 2359 // TagResourceWithContext is the same as TagResource with the addition of 2360 // the ability to pass a context and additional request options. 2361 // 2362 // See TagResource for details on how to use this API operation. 2363 // 2364 // The context must be non-nil and will be used for request cancellation. If 2365 // the context is nil a panic will occur. In the future the SDK may create 2366 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2367 // for more information on using Contexts. 2368 func (c *SecretsManager) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { 2369 req, out := c.TagResourceRequest(input) 2370 req.SetContext(ctx) 2371 req.ApplyOptions(opts...) 2372 return out, req.Send() 2373 } 2374 2375 const opUntagResource = "UntagResource" 2376 2377 // UntagResourceRequest generates a "aws/request.Request" representing the 2378 // client's request for the UntagResource operation. The "output" return 2379 // value will be populated with the request's response once the request completes 2380 // successfully. 2381 // 2382 // Use "Send" method on the returned Request to send the API call to the service. 2383 // the "output" return value is not valid until after Send returns without error. 2384 // 2385 // See UntagResource for more information on using the UntagResource 2386 // API call, and error handling. 2387 // 2388 // This method is useful when you want to inject custom logic or configuration 2389 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 2390 // 2391 // 2392 // // Example sending a request using the UntagResourceRequest method. 2393 // req, resp := client.UntagResourceRequest(params) 2394 // 2395 // err := req.Send() 2396 // if err == nil { // resp is now filled 2397 // fmt.Println(resp) 2398 // } 2399 // 2400 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UntagResource 2401 func (c *SecretsManager) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { 2402 op := &request.Operation{ 2403 Name: opUntagResource, 2404 HTTPMethod: "POST", 2405 HTTPPath: "/", 2406 } 2407 2408 if input == nil { 2409 input = &UntagResourceInput{} 2410 } 2411 2412 output = &UntagResourceOutput{} 2413 req = c.newRequest(op, input, output) 2414 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2415 return 2416 } 2417 2418 // UntagResource API operation for AWS Secrets Manager. 2419 // 2420 // Removes one or more tags from the specified secret. 2421 // 2422 // This operation is idempotent. If a requested tag is not attached to the secret, 2423 // no error is returned and the secret metadata is unchanged. 2424 // 2425 // If you use tags as part of your security strategy, then removing a tag can 2426 // change permissions. If successfully completing this operation would result 2427 // in you losing your permissions for this secret, then the operation is blocked 2428 // and returns an Access Denied error. 2429 // 2430 // Minimum permissions 2431 // 2432 // To run this command, you must have the following permissions: 2433 // 2434 // * secretsmanager:UntagResource 2435 // 2436 // Related operations 2437 // 2438 // * To add one or more tags to the collection attached to a secret, use 2439 // TagResource. 2440 // 2441 // * To view the list of tags attached to a secret, use DescribeSecret. 2442 // 2443 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2444 // with awserr.Error's Code and Message methods to get detailed information about 2445 // the error. 2446 // 2447 // See the AWS API reference guide for AWS Secrets Manager's 2448 // API operation UntagResource for usage and error information. 2449 // 2450 // Returned Error Types: 2451 // * ResourceNotFoundException 2452 // We can't find the resource that you asked for. 2453 // 2454 // * InvalidRequestException 2455 // You provided a parameter value that is not valid for the current state of 2456 // the resource. 2457 // 2458 // Possible causes: 2459 // 2460 // * You tried to perform the operation on a secret that's currently marked 2461 // deleted. 2462 // 2463 // * You tried to enable rotation on a secret that doesn't already have a 2464 // Lambda function ARN configured and you didn't include such an ARN as a 2465 // parameter in this call. 2466 // 2467 // * InvalidParameterException 2468 // You provided an invalid value for a parameter. 2469 // 2470 // * InternalServiceError 2471 // An error occurred on the server side. 2472 // 2473 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UntagResource 2474 func (c *SecretsManager) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { 2475 req, out := c.UntagResourceRequest(input) 2476 return out, req.Send() 2477 } 2478 2479 // UntagResourceWithContext is the same as UntagResource with the addition of 2480 // the ability to pass a context and additional request options. 2481 // 2482 // See UntagResource for details on how to use this API operation. 2483 // 2484 // The context must be non-nil and will be used for request cancellation. If 2485 // the context is nil a panic will occur. In the future the SDK may create 2486 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2487 // for more information on using Contexts. 2488 func (c *SecretsManager) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { 2489 req, out := c.UntagResourceRequest(input) 2490 req.SetContext(ctx) 2491 req.ApplyOptions(opts...) 2492 return out, req.Send() 2493 } 2494 2495 const opUpdateSecret = "UpdateSecret" 2496 2497 // UpdateSecretRequest generates a "aws/request.Request" representing the 2498 // client's request for the UpdateSecret operation. The "output" return 2499 // value will be populated with the request's response once the request completes 2500 // successfully. 2501 // 2502 // Use "Send" method on the returned Request to send the API call to the service. 2503 // the "output" return value is not valid until after Send returns without error. 2504 // 2505 // See UpdateSecret for more information on using the UpdateSecret 2506 // API call, and error handling. 2507 // 2508 // This method is useful when you want to inject custom logic or configuration 2509 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 2510 // 2511 // 2512 // // Example sending a request using the UpdateSecretRequest method. 2513 // req, resp := client.UpdateSecretRequest(params) 2514 // 2515 // err := req.Send() 2516 // if err == nil { // resp is now filled 2517 // fmt.Println(resp) 2518 // } 2519 // 2520 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecret 2521 func (c *SecretsManager) UpdateSecretRequest(input *UpdateSecretInput) (req *request.Request, output *UpdateSecretOutput) { 2522 op := &request.Operation{ 2523 Name: opUpdateSecret, 2524 HTTPMethod: "POST", 2525 HTTPPath: "/", 2526 } 2527 2528 if input == nil { 2529 input = &UpdateSecretInput{} 2530 } 2531 2532 output = &UpdateSecretOutput{} 2533 req = c.newRequest(op, input, output) 2534 return 2535 } 2536 2537 // UpdateSecret API operation for AWS Secrets Manager. 2538 // 2539 // Modifies many of the details of the specified secret. 2540 // 2541 // To change the secret value, you can also use PutSecretValue. 2542 // 2543 // To change the rotation configuration of a secret, use RotateSecret instead. 2544 // 2545 // We recommend you avoid calling UpdateSecret at a sustained rate of more than 2546 // once every 10 minutes. When you call UpdateSecret to update the secret value, 2547 // Secrets Manager creates a new version of the secret. Secrets Manager removes 2548 // outdated versions when there are more than 100, but it does not remove versions 2549 // created less than 24 hours ago. If you update the secret value more than 2550 // once every 10 minutes, you create more versions than Secrets Manager removes, 2551 // and you will reach the quota for secret versions. 2552 // 2553 // The Secrets Manager console uses only the SecretString parameter and therefore 2554 // limits you to encrypting and storing only a text string. To encrypt and store 2555 // binary data as part of the version of a secret, you must use either the Amazon 2556 // Web Services CLI or one of the Amazon Web Services SDKs. 2557 // 2558 // * If a version with a VersionId with the same value as the ClientRequestToken 2559 // parameter already exists, the operation results in an error. You cannot 2560 // modify an existing version, you can only create a new version. 2561 // 2562 // * If you include SecretString or SecretBinary to create a new secret version, 2563 // Secrets Manager automatically attaches the staging label AWSCURRENT to 2564 // the new version. 2565 // 2566 // * If you call an operation to encrypt or decrypt the SecretString or SecretBinary 2567 // for a secret in the same account as the calling user and that secret doesn't 2568 // specify a Amazon Web Services KMS encryption key, Secrets Manager uses 2569 // the account's default Amazon Web Services managed customer master key 2570 // (CMK) with the alias aws/secretsmanager. If this key doesn't already exist 2571 // in your account then Secrets Manager creates it for you automatically. 2572 // All users and roles in the same Amazon Web Services account automatically 2573 // have access to use the default CMK. Note that if an Secrets Manager API 2574 // call results in Amazon Web Services creating the account's Amazon Web 2575 // Services-managed CMK, it can result in a one-time significant delay in 2576 // returning the result. 2577 // 2578 // * If the secret resides in a different Amazon Web Services account from 2579 // the credentials calling an API that requires encryption or decryption 2580 // of the secret value then you must create and use a custom Amazon Web Services 2581 // KMS CMK because you can't access the default CMK for the account using 2582 // credentials from a different Amazon Web Services account. Store the ARN 2583 // of the CMK in the secret when you create the secret or when you update 2584 // it by including it in the KMSKeyId. If you call an API that must encrypt 2585 // or decrypt SecretString or SecretBinary using credentials from a different 2586 // account then the Amazon Web Services KMS key policy must grant cross-account 2587 // access to that other account's user or role for both the kms:GenerateDataKey 2588 // and kms:Decrypt operations. 2589 // 2590 // Minimum permissions 2591 // 2592 // To run this command, you must have the following permissions: 2593 // 2594 // * secretsmanager:UpdateSecret 2595 // 2596 // * kms:GenerateDataKey - needed only if you use a custom Amazon Web Services 2597 // KMS key to encrypt the secret. You do not need this permission to use 2598 // the account's Amazon Web Services managed CMK for Secrets Manager. 2599 // 2600 // * kms:Decrypt - needed only if you use a custom Amazon Web Services KMS 2601 // key to encrypt the secret. You do not need this permission to use the 2602 // account's Amazon Web Services managed CMK for Secrets Manager. 2603 // 2604 // Related operations 2605 // 2606 // * To create a new secret, use CreateSecret. 2607 // 2608 // * To add only a new version to an existing secret, use PutSecretValue. 2609 // 2610 // * To get the details for a secret, use DescribeSecret. 2611 // 2612 // * To list the versions contained in a secret, use ListSecretVersionIds. 2613 // 2614 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2615 // with awserr.Error's Code and Message methods to get detailed information about 2616 // the error. 2617 // 2618 // See the AWS API reference guide for AWS Secrets Manager's 2619 // API operation UpdateSecret for usage and error information. 2620 // 2621 // Returned Error Types: 2622 // * InvalidParameterException 2623 // You provided an invalid value for a parameter. 2624 // 2625 // * InvalidRequestException 2626 // You provided a parameter value that is not valid for the current state of 2627 // the resource. 2628 // 2629 // Possible causes: 2630 // 2631 // * You tried to perform the operation on a secret that's currently marked 2632 // deleted. 2633 // 2634 // * You tried to enable rotation on a secret that doesn't already have a 2635 // Lambda function ARN configured and you didn't include such an ARN as a 2636 // parameter in this call. 2637 // 2638 // * LimitExceededException 2639 // The request failed because it would exceed one of the Secrets Manager internal 2640 // limits. 2641 // 2642 // * EncryptionFailure 2643 // Secrets Manager can't encrypt the protected secret text using the provided 2644 // KMS key. Check that the customer master key (CMK) is available, enabled, 2645 // and not in an invalid state. For more information, see How Key State Affects 2646 // Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). 2647 // 2648 // * ResourceExistsException 2649 // A resource with the ID you requested already exists. 2650 // 2651 // * ResourceNotFoundException 2652 // We can't find the resource that you asked for. 2653 // 2654 // * MalformedPolicyDocumentException 2655 // You provided a resource-based policy with syntax errors. 2656 // 2657 // * InternalServiceError 2658 // An error occurred on the server side. 2659 // 2660 // * PreconditionNotMetException 2661 // The request failed because you did not complete all the prerequisite steps. 2662 // 2663 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecret 2664 func (c *SecretsManager) UpdateSecret(input *UpdateSecretInput) (*UpdateSecretOutput, error) { 2665 req, out := c.UpdateSecretRequest(input) 2666 return out, req.Send() 2667 } 2668 2669 // UpdateSecretWithContext is the same as UpdateSecret with the addition of 2670 // the ability to pass a context and additional request options. 2671 // 2672 // See UpdateSecret for details on how to use this API operation. 2673 // 2674 // The context must be non-nil and will be used for request cancellation. If 2675 // the context is nil a panic will occur. In the future the SDK may create 2676 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2677 // for more information on using Contexts. 2678 func (c *SecretsManager) UpdateSecretWithContext(ctx aws.Context, input *UpdateSecretInput, opts ...request.Option) (*UpdateSecretOutput, error) { 2679 req, out := c.UpdateSecretRequest(input) 2680 req.SetContext(ctx) 2681 req.ApplyOptions(opts...) 2682 return out, req.Send() 2683 } 2684 2685 const opUpdateSecretVersionStage = "UpdateSecretVersionStage" 2686 2687 // UpdateSecretVersionStageRequest generates a "aws/request.Request" representing the 2688 // client's request for the UpdateSecretVersionStage operation. The "output" return 2689 // value will be populated with the request's response once the request completes 2690 // successfully. 2691 // 2692 // Use "Send" method on the returned Request to send the API call to the service. 2693 // the "output" return value is not valid until after Send returns without error. 2694 // 2695 // See UpdateSecretVersionStage for more information on using the UpdateSecretVersionStage 2696 // API call, and error handling. 2697 // 2698 // This method is useful when you want to inject custom logic or configuration 2699 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 2700 // 2701 // 2702 // // Example sending a request using the UpdateSecretVersionStageRequest method. 2703 // req, resp := client.UpdateSecretVersionStageRequest(params) 2704 // 2705 // err := req.Send() 2706 // if err == nil { // resp is now filled 2707 // fmt.Println(resp) 2708 // } 2709 // 2710 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecretVersionStage 2711 func (c *SecretsManager) UpdateSecretVersionStageRequest(input *UpdateSecretVersionStageInput) (req *request.Request, output *UpdateSecretVersionStageOutput) { 2712 op := &request.Operation{ 2713 Name: opUpdateSecretVersionStage, 2714 HTTPMethod: "POST", 2715 HTTPPath: "/", 2716 } 2717 2718 if input == nil { 2719 input = &UpdateSecretVersionStageInput{} 2720 } 2721 2722 output = &UpdateSecretVersionStageOutput{} 2723 req = c.newRequest(op, input, output) 2724 return 2725 } 2726 2727 // UpdateSecretVersionStage API operation for AWS Secrets Manager. 2728 // 2729 // Modifies the staging labels attached to a version of a secret. Staging labels 2730 // are used to track a version as it progresses through the secret rotation 2731 // process. You can attach a staging label to only one version of a secret at 2732 // a time. If a staging label to be added is already attached to another version, 2733 // then it is moved--removed from the other version first and then attached 2734 // to this one. For more information about staging labels, see Staging Labels 2735 // (https://docs.aws.amazon.com/secretsmanager/latest/userguide/terms-concepts.html#term_staging-label) 2736 // in the Amazon Web Services Secrets Manager User Guide. 2737 // 2738 // The staging labels that you specify in the VersionStage parameter are added 2739 // to the existing list of staging labels--they don't replace it. 2740 // 2741 // You can move the AWSCURRENT staging label to this version by including it 2742 // in this call. 2743 // 2744 // Whenever you move AWSCURRENT, Secrets Manager automatically moves the label 2745 // AWSPREVIOUS to the version that AWSCURRENT was removed from. 2746 // 2747 // If this action results in the last label being removed from a version, then 2748 // the version is considered to be 'deprecated' and can be deleted by Secrets 2749 // Manager. 2750 // 2751 // Minimum permissions 2752 // 2753 // To run this command, you must have the following permissions: 2754 // 2755 // * secretsmanager:UpdateSecretVersionStage 2756 // 2757 // Related operations 2758 // 2759 // * To get the list of staging labels that are currently associated with 2760 // a version of a secret, use DescribeSecret and examine the SecretVersionsToStages 2761 // response value. 2762 // 2763 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2764 // with awserr.Error's Code and Message methods to get detailed information about 2765 // the error. 2766 // 2767 // See the AWS API reference guide for AWS Secrets Manager's 2768 // API operation UpdateSecretVersionStage for usage and error information. 2769 // 2770 // Returned Error Types: 2771 // * ResourceNotFoundException 2772 // We can't find the resource that you asked for. 2773 // 2774 // * InvalidParameterException 2775 // You provided an invalid value for a parameter. 2776 // 2777 // * InvalidRequestException 2778 // You provided a parameter value that is not valid for the current state of 2779 // the resource. 2780 // 2781 // Possible causes: 2782 // 2783 // * You tried to perform the operation on a secret that's currently marked 2784 // deleted. 2785 // 2786 // * You tried to enable rotation on a secret that doesn't already have a 2787 // Lambda function ARN configured and you didn't include such an ARN as a 2788 // parameter in this call. 2789 // 2790 // * LimitExceededException 2791 // The request failed because it would exceed one of the Secrets Manager internal 2792 // limits. 2793 // 2794 // * InternalServiceError 2795 // An error occurred on the server side. 2796 // 2797 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecretVersionStage 2798 func (c *SecretsManager) UpdateSecretVersionStage(input *UpdateSecretVersionStageInput) (*UpdateSecretVersionStageOutput, error) { 2799 req, out := c.UpdateSecretVersionStageRequest(input) 2800 return out, req.Send() 2801 } 2802 2803 // UpdateSecretVersionStageWithContext is the same as UpdateSecretVersionStage with the addition of 2804 // the ability to pass a context and additional request options. 2805 // 2806 // See UpdateSecretVersionStage for details on how to use this API operation. 2807 // 2808 // The context must be non-nil and will be used for request cancellation. If 2809 // the context is nil a panic will occur. In the future the SDK may create 2810 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2811 // for more information on using Contexts. 2812 func (c *SecretsManager) UpdateSecretVersionStageWithContext(ctx aws.Context, input *UpdateSecretVersionStageInput, opts ...request.Option) (*UpdateSecretVersionStageOutput, error) { 2813 req, out := c.UpdateSecretVersionStageRequest(input) 2814 req.SetContext(ctx) 2815 req.ApplyOptions(opts...) 2816 return out, req.Send() 2817 } 2818 2819 const opValidateResourcePolicy = "ValidateResourcePolicy" 2820 2821 // ValidateResourcePolicyRequest generates a "aws/request.Request" representing the 2822 // client's request for the ValidateResourcePolicy operation. The "output" return 2823 // value will be populated with the request's response once the request completes 2824 // successfully. 2825 // 2826 // Use "Send" method on the returned Request to send the API call to the service. 2827 // the "output" return value is not valid until after Send returns without error. 2828 // 2829 // See ValidateResourcePolicy for more information on using the ValidateResourcePolicy 2830 // API call, and error handling. 2831 // 2832 // This method is useful when you want to inject custom logic or configuration 2833 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 2834 // 2835 // 2836 // // Example sending a request using the ValidateResourcePolicyRequest method. 2837 // req, resp := client.ValidateResourcePolicyRequest(params) 2838 // 2839 // err := req.Send() 2840 // if err == nil { // resp is now filled 2841 // fmt.Println(resp) 2842 // } 2843 // 2844 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ValidateResourcePolicy 2845 func (c *SecretsManager) ValidateResourcePolicyRequest(input *ValidateResourcePolicyInput) (req *request.Request, output *ValidateResourcePolicyOutput) { 2846 op := &request.Operation{ 2847 Name: opValidateResourcePolicy, 2848 HTTPMethod: "POST", 2849 HTTPPath: "/", 2850 } 2851 2852 if input == nil { 2853 input = &ValidateResourcePolicyInput{} 2854 } 2855 2856 output = &ValidateResourcePolicyOutput{} 2857 req = c.newRequest(op, input, output) 2858 return 2859 } 2860 2861 // ValidateResourcePolicy API operation for AWS Secrets Manager. 2862 // 2863 // Validates that the resource policy does not grant a wide range of IAM principals 2864 // access to your secret. The JSON request string input and response output 2865 // displays formatted code with white space and line breaks for better readability. 2866 // Submit your input as a single line JSON string. A resource-based policy is 2867 // optional for secrets. 2868 // 2869 // The API performs three checks when validating the secret: 2870 // 2871 // * Sends a call to Zelkova (https://aws.amazon.com/blogs/security/protect-sensitive-data-in-the-cloud-with-automated-reasoning-zelkova/), 2872 // an automated reasoning engine, to ensure your Resource Policy does not 2873 // allow broad access to your secret. 2874 // 2875 // * Checks for correct syntax in a policy. 2876 // 2877 // * Verifies the policy does not lock out a caller. 2878 // 2879 // Minimum Permissions 2880 // 2881 // You must have the permissions required to access the following APIs: 2882 // 2883 // * secretsmanager:PutResourcePolicy 2884 // 2885 // * secretsmanager:ValidateResourcePolicy 2886 // 2887 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2888 // with awserr.Error's Code and Message methods to get detailed information about 2889 // the error. 2890 // 2891 // See the AWS API reference guide for AWS Secrets Manager's 2892 // API operation ValidateResourcePolicy for usage and error information. 2893 // 2894 // Returned Error Types: 2895 // * MalformedPolicyDocumentException 2896 // You provided a resource-based policy with syntax errors. 2897 // 2898 // * ResourceNotFoundException 2899 // We can't find the resource that you asked for. 2900 // 2901 // * InvalidParameterException 2902 // You provided an invalid value for a parameter. 2903 // 2904 // * InternalServiceError 2905 // An error occurred on the server side. 2906 // 2907 // * InvalidRequestException 2908 // You provided a parameter value that is not valid for the current state of 2909 // the resource. 2910 // 2911 // Possible causes: 2912 // 2913 // * You tried to perform the operation on a secret that's currently marked 2914 // deleted. 2915 // 2916 // * You tried to enable rotation on a secret that doesn't already have a 2917 // Lambda function ARN configured and you didn't include such an ARN as a 2918 // parameter in this call. 2919 // 2920 // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ValidateResourcePolicy 2921 func (c *SecretsManager) ValidateResourcePolicy(input *ValidateResourcePolicyInput) (*ValidateResourcePolicyOutput, error) { 2922 req, out := c.ValidateResourcePolicyRequest(input) 2923 return out, req.Send() 2924 } 2925 2926 // ValidateResourcePolicyWithContext is the same as ValidateResourcePolicy with the addition of 2927 // the ability to pass a context and additional request options. 2928 // 2929 // See ValidateResourcePolicy for details on how to use this API operation. 2930 // 2931 // The context must be non-nil and will be used for request cancellation. If 2932 // the context is nil a panic will occur. In the future the SDK may create 2933 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2934 // for more information on using Contexts. 2935 func (c *SecretsManager) ValidateResourcePolicyWithContext(ctx aws.Context, input *ValidateResourcePolicyInput, opts ...request.Option) (*ValidateResourcePolicyOutput, error) { 2936 req, out := c.ValidateResourcePolicyRequest(input) 2937 req.SetContext(ctx) 2938 req.ApplyOptions(opts...) 2939 return out, req.Send() 2940 } 2941 2942 type CancelRotateSecretInput struct { 2943 _ struct{} `type:"structure"` 2944 2945 // Specifies the secret to cancel a rotation request. You can specify either 2946 // the Amazon Resource Name (ARN) or the friendly name of the secret. 2947 // 2948 // For an ARN, we recommend that you specify a complete ARN rather than a partial 2949 // ARN. 2950 // 2951 // SecretId is a required field 2952 SecretId *string `min:"1" type:"string" required:"true"` 2953 } 2954 2955 // String returns the string representation. 2956 // 2957 // API parameter values that are decorated as "sensitive" in the API will not 2958 // be included in the string output. The member name will be present, but the 2959 // value will be replaced with "sensitive". 2960 func (s CancelRotateSecretInput) String() string { 2961 return awsutil.Prettify(s) 2962 } 2963 2964 // GoString returns the string representation. 2965 // 2966 // API parameter values that are decorated as "sensitive" in the API will not 2967 // be included in the string output. The member name will be present, but the 2968 // value will be replaced with "sensitive". 2969 func (s CancelRotateSecretInput) GoString() string { 2970 return s.String() 2971 } 2972 2973 // Validate inspects the fields of the type to determine if they are valid. 2974 func (s *CancelRotateSecretInput) Validate() error { 2975 invalidParams := request.ErrInvalidParams{Context: "CancelRotateSecretInput"} 2976 if s.SecretId == nil { 2977 invalidParams.Add(request.NewErrParamRequired("SecretId")) 2978 } 2979 if s.SecretId != nil && len(*s.SecretId) < 1 { 2980 invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) 2981 } 2982 2983 if invalidParams.Len() > 0 { 2984 return invalidParams 2985 } 2986 return nil 2987 } 2988 2989 // SetSecretId sets the SecretId field's value. 2990 func (s *CancelRotateSecretInput) SetSecretId(v string) *CancelRotateSecretInput { 2991 s.SecretId = &v 2992 return s 2993 } 2994 2995 type CancelRotateSecretOutput struct { 2996 _ struct{} `type:"structure"` 2997 2998 // The ARN of the secret for which rotation was canceled. 2999 ARN *string `min:"20" type:"string"` 3000 3001 // The friendly name of the secret for which rotation was canceled. 3002 Name *string `min:"1" type:"string"` 3003 3004 // The unique identifier of the version of the secret created during the rotation. 3005 // This version might not be complete, and should be evaluated for possible 3006 // deletion. At the very least, you should remove the VersionStage value AWSPENDING 3007 // to enable this version to be deleted. Failing to clean up a cancelled rotation 3008 // can block you from successfully starting future rotations. 3009 VersionId *string `min:"32" type:"string"` 3010 } 3011 3012 // String returns the string representation. 3013 // 3014 // API parameter values that are decorated as "sensitive" in the API will not 3015 // be included in the string output. The member name will be present, but the 3016 // value will be replaced with "sensitive". 3017 func (s CancelRotateSecretOutput) String() string { 3018 return awsutil.Prettify(s) 3019 } 3020 3021 // GoString returns the string representation. 3022 // 3023 // API parameter values that are decorated as "sensitive" in the API will not 3024 // be included in the string output. The member name will be present, but the 3025 // value will be replaced with "sensitive". 3026 func (s CancelRotateSecretOutput) GoString() string { 3027 return s.String() 3028 } 3029 3030 // SetARN sets the ARN field's value. 3031 func (s *CancelRotateSecretOutput) SetARN(v string) *CancelRotateSecretOutput { 3032 s.ARN = &v 3033 return s 3034 } 3035 3036 // SetName sets the Name field's value. 3037 func (s *CancelRotateSecretOutput) SetName(v string) *CancelRotateSecretOutput { 3038 s.Name = &v 3039 return s 3040 } 3041 3042 // SetVersionId sets the VersionId field's value. 3043 func (s *CancelRotateSecretOutput) SetVersionId(v string) *CancelRotateSecretOutput { 3044 s.VersionId = &v 3045 return s 3046 } 3047 3048 type CreateSecretInput struct { 3049 _ struct{} `type:"structure"` 3050 3051 // (Optional) Add a list of regions to replicate secrets. Secrets Manager replicates 3052 // the KMSKeyID objects to the list of regions specified in the parameter. 3053 AddReplicaRegions []*ReplicaRegionType `min:"1" type:"list"` 3054 3055 // (Optional) If you include SecretString or SecretBinary, then an initial version 3056 // is created as part of the secret, and this parameter specifies a unique identifier 3057 // for the new version. 3058 // 3059 // If you use the Amazon Web Services CLI or one of the Amazon Web Services 3060 // SDK to call this operation, then you can leave this parameter empty. The 3061 // CLI or SDK generates a random UUID for you and includes it as the value for 3062 // this parameter in the request. If you don't use the SDK and instead generate 3063 // a raw HTTP request to the Secrets Manager service endpoint, then you must 3064 // generate a ClientRequestToken yourself for the new version and include the 3065 // value in the request. 3066 // 3067 // This value helps ensure idempotency. Secrets Manager uses this value to prevent 3068 // the accidental creation of duplicate versions if there are failures and retries 3069 // during a rotation. We recommend that you generate a UUID-type (https://wikipedia.org/wiki/Universally_unique_identifier) 3070 // value to ensure uniqueness of your versions within the specified secret. 3071 // 3072 // * If the ClientRequestToken value isn't already associated with a version 3073 // of the secret then a new version of the secret is created. 3074 // 3075 // * If a version with this value already exists and the version SecretString 3076 // and SecretBinary values are the same as those in the request, then the 3077 // request is ignored. 3078 // 3079 // * If a version with this value already exists and that version's SecretString 3080 // and SecretBinary values are different from those in the request, then 3081 // the request fails because you cannot modify an existing version. Instead, 3082 // use PutSecretValue to create a new version. 3083 // 3084 // This value becomes the VersionId of the new version. 3085 ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` 3086 3087 // (Optional) Specifies a user-provided description of the secret. 3088 Description *string `type:"string"` 3089 3090 // (Optional) If set, the replication overwrites a secret with the same name 3091 // in the destination region. 3092 ForceOverwriteReplicaSecret *bool `type:"boolean"` 3093 3094 // (Optional) Specifies the ARN, Key ID, or alias of the Amazon Web Services 3095 // KMS customer master key (CMK) to be used to encrypt the SecretString or SecretBinary 3096 // values in the versions stored in this secret. 3097 // 3098 // You can specify any of the supported ways to identify a Amazon Web Services 3099 // KMS key ID. If you need to reference a CMK in a different account, you can 3100 // use only the key ARN or the alias ARN. 3101 // 3102 // If you don't specify this value, then Secrets Manager defaults to using the 3103 // Amazon Web Services account's default CMK (the one named aws/secretsmanager). 3104 // If a Amazon Web Services KMS CMK with that name doesn't yet exist, then Secrets 3105 // Manager creates it for you automatically the first time it needs to encrypt 3106 // a version's SecretString or SecretBinary fields. 3107 // 3108 // You can use the account default CMK to encrypt and decrypt only if you call 3109 // this operation using credentials from the same account that owns the secret. 3110 // If the secret resides in a different account, then you must create a custom 3111 // CMK and specify the ARN in this field. 3112 KmsKeyId *string `type:"string"` 3113 3114 // Specifies the friendly name of the new secret. 3115 // 3116 // The secret name must be ASCII letters, digits, or the following characters 3117 // : /_+=.@- 3118 // 3119 // Do not end your secret name with a hyphen followed by six characters. If 3120 // you do so, you risk confusion and unexpected results when searching for a 3121 // secret by partial ARN. Secrets Manager automatically adds a hyphen and six 3122 // random characters at the end of the ARN. 3123 // 3124 // Name is a required field 3125 Name *string `min:"1" type:"string" required:"true"` 3126 3127 // (Optional) Specifies binary data that you want to encrypt and store in the 3128 // new version of the secret. To use this parameter in the command-line tools, 3129 // we recommend that you store your binary data in a file and then use the appropriate 3130 // technique for your tool to pass the contents of the file as a parameter. 3131 // 3132 // Either SecretString or SecretBinary must have a value, but not both. They 3133 // cannot both be empty. 3134 // 3135 // This parameter is not available using the Secrets Manager console. It can 3136 // be accessed only by using the Amazon Web Services CLI or one of the Amazon 3137 // Web Services SDKs. 3138 // 3139 // SecretBinary is a sensitive parameter and its value will be 3140 // replaced with "sensitive" in string returned by CreateSecretInput's 3141 // String and GoString methods. 3142 // 3143 // SecretBinary is automatically base64 encoded/decoded by the SDK. 3144 SecretBinary []byte `type:"blob" sensitive:"true"` 3145 3146 // (Optional) Specifies text data that you want to encrypt and store in this 3147 // new version of the secret. 3148 // 3149 // Either SecretString or SecretBinary must have a value, but not both. They 3150 // cannot both be empty. 3151 // 3152 // If you create a secret by using the Secrets Manager console then Secrets 3153 // Manager puts the protected secret text in only the SecretString parameter. 3154 // The Secrets Manager console stores the information as a JSON structure of 3155 // key/value pairs that the Lambda rotation function knows how to parse. 3156 // 3157 // For storing multiple values, we recommend that you use a JSON text string 3158 // argument and specify key/value pairs. For more information, see Specifying 3159 // parameter values for the Amazon Web Services CLI (https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html) 3160 // in the Amazon Web Services CLI User Guide. 3161 // 3162 // SecretString is a sensitive parameter and its value will be 3163 // replaced with "sensitive" in string returned by CreateSecretInput's 3164 // String and GoString methods. 3165 SecretString *string `type:"string" sensitive:"true"` 3166 3167 // (Optional) Specifies a list of user-defined tags that are attached to the 3168 // secret. Each tag is a "Key" and "Value" pair of strings. This operation only 3169 // appends tags to the existing list of tags. To remove tags, you must use UntagResource. 3170 // 3171 // * Secrets Manager tag key names are case sensitive. A tag with the key 3172 // "ABC" is a different tag from one with key "abc". 3173 // 3174 // * If you check tags in IAM policy Condition elements as part of your security 3175 // strategy, then adding or removing a tag can change permissions. If the 3176 // successful completion of this operation would result in you losing your 3177 // permissions for this secret, then this operation is blocked and returns 3178 // an Access Denied error. 3179 // 3180 // This parameter requires a JSON text string argument. For information on how 3181 // to format a JSON parameter for the various command line tool environments, 3182 // see Using JSON for Parameters (https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) 3183 // in the CLI User Guide. For example: 3184 // 3185 // [{"Key":"CostCenter","Value":"12345"},{"Key":"environment","Value":"production"}] 3186 // 3187 // If your command-line tool or SDK requires quotation marks around the parameter, 3188 // you should use single quotes to avoid confusion with the double quotes required 3189 // in the JSON text. 3190 // 3191 // The following basic restrictions apply to tags: 3192 // 3193 // * Maximum number of tags per secret—50 3194 // 3195 // * Maximum key length—127 Unicode characters in UTF-8 3196 // 3197 // * Maximum value length—255 Unicode characters in UTF-8 3198 // 3199 // * Tag keys and values are case sensitive. 3200 // 3201 // * Do not use the aws: prefix in your tag names or values because Amazon 3202 // Web Services reserves it for Amazon Web Services use. You can't edit or 3203 // delete tag names or values with this prefix. Tags with this prefix do 3204 // not count against your tags per secret limit. 3205 // 3206 // * If you use your tagging schema across multiple services and resources, 3207 // remember other services might have restrictions on allowed characters. 3208 // Generally allowed characters: letters, spaces, and numbers representable 3209 // in UTF-8, plus the following special characters: + - = . _ : / @. 3210 Tags []*Tag `type:"list"` 3211 } 3212 3213 // String returns the string representation. 3214 // 3215 // API parameter values that are decorated as "sensitive" in the API will not 3216 // be included in the string output. The member name will be present, but the 3217 // value will be replaced with "sensitive". 3218 func (s CreateSecretInput) String() string { 3219 return awsutil.Prettify(s) 3220 } 3221 3222 // GoString returns the string representation. 3223 // 3224 // API parameter values that are decorated as "sensitive" in the API will not 3225 // be included in the string output. The member name will be present, but the 3226 // value will be replaced with "sensitive". 3227 func (s CreateSecretInput) GoString() string { 3228 return s.String() 3229 } 3230 3231 // Validate inspects the fields of the type to determine if they are valid. 3232 func (s *CreateSecretInput) Validate() error { 3233 invalidParams := request.ErrInvalidParams{Context: "CreateSecretInput"} 3234 if s.AddReplicaRegions != nil && len(s.AddReplicaRegions) < 1 { 3235 invalidParams.Add(request.NewErrParamMinLen("AddReplicaRegions", 1)) 3236 } 3237 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { 3238 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) 3239 } 3240 if s.Name == nil { 3241 invalidParams.Add(request.NewErrParamRequired("Name")) 3242 } 3243 if s.Name != nil && len(*s.Name) < 1 { 3244 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3245 } 3246 if s.AddReplicaRegions != nil { 3247 for i, v := range s.AddReplicaRegions { 3248 if v == nil { 3249 continue 3250 } 3251 if err := v.Validate(); err != nil { 3252 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AddReplicaRegions", i), err.(request.ErrInvalidParams)) 3253 } 3254 } 3255 } 3256 if s.Tags != nil { 3257 for i, v := range s.Tags { 3258 if v == nil { 3259 continue 3260 } 3261 if err := v.Validate(); err != nil { 3262 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 3263 } 3264 } 3265 } 3266 3267 if invalidParams.Len() > 0 { 3268 return invalidParams 3269 } 3270 return nil 3271 } 3272 3273 // SetAddReplicaRegions sets the AddReplicaRegions field's value. 3274 func (s *CreateSecretInput) SetAddReplicaRegions(v []*ReplicaRegionType) *CreateSecretInput { 3275 s.AddReplicaRegions = v 3276 return s 3277 } 3278 3279 // SetClientRequestToken sets the ClientRequestToken field's value. 3280 func (s *CreateSecretInput) SetClientRequestToken(v string) *CreateSecretInput { 3281 s.ClientRequestToken = &v 3282 return s 3283 } 3284 3285 // SetDescription sets the Description field's value. 3286 func (s *CreateSecretInput) SetDescription(v string) *CreateSecretInput { 3287 s.Description = &v 3288 return s 3289 } 3290 3291 // SetForceOverwriteReplicaSecret sets the ForceOverwriteReplicaSecret field's value. 3292 func (s *CreateSecretInput) SetForceOverwriteReplicaSecret(v bool) *CreateSecretInput { 3293 s.ForceOverwriteReplicaSecret = &v 3294 return s 3295 } 3296 3297 // SetKmsKeyId sets the KmsKeyId field's value. 3298 func (s *CreateSecretInput) SetKmsKeyId(v string) *CreateSecretInput { 3299 s.KmsKeyId = &v 3300 return s 3301 } 3302 3303 // SetName sets the Name field's value. 3304 func (s *CreateSecretInput) SetName(v string) *CreateSecretInput { 3305 s.Name = &v 3306 return s 3307 } 3308 3309 // SetSecretBinary sets the SecretBinary field's value. 3310 func (s *CreateSecretInput) SetSecretBinary(v []byte) *CreateSecretInput { 3311 s.SecretBinary = v 3312 return s 3313 } 3314 3315 // SetSecretString sets the SecretString field's value. 3316 func (s *CreateSecretInput) SetSecretString(v string) *CreateSecretInput { 3317 s.SecretString = &v 3318 return s 3319 } 3320 3321 // SetTags sets the Tags field's value. 3322 func (s *CreateSecretInput) SetTags(v []*Tag) *CreateSecretInput { 3323 s.Tags = v 3324 return s 3325 } 3326 3327 type CreateSecretOutput struct { 3328 _ struct{} `type:"structure"` 3329 3330 // The Amazon Resource Name (ARN) of the secret that you just created. 3331 // 3332 // Secrets Manager automatically adds several random characters to the name 3333 // at the end of the ARN when you initially create a secret. This affects only 3334 // the ARN and not the actual friendly name. This ensures that if you create 3335 // a new secret with the same name as an old secret that you previously deleted, 3336 // then users with access to the old secret don't automatically get access to 3337 // the new secret because the ARNs are different. 3338 ARN *string `min:"20" type:"string"` 3339 3340 // The friendly name of the secret that you just created. 3341 Name *string `min:"1" type:"string"` 3342 3343 // Describes a list of replication status objects as InProgress, Failed or InSync. 3344 ReplicationStatus []*ReplicationStatusType `type:"list"` 3345 3346 // The unique identifier associated with the version of the secret you just 3347 // created. 3348 VersionId *string `min:"32" type:"string"` 3349 } 3350 3351 // String returns the string representation. 3352 // 3353 // API parameter values that are decorated as "sensitive" in the API will not 3354 // be included in the string output. The member name will be present, but the 3355 // value will be replaced with "sensitive". 3356 func (s CreateSecretOutput) String() string { 3357 return awsutil.Prettify(s) 3358 } 3359 3360 // GoString returns the string representation. 3361 // 3362 // API parameter values that are decorated as "sensitive" in the API will not 3363 // be included in the string output. The member name will be present, but the 3364 // value will be replaced with "sensitive". 3365 func (s CreateSecretOutput) GoString() string { 3366 return s.String() 3367 } 3368 3369 // SetARN sets the ARN field's value. 3370 func (s *CreateSecretOutput) SetARN(v string) *CreateSecretOutput { 3371 s.ARN = &v 3372 return s 3373 } 3374 3375 // SetName sets the Name field's value. 3376 func (s *CreateSecretOutput) SetName(v string) *CreateSecretOutput { 3377 s.Name = &v 3378 return s 3379 } 3380 3381 // SetReplicationStatus sets the ReplicationStatus field's value. 3382 func (s *CreateSecretOutput) SetReplicationStatus(v []*ReplicationStatusType) *CreateSecretOutput { 3383 s.ReplicationStatus = v 3384 return s 3385 } 3386 3387 // SetVersionId sets the VersionId field's value. 3388 func (s *CreateSecretOutput) SetVersionId(v string) *CreateSecretOutput { 3389 s.VersionId = &v 3390 return s 3391 } 3392 3393 // Secrets Manager can't decrypt the protected secret text using the provided 3394 // KMS key. 3395 type DecryptionFailure struct { 3396 _ struct{} `type:"structure"` 3397 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3398 3399 Message_ *string `locationName:"Message" type:"string"` 3400 } 3401 3402 // String returns the string representation. 3403 // 3404 // API parameter values that are decorated as "sensitive" in the API will not 3405 // be included in the string output. The member name will be present, but the 3406 // value will be replaced with "sensitive". 3407 func (s DecryptionFailure) String() string { 3408 return awsutil.Prettify(s) 3409 } 3410 3411 // GoString returns the string representation. 3412 // 3413 // API parameter values that are decorated as "sensitive" in the API will not 3414 // be included in the string output. The member name will be present, but the 3415 // value will be replaced with "sensitive". 3416 func (s DecryptionFailure) GoString() string { 3417 return s.String() 3418 } 3419 3420 func newErrorDecryptionFailure(v protocol.ResponseMetadata) error { 3421 return &DecryptionFailure{ 3422 RespMetadata: v, 3423 } 3424 } 3425 3426 // Code returns the exception type name. 3427 func (s *DecryptionFailure) Code() string { 3428 return "DecryptionFailure" 3429 } 3430 3431 // Message returns the exception's message. 3432 func (s *DecryptionFailure) Message() string { 3433 if s.Message_ != nil { 3434 return *s.Message_ 3435 } 3436 return "" 3437 } 3438 3439 // OrigErr always returns nil, satisfies awserr.Error interface. 3440 func (s *DecryptionFailure) OrigErr() error { 3441 return nil 3442 } 3443 3444 func (s *DecryptionFailure) Error() string { 3445 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3446 } 3447 3448 // Status code returns the HTTP status code for the request's response error. 3449 func (s *DecryptionFailure) StatusCode() int { 3450 return s.RespMetadata.StatusCode 3451 } 3452 3453 // RequestID returns the service's response RequestID for request. 3454 func (s *DecryptionFailure) RequestID() string { 3455 return s.RespMetadata.RequestID 3456 } 3457 3458 type DeleteResourcePolicyInput struct { 3459 _ struct{} `type:"structure"` 3460 3461 // Specifies the secret that you want to delete the attached resource-based 3462 // policy for. You can specify either the Amazon Resource Name (ARN) or the 3463 // friendly name of the secret. 3464 // 3465 // For an ARN, we recommend that you specify a complete ARN rather than a partial 3466 // ARN. 3467 // 3468 // SecretId is a required field 3469 SecretId *string `min:"1" type:"string" required:"true"` 3470 } 3471 3472 // String returns the string representation. 3473 // 3474 // API parameter values that are decorated as "sensitive" in the API will not 3475 // be included in the string output. The member name will be present, but the 3476 // value will be replaced with "sensitive". 3477 func (s DeleteResourcePolicyInput) String() string { 3478 return awsutil.Prettify(s) 3479 } 3480 3481 // GoString returns the string representation. 3482 // 3483 // API parameter values that are decorated as "sensitive" in the API will not 3484 // be included in the string output. The member name will be present, but the 3485 // value will be replaced with "sensitive". 3486 func (s DeleteResourcePolicyInput) GoString() string { 3487 return s.String() 3488 } 3489 3490 // Validate inspects the fields of the type to determine if they are valid. 3491 func (s *DeleteResourcePolicyInput) Validate() error { 3492 invalidParams := request.ErrInvalidParams{Context: "DeleteResourcePolicyInput"} 3493 if s.SecretId == nil { 3494 invalidParams.Add(request.NewErrParamRequired("SecretId")) 3495 } 3496 if s.SecretId != nil && len(*s.SecretId) < 1 { 3497 invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) 3498 } 3499 3500 if invalidParams.Len() > 0 { 3501 return invalidParams 3502 } 3503 return nil 3504 } 3505 3506 // SetSecretId sets the SecretId field's value. 3507 func (s *DeleteResourcePolicyInput) SetSecretId(v string) *DeleteResourcePolicyInput { 3508 s.SecretId = &v 3509 return s 3510 } 3511 3512 type DeleteResourcePolicyOutput struct { 3513 _ struct{} `type:"structure"` 3514 3515 // The ARN of the secret that the resource-based policy was deleted for. 3516 ARN *string `min:"20" type:"string"` 3517 3518 // The friendly name of the secret that the resource-based policy was deleted 3519 // for. 3520 Name *string `min:"1" type:"string"` 3521 } 3522 3523 // String returns the string representation. 3524 // 3525 // API parameter values that are decorated as "sensitive" in the API will not 3526 // be included in the string output. The member name will be present, but the 3527 // value will be replaced with "sensitive". 3528 func (s DeleteResourcePolicyOutput) String() string { 3529 return awsutil.Prettify(s) 3530 } 3531 3532 // GoString returns the string representation. 3533 // 3534 // API parameter values that are decorated as "sensitive" in the API will not 3535 // be included in the string output. The member name will be present, but the 3536 // value will be replaced with "sensitive". 3537 func (s DeleteResourcePolicyOutput) GoString() string { 3538 return s.String() 3539 } 3540 3541 // SetARN sets the ARN field's value. 3542 func (s *DeleteResourcePolicyOutput) SetARN(v string) *DeleteResourcePolicyOutput { 3543 s.ARN = &v 3544 return s 3545 } 3546 3547 // SetName sets the Name field's value. 3548 func (s *DeleteResourcePolicyOutput) SetName(v string) *DeleteResourcePolicyOutput { 3549 s.Name = &v 3550 return s 3551 } 3552 3553 type DeleteSecretInput struct { 3554 _ struct{} `type:"structure"` 3555 3556 // (Optional) Specifies that the secret is to be deleted without any recovery 3557 // window. You can't use both this parameter and the RecoveryWindowInDays parameter 3558 // in the same API call. 3559 // 3560 // An asynchronous background process performs the actual deletion, so there 3561 // can be a short delay before the operation completes. If you write code to 3562 // delete and then immediately recreate a secret with the same name, ensure 3563 // that your code includes appropriate back off and retry logic. 3564 // 3565 // Use this parameter with caution. This parameter causes the operation to skip 3566 // the normal waiting period before the permanent deletion that Amazon Web Services 3567 // would normally impose with the RecoveryWindowInDays parameter. If you delete 3568 // a secret with the ForceDeleteWithouRecovery parameter, then you have no opportunity 3569 // to recover the secret. You lose the secret permanently. 3570 // 3571 // If you use this parameter and include a previously deleted or nonexistent 3572 // secret, the operation does not return the error ResourceNotFoundException 3573 // in order to correctly handle retries. 3574 ForceDeleteWithoutRecovery *bool `type:"boolean"` 3575 3576 // (Optional) Specifies the number of days that Secrets Manager waits before 3577 // Secrets Manager can delete the secret. You can't use both this parameter 3578 // and the ForceDeleteWithoutRecovery parameter in the same API call. 3579 // 3580 // This value can range from 7 to 30 days with a default value of 30. 3581 RecoveryWindowInDays *int64 `type:"long"` 3582 3583 // Specifies the secret to delete. You can specify either the Amazon Resource 3584 // Name (ARN) or the friendly name of the secret. 3585 // 3586 // For an ARN, we recommend that you specify a complete ARN rather than a partial 3587 // ARN. 3588 // 3589 // SecretId is a required field 3590 SecretId *string `min:"1" type:"string" required:"true"` 3591 } 3592 3593 // String returns the string representation. 3594 // 3595 // API parameter values that are decorated as "sensitive" in the API will not 3596 // be included in the string output. The member name will be present, but the 3597 // value will be replaced with "sensitive". 3598 func (s DeleteSecretInput) String() string { 3599 return awsutil.Prettify(s) 3600 } 3601 3602 // GoString returns the string representation. 3603 // 3604 // API parameter values that are decorated as "sensitive" in the API will not 3605 // be included in the string output. The member name will be present, but the 3606 // value will be replaced with "sensitive". 3607 func (s DeleteSecretInput) GoString() string { 3608 return s.String() 3609 } 3610 3611 // Validate inspects the fields of the type to determine if they are valid. 3612 func (s *DeleteSecretInput) Validate() error { 3613 invalidParams := request.ErrInvalidParams{Context: "DeleteSecretInput"} 3614 if s.SecretId == nil { 3615 invalidParams.Add(request.NewErrParamRequired("SecretId")) 3616 } 3617 if s.SecretId != nil && len(*s.SecretId) < 1 { 3618 invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) 3619 } 3620 3621 if invalidParams.Len() > 0 { 3622 return invalidParams 3623 } 3624 return nil 3625 } 3626 3627 // SetForceDeleteWithoutRecovery sets the ForceDeleteWithoutRecovery field's value. 3628 func (s *DeleteSecretInput) SetForceDeleteWithoutRecovery(v bool) *DeleteSecretInput { 3629 s.ForceDeleteWithoutRecovery = &v 3630 return s 3631 } 3632 3633 // SetRecoveryWindowInDays sets the RecoveryWindowInDays field's value. 3634 func (s *DeleteSecretInput) SetRecoveryWindowInDays(v int64) *DeleteSecretInput { 3635 s.RecoveryWindowInDays = &v 3636 return s 3637 } 3638 3639 // SetSecretId sets the SecretId field's value. 3640 func (s *DeleteSecretInput) SetSecretId(v string) *DeleteSecretInput { 3641 s.SecretId = &v 3642 return s 3643 } 3644 3645 type DeleteSecretOutput struct { 3646 _ struct{} `type:"structure"` 3647 3648 // The ARN of the secret that is now scheduled for deletion. 3649 ARN *string `min:"20" type:"string"` 3650 3651 // The date and time after which this secret can be deleted by Secrets Manager 3652 // and can no longer be restored. This value is the date and time of the delete 3653 // request plus the number of days specified in RecoveryWindowInDays. 3654 DeletionDate *time.Time `type:"timestamp"` 3655 3656 // The friendly name of the secret currently scheduled for deletion. 3657 Name *string `min:"1" type:"string"` 3658 } 3659 3660 // String returns the string representation. 3661 // 3662 // API parameter values that are decorated as "sensitive" in the API will not 3663 // be included in the string output. The member name will be present, but the 3664 // value will be replaced with "sensitive". 3665 func (s DeleteSecretOutput) String() string { 3666 return awsutil.Prettify(s) 3667 } 3668 3669 // GoString returns the string representation. 3670 // 3671 // API parameter values that are decorated as "sensitive" in the API will not 3672 // be included in the string output. The member name will be present, but the 3673 // value will be replaced with "sensitive". 3674 func (s DeleteSecretOutput) GoString() string { 3675 return s.String() 3676 } 3677 3678 // SetARN sets the ARN field's value. 3679 func (s *DeleteSecretOutput) SetARN(v string) *DeleteSecretOutput { 3680 s.ARN = &v 3681 return s 3682 } 3683 3684 // SetDeletionDate sets the DeletionDate field's value. 3685 func (s *DeleteSecretOutput) SetDeletionDate(v time.Time) *DeleteSecretOutput { 3686 s.DeletionDate = &v 3687 return s 3688 } 3689 3690 // SetName sets the Name field's value. 3691 func (s *DeleteSecretOutput) SetName(v string) *DeleteSecretOutput { 3692 s.Name = &v 3693 return s 3694 } 3695 3696 type DescribeSecretInput struct { 3697 _ struct{} `type:"structure"` 3698 3699 // The identifier of the secret whose details you want to retrieve. You can 3700 // specify either the Amazon Resource Name (ARN) or the friendly name of the 3701 // secret. 3702 // 3703 // For an ARN, we recommend that you specify a complete ARN rather than a partial 3704 // ARN. 3705 // 3706 // SecretId is a required field 3707 SecretId *string `min:"1" type:"string" required:"true"` 3708 } 3709 3710 // String returns the string representation. 3711 // 3712 // API parameter values that are decorated as "sensitive" in the API will not 3713 // be included in the string output. The member name will be present, but the 3714 // value will be replaced with "sensitive". 3715 func (s DescribeSecretInput) String() string { 3716 return awsutil.Prettify(s) 3717 } 3718 3719 // GoString returns the string representation. 3720 // 3721 // API parameter values that are decorated as "sensitive" in the API will not 3722 // be included in the string output. The member name will be present, but the 3723 // value will be replaced with "sensitive". 3724 func (s DescribeSecretInput) GoString() string { 3725 return s.String() 3726 } 3727 3728 // Validate inspects the fields of the type to determine if they are valid. 3729 func (s *DescribeSecretInput) Validate() error { 3730 invalidParams := request.ErrInvalidParams{Context: "DescribeSecretInput"} 3731 if s.SecretId == nil { 3732 invalidParams.Add(request.NewErrParamRequired("SecretId")) 3733 } 3734 if s.SecretId != nil && len(*s.SecretId) < 1 { 3735 invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) 3736 } 3737 3738 if invalidParams.Len() > 0 { 3739 return invalidParams 3740 } 3741 return nil 3742 } 3743 3744 // SetSecretId sets the SecretId field's value. 3745 func (s *DescribeSecretInput) SetSecretId(v string) *DescribeSecretInput { 3746 s.SecretId = &v 3747 return s 3748 } 3749 3750 type DescribeSecretOutput struct { 3751 _ struct{} `type:"structure"` 3752 3753 // The ARN of the secret. 3754 ARN *string `min:"20" type:"string"` 3755 3756 // The date you created the secret. 3757 CreatedDate *time.Time `type:"timestamp"` 3758 3759 // This value exists if the secret is scheduled for deletion. Some time after 3760 // the specified date and time, Secrets Manager deletes the secret and all of 3761 // its versions. 3762 // 3763 // If a secret is scheduled for deletion, then its details, including the encrypted 3764 // secret information, is not accessible. To cancel a scheduled deletion and 3765 // restore access, use RestoreSecret. 3766 DeletedDate *time.Time `type:"timestamp"` 3767 3768 // The user-provided description of the secret. 3769 Description *string `type:"string"` 3770 3771 // The ARN or alias of the Amazon Web Services KMS customer master key (CMK) 3772 // that's used to encrypt the SecretString or SecretBinary fields in each version 3773 // of the secret. If you don't provide a key, then Secrets Manager defaults 3774 // to encrypting the secret fields with the default Amazon Web Services KMS 3775 // CMK (the one named awssecretsmanager) for this account. 3776 KmsKeyId *string `type:"string"` 3777 3778 // The last date that this secret was accessed. This value is truncated to midnight 3779 // of the date and therefore shows only the date, not the time. 3780 LastAccessedDate *time.Time `type:"timestamp"` 3781 3782 // The last date and time that this secret was modified in any way. 3783 LastChangedDate *time.Time `type:"timestamp"` 3784 3785 // The last date and time that the rotation process for this secret was invoked. 3786 // 3787 // The most recent date and time that the Secrets Manager rotation process successfully 3788 // completed. If the secret doesn't rotate, Secrets Manager returns a null value. 3789 LastRotatedDate *time.Time `type:"timestamp"` 3790 3791 // The user-provided friendly name of the secret. 3792 Name *string `min:"1" type:"string"` 3793 3794 // Returns the name of the service that created this secret. 3795 OwningService *string `min:"1" type:"string"` 3796 3797 // Specifies the primary region for secret replication. 3798 PrimaryRegion *string `min:"1" type:"string"` 3799 3800 // Describes a list of replication status objects as InProgress, Failed or InSync.P 3801 ReplicationStatus []*ReplicationStatusType `type:"list"` 3802 3803 // Specifies whether automatic rotation is enabled for this secret. 3804 // 3805 // To enable rotation, use RotateSecret with AutomaticallyRotateAfterDays set 3806 // to a value greater than 0. To disable rotation, use CancelRotateSecret. 3807 RotationEnabled *bool `type:"boolean"` 3808 3809 // The ARN of a Lambda function that's invoked by Secrets Manager to rotate 3810 // the secret either automatically per the schedule or manually by a call to 3811 // RotateSecret. 3812 RotationLambdaARN *string `type:"string"` 3813 3814 // A structure with the rotation configuration for this secret. This field is 3815 // only populated if rotation is configured. 3816 RotationRules *RotationRulesType `type:"structure"` 3817 3818 // The list of user-defined tags that are associated with the secret. To add 3819 // tags to a secret, use TagResource. To remove tags, use UntagResource. 3820 Tags []*Tag `type:"list"` 3821 3822 // A list of all of the currently assigned VersionStage staging labels and the 3823 // VersionId that each is attached to. Staging labels are used to keep track 3824 // of the different versions during the rotation process. 3825 // 3826 // A version that does not have any staging labels attached is considered deprecated 3827 // and subject to deletion. Such versions are not included in this list. 3828 VersionIdsToStages map[string][]*string `type:"map"` 3829 } 3830 3831 // String returns the string representation. 3832 // 3833 // API parameter values that are decorated as "sensitive" in the API will not 3834 // be included in the string output. The member name will be present, but the 3835 // value will be replaced with "sensitive". 3836 func (s DescribeSecretOutput) String() string { 3837 return awsutil.Prettify(s) 3838 } 3839 3840 // GoString returns the string representation. 3841 // 3842 // API parameter values that are decorated as "sensitive" in the API will not 3843 // be included in the string output. The member name will be present, but the 3844 // value will be replaced with "sensitive". 3845 func (s DescribeSecretOutput) GoString() string { 3846 return s.String() 3847 } 3848 3849 // SetARN sets the ARN field's value. 3850 func (s *DescribeSecretOutput) SetARN(v string) *DescribeSecretOutput { 3851 s.ARN = &v 3852 return s 3853 } 3854 3855 // SetCreatedDate sets the CreatedDate field's value. 3856 func (s *DescribeSecretOutput) SetCreatedDate(v time.Time) *DescribeSecretOutput { 3857 s.CreatedDate = &v 3858 return s 3859 } 3860 3861 // SetDeletedDate sets the DeletedDate field's value. 3862 func (s *DescribeSecretOutput) SetDeletedDate(v time.Time) *DescribeSecretOutput { 3863 s.DeletedDate = &v 3864 return s 3865 } 3866 3867 // SetDescription sets the Description field's value. 3868 func (s *DescribeSecretOutput) SetDescription(v string) *DescribeSecretOutput { 3869 s.Description = &v 3870 return s 3871 } 3872 3873 // SetKmsKeyId sets the KmsKeyId field's value. 3874 func (s *DescribeSecretOutput) SetKmsKeyId(v string) *DescribeSecretOutput { 3875 s.KmsKeyId = &v 3876 return s 3877 } 3878 3879 // SetLastAccessedDate sets the LastAccessedDate field's value. 3880 func (s *DescribeSecretOutput) SetLastAccessedDate(v time.Time) *DescribeSecretOutput { 3881 s.LastAccessedDate = &v 3882 return s 3883 } 3884 3885 // SetLastChangedDate sets the LastChangedDate field's value. 3886 func (s *DescribeSecretOutput) SetLastChangedDate(v time.Time) *DescribeSecretOutput { 3887 s.LastChangedDate = &v 3888 return s 3889 } 3890 3891 // SetLastRotatedDate sets the LastRotatedDate field's value. 3892 func (s *DescribeSecretOutput) SetLastRotatedDate(v time.Time) *DescribeSecretOutput { 3893 s.LastRotatedDate = &v 3894 return s 3895 } 3896 3897 // SetName sets the Name field's value. 3898 func (s *DescribeSecretOutput) SetName(v string) *DescribeSecretOutput { 3899 s.Name = &v 3900 return s 3901 } 3902 3903 // SetOwningService sets the OwningService field's value. 3904 func (s *DescribeSecretOutput) SetOwningService(v string) *DescribeSecretOutput { 3905 s.OwningService = &v 3906 return s 3907 } 3908 3909 // SetPrimaryRegion sets the PrimaryRegion field's value. 3910 func (s *DescribeSecretOutput) SetPrimaryRegion(v string) *DescribeSecretOutput { 3911 s.PrimaryRegion = &v 3912 return s 3913 } 3914 3915 // SetReplicationStatus sets the ReplicationStatus field's value. 3916 func (s *DescribeSecretOutput) SetReplicationStatus(v []*ReplicationStatusType) *DescribeSecretOutput { 3917 s.ReplicationStatus = v 3918 return s 3919 } 3920 3921 // SetRotationEnabled sets the RotationEnabled field's value. 3922 func (s *DescribeSecretOutput) SetRotationEnabled(v bool) *DescribeSecretOutput { 3923 s.RotationEnabled = &v 3924 return s 3925 } 3926 3927 // SetRotationLambdaARN sets the RotationLambdaARN field's value. 3928 func (s *DescribeSecretOutput) SetRotationLambdaARN(v string) *DescribeSecretOutput { 3929 s.RotationLambdaARN = &v 3930 return s 3931 } 3932 3933 // SetRotationRules sets the RotationRules field's value. 3934 func (s *DescribeSecretOutput) SetRotationRules(v *RotationRulesType) *DescribeSecretOutput { 3935 s.RotationRules = v 3936 return s 3937 } 3938 3939 // SetTags sets the Tags field's value. 3940 func (s *DescribeSecretOutput) SetTags(v []*Tag) *DescribeSecretOutput { 3941 s.Tags = v 3942 return s 3943 } 3944 3945 // SetVersionIdsToStages sets the VersionIdsToStages field's value. 3946 func (s *DescribeSecretOutput) SetVersionIdsToStages(v map[string][]*string) *DescribeSecretOutput { 3947 s.VersionIdsToStages = v 3948 return s 3949 } 3950 3951 // Secrets Manager can't encrypt the protected secret text using the provided 3952 // KMS key. Check that the customer master key (CMK) is available, enabled, 3953 // and not in an invalid state. For more information, see How Key State Affects 3954 // Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). 3955 type EncryptionFailure struct { 3956 _ struct{} `type:"structure"` 3957 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3958 3959 Message_ *string `locationName:"Message" type:"string"` 3960 } 3961 3962 // String returns the string representation. 3963 // 3964 // API parameter values that are decorated as "sensitive" in the API will not 3965 // be included in the string output. The member name will be present, but the 3966 // value will be replaced with "sensitive". 3967 func (s EncryptionFailure) String() string { 3968 return awsutil.Prettify(s) 3969 } 3970 3971 // GoString returns the string representation. 3972 // 3973 // API parameter values that are decorated as "sensitive" in the API will not 3974 // be included in the string output. The member name will be present, but the 3975 // value will be replaced with "sensitive". 3976 func (s EncryptionFailure) GoString() string { 3977 return s.String() 3978 } 3979 3980 func newErrorEncryptionFailure(v protocol.ResponseMetadata) error { 3981 return &EncryptionFailure{ 3982 RespMetadata: v, 3983 } 3984 } 3985 3986 // Code returns the exception type name. 3987 func (s *EncryptionFailure) Code() string { 3988 return "EncryptionFailure" 3989 } 3990 3991 // Message returns the exception's message. 3992 func (s *EncryptionFailure) Message() string { 3993 if s.Message_ != nil { 3994 return *s.Message_ 3995 } 3996 return "" 3997 } 3998 3999 // OrigErr always returns nil, satisfies awserr.Error interface. 4000 func (s *EncryptionFailure) OrigErr() error { 4001 return nil 4002 } 4003 4004 func (s *EncryptionFailure) Error() string { 4005 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4006 } 4007 4008 // Status code returns the HTTP status code for the request's response error. 4009 func (s *EncryptionFailure) StatusCode() int { 4010 return s.RespMetadata.StatusCode 4011 } 4012 4013 // RequestID returns the service's response RequestID for request. 4014 func (s *EncryptionFailure) RequestID() string { 4015 return s.RespMetadata.RequestID 4016 } 4017 4018 // Allows you to add filters when you use the search function in Secrets Manager. 4019 type Filter struct { 4020 _ struct{} `type:"structure"` 4021 4022 // Filters your list of secrets by a specific key. 4023 Key *string `type:"string" enum:"FilterNameStringType"` 4024 4025 // Filters your list of secrets by a specific value. 4026 // 4027 // You can prefix your search value with an exclamation mark (!) in order to 4028 // perform negation filters. 4029 Values []*string `min:"1" type:"list"` 4030 } 4031 4032 // String returns the string representation. 4033 // 4034 // API parameter values that are decorated as "sensitive" in the API will not 4035 // be included in the string output. The member name will be present, but the 4036 // value will be replaced with "sensitive". 4037 func (s Filter) String() string { 4038 return awsutil.Prettify(s) 4039 } 4040 4041 // GoString returns the string representation. 4042 // 4043 // API parameter values that are decorated as "sensitive" in the API will not 4044 // be included in the string output. The member name will be present, but the 4045 // value will be replaced with "sensitive". 4046 func (s Filter) GoString() string { 4047 return s.String() 4048 } 4049 4050 // Validate inspects the fields of the type to determine if they are valid. 4051 func (s *Filter) Validate() error { 4052 invalidParams := request.ErrInvalidParams{Context: "Filter"} 4053 if s.Values != nil && len(s.Values) < 1 { 4054 invalidParams.Add(request.NewErrParamMinLen("Values", 1)) 4055 } 4056 4057 if invalidParams.Len() > 0 { 4058 return invalidParams 4059 } 4060 return nil 4061 } 4062 4063 // SetKey sets the Key field's value. 4064 func (s *Filter) SetKey(v string) *Filter { 4065 s.Key = &v 4066 return s 4067 } 4068 4069 // SetValues sets the Values field's value. 4070 func (s *Filter) SetValues(v []*string) *Filter { 4071 s.Values = v 4072 return s 4073 } 4074 4075 type GetRandomPasswordInput struct { 4076 _ struct{} `type:"structure"` 4077 4078 // A string that includes characters that should not be included in the generated 4079 // password. The default is that all characters from the included sets can be 4080 // used. 4081 ExcludeCharacters *string `type:"string"` 4082 4083 // Specifies that the generated password should not include lowercase letters. 4084 // The default if you do not include this switch parameter is that lowercase 4085 // letters can be included. 4086 ExcludeLowercase *bool `type:"boolean"` 4087 4088 // Specifies that the generated password should not include digits. The default 4089 // if you do not include this switch parameter is that digits can be included. 4090 ExcludeNumbers *bool `type:"boolean"` 4091 4092 // Specifies that the generated password should not include punctuation characters. 4093 // The default if you do not include this switch parameter is that punctuation 4094 // characters can be included. 4095 // 4096 // The following are the punctuation characters that can be included in the 4097 // generated password if you don't explicitly exclude them with ExcludeCharacters 4098 // or ExcludePunctuation: 4099 // 4100 // ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~ 4101 ExcludePunctuation *bool `type:"boolean"` 4102 4103 // Specifies that the generated password should not include uppercase letters. 4104 // The default if you do not include this switch parameter is that uppercase 4105 // letters can be included. 4106 ExcludeUppercase *bool `type:"boolean"` 4107 4108 // Specifies that the generated password can include the space character. The 4109 // default if you do not include this switch parameter is that the space character 4110 // is not included. 4111 IncludeSpace *bool `type:"boolean"` 4112 4113 // The desired length of the generated password. The default value if you do 4114 // not include this parameter is 32 characters. 4115 PasswordLength *int64 `min:"1" type:"long"` 4116 4117 // A boolean value that specifies whether the generated password must include 4118 // at least one of every allowed character type. The default value is True and 4119 // the operation requires at least one of every character type. 4120 RequireEachIncludedType *bool `type:"boolean"` 4121 } 4122 4123 // String returns the string representation. 4124 // 4125 // API parameter values that are decorated as "sensitive" in the API will not 4126 // be included in the string output. The member name will be present, but the 4127 // value will be replaced with "sensitive". 4128 func (s GetRandomPasswordInput) String() string { 4129 return awsutil.Prettify(s) 4130 } 4131 4132 // GoString returns the string representation. 4133 // 4134 // API parameter values that are decorated as "sensitive" in the API will not 4135 // be included in the string output. The member name will be present, but the 4136 // value will be replaced with "sensitive". 4137 func (s GetRandomPasswordInput) GoString() string { 4138 return s.String() 4139 } 4140 4141 // Validate inspects the fields of the type to determine if they are valid. 4142 func (s *GetRandomPasswordInput) Validate() error { 4143 invalidParams := request.ErrInvalidParams{Context: "GetRandomPasswordInput"} 4144 if s.PasswordLength != nil && *s.PasswordLength < 1 { 4145 invalidParams.Add(request.NewErrParamMinValue("PasswordLength", 1)) 4146 } 4147 4148 if invalidParams.Len() > 0 { 4149 return invalidParams 4150 } 4151 return nil 4152 } 4153 4154 // SetExcludeCharacters sets the ExcludeCharacters field's value. 4155 func (s *GetRandomPasswordInput) SetExcludeCharacters(v string) *GetRandomPasswordInput { 4156 s.ExcludeCharacters = &v 4157 return s 4158 } 4159 4160 // SetExcludeLowercase sets the ExcludeLowercase field's value. 4161 func (s *GetRandomPasswordInput) SetExcludeLowercase(v bool) *GetRandomPasswordInput { 4162 s.ExcludeLowercase = &v 4163 return s 4164 } 4165 4166 // SetExcludeNumbers sets the ExcludeNumbers field's value. 4167 func (s *GetRandomPasswordInput) SetExcludeNumbers(v bool) *GetRandomPasswordInput { 4168 s.ExcludeNumbers = &v 4169 return s 4170 } 4171 4172 // SetExcludePunctuation sets the ExcludePunctuation field's value. 4173 func (s *GetRandomPasswordInput) SetExcludePunctuation(v bool) *GetRandomPasswordInput { 4174 s.ExcludePunctuation = &v 4175 return s 4176 } 4177 4178 // SetExcludeUppercase sets the ExcludeUppercase field's value. 4179 func (s *GetRandomPasswordInput) SetExcludeUppercase(v bool) *GetRandomPasswordInput { 4180 s.ExcludeUppercase = &v 4181 return s 4182 } 4183 4184 // SetIncludeSpace sets the IncludeSpace field's value. 4185 func (s *GetRandomPasswordInput) SetIncludeSpace(v bool) *GetRandomPasswordInput { 4186 s.IncludeSpace = &v 4187 return s 4188 } 4189 4190 // SetPasswordLength sets the PasswordLength field's value. 4191 func (s *GetRandomPasswordInput) SetPasswordLength(v int64) *GetRandomPasswordInput { 4192 s.PasswordLength = &v 4193 return s 4194 } 4195 4196 // SetRequireEachIncludedType sets the RequireEachIncludedType field's value. 4197 func (s *GetRandomPasswordInput) SetRequireEachIncludedType(v bool) *GetRandomPasswordInput { 4198 s.RequireEachIncludedType = &v 4199 return s 4200 } 4201 4202 type GetRandomPasswordOutput struct { 4203 _ struct{} `type:"structure"` 4204 4205 // A string with the generated password. 4206 // 4207 // RandomPassword is a sensitive parameter and its value will be 4208 // replaced with "sensitive" in string returned by GetRandomPasswordOutput's 4209 // String and GoString methods. 4210 RandomPassword *string `type:"string" sensitive:"true"` 4211 } 4212 4213 // String returns the string representation. 4214 // 4215 // API parameter values that are decorated as "sensitive" in the API will not 4216 // be included in the string output. The member name will be present, but the 4217 // value will be replaced with "sensitive". 4218 func (s GetRandomPasswordOutput) String() string { 4219 return awsutil.Prettify(s) 4220 } 4221 4222 // GoString returns the string representation. 4223 // 4224 // API parameter values that are decorated as "sensitive" in the API will not 4225 // be included in the string output. The member name will be present, but the 4226 // value will be replaced with "sensitive". 4227 func (s GetRandomPasswordOutput) GoString() string { 4228 return s.String() 4229 } 4230 4231 // SetRandomPassword sets the RandomPassword field's value. 4232 func (s *GetRandomPasswordOutput) SetRandomPassword(v string) *GetRandomPasswordOutput { 4233 s.RandomPassword = &v 4234 return s 4235 } 4236 4237 type GetResourcePolicyInput struct { 4238 _ struct{} `type:"structure"` 4239 4240 // Specifies the secret that you want to retrieve the attached resource-based 4241 // policy for. You can specify either the Amazon Resource Name (ARN) or the 4242 // friendly name of the secret. 4243 // 4244 // For an ARN, we recommend that you specify a complete ARN rather than a partial 4245 // ARN. 4246 // 4247 // SecretId is a required field 4248 SecretId *string `min:"1" type:"string" required:"true"` 4249 } 4250 4251 // String returns the string representation. 4252 // 4253 // API parameter values that are decorated as "sensitive" in the API will not 4254 // be included in the string output. The member name will be present, but the 4255 // value will be replaced with "sensitive". 4256 func (s GetResourcePolicyInput) String() string { 4257 return awsutil.Prettify(s) 4258 } 4259 4260 // GoString returns the string representation. 4261 // 4262 // API parameter values that are decorated as "sensitive" in the API will not 4263 // be included in the string output. The member name will be present, but the 4264 // value will be replaced with "sensitive". 4265 func (s GetResourcePolicyInput) GoString() string { 4266 return s.String() 4267 } 4268 4269 // Validate inspects the fields of the type to determine if they are valid. 4270 func (s *GetResourcePolicyInput) Validate() error { 4271 invalidParams := request.ErrInvalidParams{Context: "GetResourcePolicyInput"} 4272 if s.SecretId == nil { 4273 invalidParams.Add(request.NewErrParamRequired("SecretId")) 4274 } 4275 if s.SecretId != nil && len(*s.SecretId) < 1 { 4276 invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) 4277 } 4278 4279 if invalidParams.Len() > 0 { 4280 return invalidParams 4281 } 4282 return nil 4283 } 4284 4285 // SetSecretId sets the SecretId field's value. 4286 func (s *GetResourcePolicyInput) SetSecretId(v string) *GetResourcePolicyInput { 4287 s.SecretId = &v 4288 return s 4289 } 4290 4291 type GetResourcePolicyOutput struct { 4292 _ struct{} `type:"structure"` 4293 4294 // The ARN of the secret that the resource-based policy was retrieved for. 4295 ARN *string `min:"20" type:"string"` 4296 4297 // The friendly name of the secret that the resource-based policy was retrieved 4298 // for. 4299 Name *string `min:"1" type:"string"` 4300 4301 // A JSON-formatted string that describes the permissions that are associated 4302 // with the attached secret. These permissions are combined with any permissions 4303 // that are associated with the user or role that attempts to access this secret. 4304 // The combined permissions specify who can access the secret and what actions 4305 // they can perform. For more information, see Authentication and Access Control 4306 // for Amazon Web Services Secrets Manager (http://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html) 4307 // in the Amazon Web Services Secrets Manager User Guide. 4308 ResourcePolicy *string `min:"1" type:"string"` 4309 } 4310 4311 // String returns the string representation. 4312 // 4313 // API parameter values that are decorated as "sensitive" in the API will not 4314 // be included in the string output. The member name will be present, but the 4315 // value will be replaced with "sensitive". 4316 func (s GetResourcePolicyOutput) String() string { 4317 return awsutil.Prettify(s) 4318 } 4319 4320 // GoString returns the string representation. 4321 // 4322 // API parameter values that are decorated as "sensitive" in the API will not 4323 // be included in the string output. The member name will be present, but the 4324 // value will be replaced with "sensitive". 4325 func (s GetResourcePolicyOutput) GoString() string { 4326 return s.String() 4327 } 4328 4329 // SetARN sets the ARN field's value. 4330 func (s *GetResourcePolicyOutput) SetARN(v string) *GetResourcePolicyOutput { 4331 s.ARN = &v 4332 return s 4333 } 4334 4335 // SetName sets the Name field's value. 4336 func (s *GetResourcePolicyOutput) SetName(v string) *GetResourcePolicyOutput { 4337 s.Name = &v 4338 return s 4339 } 4340 4341 // SetResourcePolicy sets the ResourcePolicy field's value. 4342 func (s *GetResourcePolicyOutput) SetResourcePolicy(v string) *GetResourcePolicyOutput { 4343 s.ResourcePolicy = &v 4344 return s 4345 } 4346 4347 type GetSecretValueInput struct { 4348 _ struct{} `type:"structure"` 4349 4350 // Specifies the secret containing the version that you want to retrieve. You 4351 // can specify either the Amazon Resource Name (ARN) or the friendly name of 4352 // the secret. 4353 // 4354 // For an ARN, we recommend that you specify a complete ARN rather than a partial 4355 // ARN. 4356 // 4357 // SecretId is a required field 4358 SecretId *string `min:"1" type:"string" required:"true"` 4359 4360 // Specifies the unique identifier of the version of the secret that you want 4361 // to retrieve. If you specify both this parameter and VersionStage, the two 4362 // parameters must refer to the same secret version. If you don't specify either 4363 // a VersionStage or VersionId then the default is to perform the operation 4364 // on the version with the VersionStage value of AWSCURRENT. 4365 // 4366 // This value is typically a UUID-type (https://wikipedia.org/wiki/Universally_unique_identifier) 4367 // value with 32 hexadecimal digits. 4368 VersionId *string `min:"32" type:"string"` 4369 4370 // Specifies the secret version that you want to retrieve by the staging label 4371 // attached to the version. 4372 // 4373 // Staging labels are used to keep track of different versions during the rotation 4374 // process. If you specify both this parameter and VersionId, the two parameters 4375 // must refer to the same secret version . If you don't specify either a VersionStage 4376 // or VersionId, then the default is to perform the operation on the version 4377 // with the VersionStage value of AWSCURRENT. 4378 VersionStage *string `min:"1" type:"string"` 4379 } 4380 4381 // String returns the string representation. 4382 // 4383 // API parameter values that are decorated as "sensitive" in the API will not 4384 // be included in the string output. The member name will be present, but the 4385 // value will be replaced with "sensitive". 4386 func (s GetSecretValueInput) String() string { 4387 return awsutil.Prettify(s) 4388 } 4389 4390 // GoString returns the string representation. 4391 // 4392 // API parameter values that are decorated as "sensitive" in the API will not 4393 // be included in the string output. The member name will be present, but the 4394 // value will be replaced with "sensitive". 4395 func (s GetSecretValueInput) GoString() string { 4396 return s.String() 4397 } 4398 4399 // Validate inspects the fields of the type to determine if they are valid. 4400 func (s *GetSecretValueInput) Validate() error { 4401 invalidParams := request.ErrInvalidParams{Context: "GetSecretValueInput"} 4402 if s.SecretId == nil { 4403 invalidParams.Add(request.NewErrParamRequired("SecretId")) 4404 } 4405 if s.SecretId != nil && len(*s.SecretId) < 1 { 4406 invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) 4407 } 4408 if s.VersionId != nil && len(*s.VersionId) < 32 { 4409 invalidParams.Add(request.NewErrParamMinLen("VersionId", 32)) 4410 } 4411 if s.VersionStage != nil && len(*s.VersionStage) < 1 { 4412 invalidParams.Add(request.NewErrParamMinLen("VersionStage", 1)) 4413 } 4414 4415 if invalidParams.Len() > 0 { 4416 return invalidParams 4417 } 4418 return nil 4419 } 4420 4421 // SetSecretId sets the SecretId field's value. 4422 func (s *GetSecretValueInput) SetSecretId(v string) *GetSecretValueInput { 4423 s.SecretId = &v 4424 return s 4425 } 4426 4427 // SetVersionId sets the VersionId field's value. 4428 func (s *GetSecretValueInput) SetVersionId(v string) *GetSecretValueInput { 4429 s.VersionId = &v 4430 return s 4431 } 4432 4433 // SetVersionStage sets the VersionStage field's value. 4434 func (s *GetSecretValueInput) SetVersionStage(v string) *GetSecretValueInput { 4435 s.VersionStage = &v 4436 return s 4437 } 4438 4439 type GetSecretValueOutput struct { 4440 _ struct{} `type:"structure"` 4441 4442 // The ARN of the secret. 4443 ARN *string `min:"20" type:"string"` 4444 4445 // The date and time that this version of the secret was created. 4446 CreatedDate *time.Time `type:"timestamp"` 4447 4448 // The friendly name of the secret. 4449 Name *string `min:"1" type:"string"` 4450 4451 // The decrypted part of the protected secret information that was originally 4452 // provided as binary data in the form of a byte array. The response parameter 4453 // represents the binary data as a base64-encoded (https://tools.ietf.org/html/rfc4648#section-4) 4454 // string. 4455 // 4456 // This parameter is not used if the secret is created by the Secrets Manager 4457 // console. 4458 // 4459 // If you store custom information in this field of the secret, then you must 4460 // code your Lambda rotation function to parse and interpret whatever you store 4461 // in the SecretString or SecretBinary fields. 4462 // 4463 // SecretBinary is a sensitive parameter and its value will be 4464 // replaced with "sensitive" in string returned by GetSecretValueOutput's 4465 // String and GoString methods. 4466 // 4467 // SecretBinary is automatically base64 encoded/decoded by the SDK. 4468 SecretBinary []byte `type:"blob" sensitive:"true"` 4469 4470 // The decrypted part of the protected secret information that was originally 4471 // provided as a string. 4472 // 4473 // If you create this secret by using the Secrets Manager console then only 4474 // the SecretString parameter contains data. Secrets Manager stores the information 4475 // as a JSON structure of key/value pairs that the Lambda rotation function 4476 // knows how to parse. 4477 // 4478 // If you store custom information in the secret by using the CreateSecret, 4479 // UpdateSecret, or PutSecretValue API operations instead of the Secrets Manager 4480 // console, or by using the Other secret type in the console, then you must 4481 // code your Lambda rotation function to parse and interpret those values. 4482 // 4483 // SecretString is a sensitive parameter and its value will be 4484 // replaced with "sensitive" in string returned by GetSecretValueOutput's 4485 // String and GoString methods. 4486 SecretString *string `type:"string" sensitive:"true"` 4487 4488 // The unique identifier of this version of the secret. 4489 VersionId *string `min:"32" type:"string"` 4490 4491 // A list of all of the staging labels currently attached to this version of 4492 // the secret. 4493 VersionStages []*string `min:"1" type:"list"` 4494 } 4495 4496 // String returns the string representation. 4497 // 4498 // API parameter values that are decorated as "sensitive" in the API will not 4499 // be included in the string output. The member name will be present, but the 4500 // value will be replaced with "sensitive". 4501 func (s GetSecretValueOutput) String() string { 4502 return awsutil.Prettify(s) 4503 } 4504 4505 // GoString returns the string representation. 4506 // 4507 // API parameter values that are decorated as "sensitive" in the API will not 4508 // be included in the string output. The member name will be present, but the 4509 // value will be replaced with "sensitive". 4510 func (s GetSecretValueOutput) GoString() string { 4511 return s.String() 4512 } 4513 4514 // SetARN sets the ARN field's value. 4515 func (s *GetSecretValueOutput) SetARN(v string) *GetSecretValueOutput { 4516 s.ARN = &v 4517 return s 4518 } 4519 4520 // SetCreatedDate sets the CreatedDate field's value. 4521 func (s *GetSecretValueOutput) SetCreatedDate(v time.Time) *GetSecretValueOutput { 4522 s.CreatedDate = &v 4523 return s 4524 } 4525 4526 // SetName sets the Name field's value. 4527 func (s *GetSecretValueOutput) SetName(v string) *GetSecretValueOutput { 4528 s.Name = &v 4529 return s 4530 } 4531 4532 // SetSecretBinary sets the SecretBinary field's value. 4533 func (s *GetSecretValueOutput) SetSecretBinary(v []byte) *GetSecretValueOutput { 4534 s.SecretBinary = v 4535 return s 4536 } 4537 4538 // SetSecretString sets the SecretString field's value. 4539 func (s *GetSecretValueOutput) SetSecretString(v string) *GetSecretValueOutput { 4540 s.SecretString = &v 4541 return s 4542 } 4543 4544 // SetVersionId sets the VersionId field's value. 4545 func (s *GetSecretValueOutput) SetVersionId(v string) *GetSecretValueOutput { 4546 s.VersionId = &v 4547 return s 4548 } 4549 4550 // SetVersionStages sets the VersionStages field's value. 4551 func (s *GetSecretValueOutput) SetVersionStages(v []*string) *GetSecretValueOutput { 4552 s.VersionStages = v 4553 return s 4554 } 4555 4556 // An error occurred on the server side. 4557 type InternalServiceError struct { 4558 _ struct{} `type:"structure"` 4559 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4560 4561 Message_ *string `locationName:"Message" type:"string"` 4562 } 4563 4564 // String returns the string representation. 4565 // 4566 // API parameter values that are decorated as "sensitive" in the API will not 4567 // be included in the string output. The member name will be present, but the 4568 // value will be replaced with "sensitive". 4569 func (s InternalServiceError) String() string { 4570 return awsutil.Prettify(s) 4571 } 4572 4573 // GoString returns the string representation. 4574 // 4575 // API parameter values that are decorated as "sensitive" in the API will not 4576 // be included in the string output. The member name will be present, but the 4577 // value will be replaced with "sensitive". 4578 func (s InternalServiceError) GoString() string { 4579 return s.String() 4580 } 4581 4582 func newErrorInternalServiceError(v protocol.ResponseMetadata) error { 4583 return &InternalServiceError{ 4584 RespMetadata: v, 4585 } 4586 } 4587 4588 // Code returns the exception type name. 4589 func (s *InternalServiceError) Code() string { 4590 return "InternalServiceError" 4591 } 4592 4593 // Message returns the exception's message. 4594 func (s *InternalServiceError) Message() string { 4595 if s.Message_ != nil { 4596 return *s.Message_ 4597 } 4598 return "" 4599 } 4600 4601 // OrigErr always returns nil, satisfies awserr.Error interface. 4602 func (s *InternalServiceError) OrigErr() error { 4603 return nil 4604 } 4605 4606 func (s *InternalServiceError) Error() string { 4607 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4608 } 4609 4610 // Status code returns the HTTP status code for the request's response error. 4611 func (s *InternalServiceError) StatusCode() int { 4612 return s.RespMetadata.StatusCode 4613 } 4614 4615 // RequestID returns the service's response RequestID for request. 4616 func (s *InternalServiceError) RequestID() string { 4617 return s.RespMetadata.RequestID 4618 } 4619 4620 // You provided an invalid NextToken value. 4621 type InvalidNextTokenException struct { 4622 _ struct{} `type:"structure"` 4623 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4624 4625 Message_ *string `locationName:"Message" type:"string"` 4626 } 4627 4628 // String returns the string representation. 4629 // 4630 // API parameter values that are decorated as "sensitive" in the API will not 4631 // be included in the string output. The member name will be present, but the 4632 // value will be replaced with "sensitive". 4633 func (s InvalidNextTokenException) String() string { 4634 return awsutil.Prettify(s) 4635 } 4636 4637 // GoString returns the string representation. 4638 // 4639 // API parameter values that are decorated as "sensitive" in the API will not 4640 // be included in the string output. The member name will be present, but the 4641 // value will be replaced with "sensitive". 4642 func (s InvalidNextTokenException) GoString() string { 4643 return s.String() 4644 } 4645 4646 func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { 4647 return &InvalidNextTokenException{ 4648 RespMetadata: v, 4649 } 4650 } 4651 4652 // Code returns the exception type name. 4653 func (s *InvalidNextTokenException) Code() string { 4654 return "InvalidNextTokenException" 4655 } 4656 4657 // Message returns the exception's message. 4658 func (s *InvalidNextTokenException) Message() string { 4659 if s.Message_ != nil { 4660 return *s.Message_ 4661 } 4662 return "" 4663 } 4664 4665 // OrigErr always returns nil, satisfies awserr.Error interface. 4666 func (s *InvalidNextTokenException) OrigErr() error { 4667 return nil 4668 } 4669 4670 func (s *InvalidNextTokenException) Error() string { 4671 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4672 } 4673 4674 // Status code returns the HTTP status code for the request's response error. 4675 func (s *InvalidNextTokenException) StatusCode() int { 4676 return s.RespMetadata.StatusCode 4677 } 4678 4679 // RequestID returns the service's response RequestID for request. 4680 func (s *InvalidNextTokenException) RequestID() string { 4681 return s.RespMetadata.RequestID 4682 } 4683 4684 // You provided an invalid value for a parameter. 4685 type InvalidParameterException struct { 4686 _ struct{} `type:"structure"` 4687 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4688 4689 Message_ *string `locationName:"Message" type:"string"` 4690 } 4691 4692 // String returns the string representation. 4693 // 4694 // API parameter values that are decorated as "sensitive" in the API will not 4695 // be included in the string output. The member name will be present, but the 4696 // value will be replaced with "sensitive". 4697 func (s InvalidParameterException) String() string { 4698 return awsutil.Prettify(s) 4699 } 4700 4701 // GoString returns the string representation. 4702 // 4703 // API parameter values that are decorated as "sensitive" in the API will not 4704 // be included in the string output. The member name will be present, but the 4705 // value will be replaced with "sensitive". 4706 func (s InvalidParameterException) GoString() string { 4707 return s.String() 4708 } 4709 4710 func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { 4711 return &InvalidParameterException{ 4712 RespMetadata: v, 4713 } 4714 } 4715 4716 // Code returns the exception type name. 4717 func (s *InvalidParameterException) Code() string { 4718 return "InvalidParameterException" 4719 } 4720 4721 // Message returns the exception's message. 4722 func (s *InvalidParameterException) Message() string { 4723 if s.Message_ != nil { 4724 return *s.Message_ 4725 } 4726 return "" 4727 } 4728 4729 // OrigErr always returns nil, satisfies awserr.Error interface. 4730 func (s *InvalidParameterException) OrigErr() error { 4731 return nil 4732 } 4733 4734 func (s *InvalidParameterException) Error() string { 4735 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4736 } 4737 4738 // Status code returns the HTTP status code for the request's response error. 4739 func (s *InvalidParameterException) StatusCode() int { 4740 return s.RespMetadata.StatusCode 4741 } 4742 4743 // RequestID returns the service's response RequestID for request. 4744 func (s *InvalidParameterException) RequestID() string { 4745 return s.RespMetadata.RequestID 4746 } 4747 4748 // You provided a parameter value that is not valid for the current state of 4749 // the resource. 4750 // 4751 // Possible causes: 4752 // 4753 // * You tried to perform the operation on a secret that's currently marked 4754 // deleted. 4755 // 4756 // * You tried to enable rotation on a secret that doesn't already have a 4757 // Lambda function ARN configured and you didn't include such an ARN as a 4758 // parameter in this call. 4759 type InvalidRequestException struct { 4760 _ struct{} `type:"structure"` 4761 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4762 4763 Message_ *string `locationName:"Message" type:"string"` 4764 } 4765 4766 // String returns the string representation. 4767 // 4768 // API parameter values that are decorated as "sensitive" in the API will not 4769 // be included in the string output. The member name will be present, but the 4770 // value will be replaced with "sensitive". 4771 func (s InvalidRequestException) String() string { 4772 return awsutil.Prettify(s) 4773 } 4774 4775 // GoString returns the string representation. 4776 // 4777 // API parameter values that are decorated as "sensitive" in the API will not 4778 // be included in the string output. The member name will be present, but the 4779 // value will be replaced with "sensitive". 4780 func (s InvalidRequestException) GoString() string { 4781 return s.String() 4782 } 4783 4784 func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { 4785 return &InvalidRequestException{ 4786 RespMetadata: v, 4787 } 4788 } 4789 4790 // Code returns the exception type name. 4791 func (s *InvalidRequestException) Code() string { 4792 return "InvalidRequestException" 4793 } 4794 4795 // Message returns the exception's message. 4796 func (s *InvalidRequestException) Message() string { 4797 if s.Message_ != nil { 4798 return *s.Message_ 4799 } 4800 return "" 4801 } 4802 4803 // OrigErr always returns nil, satisfies awserr.Error interface. 4804 func (s *InvalidRequestException) OrigErr() error { 4805 return nil 4806 } 4807 4808 func (s *InvalidRequestException) Error() string { 4809 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4810 } 4811 4812 // Status code returns the HTTP status code for the request's response error. 4813 func (s *InvalidRequestException) StatusCode() int { 4814 return s.RespMetadata.StatusCode 4815 } 4816 4817 // RequestID returns the service's response RequestID for request. 4818 func (s *InvalidRequestException) RequestID() string { 4819 return s.RespMetadata.RequestID 4820 } 4821 4822 // The request failed because it would exceed one of the Secrets Manager internal 4823 // limits. 4824 type LimitExceededException struct { 4825 _ struct{} `type:"structure"` 4826 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4827 4828 Message_ *string `locationName:"Message" type:"string"` 4829 } 4830 4831 // String returns the string representation. 4832 // 4833 // API parameter values that are decorated as "sensitive" in the API will not 4834 // be included in the string output. The member name will be present, but the 4835 // value will be replaced with "sensitive". 4836 func (s LimitExceededException) String() string { 4837 return awsutil.Prettify(s) 4838 } 4839 4840 // GoString returns the string representation. 4841 // 4842 // API parameter values that are decorated as "sensitive" in the API will not 4843 // be included in the string output. The member name will be present, but the 4844 // value will be replaced with "sensitive". 4845 func (s LimitExceededException) GoString() string { 4846 return s.String() 4847 } 4848 4849 func newErrorLimitExceededException(v protocol.ResponseMetadata) error { 4850 return &LimitExceededException{ 4851 RespMetadata: v, 4852 } 4853 } 4854 4855 // Code returns the exception type name. 4856 func (s *LimitExceededException) Code() string { 4857 return "LimitExceededException" 4858 } 4859 4860 // Message returns the exception's message. 4861 func (s *LimitExceededException) Message() string { 4862 if s.Message_ != nil { 4863 return *s.Message_ 4864 } 4865 return "" 4866 } 4867 4868 // OrigErr always returns nil, satisfies awserr.Error interface. 4869 func (s *LimitExceededException) OrigErr() error { 4870 return nil 4871 } 4872 4873 func (s *LimitExceededException) Error() string { 4874 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4875 } 4876 4877 // Status code returns the HTTP status code for the request's response error. 4878 func (s *LimitExceededException) StatusCode() int { 4879 return s.RespMetadata.StatusCode 4880 } 4881 4882 // RequestID returns the service's response RequestID for request. 4883 func (s *LimitExceededException) RequestID() string { 4884 return s.RespMetadata.RequestID 4885 } 4886 4887 type ListSecretVersionIdsInput struct { 4888 _ struct{} `type:"structure"` 4889 4890 // (Optional) Specifies that you want the results to include versions that do 4891 // not have any staging labels attached to them. Such versions are considered 4892 // deprecated and are subject to deletion by Secrets Manager as needed. 4893 IncludeDeprecated *bool `type:"boolean"` 4894 4895 // (Optional) Limits the number of results you want to include in the response. 4896 // If you don't include this parameter, it defaults to a value that's specific 4897 // to the operation. If additional items exist beyond the maximum you specify, 4898 // the NextToken response element is present and has a value (isn't null). Include 4899 // that value as the NextToken request parameter in the next call to the operation 4900 // to get the next part of the results. Note that Secrets Manager might return 4901 // fewer results than the maximum even when there are more results available. 4902 // You should check NextToken after every operation to ensure that you receive 4903 // all of the results. 4904 MaxResults *int64 `min:"1" type:"integer"` 4905 4906 // (Optional) Use this parameter in a request if you receive a NextToken response 4907 // in a previous request indicating there's more output available. In a subsequent 4908 // call, set it to the value of the previous call NextToken response to indicate 4909 // where the output should continue from. 4910 NextToken *string `min:"1" type:"string"` 4911 4912 // The identifier for the secret containing the versions you want to list. You 4913 // can specify either the Amazon Resource Name (ARN) or the friendly name of 4914 // the secret. 4915 // 4916 // For an ARN, we recommend that you specify a complete ARN rather than a partial 4917 // ARN. 4918 // 4919 // SecretId is a required field 4920 SecretId *string `min:"1" type:"string" required:"true"` 4921 } 4922 4923 // String returns the string representation. 4924 // 4925 // API parameter values that are decorated as "sensitive" in the API will not 4926 // be included in the string output. The member name will be present, but the 4927 // value will be replaced with "sensitive". 4928 func (s ListSecretVersionIdsInput) String() string { 4929 return awsutil.Prettify(s) 4930 } 4931 4932 // GoString returns the string representation. 4933 // 4934 // API parameter values that are decorated as "sensitive" in the API will not 4935 // be included in the string output. The member name will be present, but the 4936 // value will be replaced with "sensitive". 4937 func (s ListSecretVersionIdsInput) GoString() string { 4938 return s.String() 4939 } 4940 4941 // Validate inspects the fields of the type to determine if they are valid. 4942 func (s *ListSecretVersionIdsInput) Validate() error { 4943 invalidParams := request.ErrInvalidParams{Context: "ListSecretVersionIdsInput"} 4944 if s.MaxResults != nil && *s.MaxResults < 1 { 4945 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4946 } 4947 if s.NextToken != nil && len(*s.NextToken) < 1 { 4948 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 4949 } 4950 if s.SecretId == nil { 4951 invalidParams.Add(request.NewErrParamRequired("SecretId")) 4952 } 4953 if s.SecretId != nil && len(*s.SecretId) < 1 { 4954 invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) 4955 } 4956 4957 if invalidParams.Len() > 0 { 4958 return invalidParams 4959 } 4960 return nil 4961 } 4962 4963 // SetIncludeDeprecated sets the IncludeDeprecated field's value. 4964 func (s *ListSecretVersionIdsInput) SetIncludeDeprecated(v bool) *ListSecretVersionIdsInput { 4965 s.IncludeDeprecated = &v 4966 return s 4967 } 4968 4969 // SetMaxResults sets the MaxResults field's value. 4970 func (s *ListSecretVersionIdsInput) SetMaxResults(v int64) *ListSecretVersionIdsInput { 4971 s.MaxResults = &v 4972 return s 4973 } 4974 4975 // SetNextToken sets the NextToken field's value. 4976 func (s *ListSecretVersionIdsInput) SetNextToken(v string) *ListSecretVersionIdsInput { 4977 s.NextToken = &v 4978 return s 4979 } 4980 4981 // SetSecretId sets the SecretId field's value. 4982 func (s *ListSecretVersionIdsInput) SetSecretId(v string) *ListSecretVersionIdsInput { 4983 s.SecretId = &v 4984 return s 4985 } 4986 4987 type ListSecretVersionIdsOutput struct { 4988 _ struct{} `type:"structure"` 4989 4990 // The Amazon Resource Name (ARN) for the secret. 4991 // 4992 // Secrets Manager automatically adds several random characters to the name 4993 // at the end of the ARN when you initially create a secret. This affects only 4994 // the ARN and not the actual friendly name. This ensures that if you create 4995 // a new secret with the same name as an old secret that you previously deleted, 4996 // then users with access to the old secret don't automatically get access to 4997 // the new secret because the ARNs are different. 4998 ARN *string `min:"20" type:"string"` 4999 5000 // The friendly name of the secret. 5001 Name *string `min:"1" type:"string"` 5002 5003 // If present in the response, this value indicates that there's more output 5004 // available than included in the current response. This can occur even when 5005 // the response includes no values at all, such as when you ask for a filtered 5006 // view of a very long list. Use this value in the NextToken request parameter 5007 // in a subsequent call to the operation to continue processing and get the 5008 // next part of the output. You should repeat this until the NextToken response 5009 // element comes back empty (as null). 5010 NextToken *string `min:"1" type:"string"` 5011 5012 // The list of the currently available versions of the specified secret. 5013 Versions []*SecretVersionsListEntry `type:"list"` 5014 } 5015 5016 // String returns the string representation. 5017 // 5018 // API parameter values that are decorated as "sensitive" in the API will not 5019 // be included in the string output. The member name will be present, but the 5020 // value will be replaced with "sensitive". 5021 func (s ListSecretVersionIdsOutput) String() string { 5022 return awsutil.Prettify(s) 5023 } 5024 5025 // GoString returns the string representation. 5026 // 5027 // API parameter values that are decorated as "sensitive" in the API will not 5028 // be included in the string output. The member name will be present, but the 5029 // value will be replaced with "sensitive". 5030 func (s ListSecretVersionIdsOutput) GoString() string { 5031 return s.String() 5032 } 5033 5034 // SetARN sets the ARN field's value. 5035 func (s *ListSecretVersionIdsOutput) SetARN(v string) *ListSecretVersionIdsOutput { 5036 s.ARN = &v 5037 return s 5038 } 5039 5040 // SetName sets the Name field's value. 5041 func (s *ListSecretVersionIdsOutput) SetName(v string) *ListSecretVersionIdsOutput { 5042 s.Name = &v 5043 return s 5044 } 5045 5046 // SetNextToken sets the NextToken field's value. 5047 func (s *ListSecretVersionIdsOutput) SetNextToken(v string) *ListSecretVersionIdsOutput { 5048 s.NextToken = &v 5049 return s 5050 } 5051 5052 // SetVersions sets the Versions field's value. 5053 func (s *ListSecretVersionIdsOutput) SetVersions(v []*SecretVersionsListEntry) *ListSecretVersionIdsOutput { 5054 s.Versions = v 5055 return s 5056 } 5057 5058 type ListSecretsInput struct { 5059 _ struct{} `type:"structure"` 5060 5061 // Lists the secret request filters. 5062 Filters []*Filter `type:"list"` 5063 5064 // (Optional) Limits the number of results you want to include in the response. 5065 // If you don't include this parameter, it defaults to a value that's specific 5066 // to the operation. If additional items exist beyond the maximum you specify, 5067 // the NextToken response element is present and has a value (isn't null). Include 5068 // that value as the NextToken request parameter in the next call to the operation 5069 // to get the next part of the results. Note that Secrets Manager might return 5070 // fewer results than the maximum even when there are more results available. 5071 // You should check NextToken after every operation to ensure that you receive 5072 // all of the results. 5073 MaxResults *int64 `min:"1" type:"integer"` 5074 5075 // (Optional) Use this parameter in a request if you receive a NextToken response 5076 // in a previous request indicating there's more output available. In a subsequent 5077 // call, set it to the value of the previous call NextToken response to indicate 5078 // where the output should continue from. 5079 NextToken *string `min:"1" type:"string"` 5080 5081 // Lists secrets in the requested order. 5082 SortOrder *string `type:"string" enum:"SortOrderType"` 5083 } 5084 5085 // String returns the string representation. 5086 // 5087 // API parameter values that are decorated as "sensitive" in the API will not 5088 // be included in the string output. The member name will be present, but the 5089 // value will be replaced with "sensitive". 5090 func (s ListSecretsInput) String() string { 5091 return awsutil.Prettify(s) 5092 } 5093 5094 // GoString returns the string representation. 5095 // 5096 // API parameter values that are decorated as "sensitive" in the API will not 5097 // be included in the string output. The member name will be present, but the 5098 // value will be replaced with "sensitive". 5099 func (s ListSecretsInput) GoString() string { 5100 return s.String() 5101 } 5102 5103 // Validate inspects the fields of the type to determine if they are valid. 5104 func (s *ListSecretsInput) Validate() error { 5105 invalidParams := request.ErrInvalidParams{Context: "ListSecretsInput"} 5106 if s.MaxResults != nil && *s.MaxResults < 1 { 5107 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 5108 } 5109 if s.NextToken != nil && len(*s.NextToken) < 1 { 5110 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5111 } 5112 if s.Filters != nil { 5113 for i, v := range s.Filters { 5114 if v == nil { 5115 continue 5116 } 5117 if err := v.Validate(); err != nil { 5118 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) 5119 } 5120 } 5121 } 5122 5123 if invalidParams.Len() > 0 { 5124 return invalidParams 5125 } 5126 return nil 5127 } 5128 5129 // SetFilters sets the Filters field's value. 5130 func (s *ListSecretsInput) SetFilters(v []*Filter) *ListSecretsInput { 5131 s.Filters = v 5132 return s 5133 } 5134 5135 // SetMaxResults sets the MaxResults field's value. 5136 func (s *ListSecretsInput) SetMaxResults(v int64) *ListSecretsInput { 5137 s.MaxResults = &v 5138 return s 5139 } 5140 5141 // SetNextToken sets the NextToken field's value. 5142 func (s *ListSecretsInput) SetNextToken(v string) *ListSecretsInput { 5143 s.NextToken = &v 5144 return s 5145 } 5146 5147 // SetSortOrder sets the SortOrder field's value. 5148 func (s *ListSecretsInput) SetSortOrder(v string) *ListSecretsInput { 5149 s.SortOrder = &v 5150 return s 5151 } 5152 5153 type ListSecretsOutput struct { 5154 _ struct{} `type:"structure"` 5155 5156 // If present in the response, this value indicates that there's more output 5157 // available than included in the current response. This can occur even when 5158 // the response includes no values at all, such as when you ask for a filtered 5159 // view of a very long list. Use this value in the NextToken request parameter 5160 // in a subsequent call to the operation to continue processing and get the 5161 // next part of the output. You should repeat this until the NextToken response 5162 // element comes back empty (as null). 5163 NextToken *string `min:"1" type:"string"` 5164 5165 // A list of the secrets in the account. 5166 SecretList []*SecretListEntry `type:"list"` 5167 } 5168 5169 // String returns the string representation. 5170 // 5171 // API parameter values that are decorated as "sensitive" in the API will not 5172 // be included in the string output. The member name will be present, but the 5173 // value will be replaced with "sensitive". 5174 func (s ListSecretsOutput) String() string { 5175 return awsutil.Prettify(s) 5176 } 5177 5178 // GoString returns the string representation. 5179 // 5180 // API parameter values that are decorated as "sensitive" in the API will not 5181 // be included in the string output. The member name will be present, but the 5182 // value will be replaced with "sensitive". 5183 func (s ListSecretsOutput) GoString() string { 5184 return s.String() 5185 } 5186 5187 // SetNextToken sets the NextToken field's value. 5188 func (s *ListSecretsOutput) SetNextToken(v string) *ListSecretsOutput { 5189 s.NextToken = &v 5190 return s 5191 } 5192 5193 // SetSecretList sets the SecretList field's value. 5194 func (s *ListSecretsOutput) SetSecretList(v []*SecretListEntry) *ListSecretsOutput { 5195 s.SecretList = v 5196 return s 5197 } 5198 5199 // You provided a resource-based policy with syntax errors. 5200 type MalformedPolicyDocumentException struct { 5201 _ struct{} `type:"structure"` 5202 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 5203 5204 Message_ *string `locationName:"Message" type:"string"` 5205 } 5206 5207 // String returns the string representation. 5208 // 5209 // API parameter values that are decorated as "sensitive" in the API will not 5210 // be included in the string output. The member name will be present, but the 5211 // value will be replaced with "sensitive". 5212 func (s MalformedPolicyDocumentException) String() string { 5213 return awsutil.Prettify(s) 5214 } 5215 5216 // GoString returns the string representation. 5217 // 5218 // API parameter values that are decorated as "sensitive" in the API will not 5219 // be included in the string output. The member name will be present, but the 5220 // value will be replaced with "sensitive". 5221 func (s MalformedPolicyDocumentException) GoString() string { 5222 return s.String() 5223 } 5224 5225 func newErrorMalformedPolicyDocumentException(v protocol.ResponseMetadata) error { 5226 return &MalformedPolicyDocumentException{ 5227 RespMetadata: v, 5228 } 5229 } 5230 5231 // Code returns the exception type name. 5232 func (s *MalformedPolicyDocumentException) Code() string { 5233 return "MalformedPolicyDocumentException" 5234 } 5235 5236 // Message returns the exception's message. 5237 func (s *MalformedPolicyDocumentException) Message() string { 5238 if s.Message_ != nil { 5239 return *s.Message_ 5240 } 5241 return "" 5242 } 5243 5244 // OrigErr always returns nil, satisfies awserr.Error interface. 5245 func (s *MalformedPolicyDocumentException) OrigErr() error { 5246 return nil 5247 } 5248 5249 func (s *MalformedPolicyDocumentException) Error() string { 5250 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 5251 } 5252 5253 // Status code returns the HTTP status code for the request's response error. 5254 func (s *MalformedPolicyDocumentException) StatusCode() int { 5255 return s.RespMetadata.StatusCode 5256 } 5257 5258 // RequestID returns the service's response RequestID for request. 5259 func (s *MalformedPolicyDocumentException) RequestID() string { 5260 return s.RespMetadata.RequestID 5261 } 5262 5263 // The request failed because you did not complete all the prerequisite steps. 5264 type PreconditionNotMetException struct { 5265 _ struct{} `type:"structure"` 5266 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 5267 5268 Message_ *string `locationName:"Message" type:"string"` 5269 } 5270 5271 // String returns the string representation. 5272 // 5273 // API parameter values that are decorated as "sensitive" in the API will not 5274 // be included in the string output. The member name will be present, but the 5275 // value will be replaced with "sensitive". 5276 func (s PreconditionNotMetException) String() string { 5277 return awsutil.Prettify(s) 5278 } 5279 5280 // GoString returns the string representation. 5281 // 5282 // API parameter values that are decorated as "sensitive" in the API will not 5283 // be included in the string output. The member name will be present, but the 5284 // value will be replaced with "sensitive". 5285 func (s PreconditionNotMetException) GoString() string { 5286 return s.String() 5287 } 5288 5289 func newErrorPreconditionNotMetException(v protocol.ResponseMetadata) error { 5290 return &PreconditionNotMetException{ 5291 RespMetadata: v, 5292 } 5293 } 5294 5295 // Code returns the exception type name. 5296 func (s *PreconditionNotMetException) Code() string { 5297 return "PreconditionNotMetException" 5298 } 5299 5300 // Message returns the exception's message. 5301 func (s *PreconditionNotMetException) Message() string { 5302 if s.Message_ != nil { 5303 return *s.Message_ 5304 } 5305 return "" 5306 } 5307 5308 // OrigErr always returns nil, satisfies awserr.Error interface. 5309 func (s *PreconditionNotMetException) OrigErr() error { 5310 return nil 5311 } 5312 5313 func (s *PreconditionNotMetException) Error() string { 5314 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 5315 } 5316 5317 // Status code returns the HTTP status code for the request's response error. 5318 func (s *PreconditionNotMetException) StatusCode() int { 5319 return s.RespMetadata.StatusCode 5320 } 5321 5322 // RequestID returns the service's response RequestID for request. 5323 func (s *PreconditionNotMetException) RequestID() string { 5324 return s.RespMetadata.RequestID 5325 } 5326 5327 // The BlockPublicPolicy parameter is set to true and the resource policy did 5328 // not prevent broad access to the secret. 5329 type PublicPolicyException struct { 5330 _ struct{} `type:"structure"` 5331 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 5332 5333 Message_ *string `locationName:"Message" type:"string"` 5334 } 5335 5336 // String returns the string representation. 5337 // 5338 // API parameter values that are decorated as "sensitive" in the API will not 5339 // be included in the string output. The member name will be present, but the 5340 // value will be replaced with "sensitive". 5341 func (s PublicPolicyException) String() string { 5342 return awsutil.Prettify(s) 5343 } 5344 5345 // GoString returns the string representation. 5346 // 5347 // API parameter values that are decorated as "sensitive" in the API will not 5348 // be included in the string output. The member name will be present, but the 5349 // value will be replaced with "sensitive". 5350 func (s PublicPolicyException) GoString() string { 5351 return s.String() 5352 } 5353 5354 func newErrorPublicPolicyException(v protocol.ResponseMetadata) error { 5355 return &PublicPolicyException{ 5356 RespMetadata: v, 5357 } 5358 } 5359 5360 // Code returns the exception type name. 5361 func (s *PublicPolicyException) Code() string { 5362 return "PublicPolicyException" 5363 } 5364 5365 // Message returns the exception's message. 5366 func (s *PublicPolicyException) Message() string { 5367 if s.Message_ != nil { 5368 return *s.Message_ 5369 } 5370 return "" 5371 } 5372 5373 // OrigErr always returns nil, satisfies awserr.Error interface. 5374 func (s *PublicPolicyException) OrigErr() error { 5375 return nil 5376 } 5377 5378 func (s *PublicPolicyException) Error() string { 5379 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 5380 } 5381 5382 // Status code returns the HTTP status code for the request's response error. 5383 func (s *PublicPolicyException) StatusCode() int { 5384 return s.RespMetadata.StatusCode 5385 } 5386 5387 // RequestID returns the service's response RequestID for request. 5388 func (s *PublicPolicyException) RequestID() string { 5389 return s.RespMetadata.RequestID 5390 } 5391 5392 type PutResourcePolicyInput struct { 5393 _ struct{} `type:"structure"` 5394 5395 // (Optional) If you set the parameter, BlockPublicPolicy to true, then you 5396 // block resource-based policies that allow broad access to the secret. 5397 BlockPublicPolicy *bool `type:"boolean"` 5398 5399 // A JSON-formatted string constructed according to the grammar and syntax for 5400 // an Amazon Web Services resource-based policy. The policy in the string identifies 5401 // who can access or manage this secret and its versions. For information on 5402 // how to format a JSON parameter for the various command line tool environments, 5403 // see Using JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) 5404 // in the CLI User Guide. 5405 // 5406 // ResourcePolicy is a required field 5407 ResourcePolicy *string `min:"1" type:"string" required:"true"` 5408 5409 // Specifies the secret that you want to attach the resource-based policy. You 5410 // can specify either the ARN or the friendly name of the secret. 5411 // 5412 // For an ARN, we recommend that you specify a complete ARN rather than a partial 5413 // ARN. 5414 // 5415 // SecretId is a required field 5416 SecretId *string `min:"1" type:"string" required:"true"` 5417 } 5418 5419 // String returns the string representation. 5420 // 5421 // API parameter values that are decorated as "sensitive" in the API will not 5422 // be included in the string output. The member name will be present, but the 5423 // value will be replaced with "sensitive". 5424 func (s PutResourcePolicyInput) String() string { 5425 return awsutil.Prettify(s) 5426 } 5427 5428 // GoString returns the string representation. 5429 // 5430 // API parameter values that are decorated as "sensitive" in the API will not 5431 // be included in the string output. The member name will be present, but the 5432 // value will be replaced with "sensitive". 5433 func (s PutResourcePolicyInput) GoString() string { 5434 return s.String() 5435 } 5436 5437 // Validate inspects the fields of the type to determine if they are valid. 5438 func (s *PutResourcePolicyInput) Validate() error { 5439 invalidParams := request.ErrInvalidParams{Context: "PutResourcePolicyInput"} 5440 if s.ResourcePolicy == nil { 5441 invalidParams.Add(request.NewErrParamRequired("ResourcePolicy")) 5442 } 5443 if s.ResourcePolicy != nil && len(*s.ResourcePolicy) < 1 { 5444 invalidParams.Add(request.NewErrParamMinLen("ResourcePolicy", 1)) 5445 } 5446 if s.SecretId == nil { 5447 invalidParams.Add(request.NewErrParamRequired("SecretId")) 5448 } 5449 if s.SecretId != nil && len(*s.SecretId) < 1 { 5450 invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) 5451 } 5452 5453 if invalidParams.Len() > 0 { 5454 return invalidParams 5455 } 5456 return nil 5457 } 5458 5459 // SetBlockPublicPolicy sets the BlockPublicPolicy field's value. 5460 func (s *PutResourcePolicyInput) SetBlockPublicPolicy(v bool) *PutResourcePolicyInput { 5461 s.BlockPublicPolicy = &v 5462 return s 5463 } 5464 5465 // SetResourcePolicy sets the ResourcePolicy field's value. 5466 func (s *PutResourcePolicyInput) SetResourcePolicy(v string) *PutResourcePolicyInput { 5467 s.ResourcePolicy = &v 5468 return s 5469 } 5470 5471 // SetSecretId sets the SecretId field's value. 5472 func (s *PutResourcePolicyInput) SetSecretId(v string) *PutResourcePolicyInput { 5473 s.SecretId = &v 5474 return s 5475 } 5476 5477 type PutResourcePolicyOutput struct { 5478 _ struct{} `type:"structure"` 5479 5480 // The ARN of the secret retrieved by the resource-based policy. 5481 ARN *string `min:"20" type:"string"` 5482 5483 // The friendly name of the secret retrieved by the resource-based policy. 5484 Name *string `min:"1" type:"string"` 5485 } 5486 5487 // String returns the string representation. 5488 // 5489 // API parameter values that are decorated as "sensitive" in the API will not 5490 // be included in the string output. The member name will be present, but the 5491 // value will be replaced with "sensitive". 5492 func (s PutResourcePolicyOutput) String() string { 5493 return awsutil.Prettify(s) 5494 } 5495 5496 // GoString returns the string representation. 5497 // 5498 // API parameter values that are decorated as "sensitive" in the API will not 5499 // be included in the string output. The member name will be present, but the 5500 // value will be replaced with "sensitive". 5501 func (s PutResourcePolicyOutput) GoString() string { 5502 return s.String() 5503 } 5504 5505 // SetARN sets the ARN field's value. 5506 func (s *PutResourcePolicyOutput) SetARN(v string) *PutResourcePolicyOutput { 5507 s.ARN = &v 5508 return s 5509 } 5510 5511 // SetName sets the Name field's value. 5512 func (s *PutResourcePolicyOutput) SetName(v string) *PutResourcePolicyOutput { 5513 s.Name = &v 5514 return s 5515 } 5516 5517 type PutSecretValueInput struct { 5518 _ struct{} `type:"structure"` 5519 5520 // (Optional) Specifies a unique identifier for the new version of the secret. 5521 // 5522 // If you use the Amazon Web Services CLI or one of the Amazon Web Services 5523 // SDK to call this operation, then you can leave this parameter empty. The 5524 // CLI or SDK generates a random UUID for you and includes that in the request. 5525 // If you don't use the SDK and instead generate a raw HTTP request to the Secrets 5526 // Manager service endpoint, then you must generate a ClientRequestToken yourself 5527 // for new versions and include that value in the request. 5528 // 5529 // This value helps ensure idempotency. Secrets Manager uses this value to prevent 5530 // the accidental creation of duplicate versions if there are failures and retries 5531 // during the Lambda rotation function's processing. We recommend that you generate 5532 // a UUID-type (https://wikipedia.org/wiki/Universally_unique_identifier) value 5533 // to ensure uniqueness within the specified secret. 5534 // 5535 // * If the ClientRequestToken value isn't already associated with a version 5536 // of the secret then a new version of the secret is created. 5537 // 5538 // * If a version with this value already exists and that version's SecretString 5539 // or SecretBinary values are the same as those in the request then the request 5540 // is ignored (the operation is idempotent). 5541 // 5542 // * If a version with this value already exists and the version of the SecretString 5543 // and SecretBinary values are different from those in the request then the 5544 // request fails because you cannot modify an existing secret version. You 5545 // can only create new versions to store new secret values. 5546 // 5547 // This value becomes the VersionId of the new version. 5548 ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` 5549 5550 // (Optional) Specifies binary data that you want to encrypt and store in the 5551 // new version of the secret. To use this parameter in the command-line tools, 5552 // we recommend that you store your binary data in a file and then use the appropriate 5553 // technique for your tool to pass the contents of the file as a parameter. 5554 // Either SecretBinary or SecretString must have a value, but not both. They 5555 // cannot both be empty. 5556 // 5557 // This parameter is not accessible if the secret using the Secrets Manager 5558 // console. 5559 // 5560 // SecretBinary is a sensitive parameter and its value will be 5561 // replaced with "sensitive" in string returned by PutSecretValueInput's 5562 // String and GoString methods. 5563 // 5564 // SecretBinary is automatically base64 encoded/decoded by the SDK. 5565 SecretBinary []byte `type:"blob" sensitive:"true"` 5566 5567 // Specifies the secret to which you want to add a new version. You can specify 5568 // either the Amazon Resource Name (ARN) or the friendly name of the secret. 5569 // The secret must already exist. 5570 // 5571 // For an ARN, we recommend that you specify a complete ARN rather than a partial 5572 // ARN. 5573 // 5574 // SecretId is a required field 5575 SecretId *string `min:"1" type:"string" required:"true"` 5576 5577 // (Optional) Specifies text data that you want to encrypt and store in this 5578 // new version of the secret. Either SecretString or SecretBinary must have 5579 // a value, but not both. They cannot both be empty. 5580 // 5581 // If you create this secret by using the Secrets Manager console then Secrets 5582 // Manager puts the protected secret text in only the SecretString parameter. 5583 // The Secrets Manager console stores the information as a JSON structure of 5584 // key/value pairs that the default Lambda rotation function knows how to parse. 5585 // 5586 // For storing multiple values, we recommend that you use a JSON text string 5587 // argument and specify key/value pairs. For more information, see Specifying 5588 // parameter values for the Amazon Web Services CLI (https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html) 5589 // in the Amazon Web Services CLI User Guide. 5590 // 5591 // SecretString is a sensitive parameter and its value will be 5592 // replaced with "sensitive" in string returned by PutSecretValueInput's 5593 // String and GoString methods. 5594 SecretString *string `type:"string" sensitive:"true"` 5595 5596 // (Optional) Specifies a list of staging labels that are attached to this version 5597 // of the secret. These staging labels are used to track the versions through 5598 // the rotation process by the Lambda rotation function. 5599 // 5600 // A staging label must be unique to a single version of the secret. If you 5601 // specify a staging label that's already associated with a different version 5602 // of the same secret then that staging label is automatically removed from 5603 // the other version and attached to this version. 5604 // 5605 // If you do not specify a value for VersionStages then Secrets Manager automatically 5606 // moves the staging label AWSCURRENT to this new version. 5607 VersionStages []*string `min:"1" type:"list"` 5608 } 5609 5610 // String returns the string representation. 5611 // 5612 // API parameter values that are decorated as "sensitive" in the API will not 5613 // be included in the string output. The member name will be present, but the 5614 // value will be replaced with "sensitive". 5615 func (s PutSecretValueInput) String() string { 5616 return awsutil.Prettify(s) 5617 } 5618 5619 // GoString returns the string representation. 5620 // 5621 // API parameter values that are decorated as "sensitive" in the API will not 5622 // be included in the string output. The member name will be present, but the 5623 // value will be replaced with "sensitive". 5624 func (s PutSecretValueInput) GoString() string { 5625 return s.String() 5626 } 5627 5628 // Validate inspects the fields of the type to determine if they are valid. 5629 func (s *PutSecretValueInput) Validate() error { 5630 invalidParams := request.ErrInvalidParams{Context: "PutSecretValueInput"} 5631 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { 5632 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) 5633 } 5634 if s.SecretId == nil { 5635 invalidParams.Add(request.NewErrParamRequired("SecretId")) 5636 } 5637 if s.SecretId != nil && len(*s.SecretId) < 1 { 5638 invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) 5639 } 5640 if s.VersionStages != nil && len(s.VersionStages) < 1 { 5641 invalidParams.Add(request.NewErrParamMinLen("VersionStages", 1)) 5642 } 5643 5644 if invalidParams.Len() > 0 { 5645 return invalidParams 5646 } 5647 return nil 5648 } 5649 5650 // SetClientRequestToken sets the ClientRequestToken field's value. 5651 func (s *PutSecretValueInput) SetClientRequestToken(v string) *PutSecretValueInput { 5652 s.ClientRequestToken = &v 5653 return s 5654 } 5655 5656 // SetSecretBinary sets the SecretBinary field's value. 5657 func (s *PutSecretValueInput) SetSecretBinary(v []byte) *PutSecretValueInput { 5658 s.SecretBinary = v 5659 return s 5660 } 5661 5662 // SetSecretId sets the SecretId field's value. 5663 func (s *PutSecretValueInput) SetSecretId(v string) *PutSecretValueInput { 5664 s.SecretId = &v 5665 return s 5666 } 5667 5668 // SetSecretString sets the SecretString field's value. 5669 func (s *PutSecretValueInput) SetSecretString(v string) *PutSecretValueInput { 5670 s.SecretString = &v 5671 return s 5672 } 5673 5674 // SetVersionStages sets the VersionStages field's value. 5675 func (s *PutSecretValueInput) SetVersionStages(v []*string) *PutSecretValueInput { 5676 s.VersionStages = v 5677 return s 5678 } 5679 5680 type PutSecretValueOutput struct { 5681 _ struct{} `type:"structure"` 5682 5683 // The Amazon Resource Name (ARN) for the secret for which you just created 5684 // a version. 5685 ARN *string `min:"20" type:"string"` 5686 5687 // The friendly name of the secret for which you just created or updated a version. 5688 Name *string `min:"1" type:"string"` 5689 5690 // The unique identifier of the version of the secret you just created or updated. 5691 VersionId *string `min:"32" type:"string"` 5692 5693 // The list of staging labels that are currently attached to this version of 5694 // the secret. Staging labels are used to track a version as it progresses through 5695 // the secret rotation process. 5696 VersionStages []*string `min:"1" type:"list"` 5697 } 5698 5699 // String returns the string representation. 5700 // 5701 // API parameter values that are decorated as "sensitive" in the API will not 5702 // be included in the string output. The member name will be present, but the 5703 // value will be replaced with "sensitive". 5704 func (s PutSecretValueOutput) String() string { 5705 return awsutil.Prettify(s) 5706 } 5707 5708 // GoString returns the string representation. 5709 // 5710 // API parameter values that are decorated as "sensitive" in the API will not 5711 // be included in the string output. The member name will be present, but the 5712 // value will be replaced with "sensitive". 5713 func (s PutSecretValueOutput) GoString() string { 5714 return s.String() 5715 } 5716 5717 // SetARN sets the ARN field's value. 5718 func (s *PutSecretValueOutput) SetARN(v string) *PutSecretValueOutput { 5719 s.ARN = &v 5720 return s 5721 } 5722 5723 // SetName sets the Name field's value. 5724 func (s *PutSecretValueOutput) SetName(v string) *PutSecretValueOutput { 5725 s.Name = &v 5726 return s 5727 } 5728 5729 // SetVersionId sets the VersionId field's value. 5730 func (s *PutSecretValueOutput) SetVersionId(v string) *PutSecretValueOutput { 5731 s.VersionId = &v 5732 return s 5733 } 5734 5735 // SetVersionStages sets the VersionStages field's value. 5736 func (s *PutSecretValueOutput) SetVersionStages(v []*string) *PutSecretValueOutput { 5737 s.VersionStages = v 5738 return s 5739 } 5740 5741 type RemoveRegionsFromReplicationInput struct { 5742 _ struct{} `type:"structure"` 5743 5744 // Remove replication from specific Regions. 5745 // 5746 // RemoveReplicaRegions is a required field 5747 RemoveReplicaRegions []*string `min:"1" type:"list" required:"true"` 5748 5749 // Remove a secret by SecretId from replica Regions. 5750 // 5751 // SecretId is a required field 5752 SecretId *string `min:"1" type:"string" required:"true"` 5753 } 5754 5755 // String returns the string representation. 5756 // 5757 // API parameter values that are decorated as "sensitive" in the API will not 5758 // be included in the string output. The member name will be present, but the 5759 // value will be replaced with "sensitive". 5760 func (s RemoveRegionsFromReplicationInput) String() string { 5761 return awsutil.Prettify(s) 5762 } 5763 5764 // GoString returns the string representation. 5765 // 5766 // API parameter values that are decorated as "sensitive" in the API will not 5767 // be included in the string output. The member name will be present, but the 5768 // value will be replaced with "sensitive". 5769 func (s RemoveRegionsFromReplicationInput) GoString() string { 5770 return s.String() 5771 } 5772 5773 // Validate inspects the fields of the type to determine if they are valid. 5774 func (s *RemoveRegionsFromReplicationInput) Validate() error { 5775 invalidParams := request.ErrInvalidParams{Context: "RemoveRegionsFromReplicationInput"} 5776 if s.RemoveReplicaRegions == nil { 5777 invalidParams.Add(request.NewErrParamRequired("RemoveReplicaRegions")) 5778 } 5779 if s.RemoveReplicaRegions != nil && len(s.RemoveReplicaRegions) < 1 { 5780 invalidParams.Add(request.NewErrParamMinLen("RemoveReplicaRegions", 1)) 5781 } 5782 if s.SecretId == nil { 5783 invalidParams.Add(request.NewErrParamRequired("SecretId")) 5784 } 5785 if s.SecretId != nil && len(*s.SecretId) < 1 { 5786 invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) 5787 } 5788 5789 if invalidParams.Len() > 0 { 5790 return invalidParams 5791 } 5792 return nil 5793 } 5794 5795 // SetRemoveReplicaRegions sets the RemoveReplicaRegions field's value. 5796 func (s *RemoveRegionsFromReplicationInput) SetRemoveReplicaRegions(v []*string) *RemoveRegionsFromReplicationInput { 5797 s.RemoveReplicaRegions = v 5798 return s 5799 } 5800 5801 // SetSecretId sets the SecretId field's value. 5802 func (s *RemoveRegionsFromReplicationInput) SetSecretId(v string) *RemoveRegionsFromReplicationInput { 5803 s.SecretId = &v 5804 return s 5805 } 5806 5807 type RemoveRegionsFromReplicationOutput struct { 5808 _ struct{} `type:"structure"` 5809 5810 // The secret ARN removed from replication regions. 5811 ARN *string `min:"20" type:"string"` 5812 5813 // Describes the remaining replication status after you remove regions from 5814 // the replication list. 5815 ReplicationStatus []*ReplicationStatusType `type:"list"` 5816 } 5817 5818 // String returns the string representation. 5819 // 5820 // API parameter values that are decorated as "sensitive" in the API will not 5821 // be included in the string output. The member name will be present, but the 5822 // value will be replaced with "sensitive". 5823 func (s RemoveRegionsFromReplicationOutput) String() string { 5824 return awsutil.Prettify(s) 5825 } 5826 5827 // GoString returns the string representation. 5828 // 5829 // API parameter values that are decorated as "sensitive" in the API will not 5830 // be included in the string output. The member name will be present, but the 5831 // value will be replaced with "sensitive". 5832 func (s RemoveRegionsFromReplicationOutput) GoString() string { 5833 return s.String() 5834 } 5835 5836 // SetARN sets the ARN field's value. 5837 func (s *RemoveRegionsFromReplicationOutput) SetARN(v string) *RemoveRegionsFromReplicationOutput { 5838 s.ARN = &v 5839 return s 5840 } 5841 5842 // SetReplicationStatus sets the ReplicationStatus field's value. 5843 func (s *RemoveRegionsFromReplicationOutput) SetReplicationStatus(v []*ReplicationStatusType) *RemoveRegionsFromReplicationOutput { 5844 s.ReplicationStatus = v 5845 return s 5846 } 5847 5848 // (Optional) Custom type consisting of a Region (required) and the KmsKeyId 5849 // which can be an ARN, Key ID, or Alias. 5850 type ReplicaRegionType struct { 5851 _ struct{} `type:"structure"` 5852 5853 // Can be an ARN, Key ID, or Alias. 5854 KmsKeyId *string `type:"string"` 5855 5856 // Describes a single instance of Region objects. 5857 Region *string `min:"1" type:"string"` 5858 } 5859 5860 // String returns the string representation. 5861 // 5862 // API parameter values that are decorated as "sensitive" in the API will not 5863 // be included in the string output. The member name will be present, but the 5864 // value will be replaced with "sensitive". 5865 func (s ReplicaRegionType) String() string { 5866 return awsutil.Prettify(s) 5867 } 5868 5869 // GoString returns the string representation. 5870 // 5871 // API parameter values that are decorated as "sensitive" in the API will not 5872 // be included in the string output. The member name will be present, but the 5873 // value will be replaced with "sensitive". 5874 func (s ReplicaRegionType) GoString() string { 5875 return s.String() 5876 } 5877 5878 // Validate inspects the fields of the type to determine if they are valid. 5879 func (s *ReplicaRegionType) Validate() error { 5880 invalidParams := request.ErrInvalidParams{Context: "ReplicaRegionType"} 5881 if s.Region != nil && len(*s.Region) < 1 { 5882 invalidParams.Add(request.NewErrParamMinLen("Region", 1)) 5883 } 5884 5885 if invalidParams.Len() > 0 { 5886 return invalidParams 5887 } 5888 return nil 5889 } 5890 5891 // SetKmsKeyId sets the KmsKeyId field's value. 5892 func (s *ReplicaRegionType) SetKmsKeyId(v string) *ReplicaRegionType { 5893 s.KmsKeyId = &v 5894 return s 5895 } 5896 5897 // SetRegion sets the Region field's value. 5898 func (s *ReplicaRegionType) SetRegion(v string) *ReplicaRegionType { 5899 s.Region = &v 5900 return s 5901 } 5902 5903 type ReplicateSecretToRegionsInput struct { 5904 _ struct{} `type:"structure"` 5905 5906 // Add Regions to replicate the secret. 5907 // 5908 // AddReplicaRegions is a required field 5909 AddReplicaRegions []*ReplicaRegionType `min:"1" type:"list" required:"true"` 5910 5911 // (Optional) If set, Secrets Manager replication overwrites a secret with the 5912 // same name in the destination region. 5913 ForceOverwriteReplicaSecret *bool `type:"boolean"` 5914 5915 // Use the Secret Id to replicate a secret to regions. 5916 // 5917 // SecretId is a required field 5918 SecretId *string `min:"1" type:"string" required:"true"` 5919 } 5920 5921 // String returns the string representation. 5922 // 5923 // API parameter values that are decorated as "sensitive" in the API will not 5924 // be included in the string output. The member name will be present, but the 5925 // value will be replaced with "sensitive". 5926 func (s ReplicateSecretToRegionsInput) String() string { 5927 return awsutil.Prettify(s) 5928 } 5929 5930 // GoString returns the string representation. 5931 // 5932 // API parameter values that are decorated as "sensitive" in the API will not 5933 // be included in the string output. The member name will be present, but the 5934 // value will be replaced with "sensitive". 5935 func (s ReplicateSecretToRegionsInput) GoString() string { 5936 return s.String() 5937 } 5938 5939 // Validate inspects the fields of the type to determine if they are valid. 5940 func (s *ReplicateSecretToRegionsInput) Validate() error { 5941 invalidParams := request.ErrInvalidParams{Context: "ReplicateSecretToRegionsInput"} 5942 if s.AddReplicaRegions == nil { 5943 invalidParams.Add(request.NewErrParamRequired("AddReplicaRegions")) 5944 } 5945 if s.AddReplicaRegions != nil && len(s.AddReplicaRegions) < 1 { 5946 invalidParams.Add(request.NewErrParamMinLen("AddReplicaRegions", 1)) 5947 } 5948 if s.SecretId == nil { 5949 invalidParams.Add(request.NewErrParamRequired("SecretId")) 5950 } 5951 if s.SecretId != nil && len(*s.SecretId) < 1 { 5952 invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) 5953 } 5954 if s.AddReplicaRegions != nil { 5955 for i, v := range s.AddReplicaRegions { 5956 if v == nil { 5957 continue 5958 } 5959 if err := v.Validate(); err != nil { 5960 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AddReplicaRegions", i), err.(request.ErrInvalidParams)) 5961 } 5962 } 5963 } 5964 5965 if invalidParams.Len() > 0 { 5966 return invalidParams 5967 } 5968 return nil 5969 } 5970 5971 // SetAddReplicaRegions sets the AddReplicaRegions field's value. 5972 func (s *ReplicateSecretToRegionsInput) SetAddReplicaRegions(v []*ReplicaRegionType) *ReplicateSecretToRegionsInput { 5973 s.AddReplicaRegions = v 5974 return s 5975 } 5976 5977 // SetForceOverwriteReplicaSecret sets the ForceOverwriteReplicaSecret field's value. 5978 func (s *ReplicateSecretToRegionsInput) SetForceOverwriteReplicaSecret(v bool) *ReplicateSecretToRegionsInput { 5979 s.ForceOverwriteReplicaSecret = &v 5980 return s 5981 } 5982 5983 // SetSecretId sets the SecretId field's value. 5984 func (s *ReplicateSecretToRegionsInput) SetSecretId(v string) *ReplicateSecretToRegionsInput { 5985 s.SecretId = &v 5986 return s 5987 } 5988 5989 type ReplicateSecretToRegionsOutput struct { 5990 _ struct{} `type:"structure"` 5991 5992 // Replicate a secret based on the ReplicaRegionType> consisting of a Region(required) 5993 // and a KMSKeyId (optional) which can be the ARN, KeyID, or Alias. 5994 ARN *string `min:"20" type:"string"` 5995 5996 // Describes the secret replication status as PENDING, SUCCESS or FAIL. 5997 ReplicationStatus []*ReplicationStatusType `type:"list"` 5998 } 5999 6000 // String returns the string representation. 6001 // 6002 // API parameter values that are decorated as "sensitive" in the API will not 6003 // be included in the string output. The member name will be present, but the 6004 // value will be replaced with "sensitive". 6005 func (s ReplicateSecretToRegionsOutput) String() string { 6006 return awsutil.Prettify(s) 6007 } 6008 6009 // GoString returns the string representation. 6010 // 6011 // API parameter values that are decorated as "sensitive" in the API will not 6012 // be included in the string output. The member name will be present, but the 6013 // value will be replaced with "sensitive". 6014 func (s ReplicateSecretToRegionsOutput) GoString() string { 6015 return s.String() 6016 } 6017 6018 // SetARN sets the ARN field's value. 6019 func (s *ReplicateSecretToRegionsOutput) SetARN(v string) *ReplicateSecretToRegionsOutput { 6020 s.ARN = &v 6021 return s 6022 } 6023 6024 // SetReplicationStatus sets the ReplicationStatus field's value. 6025 func (s *ReplicateSecretToRegionsOutput) SetReplicationStatus(v []*ReplicationStatusType) *ReplicateSecretToRegionsOutput { 6026 s.ReplicationStatus = v 6027 return s 6028 } 6029 6030 // A replication object consisting of a RegionReplicationStatus object and includes 6031 // a Region, KMSKeyId, status, and status message. 6032 type ReplicationStatusType struct { 6033 _ struct{} `type:"structure"` 6034 6035 // Can be an ARN, Key ID, or Alias. 6036 KmsKeyId *string `type:"string"` 6037 6038 // The date that you last accessed the secret in the Region. 6039 LastAccessedDate *time.Time `type:"timestamp"` 6040 6041 // The Region where replication occurs. 6042 Region *string `min:"1" type:"string"` 6043 6044 // The status can be InProgress, Failed, or InSync. 6045 Status *string `type:"string" enum:"StatusType"` 6046 6047 // Status message such as "Secret with this name already exists in this region". 6048 StatusMessage *string `min:"1" type:"string"` 6049 } 6050 6051 // String returns the string representation. 6052 // 6053 // API parameter values that are decorated as "sensitive" in the API will not 6054 // be included in the string output. The member name will be present, but the 6055 // value will be replaced with "sensitive". 6056 func (s ReplicationStatusType) String() string { 6057 return awsutil.Prettify(s) 6058 } 6059 6060 // GoString returns the string representation. 6061 // 6062 // API parameter values that are decorated as "sensitive" in the API will not 6063 // be included in the string output. The member name will be present, but the 6064 // value will be replaced with "sensitive". 6065 func (s ReplicationStatusType) GoString() string { 6066 return s.String() 6067 } 6068 6069 // SetKmsKeyId sets the KmsKeyId field's value. 6070 func (s *ReplicationStatusType) SetKmsKeyId(v string) *ReplicationStatusType { 6071 s.KmsKeyId = &v 6072 return s 6073 } 6074 6075 // SetLastAccessedDate sets the LastAccessedDate field's value. 6076 func (s *ReplicationStatusType) SetLastAccessedDate(v time.Time) *ReplicationStatusType { 6077 s.LastAccessedDate = &v 6078 return s 6079 } 6080 6081 // SetRegion sets the Region field's value. 6082 func (s *ReplicationStatusType) SetRegion(v string) *ReplicationStatusType { 6083 s.Region = &v 6084 return s 6085 } 6086 6087 // SetStatus sets the Status field's value. 6088 func (s *ReplicationStatusType) SetStatus(v string) *ReplicationStatusType { 6089 s.Status = &v 6090 return s 6091 } 6092 6093 // SetStatusMessage sets the StatusMessage field's value. 6094 func (s *ReplicationStatusType) SetStatusMessage(v string) *ReplicationStatusType { 6095 s.StatusMessage = &v 6096 return s 6097 } 6098 6099 // A resource with the ID you requested already exists. 6100 type ResourceExistsException struct { 6101 _ struct{} `type:"structure"` 6102 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 6103 6104 Message_ *string `locationName:"Message" type:"string"` 6105 } 6106 6107 // String returns the string representation. 6108 // 6109 // API parameter values that are decorated as "sensitive" in the API will not 6110 // be included in the string output. The member name will be present, but the 6111 // value will be replaced with "sensitive". 6112 func (s ResourceExistsException) String() string { 6113 return awsutil.Prettify(s) 6114 } 6115 6116 // GoString returns the string representation. 6117 // 6118 // API parameter values that are decorated as "sensitive" in the API will not 6119 // be included in the string output. The member name will be present, but the 6120 // value will be replaced with "sensitive". 6121 func (s ResourceExistsException) GoString() string { 6122 return s.String() 6123 } 6124 6125 func newErrorResourceExistsException(v protocol.ResponseMetadata) error { 6126 return &ResourceExistsException{ 6127 RespMetadata: v, 6128 } 6129 } 6130 6131 // Code returns the exception type name. 6132 func (s *ResourceExistsException) Code() string { 6133 return "ResourceExistsException" 6134 } 6135 6136 // Message returns the exception's message. 6137 func (s *ResourceExistsException) Message() string { 6138 if s.Message_ != nil { 6139 return *s.Message_ 6140 } 6141 return "" 6142 } 6143 6144 // OrigErr always returns nil, satisfies awserr.Error interface. 6145 func (s *ResourceExistsException) OrigErr() error { 6146 return nil 6147 } 6148 6149 func (s *ResourceExistsException) Error() string { 6150 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 6151 } 6152 6153 // Status code returns the HTTP status code for the request's response error. 6154 func (s *ResourceExistsException) StatusCode() int { 6155 return s.RespMetadata.StatusCode 6156 } 6157 6158 // RequestID returns the service's response RequestID for request. 6159 func (s *ResourceExistsException) RequestID() string { 6160 return s.RespMetadata.RequestID 6161 } 6162 6163 // We can't find the resource that you asked for. 6164 type ResourceNotFoundException struct { 6165 _ struct{} `type:"structure"` 6166 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 6167 6168 Message_ *string `locationName:"Message" type:"string"` 6169 } 6170 6171 // String returns the string representation. 6172 // 6173 // API parameter values that are decorated as "sensitive" in the API will not 6174 // be included in the string output. The member name will be present, but the 6175 // value will be replaced with "sensitive". 6176 func (s ResourceNotFoundException) String() string { 6177 return awsutil.Prettify(s) 6178 } 6179 6180 // GoString returns the string representation. 6181 // 6182 // API parameter values that are decorated as "sensitive" in the API will not 6183 // be included in the string output. The member name will be present, but the 6184 // value will be replaced with "sensitive". 6185 func (s ResourceNotFoundException) GoString() string { 6186 return s.String() 6187 } 6188 6189 func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 6190 return &ResourceNotFoundException{ 6191 RespMetadata: v, 6192 } 6193 } 6194 6195 // Code returns the exception type name. 6196 func (s *ResourceNotFoundException) Code() string { 6197 return "ResourceNotFoundException" 6198 } 6199 6200 // Message returns the exception's message. 6201 func (s *ResourceNotFoundException) Message() string { 6202 if s.Message_ != nil { 6203 return *s.Message_ 6204 } 6205 return "" 6206 } 6207 6208 // OrigErr always returns nil, satisfies awserr.Error interface. 6209 func (s *ResourceNotFoundException) OrigErr() error { 6210 return nil 6211 } 6212 6213 func (s *ResourceNotFoundException) Error() string { 6214 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 6215 } 6216 6217 // Status code returns the HTTP status code for the request's response error. 6218 func (s *ResourceNotFoundException) StatusCode() int { 6219 return s.RespMetadata.StatusCode 6220 } 6221 6222 // RequestID returns the service's response RequestID for request. 6223 func (s *ResourceNotFoundException) RequestID() string { 6224 return s.RespMetadata.RequestID 6225 } 6226 6227 type RestoreSecretInput struct { 6228 _ struct{} `type:"structure"` 6229 6230 // Specifies the secret that you want to restore from a previously scheduled 6231 // deletion. You can specify either the Amazon Resource Name (ARN) or the friendly 6232 // name of the secret. 6233 // 6234 // For an ARN, we recommend that you specify a complete ARN rather than a partial 6235 // ARN. 6236 // 6237 // SecretId is a required field 6238 SecretId *string `min:"1" type:"string" required:"true"` 6239 } 6240 6241 // String returns the string representation. 6242 // 6243 // API parameter values that are decorated as "sensitive" in the API will not 6244 // be included in the string output. The member name will be present, but the 6245 // value will be replaced with "sensitive". 6246 func (s RestoreSecretInput) String() string { 6247 return awsutil.Prettify(s) 6248 } 6249 6250 // GoString returns the string representation. 6251 // 6252 // API parameter values that are decorated as "sensitive" in the API will not 6253 // be included in the string output. The member name will be present, but the 6254 // value will be replaced with "sensitive". 6255 func (s RestoreSecretInput) GoString() string { 6256 return s.String() 6257 } 6258 6259 // Validate inspects the fields of the type to determine if they are valid. 6260 func (s *RestoreSecretInput) Validate() error { 6261 invalidParams := request.ErrInvalidParams{Context: "RestoreSecretInput"} 6262 if s.SecretId == nil { 6263 invalidParams.Add(request.NewErrParamRequired("SecretId")) 6264 } 6265 if s.SecretId != nil && len(*s.SecretId) < 1 { 6266 invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) 6267 } 6268 6269 if invalidParams.Len() > 0 { 6270 return invalidParams 6271 } 6272 return nil 6273 } 6274 6275 // SetSecretId sets the SecretId field's value. 6276 func (s *RestoreSecretInput) SetSecretId(v string) *RestoreSecretInput { 6277 s.SecretId = &v 6278 return s 6279 } 6280 6281 type RestoreSecretOutput struct { 6282 _ struct{} `type:"structure"` 6283 6284 // The ARN of the secret that was restored. 6285 ARN *string `min:"20" type:"string"` 6286 6287 // The friendly name of the secret that was restored. 6288 Name *string `min:"1" type:"string"` 6289 } 6290 6291 // String returns the string representation. 6292 // 6293 // API parameter values that are decorated as "sensitive" in the API will not 6294 // be included in the string output. The member name will be present, but the 6295 // value will be replaced with "sensitive". 6296 func (s RestoreSecretOutput) String() string { 6297 return awsutil.Prettify(s) 6298 } 6299 6300 // GoString returns the string representation. 6301 // 6302 // API parameter values that are decorated as "sensitive" in the API will not 6303 // be included in the string output. The member name will be present, but the 6304 // value will be replaced with "sensitive". 6305 func (s RestoreSecretOutput) GoString() string { 6306 return s.String() 6307 } 6308 6309 // SetARN sets the ARN field's value. 6310 func (s *RestoreSecretOutput) SetARN(v string) *RestoreSecretOutput { 6311 s.ARN = &v 6312 return s 6313 } 6314 6315 // SetName sets the Name field's value. 6316 func (s *RestoreSecretOutput) SetName(v string) *RestoreSecretOutput { 6317 s.Name = &v 6318 return s 6319 } 6320 6321 type RotateSecretInput struct { 6322 _ struct{} `type:"structure"` 6323 6324 // (Optional) Specifies a unique identifier for the new version of the secret 6325 // that helps ensure idempotency. 6326 // 6327 // If you use the Amazon Web Services CLI or one of the Amazon Web Services 6328 // SDK to call this operation, then you can leave this parameter empty. The 6329 // CLI or SDK generates a random UUID for you and includes that in the request 6330 // for this parameter. If you don't use the SDK and instead generate a raw HTTP 6331 // request to the Secrets Manager service endpoint, then you must generate a 6332 // ClientRequestToken yourself for new versions and include that value in the 6333 // request. 6334 // 6335 // You only need to specify your own value if you implement your own retry logic 6336 // and want to ensure that a given secret is not created twice. We recommend 6337 // that you generate a UUID-type (https://wikipedia.org/wiki/Universally_unique_identifier) 6338 // value to ensure uniqueness within the specified secret. 6339 // 6340 // Secrets Manager uses this value to prevent the accidental creation of duplicate 6341 // versions if there are failures and retries during the function's processing. 6342 // This value becomes the VersionId of the new version. 6343 ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` 6344 6345 // (Optional) Specifies the ARN of the Lambda function that can rotate the secret. 6346 RotationLambdaARN *string `type:"string"` 6347 6348 // A structure that defines the rotation configuration for this secret. 6349 RotationRules *RotationRulesType `type:"structure"` 6350 6351 // Specifies the secret that you want to rotate. You can specify either the 6352 // Amazon Resource Name (ARN) or the friendly name of the secret. 6353 // 6354 // For an ARN, we recommend that you specify a complete ARN rather than a partial 6355 // ARN. 6356 // 6357 // SecretId is a required field 6358 SecretId *string `min:"1" type:"string" required:"true"` 6359 } 6360 6361 // String returns the string representation. 6362 // 6363 // API parameter values that are decorated as "sensitive" in the API will not 6364 // be included in the string output. The member name will be present, but the 6365 // value will be replaced with "sensitive". 6366 func (s RotateSecretInput) String() string { 6367 return awsutil.Prettify(s) 6368 } 6369 6370 // GoString returns the string representation. 6371 // 6372 // API parameter values that are decorated as "sensitive" in the API will not 6373 // be included in the string output. The member name will be present, but the 6374 // value will be replaced with "sensitive". 6375 func (s RotateSecretInput) GoString() string { 6376 return s.String() 6377 } 6378 6379 // Validate inspects the fields of the type to determine if they are valid. 6380 func (s *RotateSecretInput) Validate() error { 6381 invalidParams := request.ErrInvalidParams{Context: "RotateSecretInput"} 6382 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { 6383 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) 6384 } 6385 if s.SecretId == nil { 6386 invalidParams.Add(request.NewErrParamRequired("SecretId")) 6387 } 6388 if s.SecretId != nil && len(*s.SecretId) < 1 { 6389 invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) 6390 } 6391 if s.RotationRules != nil { 6392 if err := s.RotationRules.Validate(); err != nil { 6393 invalidParams.AddNested("RotationRules", err.(request.ErrInvalidParams)) 6394 } 6395 } 6396 6397 if invalidParams.Len() > 0 { 6398 return invalidParams 6399 } 6400 return nil 6401 } 6402 6403 // SetClientRequestToken sets the ClientRequestToken field's value. 6404 func (s *RotateSecretInput) SetClientRequestToken(v string) *RotateSecretInput { 6405 s.ClientRequestToken = &v 6406 return s 6407 } 6408 6409 // SetRotationLambdaARN sets the RotationLambdaARN field's value. 6410 func (s *RotateSecretInput) SetRotationLambdaARN(v string) *RotateSecretInput { 6411 s.RotationLambdaARN = &v 6412 return s 6413 } 6414 6415 // SetRotationRules sets the RotationRules field's value. 6416 func (s *RotateSecretInput) SetRotationRules(v *RotationRulesType) *RotateSecretInput { 6417 s.RotationRules = v 6418 return s 6419 } 6420 6421 // SetSecretId sets the SecretId field's value. 6422 func (s *RotateSecretInput) SetSecretId(v string) *RotateSecretInput { 6423 s.SecretId = &v 6424 return s 6425 } 6426 6427 type RotateSecretOutput struct { 6428 _ struct{} `type:"structure"` 6429 6430 // The ARN of the secret. 6431 ARN *string `min:"20" type:"string"` 6432 6433 // The friendly name of the secret. 6434 Name *string `min:"1" type:"string"` 6435 6436 // The ID of the new version of the secret created by the rotation started by 6437 // this request. 6438 VersionId *string `min:"32" type:"string"` 6439 } 6440 6441 // String returns the string representation. 6442 // 6443 // API parameter values that are decorated as "sensitive" in the API will not 6444 // be included in the string output. The member name will be present, but the 6445 // value will be replaced with "sensitive". 6446 func (s RotateSecretOutput) String() string { 6447 return awsutil.Prettify(s) 6448 } 6449 6450 // GoString returns the string representation. 6451 // 6452 // API parameter values that are decorated as "sensitive" in the API will not 6453 // be included in the string output. The member name will be present, but the 6454 // value will be replaced with "sensitive". 6455 func (s RotateSecretOutput) GoString() string { 6456 return s.String() 6457 } 6458 6459 // SetARN sets the ARN field's value. 6460 func (s *RotateSecretOutput) SetARN(v string) *RotateSecretOutput { 6461 s.ARN = &v 6462 return s 6463 } 6464 6465 // SetName sets the Name field's value. 6466 func (s *RotateSecretOutput) SetName(v string) *RotateSecretOutput { 6467 s.Name = &v 6468 return s 6469 } 6470 6471 // SetVersionId sets the VersionId field's value. 6472 func (s *RotateSecretOutput) SetVersionId(v string) *RotateSecretOutput { 6473 s.VersionId = &v 6474 return s 6475 } 6476 6477 // A structure that defines the rotation configuration for the secret. 6478 type RotationRulesType struct { 6479 _ struct{} `type:"structure"` 6480 6481 // Specifies the number of days between automatic scheduled rotations of the 6482 // secret. 6483 // 6484 // Secrets Manager schedules the next rotation when the previous one is complete. 6485 // Secrets Manager schedules the date by adding the rotation interval (number 6486 // of days) to the actual date of the last rotation. The service chooses the 6487 // hour within that 24-hour date window randomly. The minute is also chosen 6488 // somewhat randomly, but weighted towards the top of the hour and influenced 6489 // by a variety of factors that help distribute load. 6490 AutomaticallyAfterDays *int64 `min:"1" type:"long"` 6491 } 6492 6493 // String returns the string representation. 6494 // 6495 // API parameter values that are decorated as "sensitive" in the API will not 6496 // be included in the string output. The member name will be present, but the 6497 // value will be replaced with "sensitive". 6498 func (s RotationRulesType) String() string { 6499 return awsutil.Prettify(s) 6500 } 6501 6502 // GoString returns the string representation. 6503 // 6504 // API parameter values that are decorated as "sensitive" in the API will not 6505 // be included in the string output. The member name will be present, but the 6506 // value will be replaced with "sensitive". 6507 func (s RotationRulesType) GoString() string { 6508 return s.String() 6509 } 6510 6511 // Validate inspects the fields of the type to determine if they are valid. 6512 func (s *RotationRulesType) Validate() error { 6513 invalidParams := request.ErrInvalidParams{Context: "RotationRulesType"} 6514 if s.AutomaticallyAfterDays != nil && *s.AutomaticallyAfterDays < 1 { 6515 invalidParams.Add(request.NewErrParamMinValue("AutomaticallyAfterDays", 1)) 6516 } 6517 6518 if invalidParams.Len() > 0 { 6519 return invalidParams 6520 } 6521 return nil 6522 } 6523 6524 // SetAutomaticallyAfterDays sets the AutomaticallyAfterDays field's value. 6525 func (s *RotationRulesType) SetAutomaticallyAfterDays(v int64) *RotationRulesType { 6526 s.AutomaticallyAfterDays = &v 6527 return s 6528 } 6529 6530 // A structure that contains the details about a secret. It does not include 6531 // the encrypted SecretString and SecretBinary values. To get those values, 6532 // use the GetSecretValue operation. 6533 type SecretListEntry struct { 6534 _ struct{} `type:"structure"` 6535 6536 // The Amazon Resource Name (ARN) of the secret. 6537 // 6538 // For more information about ARNs in Secrets Manager, see Policy Resources 6539 // (https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#iam-resources) 6540 // in the Amazon Web Services Secrets Manager User Guide. 6541 ARN *string `min:"20" type:"string"` 6542 6543 // The date and time when a secret was created. 6544 CreatedDate *time.Time `type:"timestamp"` 6545 6546 // The date and time the deletion of the secret occurred. Not present on active 6547 // secrets. The secret can be recovered until the number of days in the recovery 6548 // window has passed, as specified in the RecoveryWindowInDays parameter of 6549 // the DeleteSecret operation. 6550 DeletedDate *time.Time `type:"timestamp"` 6551 6552 // The user-provided description of the secret. 6553 Description *string `type:"string"` 6554 6555 // The ARN or alias of the Amazon Web Services KMS customer master key (CMK) 6556 // used to encrypt the SecretString and SecretBinary fields in each version 6557 // of the secret. If you don't provide a key, then Secrets Manager defaults 6558 // to encrypting the secret fields with the default KMS CMK, the key named awssecretsmanager, 6559 // for this account. 6560 KmsKeyId *string `type:"string"` 6561 6562 // The last date that this secret was accessed. This value is truncated to midnight 6563 // of the date and therefore shows only the date, not the time. 6564 LastAccessedDate *time.Time `type:"timestamp"` 6565 6566 // The last date and time that this secret was modified in any way. 6567 LastChangedDate *time.Time `type:"timestamp"` 6568 6569 // The most recent date and time that the Secrets Manager rotation process was 6570 // successfully completed. This value is null if the secret hasn't ever rotated. 6571 LastRotatedDate *time.Time `type:"timestamp"` 6572 6573 // The friendly name of the secret. You can use forward slashes in the name 6574 // to represent a path hierarchy. For example, /prod/databases/dbserver1 could 6575 // represent the secret for a server named dbserver1 in the folder databases 6576 // in the folder prod. 6577 Name *string `min:"1" type:"string"` 6578 6579 // Returns the name of the service that created the secret. 6580 OwningService *string `min:"1" type:"string"` 6581 6582 // The Region where Secrets Manager originated the secret. 6583 PrimaryRegion *string `min:"1" type:"string"` 6584 6585 // Indicates whether automatic, scheduled rotation is enabled for this secret. 6586 RotationEnabled *bool `type:"boolean"` 6587 6588 // The ARN of an Amazon Web Services Lambda function invoked by Secrets Manager 6589 // to rotate and expire the secret either automatically per the schedule or 6590 // manually by a call to RotateSecret. 6591 RotationLambdaARN *string `type:"string"` 6592 6593 // A structure that defines the rotation configuration for the secret. 6594 RotationRules *RotationRulesType `type:"structure"` 6595 6596 // A list of all of the currently assigned SecretVersionStage staging labels 6597 // and the SecretVersionId attached to each one. Staging labels are used to 6598 // keep track of the different versions during the rotation process. 6599 // 6600 // A version that does not have any SecretVersionStage is considered deprecated 6601 // and subject to deletion. Such versions are not included in this list. 6602 SecretVersionsToStages map[string][]*string `type:"map"` 6603 6604 // The list of user-defined tags associated with the secret. To add tags to 6605 // a secret, use TagResource. To remove tags, use UntagResource. 6606 Tags []*Tag `type:"list"` 6607 } 6608 6609 // String returns the string representation. 6610 // 6611 // API parameter values that are decorated as "sensitive" in the API will not 6612 // be included in the string output. The member name will be present, but the 6613 // value will be replaced with "sensitive". 6614 func (s SecretListEntry) String() string { 6615 return awsutil.Prettify(s) 6616 } 6617 6618 // GoString returns the string representation. 6619 // 6620 // API parameter values that are decorated as "sensitive" in the API will not 6621 // be included in the string output. The member name will be present, but the 6622 // value will be replaced with "sensitive". 6623 func (s SecretListEntry) GoString() string { 6624 return s.String() 6625 } 6626 6627 // SetARN sets the ARN field's value. 6628 func (s *SecretListEntry) SetARN(v string) *SecretListEntry { 6629 s.ARN = &v 6630 return s 6631 } 6632 6633 // SetCreatedDate sets the CreatedDate field's value. 6634 func (s *SecretListEntry) SetCreatedDate(v time.Time) *SecretListEntry { 6635 s.CreatedDate = &v 6636 return s 6637 } 6638 6639 // SetDeletedDate sets the DeletedDate field's value. 6640 func (s *SecretListEntry) SetDeletedDate(v time.Time) *SecretListEntry { 6641 s.DeletedDate = &v 6642 return s 6643 } 6644 6645 // SetDescription sets the Description field's value. 6646 func (s *SecretListEntry) SetDescription(v string) *SecretListEntry { 6647 s.Description = &v 6648 return s 6649 } 6650 6651 // SetKmsKeyId sets the KmsKeyId field's value. 6652 func (s *SecretListEntry) SetKmsKeyId(v string) *SecretListEntry { 6653 s.KmsKeyId = &v 6654 return s 6655 } 6656 6657 // SetLastAccessedDate sets the LastAccessedDate field's value. 6658 func (s *SecretListEntry) SetLastAccessedDate(v time.Time) *SecretListEntry { 6659 s.LastAccessedDate = &v 6660 return s 6661 } 6662 6663 // SetLastChangedDate sets the LastChangedDate field's value. 6664 func (s *SecretListEntry) SetLastChangedDate(v time.Time) *SecretListEntry { 6665 s.LastChangedDate = &v 6666 return s 6667 } 6668 6669 // SetLastRotatedDate sets the LastRotatedDate field's value. 6670 func (s *SecretListEntry) SetLastRotatedDate(v time.Time) *SecretListEntry { 6671 s.LastRotatedDate = &v 6672 return s 6673 } 6674 6675 // SetName sets the Name field's value. 6676 func (s *SecretListEntry) SetName(v string) *SecretListEntry { 6677 s.Name = &v 6678 return s 6679 } 6680 6681 // SetOwningService sets the OwningService field's value. 6682 func (s *SecretListEntry) SetOwningService(v string) *SecretListEntry { 6683 s.OwningService = &v 6684 return s 6685 } 6686 6687 // SetPrimaryRegion sets the PrimaryRegion field's value. 6688 func (s *SecretListEntry) SetPrimaryRegion(v string) *SecretListEntry { 6689 s.PrimaryRegion = &v 6690 return s 6691 } 6692 6693 // SetRotationEnabled sets the RotationEnabled field's value. 6694 func (s *SecretListEntry) SetRotationEnabled(v bool) *SecretListEntry { 6695 s.RotationEnabled = &v 6696 return s 6697 } 6698 6699 // SetRotationLambdaARN sets the RotationLambdaARN field's value. 6700 func (s *SecretListEntry) SetRotationLambdaARN(v string) *SecretListEntry { 6701 s.RotationLambdaARN = &v 6702 return s 6703 } 6704 6705 // SetRotationRules sets the RotationRules field's value. 6706 func (s *SecretListEntry) SetRotationRules(v *RotationRulesType) *SecretListEntry { 6707 s.RotationRules = v 6708 return s 6709 } 6710 6711 // SetSecretVersionsToStages sets the SecretVersionsToStages field's value. 6712 func (s *SecretListEntry) SetSecretVersionsToStages(v map[string][]*string) *SecretListEntry { 6713 s.SecretVersionsToStages = v 6714 return s 6715 } 6716 6717 // SetTags sets the Tags field's value. 6718 func (s *SecretListEntry) SetTags(v []*Tag) *SecretListEntry { 6719 s.Tags = v 6720 return s 6721 } 6722 6723 // A structure that contains information about one version of a secret. 6724 type SecretVersionsListEntry struct { 6725 _ struct{} `type:"structure"` 6726 6727 // The date and time this version of the secret was created. 6728 CreatedDate *time.Time `type:"timestamp"` 6729 6730 // The KMS keys used to encrypt the secret version. 6731 KmsKeyIds []*string `type:"list"` 6732 6733 // The date that this version of the secret was last accessed. Note that the 6734 // resolution of this field is at the date level and does not include the time. 6735 LastAccessedDate *time.Time `type:"timestamp"` 6736 6737 // The unique version identifier of this version of the secret. 6738 VersionId *string `min:"32" type:"string"` 6739 6740 // An array of staging labels that are currently associated with this version 6741 // of the secret. 6742 VersionStages []*string `min:"1" type:"list"` 6743 } 6744 6745 // String returns the string representation. 6746 // 6747 // API parameter values that are decorated as "sensitive" in the API will not 6748 // be included in the string output. The member name will be present, but the 6749 // value will be replaced with "sensitive". 6750 func (s SecretVersionsListEntry) String() string { 6751 return awsutil.Prettify(s) 6752 } 6753 6754 // GoString returns the string representation. 6755 // 6756 // API parameter values that are decorated as "sensitive" in the API will not 6757 // be included in the string output. The member name will be present, but the 6758 // value will be replaced with "sensitive". 6759 func (s SecretVersionsListEntry) GoString() string { 6760 return s.String() 6761 } 6762 6763 // SetCreatedDate sets the CreatedDate field's value. 6764 func (s *SecretVersionsListEntry) SetCreatedDate(v time.Time) *SecretVersionsListEntry { 6765 s.CreatedDate = &v 6766 return s 6767 } 6768 6769 // SetKmsKeyIds sets the KmsKeyIds field's value. 6770 func (s *SecretVersionsListEntry) SetKmsKeyIds(v []*string) *SecretVersionsListEntry { 6771 s.KmsKeyIds = v 6772 return s 6773 } 6774 6775 // SetLastAccessedDate sets the LastAccessedDate field's value. 6776 func (s *SecretVersionsListEntry) SetLastAccessedDate(v time.Time) *SecretVersionsListEntry { 6777 s.LastAccessedDate = &v 6778 return s 6779 } 6780 6781 // SetVersionId sets the VersionId field's value. 6782 func (s *SecretVersionsListEntry) SetVersionId(v string) *SecretVersionsListEntry { 6783 s.VersionId = &v 6784 return s 6785 } 6786 6787 // SetVersionStages sets the VersionStages field's value. 6788 func (s *SecretVersionsListEntry) SetVersionStages(v []*string) *SecretVersionsListEntry { 6789 s.VersionStages = v 6790 return s 6791 } 6792 6793 type StopReplicationToReplicaInput struct { 6794 _ struct{} `type:"structure"` 6795 6796 // Response to StopReplicationToReplica of a secret, based on the SecretId. 6797 // 6798 // SecretId is a required field 6799 SecretId *string `min:"1" type:"string" required:"true"` 6800 } 6801 6802 // String returns the string representation. 6803 // 6804 // API parameter values that are decorated as "sensitive" in the API will not 6805 // be included in the string output. The member name will be present, but the 6806 // value will be replaced with "sensitive". 6807 func (s StopReplicationToReplicaInput) String() string { 6808 return awsutil.Prettify(s) 6809 } 6810 6811 // GoString returns the string representation. 6812 // 6813 // API parameter values that are decorated as "sensitive" in the API will not 6814 // be included in the string output. The member name will be present, but the 6815 // value will be replaced with "sensitive". 6816 func (s StopReplicationToReplicaInput) GoString() string { 6817 return s.String() 6818 } 6819 6820 // Validate inspects the fields of the type to determine if they are valid. 6821 func (s *StopReplicationToReplicaInput) Validate() error { 6822 invalidParams := request.ErrInvalidParams{Context: "StopReplicationToReplicaInput"} 6823 if s.SecretId == nil { 6824 invalidParams.Add(request.NewErrParamRequired("SecretId")) 6825 } 6826 if s.SecretId != nil && len(*s.SecretId) < 1 { 6827 invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) 6828 } 6829 6830 if invalidParams.Len() > 0 { 6831 return invalidParams 6832 } 6833 return nil 6834 } 6835 6836 // SetSecretId sets the SecretId field's value. 6837 func (s *StopReplicationToReplicaInput) SetSecretId(v string) *StopReplicationToReplicaInput { 6838 s.SecretId = &v 6839 return s 6840 } 6841 6842 type StopReplicationToReplicaOutput struct { 6843 _ struct{} `type:"structure"` 6844 6845 // Response StopReplicationToReplica of a secret, based on the ARN,. 6846 ARN *string `min:"20" type:"string"` 6847 } 6848 6849 // String returns the string representation. 6850 // 6851 // API parameter values that are decorated as "sensitive" in the API will not 6852 // be included in the string output. The member name will be present, but the 6853 // value will be replaced with "sensitive". 6854 func (s StopReplicationToReplicaOutput) String() string { 6855 return awsutil.Prettify(s) 6856 } 6857 6858 // GoString returns the string representation. 6859 // 6860 // API parameter values that are decorated as "sensitive" in the API will not 6861 // be included in the string output. The member name will be present, but the 6862 // value will be replaced with "sensitive". 6863 func (s StopReplicationToReplicaOutput) GoString() string { 6864 return s.String() 6865 } 6866 6867 // SetARN sets the ARN field's value. 6868 func (s *StopReplicationToReplicaOutput) SetARN(v string) *StopReplicationToReplicaOutput { 6869 s.ARN = &v 6870 return s 6871 } 6872 6873 // A structure that contains information about a tag. 6874 type Tag struct { 6875 _ struct{} `type:"structure"` 6876 6877 // The key identifier, or name, of the tag. 6878 Key *string `min:"1" type:"string"` 6879 6880 // The string value associated with the key of the tag. 6881 Value *string `type:"string"` 6882 } 6883 6884 // String returns the string representation. 6885 // 6886 // API parameter values that are decorated as "sensitive" in the API will not 6887 // be included in the string output. The member name will be present, but the 6888 // value will be replaced with "sensitive". 6889 func (s Tag) String() string { 6890 return awsutil.Prettify(s) 6891 } 6892 6893 // GoString returns the string representation. 6894 // 6895 // API parameter values that are decorated as "sensitive" in the API will not 6896 // be included in the string output. The member name will be present, but the 6897 // value will be replaced with "sensitive". 6898 func (s Tag) GoString() string { 6899 return s.String() 6900 } 6901 6902 // Validate inspects the fields of the type to determine if they are valid. 6903 func (s *Tag) Validate() error { 6904 invalidParams := request.ErrInvalidParams{Context: "Tag"} 6905 if s.Key != nil && len(*s.Key) < 1 { 6906 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 6907 } 6908 6909 if invalidParams.Len() > 0 { 6910 return invalidParams 6911 } 6912 return nil 6913 } 6914 6915 // SetKey sets the Key field's value. 6916 func (s *Tag) SetKey(v string) *Tag { 6917 s.Key = &v 6918 return s 6919 } 6920 6921 // SetValue sets the Value field's value. 6922 func (s *Tag) SetValue(v string) *Tag { 6923 s.Value = &v 6924 return s 6925 } 6926 6927 type TagResourceInput struct { 6928 _ struct{} `type:"structure"` 6929 6930 // The identifier for the secret that you want to attach tags to. You can specify 6931 // either the Amazon Resource Name (ARN) or the friendly name of the secret. 6932 // 6933 // For an ARN, we recommend that you specify a complete ARN rather than a partial 6934 // ARN. 6935 // 6936 // SecretId is a required field 6937 SecretId *string `min:"1" type:"string" required:"true"` 6938 6939 // The tags to attach to the secret. Each element in the list consists of a 6940 // Key and a Value. 6941 // 6942 // This parameter to the API requires a JSON text string argument. 6943 // 6944 // For storing multiple values, we recommend that you use a JSON text string 6945 // argument and specify key/value pairs. For more information, see Specifying 6946 // parameter values for the Amazon Web Services CLI (https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html) 6947 // in the Amazon Web Services CLI User Guide. 6948 // 6949 // Tags is a required field 6950 Tags []*Tag `type:"list" required:"true"` 6951 } 6952 6953 // String returns the string representation. 6954 // 6955 // API parameter values that are decorated as "sensitive" in the API will not 6956 // be included in the string output. The member name will be present, but the 6957 // value will be replaced with "sensitive". 6958 func (s TagResourceInput) String() string { 6959 return awsutil.Prettify(s) 6960 } 6961 6962 // GoString returns the string representation. 6963 // 6964 // API parameter values that are decorated as "sensitive" in the API will not 6965 // be included in the string output. The member name will be present, but the 6966 // value will be replaced with "sensitive". 6967 func (s TagResourceInput) GoString() string { 6968 return s.String() 6969 } 6970 6971 // Validate inspects the fields of the type to determine if they are valid. 6972 func (s *TagResourceInput) Validate() error { 6973 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 6974 if s.SecretId == nil { 6975 invalidParams.Add(request.NewErrParamRequired("SecretId")) 6976 } 6977 if s.SecretId != nil && len(*s.SecretId) < 1 { 6978 invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) 6979 } 6980 if s.Tags == nil { 6981 invalidParams.Add(request.NewErrParamRequired("Tags")) 6982 } 6983 if s.Tags != nil { 6984 for i, v := range s.Tags { 6985 if v == nil { 6986 continue 6987 } 6988 if err := v.Validate(); err != nil { 6989 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 6990 } 6991 } 6992 } 6993 6994 if invalidParams.Len() > 0 { 6995 return invalidParams 6996 } 6997 return nil 6998 } 6999 7000 // SetSecretId sets the SecretId field's value. 7001 func (s *TagResourceInput) SetSecretId(v string) *TagResourceInput { 7002 s.SecretId = &v 7003 return s 7004 } 7005 7006 // SetTags sets the Tags field's value. 7007 func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { 7008 s.Tags = v 7009 return s 7010 } 7011 7012 type TagResourceOutput struct { 7013 _ struct{} `type:"structure"` 7014 } 7015 7016 // String returns the string representation. 7017 // 7018 // API parameter values that are decorated as "sensitive" in the API will not 7019 // be included in the string output. The member name will be present, but the 7020 // value will be replaced with "sensitive". 7021 func (s TagResourceOutput) String() string { 7022 return awsutil.Prettify(s) 7023 } 7024 7025 // GoString returns the string representation. 7026 // 7027 // API parameter values that are decorated as "sensitive" in the API will not 7028 // be included in the string output. The member name will be present, but the 7029 // value will be replaced with "sensitive". 7030 func (s TagResourceOutput) GoString() string { 7031 return s.String() 7032 } 7033 7034 type UntagResourceInput struct { 7035 _ struct{} `type:"structure"` 7036 7037 // The identifier for the secret that you want to remove tags from. You can 7038 // specify either the Amazon Resource Name (ARN) or the friendly name of the 7039 // secret. 7040 // 7041 // For an ARN, we recommend that you specify a complete ARN rather than a partial 7042 // ARN. 7043 // 7044 // SecretId is a required field 7045 SecretId *string `min:"1" type:"string" required:"true"` 7046 7047 // A list of tag key names to remove from the secret. You don't specify the 7048 // value. Both the key and its associated value are removed. 7049 // 7050 // This parameter to the API requires a JSON text string argument. 7051 // 7052 // For storing multiple values, we recommend that you use a JSON text string 7053 // argument and specify key/value pairs. For more information, see Specifying 7054 // parameter values for the Amazon Web Services CLI (https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html) 7055 // in the Amazon Web Services CLI User Guide. 7056 // 7057 // TagKeys is a required field 7058 TagKeys []*string `type:"list" required:"true"` 7059 } 7060 7061 // String returns the string representation. 7062 // 7063 // API parameter values that are decorated as "sensitive" in the API will not 7064 // be included in the string output. The member name will be present, but the 7065 // value will be replaced with "sensitive". 7066 func (s UntagResourceInput) String() string { 7067 return awsutil.Prettify(s) 7068 } 7069 7070 // GoString returns the string representation. 7071 // 7072 // API parameter values that are decorated as "sensitive" in the API will not 7073 // be included in the string output. The member name will be present, but the 7074 // value will be replaced with "sensitive". 7075 func (s UntagResourceInput) GoString() string { 7076 return s.String() 7077 } 7078 7079 // Validate inspects the fields of the type to determine if they are valid. 7080 func (s *UntagResourceInput) Validate() error { 7081 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 7082 if s.SecretId == nil { 7083 invalidParams.Add(request.NewErrParamRequired("SecretId")) 7084 } 7085 if s.SecretId != nil && len(*s.SecretId) < 1 { 7086 invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) 7087 } 7088 if s.TagKeys == nil { 7089 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 7090 } 7091 7092 if invalidParams.Len() > 0 { 7093 return invalidParams 7094 } 7095 return nil 7096 } 7097 7098 // SetSecretId sets the SecretId field's value. 7099 func (s *UntagResourceInput) SetSecretId(v string) *UntagResourceInput { 7100 s.SecretId = &v 7101 return s 7102 } 7103 7104 // SetTagKeys sets the TagKeys field's value. 7105 func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 7106 s.TagKeys = v 7107 return s 7108 } 7109 7110 type UntagResourceOutput struct { 7111 _ struct{} `type:"structure"` 7112 } 7113 7114 // String returns the string representation. 7115 // 7116 // API parameter values that are decorated as "sensitive" in the API will not 7117 // be included in the string output. The member name will be present, but the 7118 // value will be replaced with "sensitive". 7119 func (s UntagResourceOutput) String() string { 7120 return awsutil.Prettify(s) 7121 } 7122 7123 // GoString returns the string representation. 7124 // 7125 // API parameter values that are decorated as "sensitive" in the API will not 7126 // be included in the string output. The member name will be present, but the 7127 // value will be replaced with "sensitive". 7128 func (s UntagResourceOutput) GoString() string { 7129 return s.String() 7130 } 7131 7132 type UpdateSecretInput struct { 7133 _ struct{} `type:"structure"` 7134 7135 // (Optional) If you want to add a new version to the secret, this parameter 7136 // specifies a unique identifier for the new version that helps ensure idempotency. 7137 // 7138 // If you use the Amazon Web Services CLI or one of the Amazon Web Services 7139 // SDK to call this operation, then you can leave this parameter empty. The 7140 // CLI or SDK generates a random UUID for you and includes that in the request. 7141 // If you don't use the SDK and instead generate a raw HTTP request to the Secrets 7142 // Manager service endpoint, then you must generate a ClientRequestToken yourself 7143 // for new versions and include that value in the request. 7144 // 7145 // You typically only need to interact with this value if you implement your 7146 // own retry logic and want to ensure that a given secret is not created twice. 7147 // We recommend that you generate a UUID-type (https://wikipedia.org/wiki/Universally_unique_identifier) 7148 // value to ensure uniqueness within the specified secret. 7149 // 7150 // Secrets Manager uses this value to prevent the accidental creation of duplicate 7151 // versions if there are failures and retries during the Lambda rotation function's 7152 // processing. 7153 // 7154 // * If the ClientRequestToken value isn't already associated with a version 7155 // of the secret then a new version of the secret is created. 7156 // 7157 // * If a version with this value already exists and that version's SecretString 7158 // and SecretBinary values are the same as those in the request then the 7159 // request is ignored (the operation is idempotent). 7160 // 7161 // * If a version with this value already exists and that version's SecretString 7162 // and SecretBinary values are different from the request then an error occurs 7163 // because you cannot modify an existing secret value. 7164 // 7165 // This value becomes the VersionId of the new version. 7166 ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` 7167 7168 // (Optional) Specifies an updated user-provided description of the secret. 7169 Description *string `type:"string"` 7170 7171 // (Optional) Specifies an updated ARN or alias of the Amazon Web Services KMS 7172 // customer master key (CMK) that Secrets Manager uses to encrypt the protected 7173 // text in new versions of this secret as well as any existing versions of this 7174 // secret that have the staging labels AWSCURRENT, AWSPENDING, or AWSPREVIOUS. 7175 // For more information about staging labels, see Staging Labels (https://docs.aws.amazon.com/secretsmanager/latest/userguide/terms-concepts.html#term_staging-label) 7176 // in the Amazon Web Services Secrets Manager User Guide. 7177 // 7178 // You can only use the account's default CMK to encrypt and decrypt if you 7179 // call this operation using credentials from the same account that owns the 7180 // secret. If the secret is in a different account, then you must create a custom 7181 // CMK and provide the ARN of that CMK in this field. The user making the call 7182 // must have permissions to both the secret and the CMK in their respective 7183 // accounts. 7184 KmsKeyId *string `type:"string"` 7185 7186 // (Optional) Specifies updated binary data that you want to encrypt and store 7187 // in the new version of the secret. To use this parameter in the command-line 7188 // tools, we recommend that you store your binary data in a file and then use 7189 // the appropriate technique for your tool to pass the contents of the file 7190 // as a parameter. Either SecretBinary or SecretString must have a value, but 7191 // not both. They cannot both be empty. 7192 // 7193 // This parameter is not accessible using the Secrets Manager console. 7194 // 7195 // SecretBinary is a sensitive parameter and its value will be 7196 // replaced with "sensitive" in string returned by UpdateSecretInput's 7197 // String and GoString methods. 7198 // 7199 // SecretBinary is automatically base64 encoded/decoded by the SDK. 7200 SecretBinary []byte `type:"blob" sensitive:"true"` 7201 7202 // Specifies the secret that you want to modify or to which you want to add 7203 // a new version. You can specify either the Amazon Resource Name (ARN) or the 7204 // friendly name of the secret. 7205 // 7206 // For an ARN, we recommend that you specify a complete ARN rather than a partial 7207 // ARN. 7208 // 7209 // SecretId is a required field 7210 SecretId *string `min:"1" type:"string" required:"true"` 7211 7212 // (Optional) Specifies updated text data that you want to encrypt and store 7213 // in this new version of the secret. Either SecretBinary or SecretString must 7214 // have a value, but not both. They cannot both be empty. 7215 // 7216 // If you create this secret by using the Secrets Manager console then Secrets 7217 // Manager puts the protected secret text in only the SecretString parameter. 7218 // The Secrets Manager console stores the information as a JSON structure of 7219 // key/value pairs that the default Lambda rotation function knows how to parse. 7220 // 7221 // For storing multiple values, we recommend that you use a JSON text string 7222 // argument and specify key/value pairs. For more information, see Specifying 7223 // parameter values for the Amazon Web Services CLI (https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html) 7224 // in the Amazon Web Services CLI User Guide. 7225 // 7226 // SecretString is a sensitive parameter and its value will be 7227 // replaced with "sensitive" in string returned by UpdateSecretInput's 7228 // String and GoString methods. 7229 SecretString *string `type:"string" sensitive:"true"` 7230 } 7231 7232 // String returns the string representation. 7233 // 7234 // API parameter values that are decorated as "sensitive" in the API will not 7235 // be included in the string output. The member name will be present, but the 7236 // value will be replaced with "sensitive". 7237 func (s UpdateSecretInput) String() string { 7238 return awsutil.Prettify(s) 7239 } 7240 7241 // GoString returns the string representation. 7242 // 7243 // API parameter values that are decorated as "sensitive" in the API will not 7244 // be included in the string output. The member name will be present, but the 7245 // value will be replaced with "sensitive". 7246 func (s UpdateSecretInput) GoString() string { 7247 return s.String() 7248 } 7249 7250 // Validate inspects the fields of the type to determine if they are valid. 7251 func (s *UpdateSecretInput) Validate() error { 7252 invalidParams := request.ErrInvalidParams{Context: "UpdateSecretInput"} 7253 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { 7254 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) 7255 } 7256 if s.SecretId == nil { 7257 invalidParams.Add(request.NewErrParamRequired("SecretId")) 7258 } 7259 if s.SecretId != nil && len(*s.SecretId) < 1 { 7260 invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) 7261 } 7262 7263 if invalidParams.Len() > 0 { 7264 return invalidParams 7265 } 7266 return nil 7267 } 7268 7269 // SetClientRequestToken sets the ClientRequestToken field's value. 7270 func (s *UpdateSecretInput) SetClientRequestToken(v string) *UpdateSecretInput { 7271 s.ClientRequestToken = &v 7272 return s 7273 } 7274 7275 // SetDescription sets the Description field's value. 7276 func (s *UpdateSecretInput) SetDescription(v string) *UpdateSecretInput { 7277 s.Description = &v 7278 return s 7279 } 7280 7281 // SetKmsKeyId sets the KmsKeyId field's value. 7282 func (s *UpdateSecretInput) SetKmsKeyId(v string) *UpdateSecretInput { 7283 s.KmsKeyId = &v 7284 return s 7285 } 7286 7287 // SetSecretBinary sets the SecretBinary field's value. 7288 func (s *UpdateSecretInput) SetSecretBinary(v []byte) *UpdateSecretInput { 7289 s.SecretBinary = v 7290 return s 7291 } 7292 7293 // SetSecretId sets the SecretId field's value. 7294 func (s *UpdateSecretInput) SetSecretId(v string) *UpdateSecretInput { 7295 s.SecretId = &v 7296 return s 7297 } 7298 7299 // SetSecretString sets the SecretString field's value. 7300 func (s *UpdateSecretInput) SetSecretString(v string) *UpdateSecretInput { 7301 s.SecretString = &v 7302 return s 7303 } 7304 7305 type UpdateSecretOutput struct { 7306 _ struct{} `type:"structure"` 7307 7308 // The ARN of the secret that was updated. 7309 // 7310 // Secrets Manager automatically adds several random characters to the name 7311 // at the end of the ARN when you initially create a secret. This affects only 7312 // the ARN and not the actual friendly name. This ensures that if you create 7313 // a new secret with the same name as an old secret that you previously deleted, 7314 // then users with access to the old secret don't automatically get access to 7315 // the new secret because the ARNs are different. 7316 ARN *string `min:"20" type:"string"` 7317 7318 // The friendly name of the secret that was updated. 7319 Name *string `min:"1" type:"string"` 7320 7321 // If a new version of the secret was created by this operation, then VersionId 7322 // contains the unique identifier of the new version. 7323 VersionId *string `min:"32" type:"string"` 7324 } 7325 7326 // String returns the string representation. 7327 // 7328 // API parameter values that are decorated as "sensitive" in the API will not 7329 // be included in the string output. The member name will be present, but the 7330 // value will be replaced with "sensitive". 7331 func (s UpdateSecretOutput) String() string { 7332 return awsutil.Prettify(s) 7333 } 7334 7335 // GoString returns the string representation. 7336 // 7337 // API parameter values that are decorated as "sensitive" in the API will not 7338 // be included in the string output. The member name will be present, but the 7339 // value will be replaced with "sensitive". 7340 func (s UpdateSecretOutput) GoString() string { 7341 return s.String() 7342 } 7343 7344 // SetARN sets the ARN field's value. 7345 func (s *UpdateSecretOutput) SetARN(v string) *UpdateSecretOutput { 7346 s.ARN = &v 7347 return s 7348 } 7349 7350 // SetName sets the Name field's value. 7351 func (s *UpdateSecretOutput) SetName(v string) *UpdateSecretOutput { 7352 s.Name = &v 7353 return s 7354 } 7355 7356 // SetVersionId sets the VersionId field's value. 7357 func (s *UpdateSecretOutput) SetVersionId(v string) *UpdateSecretOutput { 7358 s.VersionId = &v 7359 return s 7360 } 7361 7362 type UpdateSecretVersionStageInput struct { 7363 _ struct{} `type:"structure"` 7364 7365 // (Optional) The secret version ID that you want to add the staging label. 7366 // If you want to remove a label from a version, then do not specify this parameter. 7367 // 7368 // If the staging label is already attached to a different version of the secret, 7369 // then you must also specify the RemoveFromVersionId parameter. 7370 MoveToVersionId *string `min:"32" type:"string"` 7371 7372 // Specifies the secret version ID of the version that the staging label is 7373 // to be removed from. If the staging label you are trying to attach to one 7374 // version is already attached to a different version, then you must include 7375 // this parameter and specify the version that the label is to be removed from. 7376 // If the label is attached and you either do not specify this parameter, or 7377 // the version ID does not match, then the operation fails. 7378 RemoveFromVersionId *string `min:"32" type:"string"` 7379 7380 // Specifies the secret with the version with the list of staging labels you 7381 // want to modify. You can specify either the Amazon Resource Name (ARN) or 7382 // the friendly name of the secret. 7383 // 7384 // For an ARN, we recommend that you specify a complete ARN rather than a partial 7385 // ARN. 7386 // 7387 // SecretId is a required field 7388 SecretId *string `min:"1" type:"string" required:"true"` 7389 7390 // The staging label to add to this version. 7391 // 7392 // VersionStage is a required field 7393 VersionStage *string `min:"1" type:"string" required:"true"` 7394 } 7395 7396 // String returns the string representation. 7397 // 7398 // API parameter values that are decorated as "sensitive" in the API will not 7399 // be included in the string output. The member name will be present, but the 7400 // value will be replaced with "sensitive". 7401 func (s UpdateSecretVersionStageInput) String() string { 7402 return awsutil.Prettify(s) 7403 } 7404 7405 // GoString returns the string representation. 7406 // 7407 // API parameter values that are decorated as "sensitive" in the API will not 7408 // be included in the string output. The member name will be present, but the 7409 // value will be replaced with "sensitive". 7410 func (s UpdateSecretVersionStageInput) GoString() string { 7411 return s.String() 7412 } 7413 7414 // Validate inspects the fields of the type to determine if they are valid. 7415 func (s *UpdateSecretVersionStageInput) Validate() error { 7416 invalidParams := request.ErrInvalidParams{Context: "UpdateSecretVersionStageInput"} 7417 if s.MoveToVersionId != nil && len(*s.MoveToVersionId) < 32 { 7418 invalidParams.Add(request.NewErrParamMinLen("MoveToVersionId", 32)) 7419 } 7420 if s.RemoveFromVersionId != nil && len(*s.RemoveFromVersionId) < 32 { 7421 invalidParams.Add(request.NewErrParamMinLen("RemoveFromVersionId", 32)) 7422 } 7423 if s.SecretId == nil { 7424 invalidParams.Add(request.NewErrParamRequired("SecretId")) 7425 } 7426 if s.SecretId != nil && len(*s.SecretId) < 1 { 7427 invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) 7428 } 7429 if s.VersionStage == nil { 7430 invalidParams.Add(request.NewErrParamRequired("VersionStage")) 7431 } 7432 if s.VersionStage != nil && len(*s.VersionStage) < 1 { 7433 invalidParams.Add(request.NewErrParamMinLen("VersionStage", 1)) 7434 } 7435 7436 if invalidParams.Len() > 0 { 7437 return invalidParams 7438 } 7439 return nil 7440 } 7441 7442 // SetMoveToVersionId sets the MoveToVersionId field's value. 7443 func (s *UpdateSecretVersionStageInput) SetMoveToVersionId(v string) *UpdateSecretVersionStageInput { 7444 s.MoveToVersionId = &v 7445 return s 7446 } 7447 7448 // SetRemoveFromVersionId sets the RemoveFromVersionId field's value. 7449 func (s *UpdateSecretVersionStageInput) SetRemoveFromVersionId(v string) *UpdateSecretVersionStageInput { 7450 s.RemoveFromVersionId = &v 7451 return s 7452 } 7453 7454 // SetSecretId sets the SecretId field's value. 7455 func (s *UpdateSecretVersionStageInput) SetSecretId(v string) *UpdateSecretVersionStageInput { 7456 s.SecretId = &v 7457 return s 7458 } 7459 7460 // SetVersionStage sets the VersionStage field's value. 7461 func (s *UpdateSecretVersionStageInput) SetVersionStage(v string) *UpdateSecretVersionStageInput { 7462 s.VersionStage = &v 7463 return s 7464 } 7465 7466 type UpdateSecretVersionStageOutput struct { 7467 _ struct{} `type:"structure"` 7468 7469 // The ARN of the secret with the modified staging label. 7470 ARN *string `min:"20" type:"string"` 7471 7472 // The friendly name of the secret with the modified staging label. 7473 Name *string `min:"1" type:"string"` 7474 } 7475 7476 // String returns the string representation. 7477 // 7478 // API parameter values that are decorated as "sensitive" in the API will not 7479 // be included in the string output. The member name will be present, but the 7480 // value will be replaced with "sensitive". 7481 func (s UpdateSecretVersionStageOutput) String() string { 7482 return awsutil.Prettify(s) 7483 } 7484 7485 // GoString returns the string representation. 7486 // 7487 // API parameter values that are decorated as "sensitive" in the API will not 7488 // be included in the string output. The member name will be present, but the 7489 // value will be replaced with "sensitive". 7490 func (s UpdateSecretVersionStageOutput) GoString() string { 7491 return s.String() 7492 } 7493 7494 // SetARN sets the ARN field's value. 7495 func (s *UpdateSecretVersionStageOutput) SetARN(v string) *UpdateSecretVersionStageOutput { 7496 s.ARN = &v 7497 return s 7498 } 7499 7500 // SetName sets the Name field's value. 7501 func (s *UpdateSecretVersionStageOutput) SetName(v string) *UpdateSecretVersionStageOutput { 7502 s.Name = &v 7503 return s 7504 } 7505 7506 type ValidateResourcePolicyInput struct { 7507 _ struct{} `type:"structure"` 7508 7509 // A JSON-formatted string constructed according to the grammar and syntax for 7510 // an Amazon Web Services resource-based policy. The policy in the string identifies 7511 // who can access or manage this secret and its versions. For information on 7512 // how to format a JSON parameter for the various command line tool environments, 7513 // see Using JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) 7514 // in the CLI User Guide.publi 7515 // 7516 // ResourcePolicy is a required field 7517 ResourcePolicy *string `min:"1" type:"string" required:"true"` 7518 7519 // (Optional) The identifier of the secret with the resource-based policy you 7520 // want to validate. You can specify either the Amazon Resource Name (ARN) or 7521 // the friendly name of the secret. 7522 // 7523 // For an ARN, we recommend that you specify a complete ARN rather than a partial 7524 // ARN. 7525 SecretId *string `min:"1" type:"string"` 7526 } 7527 7528 // String returns the string representation. 7529 // 7530 // API parameter values that are decorated as "sensitive" in the API will not 7531 // be included in the string output. The member name will be present, but the 7532 // value will be replaced with "sensitive". 7533 func (s ValidateResourcePolicyInput) String() string { 7534 return awsutil.Prettify(s) 7535 } 7536 7537 // GoString returns the string representation. 7538 // 7539 // API parameter values that are decorated as "sensitive" in the API will not 7540 // be included in the string output. The member name will be present, but the 7541 // value will be replaced with "sensitive". 7542 func (s ValidateResourcePolicyInput) GoString() string { 7543 return s.String() 7544 } 7545 7546 // Validate inspects the fields of the type to determine if they are valid. 7547 func (s *ValidateResourcePolicyInput) Validate() error { 7548 invalidParams := request.ErrInvalidParams{Context: "ValidateResourcePolicyInput"} 7549 if s.ResourcePolicy == nil { 7550 invalidParams.Add(request.NewErrParamRequired("ResourcePolicy")) 7551 } 7552 if s.ResourcePolicy != nil && len(*s.ResourcePolicy) < 1 { 7553 invalidParams.Add(request.NewErrParamMinLen("ResourcePolicy", 1)) 7554 } 7555 if s.SecretId != nil && len(*s.SecretId) < 1 { 7556 invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) 7557 } 7558 7559 if invalidParams.Len() > 0 { 7560 return invalidParams 7561 } 7562 return nil 7563 } 7564 7565 // SetResourcePolicy sets the ResourcePolicy field's value. 7566 func (s *ValidateResourcePolicyInput) SetResourcePolicy(v string) *ValidateResourcePolicyInput { 7567 s.ResourcePolicy = &v 7568 return s 7569 } 7570 7571 // SetSecretId sets the SecretId field's value. 7572 func (s *ValidateResourcePolicyInput) SetSecretId(v string) *ValidateResourcePolicyInput { 7573 s.SecretId = &v 7574 return s 7575 } 7576 7577 type ValidateResourcePolicyOutput struct { 7578 _ struct{} `type:"structure"` 7579 7580 // Returns a message stating that your Reource Policy passed validation. 7581 PolicyValidationPassed *bool `type:"boolean"` 7582 7583 // Returns an error message if your policy doesn't pass validatation. 7584 ValidationErrors []*ValidationErrorsEntry `type:"list"` 7585 } 7586 7587 // String returns the string representation. 7588 // 7589 // API parameter values that are decorated as "sensitive" in the API will not 7590 // be included in the string output. The member name will be present, but the 7591 // value will be replaced with "sensitive". 7592 func (s ValidateResourcePolicyOutput) String() string { 7593 return awsutil.Prettify(s) 7594 } 7595 7596 // GoString returns the string representation. 7597 // 7598 // API parameter values that are decorated as "sensitive" in the API will not 7599 // be included in the string output. The member name will be present, but the 7600 // value will be replaced with "sensitive". 7601 func (s ValidateResourcePolicyOutput) GoString() string { 7602 return s.String() 7603 } 7604 7605 // SetPolicyValidationPassed sets the PolicyValidationPassed field's value. 7606 func (s *ValidateResourcePolicyOutput) SetPolicyValidationPassed(v bool) *ValidateResourcePolicyOutput { 7607 s.PolicyValidationPassed = &v 7608 return s 7609 } 7610 7611 // SetValidationErrors sets the ValidationErrors field's value. 7612 func (s *ValidateResourcePolicyOutput) SetValidationErrors(v []*ValidationErrorsEntry) *ValidateResourcePolicyOutput { 7613 s.ValidationErrors = v 7614 return s 7615 } 7616 7617 // Displays errors that occurred during validation of the resource policy. 7618 type ValidationErrorsEntry struct { 7619 _ struct{} `type:"structure"` 7620 7621 // Checks the name of the policy. 7622 CheckName *string `min:"1" type:"string"` 7623 7624 // Displays error messages if validation encounters problems during validation 7625 // of the resource policy. 7626 ErrorMessage *string `type:"string"` 7627 } 7628 7629 // String returns the string representation. 7630 // 7631 // API parameter values that are decorated as "sensitive" in the API will not 7632 // be included in the string output. The member name will be present, but the 7633 // value will be replaced with "sensitive". 7634 func (s ValidationErrorsEntry) String() string { 7635 return awsutil.Prettify(s) 7636 } 7637 7638 // GoString returns the string representation. 7639 // 7640 // API parameter values that are decorated as "sensitive" in the API will not 7641 // be included in the string output. The member name will be present, but the 7642 // value will be replaced with "sensitive". 7643 func (s ValidationErrorsEntry) GoString() string { 7644 return s.String() 7645 } 7646 7647 // SetCheckName sets the CheckName field's value. 7648 func (s *ValidationErrorsEntry) SetCheckName(v string) *ValidationErrorsEntry { 7649 s.CheckName = &v 7650 return s 7651 } 7652 7653 // SetErrorMessage sets the ErrorMessage field's value. 7654 func (s *ValidationErrorsEntry) SetErrorMessage(v string) *ValidationErrorsEntry { 7655 s.ErrorMessage = &v 7656 return s 7657 } 7658 7659 const ( 7660 // FilterNameStringTypeDescription is a FilterNameStringType enum value 7661 FilterNameStringTypeDescription = "description" 7662 7663 // FilterNameStringTypeName is a FilterNameStringType enum value 7664 FilterNameStringTypeName = "name" 7665 7666 // FilterNameStringTypeTagKey is a FilterNameStringType enum value 7667 FilterNameStringTypeTagKey = "tag-key" 7668 7669 // FilterNameStringTypeTagValue is a FilterNameStringType enum value 7670 FilterNameStringTypeTagValue = "tag-value" 7671 7672 // FilterNameStringTypePrimaryRegion is a FilterNameStringType enum value 7673 FilterNameStringTypePrimaryRegion = "primary-region" 7674 7675 // FilterNameStringTypeAll is a FilterNameStringType enum value 7676 FilterNameStringTypeAll = "all" 7677 ) 7678 7679 // FilterNameStringType_Values returns all elements of the FilterNameStringType enum 7680 func FilterNameStringType_Values() []string { 7681 return []string{ 7682 FilterNameStringTypeDescription, 7683 FilterNameStringTypeName, 7684 FilterNameStringTypeTagKey, 7685 FilterNameStringTypeTagValue, 7686 FilterNameStringTypePrimaryRegion, 7687 FilterNameStringTypeAll, 7688 } 7689 } 7690 7691 const ( 7692 // SortOrderTypeAsc is a SortOrderType enum value 7693 SortOrderTypeAsc = "asc" 7694 7695 // SortOrderTypeDesc is a SortOrderType enum value 7696 SortOrderTypeDesc = "desc" 7697 ) 7698 7699 // SortOrderType_Values returns all elements of the SortOrderType enum 7700 func SortOrderType_Values() []string { 7701 return []string{ 7702 SortOrderTypeAsc, 7703 SortOrderTypeDesc, 7704 } 7705 } 7706 7707 const ( 7708 // StatusTypeInSync is a StatusType enum value 7709 StatusTypeInSync = "InSync" 7710 7711 // StatusTypeFailed is a StatusType enum value 7712 StatusTypeFailed = "Failed" 7713 7714 // StatusTypeInProgress is a StatusType enum value 7715 StatusTypeInProgress = "InProgress" 7716 ) 7717 7718 // StatusType_Values returns all elements of the StatusType enum 7719 func StatusType_Values() []string { 7720 return []string{ 7721 StatusTypeInSync, 7722 StatusTypeFailed, 7723 StatusTypeInProgress, 7724 } 7725 }