aws-sdk-secretsmanager 1.84.0 → 1.110.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,98 @@
10
10
  module Aws::SecretsManager
11
11
  module Types
12
12
 
13
+ # The error Secrets Manager encountered while retrieving an individual
14
+ # secret as part of BatchGetSecretValue.
15
+ #
16
+ # @!attribute [rw] secret_id
17
+ # The ARN or name of the secret.
18
+ # @return [String]
19
+ #
20
+ # @!attribute [rw] error_code
21
+ # The error Secrets Manager encountered while retrieving an individual
22
+ # secret as part of BatchGetSecretValue, for example
23
+ # `ResourceNotFoundException`,`InvalidParameterException`,
24
+ # `InvalidRequestException`, `DecryptionFailure`, or
25
+ # `AccessDeniedException`.
26
+ # @return [String]
27
+ #
28
+ # @!attribute [rw] message
29
+ # A message describing the error.
30
+ # @return [String]
31
+ #
32
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/APIErrorType AWS API Documentation
33
+ #
34
+ class APIErrorType < Struct.new(
35
+ :secret_id,
36
+ :error_code,
37
+ :message)
38
+ SENSITIVE = []
39
+ include Aws::Structure
40
+ end
41
+
42
+ # @!attribute [rw] secret_id_list
43
+ # The ARN or names of the secrets to retrieve. You must include
44
+ # `Filters` or `SecretIdList`, but not both.
45
+ # @return [Array<String>]
46
+ #
47
+ # @!attribute [rw] filters
48
+ # The filters to choose which secrets to retrieve. You must include
49
+ # `Filters` or `SecretIdList`, but not both.
50
+ # @return [Array<Types::Filter>]
51
+ #
52
+ # @!attribute [rw] max_results
53
+ # The number of results to include in the response.
54
+ #
55
+ # If there are more results available, in the response, Secrets
56
+ # Manager includes `NextToken`. To get the next results, call
57
+ # `BatchGetSecretValue` again with the value from `NextToken`. To use
58
+ # this parameter, you must also use the `Filters` parameter.
59
+ # @return [Integer]
60
+ #
61
+ # @!attribute [rw] next_token
62
+ # A token that indicates where the output should continue from, if a
63
+ # previous call did not show all results. To get the next results,
64
+ # call `BatchGetSecretValue` again with this value.
65
+ # @return [String]
66
+ #
67
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/BatchGetSecretValueRequest AWS API Documentation
68
+ #
69
+ class BatchGetSecretValueRequest < Struct.new(
70
+ :secret_id_list,
71
+ :filters,
72
+ :max_results,
73
+ :next_token)
74
+ SENSITIVE = []
75
+ include Aws::Structure
76
+ end
77
+
78
+ # @!attribute [rw] secret_values
79
+ # A list of secret values.
80
+ # @return [Array<Types::SecretValueEntry>]
81
+ #
82
+ # @!attribute [rw] next_token
83
+ # Secrets Manager includes this value if there's more output
84
+ # available than what is included in the current response. This can
85
+ # occur even when the response includes no values at all, such as when
86
+ # you ask for a filtered view of a long list. To get the next results,
87
+ # call `BatchGetSecretValue` again with this value.
88
+ # @return [String]
89
+ #
90
+ # @!attribute [rw] errors
91
+ # A list of errors Secrets Manager encountered while attempting to
92
+ # retrieve individual secrets.
93
+ # @return [Array<Types::APIErrorType>]
94
+ #
95
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/BatchGetSecretValueResponse AWS API Documentation
96
+ #
97
+ class BatchGetSecretValueResponse < Struct.new(
98
+ :secret_values,
99
+ :next_token,
100
+ :errors)
101
+ SENSITIVE = []
102
+ include Aws::Structure
103
+ end
104
+
13
105
  # @!attribute [rw] secret_id
14
106
  # The ARN or name of the secret.
15
107
  #
@@ -151,6 +243,11 @@ module Aws::SecretsManager
151
243
  # both.
152
244
  #
153
245
  # This parameter is not available in the Secrets Manager console.
246
+ #
247
+ # Sensitive: This field contains sensitive information, so the service
248
+ # does not include it in CloudTrail log entries. If you create your
249
+ # own log entries, you must also avoid logging the information in this
250
+ # field.
154
251
  # @return [String]
155
252
  #
156
253
  # @!attribute [rw] secret_string
@@ -166,13 +263,18 @@ module Aws::SecretsManager
166
263
  # `SecretString` parameter. The Secrets Manager console stores the
167
264
  # information as a JSON structure of key/value pairs that a Lambda
168
265
  # rotation function can parse.
266
+ #
267
+ # Sensitive: This field contains sensitive information, so the service
268
+ # does not include it in CloudTrail log entries. If you create your
269
+ # own log entries, you must also avoid logging the information in this
270
+ # field.
169
271
  # @return [String]
170
272
  #
171
273
  # @!attribute [rw] tags
172
274
  # A list of tags to attach to the secret. Each tag is a key and value
173
275
  # pair of strings in a JSON text string, for example:
174
276
  #
175
- # `[\{"Key":"CostCenter","Value":"12345"\},\{"Key":"environment","Value":"production"\}]`
277
+ # `[{"Key":"CostCenter","Value":"12345"},{"Key":"environment","Value":"production"}]`
176
278
  #
177
279
  # Secrets Manager tag key names are case sensitive. A tag with the key
178
280
  # "ABC" is a different tag from one with key "abc".
@@ -435,6 +537,8 @@ module Aws::SecretsManager
435
537
  #
436
538
  # @!attribute [rw] rotation_enabled
437
539
  # Specifies whether automatic rotation is turned on for this secret.
540
+ # If the secret has never been configured for rotation, Secrets
541
+ # Manager returns null.
438
542
  #
439
543
  # To turn on rotation, use RotateSecret. To turn off rotation, use
440
544
  # CancelRotateSecret.
@@ -455,8 +559,8 @@ module Aws::SecretsManager
455
559
  #
456
560
  # @!attribute [rw] last_rotated_date
457
561
  # The last date and time that Secrets Manager rotated the secret. If
458
- # the secret isn't configured for rotation, Secrets Manager returns
459
- # null.
562
+ # the secret isn't configured for rotation or rotation has been
563
+ # disabled, Secrets Manager returns null.
460
564
  # @return [Time]
461
565
  #
462
566
  # @!attribute [rw] last_changed_date
@@ -482,8 +586,15 @@ module Aws::SecretsManager
482
586
  #
483
587
  # @!attribute [rw] next_rotation_date
484
588
  # The next rotation is scheduled to occur on or before this date. If
485
- # the secret isn't configured for rotation, Secrets Manager returns
486
- # null.
589
+ # the secret isn't configured for rotation or rotation has been
590
+ # disabled, Secrets Manager returns null. If rotation fails, Secrets
591
+ # Manager retries the entire rotation process multiple times. If
592
+ # rotation is unsuccessful, this date may be in the past.
593
+ #
594
+ # This date represents the latest date that rotation will occur, but
595
+ # it is not an approximate rotation date. In some cases, for example
596
+ # if you turn off automatic rotation and then turn it back on, the
597
+ # next rotation may occur much sooner than this date.
487
598
  # @return [Time]
488
599
  #
489
600
  # @!attribute [rw] tags
@@ -656,7 +767,7 @@ module Aws::SecretsManager
656
767
  # @!attribute [rw] exclude_punctuation
657
768
  # Specifies whether to exclude the following punctuation characters
658
769
  # from the password: `` ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [
659
- # \ ] ^ _ ` \{ | \} ~ ``. If you don't include this switch, the
770
+ # \ ] ^ _ ` { | } ~ ``. If you don't include this switch, the
660
771
  # password can contain punctuation.
661
772
  # @return [Boolean]
662
773
  #
@@ -762,7 +873,8 @@ module Aws::SecretsManager
762
873
  end
763
874
 
764
875
  # @!attribute [rw] secret_id
765
- # The ARN or name of the secret to retrieve.
876
+ # The ARN or name of the secret to retrieve. To retrieve a secret from
877
+ # another account, you must use an ARN.
766
878
  #
767
879
  # For an ARN, we recommend that you specify a complete ARN rather than
768
880
  # a partial ARN. See [Finding a secret from a partial ARN][1].
@@ -821,18 +933,20 @@ module Aws::SecretsManager
821
933
  #
822
934
  # @!attribute [rw] secret_binary
823
935
  # The decrypted secret value, if the secret value was originally
824
- # provided as binary data in the form of a byte array. The response
825
- # parameter represents the binary data as a [base64-encoded][1]
826
- # string.
936
+ # provided as binary data in the form of a byte array. When you
937
+ # retrieve a `SecretBinary` using the HTTP API, the Python SDK, or the
938
+ # Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it
939
+ # is not encoded.
827
940
  #
828
941
  # If the secret was created by using the Secrets Manager console, or
829
942
  # if the secret value was originally provided as a string, then this
830
943
  # field is omitted. The secret value appears in `SecretString`
831
944
  # instead.
832
945
  #
833
- #
834
- #
835
- # [1]: https://tools.ietf.org/html/rfc4648#section-4
946
+ # Sensitive: This field contains sensitive information, so the service
947
+ # does not include it in CloudTrail log entries. If you create your
948
+ # own log entries, you must also avoid logging the information in this
949
+ # field.
836
950
  # @return [String]
837
951
  #
838
952
  # @!attribute [rw] secret_string
@@ -842,6 +956,11 @@ module Aws::SecretsManager
842
956
  # If this secret was created by using the console, then Secrets
843
957
  # Manager stores the information as a JSON structure of key/value
844
958
  # pairs.
959
+ #
960
+ # Sensitive: This field contains sensitive information, so the service
961
+ # does not include it in CloudTrail log entries. If you create your
962
+ # own log entries, you must also avoid logging the information in this
963
+ # field.
845
964
  # @return [String]
846
965
  #
847
966
  # @!attribute [rw] version_stages
@@ -1151,6 +1270,27 @@ module Aws::SecretsManager
1151
1270
  # Specifies whether to block resource-based policies that allow broad
1152
1271
  # access to the secret, for example those that use a wildcard for the
1153
1272
  # principal. By default, public policies aren't blocked.
1273
+ #
1274
+ # Resource policy validation and the BlockPublicPolicy parameter help
1275
+ # protect your resources by preventing public access from being
1276
+ # granted through the resource policies that are directly attached to
1277
+ # your secrets. In addition to using these features, carefully inspect
1278
+ # the following policies to confirm that they do not grant public
1279
+ # access:
1280
+ #
1281
+ # * Identity-based policies attached to associated Amazon Web
1282
+ # Services
1283
+ # principals (for example, IAM roles)
1284
+ #
1285
+ # * Resource-based policies attached to associated Amazon Web Services
1286
+ # resources (for example, Key Management Service (KMS) keys)
1287
+ #
1288
+ # To review permissions to your secrets, see [Determine who has
1289
+ # permissions to your secrets][1].
1290
+ #
1291
+ #
1292
+ #
1293
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/determine-acccess_examine-iam-policies.html
1154
1294
  # @return [Boolean]
1155
1295
  #
1156
1296
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutResourcePolicyRequest AWS API Documentation
@@ -1246,6 +1386,11 @@ module Aws::SecretsManager
1246
1386
  # You must include `SecretBinary` or `SecretString`, but not both.
1247
1387
  #
1248
1388
  # You can't access this value from the Secrets Manager console.
1389
+ #
1390
+ # Sensitive: This field contains sensitive information, so the service
1391
+ # does not include it in CloudTrail log entries. If you create your
1392
+ # own log entries, you must also avoid logging the information in this
1393
+ # field.
1249
1394
  # @return [String]
1250
1395
  #
1251
1396
  # @!attribute [rw] secret_string
@@ -1255,6 +1400,11 @@ module Aws::SecretsManager
1255
1400
  #
1256
1401
  # We recommend you create the secret string as JSON key/value pairs,
1257
1402
  # as shown in the example.
1403
+ #
1404
+ # Sensitive: This field contains sensitive information, so the service
1405
+ # does not include it in CloudTrail log entries. If you create your
1406
+ # own log entries, you must also avoid logging the information in this
1407
+ # field.
1258
1408
  # @return [String]
1259
1409
  #
1260
1410
  # @!attribute [rw] version_stages
@@ -1273,6 +1423,24 @@ module Aws::SecretsManager
1273
1423
  # automatically moves the staging label `AWSCURRENT` to this version.
1274
1424
  # @return [Array<String>]
1275
1425
  #
1426
+ # @!attribute [rw] rotation_token
1427
+ # A unique identifier that indicates the source of the request. For
1428
+ # cross-account rotation (when you rotate a secret in one account by
1429
+ # using a Lambda rotation function in another account) and the Lambda
1430
+ # rotation function assumes an IAM role to call Secrets Manager,
1431
+ # Secrets Manager validates the identity with the rotation token. For
1432
+ # more information, see [How rotation works][1].
1433
+ #
1434
+ # Sensitive: This field contains sensitive information, so the service
1435
+ # does not include it in CloudTrail log entries. If you create your
1436
+ # own log entries, you must also avoid logging the information in this
1437
+ # field.
1438
+ #
1439
+ #
1440
+ #
1441
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html
1442
+ # @return [String]
1443
+ #
1276
1444
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutSecretValueRequest AWS API Documentation
1277
1445
  #
1278
1446
  class PutSecretValueRequest < Struct.new(
@@ -1280,8 +1448,9 @@ module Aws::SecretsManager
1280
1448
  :client_request_token,
1281
1449
  :secret_binary,
1282
1450
  :secret_string,
1283
- :version_stages)
1284
- SENSITIVE = [:secret_binary, :secret_string]
1451
+ :version_stages,
1452
+ :rotation_token)
1453
+ SENSITIVE = [:secret_binary, :secret_string, :rotation_token]
1285
1454
  include Aws::Structure
1286
1455
  end
1287
1456
 
@@ -1588,7 +1757,7 @@ module Aws::SecretsManager
1588
1757
  #
1589
1758
  #
1590
1759
  #
1591
- # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html
1760
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_lambda-functions.html#rotate-secrets_lambda-functions-code
1592
1761
  # @return [Boolean]
1593
1762
  #
1594
1763
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RotateSecretRequest AWS API Documentation
@@ -1715,10 +1884,7 @@ module Aws::SecretsManager
1715
1884
  # @return [String]
1716
1885
  #
1717
1886
  # @!attribute [rw] name
1718
- # The friendly name of the secret. You can use forward slashes in the
1719
- # name to represent a path hierarchy. For example,
1720
- # `/prod/databases/dbserver1` could represent the secret for a server
1721
- # named `dbserver1` in the folder `databases` in the folder `prod`.
1887
+ # The friendly name of the secret.
1722
1888
  # @return [String]
1723
1889
  #
1724
1890
  # @!attribute [rw] description
@@ -1779,8 +1945,8 @@ module Aws::SecretsManager
1779
1945
  #
1780
1946
  # @!attribute [rw] next_rotation_date
1781
1947
  # The next rotation is scheduled to occur on or before this date. If
1782
- # the secret isn't configured for rotation, Secrets Manager returns
1783
- # null.
1948
+ # the secret isn't configured for rotation or rotation has been
1949
+ # disabled, Secrets Manager returns null.
1784
1950
  # @return [Time]
1785
1951
  #
1786
1952
  # @!attribute [rw] tags
@@ -1843,6 +2009,59 @@ module Aws::SecretsManager
1843
2009
  include Aws::Structure
1844
2010
  end
1845
2011
 
2012
+ # A structure that contains the secret value and other details for a
2013
+ # secret.
2014
+ #
2015
+ # @!attribute [rw] arn
2016
+ # The Amazon Resource Name (ARN) of the secret.
2017
+ # @return [String]
2018
+ #
2019
+ # @!attribute [rw] name
2020
+ # The friendly name of the secret.
2021
+ # @return [String]
2022
+ #
2023
+ # @!attribute [rw] version_id
2024
+ # The unique version identifier of this version of the secret.
2025
+ # @return [String]
2026
+ #
2027
+ # @!attribute [rw] secret_binary
2028
+ # The decrypted secret value, if the secret value was originally
2029
+ # provided as binary data in the form of a byte array. The parameter
2030
+ # represents the binary data as a [base64-encoded][1] string.
2031
+ #
2032
+ #
2033
+ #
2034
+ # [1]: https://tools.ietf.org/html/rfc4648#section-4
2035
+ # @return [String]
2036
+ #
2037
+ # @!attribute [rw] secret_string
2038
+ # The decrypted secret value, if the secret value was originally
2039
+ # provided as a string or through the Secrets Manager console.
2040
+ # @return [String]
2041
+ #
2042
+ # @!attribute [rw] version_stages
2043
+ # A list of all of the staging labels currently attached to this
2044
+ # version of the secret.
2045
+ # @return [Array<String>]
2046
+ #
2047
+ # @!attribute [rw] created_date
2048
+ # The date the secret was created.
2049
+ # @return [Time]
2050
+ #
2051
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/SecretValueEntry AWS API Documentation
2052
+ #
2053
+ class SecretValueEntry < Struct.new(
2054
+ :arn,
2055
+ :name,
2056
+ :version_id,
2057
+ :secret_binary,
2058
+ :secret_string,
2059
+ :version_stages,
2060
+ :created_date)
2061
+ SENSITIVE = [:secret_binary, :secret_string]
2062
+ include Aws::Structure
2063
+ end
2064
+
1846
2065
  # A structure that contains information about one version of a secret.
1847
2066
  #
1848
2067
  # @!attribute [rw] version_id
@@ -2047,7 +2266,7 @@ module Aws::SecretsManager
2047
2266
  # to encrypt new secret versions as well as any existing versions with
2048
2267
  # the staging labels `AWSCURRENT`, `AWSPENDING`, or `AWSPREVIOUS`. If
2049
2268
  # you don't have `kms:Encrypt` permission to the new key, Secrets
2050
- # Manager does not re-ecrypt existing secret versions with the new
2269
+ # Manager does not re-encrypt existing secret versions with the new
2051
2270
  # key. For more information about versions and staging labels, see
2052
2271
  # [Concepts: Version][1].
2053
2272
  #
@@ -2086,6 +2305,11 @@ module Aws::SecretsManager
2086
2305
  # both.
2087
2306
  #
2088
2307
  # You can't access this parameter in the Secrets Manager console.
2308
+ #
2309
+ # Sensitive: This field contains sensitive information, so the service
2310
+ # does not include it in CloudTrail log entries. If you create your
2311
+ # own log entries, you must also avoid logging the information in this
2312
+ # field.
2089
2313
  # @return [String]
2090
2314
  #
2091
2315
  # @!attribute [rw] secret_string
@@ -2095,6 +2319,11 @@ module Aws::SecretsManager
2095
2319
  #
2096
2320
  # Either `SecretBinary` or `SecretString` must have a value, but not
2097
2321
  # both.
2322
+ #
2323
+ # Sensitive: This field contains sensitive information, so the service
2324
+ # does not include it in CloudTrail log entries. If you create your
2325
+ # own log entries, you must also avoid logging the information in this
2326
+ # field.
2098
2327
  # @return [String]
2099
2328
  #
2100
2329
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecretRequest AWS API Documentation
@@ -2198,7 +2427,8 @@ module Aws::SecretsManager
2198
2427
  end
2199
2428
 
2200
2429
  # @!attribute [rw] secret_id
2201
- # This field is reserved for internal use.
2430
+ # The ARN or name of the secret with the resource-based policy you
2431
+ # want to validate.
2202
2432
  # @return [String]
2203
2433
  #
2204
2434
  # @!attribute [rw] resource_policy
@@ -2261,3 +2491,4 @@ module Aws::SecretsManager
2261
2491
 
2262
2492
  end
2263
2493
  end
2494
+
@@ -11,16 +11,7 @@
11
11
  require 'aws-sdk-core'
12
12
  require 'aws-sigv4'
13
13
 
14
- require_relative 'aws-sdk-secretsmanager/types'
15
- require_relative 'aws-sdk-secretsmanager/client_api'
16
- require_relative 'aws-sdk-secretsmanager/plugins/endpoints.rb'
17
- require_relative 'aws-sdk-secretsmanager/client'
18
- require_relative 'aws-sdk-secretsmanager/errors'
19
- require_relative 'aws-sdk-secretsmanager/resource'
20
- require_relative 'aws-sdk-secretsmanager/endpoint_parameters'
21
- require_relative 'aws-sdk-secretsmanager/endpoint_provider'
22
- require_relative 'aws-sdk-secretsmanager/endpoints'
23
- require_relative 'aws-sdk-secretsmanager/customizations'
14
+ Aws::Plugins::GlobalConfiguration.add_identifier(:secretsmanager)
24
15
 
25
16
  # This module provides support for AWS Secrets Manager. This module is available in the
26
17
  # `aws-sdk-secretsmanager` gem.
@@ -32,7 +23,7 @@ require_relative 'aws-sdk-secretsmanager/customizations'
32
23
  # structure.
33
24
  #
34
25
  # secrets_manager = Aws::SecretsManager::Client.new
35
- # resp = secrets_manager.cancel_rotate_secret(params)
26
+ # resp = secrets_manager.batch_get_secret_value(params)
36
27
  #
37
28
  # See {Client} for more information.
38
29
  #
@@ -51,7 +42,20 @@ require_relative 'aws-sdk-secretsmanager/customizations'
51
42
  #
52
43
  # @!group service
53
44
  module Aws::SecretsManager
45
+ autoload :Types, 'aws-sdk-secretsmanager/types'
46
+ autoload :ClientApi, 'aws-sdk-secretsmanager/client_api'
47
+ module Plugins
48
+ autoload :Endpoints, 'aws-sdk-secretsmanager/plugins/endpoints.rb'
49
+ end
50
+ autoload :Client, 'aws-sdk-secretsmanager/client'
51
+ autoload :Errors, 'aws-sdk-secretsmanager/errors'
52
+ autoload :Resource, 'aws-sdk-secretsmanager/resource'
53
+ autoload :EndpointParameters, 'aws-sdk-secretsmanager/endpoint_parameters'
54
+ autoload :EndpointProvider, 'aws-sdk-secretsmanager/endpoint_provider'
55
+ autoload :Endpoints, 'aws-sdk-secretsmanager/endpoints'
54
56
 
55
- GEM_VERSION = '1.84.0'
57
+ GEM_VERSION = '1.110.0'
56
58
 
57
59
  end
60
+
61
+ require_relative 'aws-sdk-secretsmanager/customizations'