aws-sdk-secretsmanager 1.31.0 → 1.113.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.
@@ -1,64 +1,141 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # WARNING ABOUT GENERATED CODE
2
4
  #
3
5
  # This file is generated. See the contributing guide for more information:
4
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
5
7
  #
6
8
  # WARNING ABOUT GENERATED CODE
7
9
 
8
10
  module Aws::SecretsManager
9
11
  module Types
10
12
 
11
- # @note When making an API call, you may pass CancelRotateSecretRequest
12
- # data as a hash:
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>]
13
81
  #
14
- # {
15
- # secret_id: "SecretIdType", # required
16
- # }
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
17
96
  #
97
+ class BatchGetSecretValueResponse < Struct.new(
98
+ :secret_values,
99
+ :next_token,
100
+ :errors)
101
+ SENSITIVE = []
102
+ include Aws::Structure
103
+ end
104
+
18
105
  # @!attribute [rw] secret_id
19
- # Specifies the secret for which you want to cancel a rotation
20
- # request. You can specify either the Amazon Resource Name (ARN) or
21
- # the friendly name of the secret.
22
- #
23
- # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
24
- # complete ARN. You can specify a partial ARN too—for example, if you
25
- # don’t include the final hyphen and six random characters that
26
- # Secrets Manager adds at the end of the ARN when you created the
27
- # secret. A partial ARN match can work as long as it uniquely matches
28
- # only one secret. However, if your secret has a name that ends in a
29
- # hyphen followed by six characters (before Secrets Manager adds the
30
- # hyphen and six characters to the ARN) and you try to use that as a
31
- # partial ARN, then those characters cause Secrets Manager to assume
32
- # that you’re specifying a complete ARN. This confusion can cause
33
- # unexpected results. To avoid this situation, we recommend that you
34
- # don’t create secret names that end with a hyphen followed by six
35
- # characters.
106
+ # The ARN or name of the secret.
36
107
  #
37
- # </note>
108
+ # For an ARN, we recommend that you specify a complete ARN rather than
109
+ # a partial ARN. See [Finding a secret from a partial ARN][1].
110
+ #
111
+ #
112
+ #
113
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
38
114
  # @return [String]
39
115
  #
40
116
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CancelRotateSecretRequest AWS API Documentation
41
117
  #
42
118
  class CancelRotateSecretRequest < Struct.new(
43
119
  :secret_id)
120
+ SENSITIVE = []
44
121
  include Aws::Structure
45
122
  end
46
123
 
47
124
  # @!attribute [rw] arn
48
- # The ARN of the secret for which rotation was canceled.
125
+ # The ARN of the secret.
49
126
  # @return [String]
50
127
  #
51
128
  # @!attribute [rw] name
52
- # The friendly name of the secret for which rotation was canceled.
129
+ # The name of the secret.
53
130
  # @return [String]
54
131
  #
55
132
  # @!attribute [rw] version_id
56
- # The unique identifier of the version of the secret that was created
57
- # during the rotation. This version might not be complete, and should
58
- # be evaluated for possible deletion. At the very least, you should
59
- # remove the `VersionStage` value `AWSPENDING` to enable this version
60
- # to be deleted. Failing to clean up a cancelled rotation can block
61
- # you from successfully starting future rotations.
133
+ # The unique identifier of the version of the secret created during
134
+ # the rotation. This version might not be complete, and should be
135
+ # evaluated for possible deletion. We recommend that you remove the
136
+ # `VersionStage` value `AWSPENDING` from this version so that Secrets
137
+ # Manager can delete it. Failing to clean up a cancelled rotation can
138
+ # block you from starting future rotations.
62
139
  # @return [String]
63
140
  #
64
141
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CancelRotateSecretResponse AWS API Documentation
@@ -67,57 +144,39 @@ module Aws::SecretsManager
67
144
  :arn,
68
145
  :name,
69
146
  :version_id)
147
+ SENSITIVE = []
70
148
  include Aws::Structure
71
149
  end
72
150
 
73
- # @note When making an API call, you may pass CreateSecretRequest
74
- # data as a hash:
75
- #
76
- # {
77
- # name: "NameType", # required
78
- # client_request_token: "ClientRequestTokenType",
79
- # description: "DescriptionType",
80
- # kms_key_id: "KmsKeyIdType",
81
- # secret_binary: "data",
82
- # secret_string: "SecretStringType",
83
- # tags: [
84
- # {
85
- # key: "TagKeyType",
86
- # value: "TagValueType",
87
- # },
88
- # ],
89
- # }
90
- #
91
151
  # @!attribute [rw] name
92
- # Specifies the friendly name of the new secret.
152
+ # The name of the new secret.
93
153
  #
94
- # The secret name must be ASCII letters, digits, or the following
95
- # characters : /\_+=.@-
154
+ # The secret name can contain ASCII letters, numbers, and the
155
+ # following characters: /\_+=.@-
96
156
  #
97
- # <note markdown="1"> Don't end your secret name with a hyphen followed by six
157
+ # Do not end your secret name with a hyphen followed by six
98
158
  # characters. If you do so, you risk confusion and unexpected results
99
- # when searching for a secret by partial ARN. This is because Secrets
100
- # Manager automatically adds a hyphen and six random characters at the
101
- # end of the ARN.
102
- #
103
- # </note>
159
+ # when searching for a secret by partial ARN. Secrets Manager
160
+ # automatically adds a hyphen and six random characters after the
161
+ # secret name at the end of the ARN.
104
162
  # @return [String]
105
163
  #
106
164
  # @!attribute [rw] client_request_token
107
- # (Optional) If you include `SecretString` or `SecretBinary`, then an
108
- # initial version is created as part of the secret, and this parameter
109
- # specifies a unique identifier for the new version.
110
- #
111
- # <note markdown="1"> If you use the AWS CLI or one of the AWS SDK to call this operation,
112
- # then you can leave this parameter empty. The CLI or SDK generates a
113
- # random UUID for you and includes it as the value for this parameter
114
- # in the request. If you don't use the SDK and instead generate a raw
115
- # HTTP request to the Secrets Manager service endpoint, then you must
116
- # generate a `ClientRequestToken` yourself for the new version and
117
- # include that value in the request.
165
+ # If you include `SecretString` or `SecretBinary`, then Secrets
166
+ # Manager creates an initial version for the secret, and this
167
+ # parameter specifies the unique identifier for the new version.
168
+ #
169
+ # <note markdown="1"> If you use the Amazon Web Services CLI or one of the Amazon Web
170
+ # Services SDKs to call this operation, then you can leave this
171
+ # parameter empty. The CLI or SDK generates a random UUID for you and
172
+ # includes it as the value for this parameter in the request.
118
173
  #
119
174
  # </note>
120
175
  #
176
+ # If you generate a raw HTTP request to the Secrets Manager service
177
+ # endpoint, then you must generate a `ClientRequestToken` and include
178
+ # it in the request.
179
+ #
121
180
  # This value helps ensure idempotency. Secrets Manager uses this value
122
181
  # to prevent the accidental creation of duplicate versions if there
123
182
  # are failures and retries during a rotation. We recommend that you
@@ -127,15 +186,14 @@ module Aws::SecretsManager
127
186
  # * If the `ClientRequestToken` value isn't already associated with a
128
187
  # version of the secret then a new version of the secret is created.
129
188
  #
130
- # * If a version with this value already exists and that version's
189
+ # * If a version with this value already exists and the version
131
190
  # `SecretString` and `SecretBinary` values are the same as those in
132
- # the request, then the request is ignored (the operation is
133
- # idempotent).
191
+ # the request, then the request is ignored.
134
192
  #
135
193
  # * If a version with this value already exists and that version's
136
194
  # `SecretString` and `SecretBinary` values are different from those
137
- # in the request then the request fails because you cannot modify an
138
- # existing version. Instead, use PutSecretValue to create a new
195
+ # in the request, then the request fails because you cannot modify
196
+ # an existing version. Instead, use PutSecretValue to create a new
139
197
  # version.
140
198
  #
141
199
  # This value becomes the `VersionId` of the new version.
@@ -149,126 +207,111 @@ module Aws::SecretsManager
149
207
  # @return [String]
150
208
  #
151
209
  # @!attribute [rw] description
152
- # (Optional) Specifies a user-provided description of the secret.
210
+ # The description of the secret.
153
211
  # @return [String]
154
212
  #
155
213
  # @!attribute [rw] kms_key_id
156
- # (Optional) Specifies the ARN, Key ID, or alias of the AWS KMS
157
- # customer master key (CMK) to be used to encrypt the `SecretString`
158
- # or `SecretBinary` values in the versions stored in this secret.
214
+ # The ARN, key ID, or alias of the KMS key that Secrets Manager uses
215
+ # to encrypt the secret value in the secret. An alias is always
216
+ # prefixed by `alias/`, for example `alias/aws/secretsmanager`. For
217
+ # more information, see [About aliases][1].
159
218
  #
160
- # You can specify any of the supported ways to identify a AWS KMS key
161
- # ID. If you need to reference a CMK in a different account, you can
162
- # use only the key ARN or the alias ARN.
219
+ # To use a KMS key in a different account, use the key ARN or the
220
+ # alias ARN.
163
221
  #
164
- # If you don't specify this value, then Secrets Manager defaults to
165
- # using the AWS account's default CMK (the one named
166
- # `aws/secretsmanager`). If a AWS KMS CMK with that name doesn't yet
167
- # exist, then Secrets Manager creates it for you automatically the
168
- # first time it needs to encrypt a version's `SecretString` or
169
- # `SecretBinary` fields.
222
+ # If you don't specify this value, then Secrets Manager uses the key
223
+ # `aws/secretsmanager`. If that key doesn't yet exist, then Secrets
224
+ # Manager creates it for you automatically the first time it encrypts
225
+ # the secret value.
170
226
  #
171
- # You can use the account's default CMK to encrypt and decrypt only
172
- # if you call this operation using credentials from the same account
173
- # that owns the secret. If the secret is in a different account, then
174
- # you must create a custom CMK and specify the ARN in this field.
227
+ # If the secret is in a different Amazon Web Services account from the
228
+ # credentials calling the API, then you can't use
229
+ # `aws/secretsmanager` to encrypt the secret, and you must create and
230
+ # use a customer managed KMS key.
231
+ #
232
+ #
233
+ #
234
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/alias-about.html
175
235
  # @return [String]
176
236
  #
177
237
  # @!attribute [rw] secret_binary
178
- # (Optional) Specifies binary data that you want to encrypt and store
179
- # in the new version of the secret. To use this parameter in the
180
- # command-line tools, we recommend that you store your binary data in
181
- # a file and then use the appropriate technique for your tool to pass
182
- # the contents of the file as a parameter.
238
+ # The binary data to encrypt and store in the new version of the
239
+ # secret. We recommend that you store your binary data in a file and
240
+ # then pass the contents of the file as a parameter.
183
241
  #
184
242
  # Either `SecretString` or `SecretBinary` must have a value, but not
185
- # both. They cannot both be empty.
243
+ # both.
186
244
  #
187
- # This parameter is not available using the Secrets Manager console.
188
- # It can be accessed only by using the AWS CLI or one of the AWS SDKs.
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.
189
251
  # @return [String]
190
252
  #
191
253
  # @!attribute [rw] secret_string
192
- # (Optional) Specifies text data that you want to encrypt and store in
193
- # this new version of the secret.
254
+ # The text data to encrypt and store in this new version of the
255
+ # secret. We recommend you use a JSON structure of key/value pairs for
256
+ # your secret value.
194
257
  #
195
258
  # Either `SecretString` or `SecretBinary` must have a value, but not
196
- # both. They cannot both be empty.
259
+ # both.
197
260
  #
198
261
  # If you create a secret by using the Secrets Manager console then
199
262
  # Secrets Manager puts the protected secret text in only the
200
263
  # `SecretString` parameter. The Secrets Manager console stores the
201
- # information as a JSON structure of key/value pairs that the Lambda
202
- # rotation function knows how to parse.
203
- #
204
- # For storing multiple values, we recommend that you use a JSON text
205
- # string argument and specify key/value pairs. For information on how
206
- # to format a JSON parameter for the various command line tool
207
- # environments, see [Using JSON for Parameters][1] in the *AWS CLI
208
- # User Guide*. For example:
209
- #
210
- # `[\{"username":"bob"\},\{"password":"abc123xyz456"\}]`
211
- #
212
- # If your command-line tool or SDK requires quotation marks around the
213
- # parameter, you should use single quotes to avoid confusion with the
214
- # double quotes required in the JSON text.
264
+ # information as a JSON structure of key/value pairs that a Lambda
265
+ # rotation function can parse.
215
266
  #
216
- #
217
- #
218
- # [1]: https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json
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.
219
271
  # @return [String]
220
272
  #
221
273
  # @!attribute [rw] tags
222
- # (Optional) Specifies a list of user-defined tags that are attached
223
- # to the secret. Each tag is a "Key" and "Value" pair of strings.
224
- # This operation only appends tags to the existing list of tags. To
225
- # remove tags, you must use UntagResource.
274
+ # A list of tags to attach to the secret. Each tag is a key and value
275
+ # pair of strings in a JSON text string, for example:
226
276
  #
227
- # * Secrets Manager tag key names are case sensitive. A tag with the
228
- # key "ABC" is a different tag from one with key "abc".
277
+ # `[{"Key":"CostCenter","Value":"12345"},{"Key":"environment","Value":"production"}]`
229
278
  #
230
- # * If you check tags in IAM policy `Condition` elements as part of
231
- # your security strategy, then adding or removing a tag can change
232
- # permissions. If the successful completion of this operation would
233
- # result in you losing your permissions for this secret, then this
234
- # operation is blocked and returns an `Access Denied` error.
279
+ # Secrets Manager tag key names are case sensitive. A tag with the key
280
+ # "ABC" is a different tag from one with key "abc".
235
281
  #
236
- # This parameter requires a JSON text string argument. For information
237
- # on how to format a JSON parameter for the various command line tool
238
- # environments, see [Using JSON for Parameters][1] in the *AWS CLI
239
- # User Guide*. For example:
240
- #
241
- # `[\{"Key":"CostCenter","Value":"12345"\},\{"Key":"environment","Value":"production"\}]`
282
+ # If you check tags in permissions policies as part of your security
283
+ # strategy, then adding or removing a tag can change permissions. If
284
+ # the completion of this operation would result in you losing your
285
+ # permissions for this secret, then Secrets Manager blocks the
286
+ # operation and returns an `Access Denied` error. For more
287
+ # information, see [Control access to secrets using tags][1] and
288
+ # [Limit access to identities with tags that match secrets' tags][2].
242
289
  #
290
+ # For information about how to format a JSON parameter for the various
291
+ # command line tool environments, see [Using JSON for Parameters][3].
243
292
  # If your command-line tool or SDK requires quotation marks around the
244
293
  # parameter, you should use single quotes to avoid confusion with the
245
294
  # double quotes required in the JSON text.
246
295
  #
247
- # The following basic restrictions apply to tags:
248
- #
249
- # * Maximum number of tags per secret—50
296
+ # For tag quotas and naming restrictions, see [Service quotas for
297
+ # Tagging][4] in the *Amazon Web Services General Reference guide*.
250
298
  #
251
- # * Maximum key length—127 Unicode characters in UTF-8
252
299
  #
253
- # * Maximum value length—255 Unicode characters in UTF-8
254
- #
255
- # * Tag keys and values are case sensitive.
256
- #
257
- # * Do not use the `aws:` prefix in your tag names or values because
258
- # it is reserved for AWS use. You can't edit or delete tag names or
259
- # values with this prefix. Tags with this prefix do not count
260
- # against your tags per secret limit.
261
- #
262
- # * If your tagging schema will be used across multiple services and
263
- # resources, remember that other services might have restrictions on
264
- # allowed characters. Generally allowed characters are: letters,
265
- # spaces, and numbers representable in UTF-8, plus the following
266
- # special characters: + - = . \_ : / @.
267
300
  #
301
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html#tag-secrets-abac
302
+ # [2]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html#auth-and-access_tags2
303
+ # [3]: https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json
304
+ # [4]: https://docs.aws.amazon.com/general/latest/gr/arg.html#taged-reference-quotas
305
+ # @return [Array<Types::Tag>]
268
306
  #
307
+ # @!attribute [rw] add_replica_regions
308
+ # A list of Regions and KMS keys to replicate secrets.
309
+ # @return [Array<Types::ReplicaRegionType>]
269
310
  #
270
- # [1]: https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json
271
- # @return [Array<Types::Tag>]
311
+ # @!attribute [rw] force_overwrite_replica_secret
312
+ # Specifies whether to overwrite a secret with the same name in the
313
+ # destination Region. By default, secrets aren't overwritten.
314
+ # @return [Boolean]
272
315
  #
273
316
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CreateSecretRequest AWS API Documentation
274
317
  #
@@ -279,39 +322,48 @@ module Aws::SecretsManager
279
322
  :kms_key_id,
280
323
  :secret_binary,
281
324
  :secret_string,
282
- :tags)
325
+ :tags,
326
+ :add_replica_regions,
327
+ :force_overwrite_replica_secret)
328
+ SENSITIVE = [:secret_binary, :secret_string]
283
329
  include Aws::Structure
284
330
  end
285
331
 
286
332
  # @!attribute [rw] arn
287
- # The Amazon Resource Name (ARN) of the secret that you just created.
288
- #
289
- # <note markdown="1"> Secrets Manager automatically adds several random characters to the
290
- # name at the end of the ARN when you initially create a secret. This
291
- # affects only the ARN and not the actual friendly name. This ensures
292
- # that if you create a new secret with the same name as an old secret
293
- # that you previously deleted, then users with access to the old
294
- # secret *don't* automatically get access to the new secret because
333
+ # The ARN of the new secret. The ARN includes the name of the secret
334
+ # followed by six random characters. This ensures that if you create a
335
+ # new secret with the same name as a deleted secret, then users with
336
+ # access to the old secret don't get access to the new secret because
295
337
  # the ARNs are different.
296
- #
297
- # </note>
298
338
  # @return [String]
299
339
  #
300
340
  # @!attribute [rw] name
301
- # The friendly name of the secret that you just created.
341
+ # The name of the new secret.
302
342
  # @return [String]
303
343
  #
304
344
  # @!attribute [rw] version_id
305
- # The unique identifier that's associated with the version of the
306
- # secret you just created.
345
+ # The unique identifier associated with the version of the new secret.
307
346
  # @return [String]
308
347
  #
348
+ # @!attribute [rw] replication_status
349
+ # A list of the replicas of this secret and their status:
350
+ #
351
+ # * `Failed`, which indicates that the replica was not created.
352
+ #
353
+ # * `InProgress`, which indicates that Secrets Manager is in the
354
+ # process of creating the replica.
355
+ #
356
+ # * `InSync`, which indicates that the replica was created.
357
+ # @return [Array<Types::ReplicationStatusType>]
358
+ #
309
359
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CreateSecretResponse AWS API Documentation
310
360
  #
311
361
  class CreateSecretResponse < Struct.new(
312
362
  :arn,
313
363
  :name,
314
- :version_id)
364
+ :version_id,
365
+ :replication_status)
366
+ SENSITIVE = []
315
367
  include Aws::Structure
316
368
  end
317
369
 
@@ -325,42 +377,27 @@ module Aws::SecretsManager
325
377
  #
326
378
  class DecryptionFailure < Struct.new(
327
379
  :message)
380
+ SENSITIVE = []
328
381
  include Aws::Structure
329
382
  end
330
383
 
331
- # @note When making an API call, you may pass DeleteResourcePolicyRequest
332
- # data as a hash:
384
+ # @!attribute [rw] secret_id
385
+ # The ARN or name of the secret to delete the attached resource-based
386
+ # policy for.
333
387
  #
334
- # {
335
- # secret_id: "SecretIdType", # required
336
- # }
388
+ # For an ARN, we recommend that you specify a complete ARN rather than
389
+ # a partial ARN. See [Finding a secret from a partial ARN][1].
337
390
  #
338
- # @!attribute [rw] secret_id
339
- # Specifies the secret that you want to delete the attached
340
- # resource-based policy for. You can specify either the Amazon
341
- # Resource Name (ARN) or the friendly name of the secret.
342
- #
343
- # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
344
- # complete ARN. You can specify a partial ARN too—for example, if you
345
- # don’t include the final hyphen and six random characters that
346
- # Secrets Manager adds at the end of the ARN when you created the
347
- # secret. A partial ARN match can work as long as it uniquely matches
348
- # only one secret. However, if your secret has a name that ends in a
349
- # hyphen followed by six characters (before Secrets Manager adds the
350
- # hyphen and six characters to the ARN) and you try to use that as a
351
- # partial ARN, then those characters cause Secrets Manager to assume
352
- # that you’re specifying a complete ARN. This confusion can cause
353
- # unexpected results. To avoid this situation, we recommend that you
354
- # don’t create secret names that end with a hyphen followed by six
355
- # characters.
356
391
  #
357
- # </note>
392
+ #
393
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
358
394
  # @return [String]
359
395
  #
360
396
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteResourcePolicyRequest AWS API Documentation
361
397
  #
362
398
  class DeleteResourcePolicyRequest < Struct.new(
363
399
  :secret_id)
400
+ SENSITIVE = []
364
401
  include Aws::Structure
365
402
  end
366
403
 
@@ -370,8 +407,8 @@ module Aws::SecretsManager
370
407
  # @return [String]
371
408
  #
372
409
  # @!attribute [rw] name
373
- # The friendly name of the secret that the resource-based policy was
374
- # deleted for.
410
+ # The name of the secret that the resource-based policy was deleted
411
+ # for.
375
412
  # @return [String]
376
413
  #
377
414
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteResourcePolicyResponse AWS API Documentation
@@ -379,64 +416,50 @@ module Aws::SecretsManager
379
416
  class DeleteResourcePolicyResponse < Struct.new(
380
417
  :arn,
381
418
  :name)
419
+ SENSITIVE = []
382
420
  include Aws::Structure
383
421
  end
384
422
 
385
- # @note When making an API call, you may pass DeleteSecretRequest
386
- # data as a hash:
423
+ # @!attribute [rw] secret_id
424
+ # The ARN or name of the secret to delete.
387
425
  #
388
- # {
389
- # secret_id: "SecretIdType", # required
390
- # recovery_window_in_days: 1,
391
- # force_delete_without_recovery: false,
392
- # }
426
+ # For an ARN, we recommend that you specify a complete ARN rather than
427
+ # a partial ARN. See [Finding a secret from a partial ARN][1].
393
428
  #
394
- # @!attribute [rw] secret_id
395
- # Specifies the secret that you want to delete. You can specify either
396
- # the Amazon Resource Name (ARN) or the friendly name of the secret.
397
- #
398
- # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
399
- # complete ARN. You can specify a partial ARN too—for example, if you
400
- # don’t include the final hyphen and six random characters that
401
- # Secrets Manager adds at the end of the ARN when you created the
402
- # secret. A partial ARN match can work as long as it uniquely matches
403
- # only one secret. However, if your secret has a name that ends in a
404
- # hyphen followed by six characters (before Secrets Manager adds the
405
- # hyphen and six characters to the ARN) and you try to use that as a
406
- # partial ARN, then those characters cause Secrets Manager to assume
407
- # that you’re specifying a complete ARN. This confusion can cause
408
- # unexpected results. To avoid this situation, we recommend that you
409
- # don’t create secret names that end with a hyphen followed by six
410
- # characters.
411
429
  #
412
- # </note>
430
+ #
431
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
413
432
  # @return [String]
414
433
  #
415
434
  # @!attribute [rw] recovery_window_in_days
416
- # (Optional) Specifies the number of days that Secrets Manager waits
417
- # before it can delete the secret. You can't use both this parameter
418
- # and the `ForceDeleteWithoutRecovery` parameter in the same API call.
419
- #
420
- # This value can range from 7 to 30 days. The default value is 30.
435
+ # The number of days from 7 to 30 that Secrets Manager waits before
436
+ # permanently deleting the secret. You can't use both this parameter
437
+ # and `ForceDeleteWithoutRecovery` in the same call. If you don't use
438
+ # either, then by default Secrets Manager uses a 30 day recovery
439
+ # window.
421
440
  # @return [Integer]
422
441
  #
423
442
  # @!attribute [rw] force_delete_without_recovery
424
- # (Optional) Specifies that the secret is to be deleted without any
425
- # recovery window. You can't use both this parameter and the
426
- # `RecoveryWindowInDays` parameter in the same API call.
443
+ # Specifies whether to delete the secret without any recovery window.
444
+ # You can't use both this parameter and `RecoveryWindowInDays` in the
445
+ # same call. If you don't use either, then by default Secrets Manager
446
+ # uses a 30 day recovery window.
427
447
  #
428
- # An asynchronous background process performs the actual deletion, so
429
- # there can be a short delay before the operation completes. If you
430
- # write code to delete and then immediately recreate a secret with the
431
- # same name, ensure that your code includes appropriate back off and
432
- # retry logic.
448
+ # Secrets Manager performs the actual deletion with an asynchronous
449
+ # background process, so there might be a short delay before the
450
+ # secret is permanently deleted. If you delete a secret and then
451
+ # immediately create a secret with the same name, use appropriate back
452
+ # off and retry logic.
453
+ #
454
+ # If you forcibly delete an already deleted or nonexistent secret, the
455
+ # operation does not return `ResourceNotFoundException`.
433
456
  #
434
457
  # Use this parameter with caution. This parameter causes the operation
435
- # to skip the normal waiting period before the permanent deletion that
436
- # AWS would normally impose with the `RecoveryWindowInDays` parameter.
437
- # If you delete a secret with the `ForceDeleteWithouRecovery`
438
- # parameter, then you have no opportunity to recover the secret. It is
439
- # permanently lost.
458
+ # to skip the normal recovery window before the permanent deletion
459
+ # that Secrets Manager would normally impose with the
460
+ # `RecoveryWindowInDays` parameter. If you delete a secret with the
461
+ # `ForceDeleteWithoutRecovery` parameter, then you have no opportunity
462
+ # to recover the secret. You lose the secret permanently.
440
463
  # @return [Boolean]
441
464
  #
442
465
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteSecretRequest AWS API Documentation
@@ -445,22 +468,23 @@ module Aws::SecretsManager
445
468
  :secret_id,
446
469
  :recovery_window_in_days,
447
470
  :force_delete_without_recovery)
471
+ SENSITIVE = []
448
472
  include Aws::Structure
449
473
  end
450
474
 
451
475
  # @!attribute [rw] arn
452
- # The ARN of the secret that is now scheduled for deletion.
476
+ # The ARN of the secret.
453
477
  # @return [String]
454
478
  #
455
479
  # @!attribute [rw] name
456
- # The friendly name of the secret that is now scheduled for deletion.
480
+ # The name of the secret.
457
481
  # @return [String]
458
482
  #
459
483
  # @!attribute [rw] deletion_date
460
- # The date and time after which this secret can be deleted by Secrets
461
- # Manager and can no longer be restored. This value is the date and
462
- # time of the delete request plus the number of days specified in
463
- # `RecoveryWindowInDays`.
484
+ # The date and time after which this secret Secrets Manager can
485
+ # permanently delete this secret, and it can no longer be restored.
486
+ # This value is the date and time of the delete request plus the
487
+ # number of days in `RecoveryWindowInDays`.
464
488
  # @return [Time]
465
489
  #
466
490
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteSecretResponse AWS API Documentation
@@ -469,42 +493,26 @@ module Aws::SecretsManager
469
493
  :arn,
470
494
  :name,
471
495
  :deletion_date)
496
+ SENSITIVE = []
472
497
  include Aws::Structure
473
498
  end
474
499
 
475
- # @note When making an API call, you may pass DescribeSecretRequest
476
- # data as a hash:
500
+ # @!attribute [rw] secret_id
501
+ # The ARN or name of the secret.
477
502
  #
478
- # {
479
- # secret_id: "SecretIdType", # required
480
- # }
503
+ # For an ARN, we recommend that you specify a complete ARN rather than
504
+ # a partial ARN. See [Finding a secret from a partial ARN][1].
481
505
  #
482
- # @!attribute [rw] secret_id
483
- # The identifier of the secret whose details you want to retrieve. You
484
- # can specify either the Amazon Resource Name (ARN) or the friendly
485
- # name of the secret.
486
- #
487
- # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
488
- # complete ARN. You can specify a partial ARN too—for example, if you
489
- # don’t include the final hyphen and six random characters that
490
- # Secrets Manager adds at the end of the ARN when you created the
491
- # secret. A partial ARN match can work as long as it uniquely matches
492
- # only one secret. However, if your secret has a name that ends in a
493
- # hyphen followed by six characters (before Secrets Manager adds the
494
- # hyphen and six characters to the ARN) and you try to use that as a
495
- # partial ARN, then those characters cause Secrets Manager to assume
496
- # that you’re specifying a complete ARN. This confusion can cause
497
- # unexpected results. To avoid this situation, we recommend that you
498
- # don’t create secret names that end with a hyphen followed by six
499
- # characters.
500
506
  #
501
- # </note>
507
+ #
508
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
502
509
  # @return [String]
503
510
  #
504
511
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DescribeSecretRequest AWS API Documentation
505
512
  #
506
513
  class DescribeSecretRequest < Struct.new(
507
514
  :secret_id)
515
+ SENSITIVE = []
508
516
  include Aws::Structure
509
517
  end
510
518
 
@@ -513,44 +521,46 @@ module Aws::SecretsManager
513
521
  # @return [String]
514
522
  #
515
523
  # @!attribute [rw] name
516
- # The user-provided friendly name of the secret.
524
+ # The name of the secret.
517
525
  # @return [String]
518
526
  #
519
527
  # @!attribute [rw] description
520
- # The user-provided description of the secret.
528
+ # The description of the secret.
521
529
  # @return [String]
522
530
  #
523
531
  # @!attribute [rw] kms_key_id
524
- # The ARN or alias of the AWS KMS customer master key (CMK) that's
525
- # used to encrypt the `SecretString` or `SecretBinary` fields in each
526
- # version of the secret. If you don't provide a key, then Secrets
527
- # Manager defaults to encrypting the secret fields with the default
528
- # AWS KMS CMK (the one named `awssecretsmanager`) for this account.
532
+ # The key ID or alias ARN of the KMS key that Secrets Manager uses to
533
+ # encrypt the secret value. If the secret is encrypted with the Amazon
534
+ # Web Services managed key `aws/secretsmanager`, this field is
535
+ # omitted. Secrets created using the console use an KMS key ID.
529
536
  # @return [String]
530
537
  #
531
538
  # @!attribute [rw] rotation_enabled
532
- # Specifies whether automatic rotation is enabled for this secret.
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.
533
542
  #
534
- # To enable rotation, use RotateSecret with
535
- # `AutomaticallyRotateAfterDays` set to a value greater than 0. To
536
- # disable rotation, use CancelRotateSecret.
543
+ # To turn on rotation, use RotateSecret. To turn off rotation, use
544
+ # CancelRotateSecret.
537
545
  # @return [Boolean]
538
546
  #
539
547
  # @!attribute [rw] rotation_lambda_arn
540
- # The ARN of a Lambda function that's invoked by Secrets Manager to
541
- # rotate the secret either automatically per the schedule or manually
542
- # by a call to `RotateSecret`.
548
+ # The ARN of the Lambda function that Secrets Manager invokes to
549
+ # rotate the secret.
543
550
  # @return [String]
544
551
  #
545
552
  # @!attribute [rw] rotation_rules
546
- # A structure that contains the rotation configuration for this
547
- # secret.
553
+ # The rotation schedule and Lambda function for this secret. If the
554
+ # secret previously had rotation turned on, but it is now turned off,
555
+ # this field shows the previous rotation schedule and rotation
556
+ # function. If the secret never had rotation turned on, this field is
557
+ # omitted.
548
558
  # @return [Types::RotationRulesType]
549
559
  #
550
560
  # @!attribute [rw] last_rotated_date
551
- # The most recent date and time that the Secrets Manager rotation
552
- # process was successfully completed. This value is null if the secret
553
- # has never rotated.
561
+ # The last date and time that Secrets Manager rotated the secret. If
562
+ # the secret isn't configured for rotation or rotation has been
563
+ # disabled, Secrets Manager returns null.
554
564
  # @return [Time]
555
565
  #
556
566
  # @!attribute [rw] last_changed_date
@@ -558,43 +568,100 @@ module Aws::SecretsManager
558
568
  # @return [Time]
559
569
  #
560
570
  # @!attribute [rw] last_accessed_date
561
- # The last date that this secret was accessed. This value is truncated
562
- # to midnight of the date and therefore shows only the date, not the
563
- # time.
571
+ # The date that the secret was last accessed in the Region. This field
572
+ # is omitted if the secret has never been retrieved in the Region.
564
573
  # @return [Time]
565
574
  #
566
575
  # @!attribute [rw] deleted_date
567
- # This value exists if the secret is scheduled for deletion. Some time
568
- # after the specified date and time, Secrets Manager deletes the
569
- # secret and all of its versions.
576
+ # The date the secret is scheduled for deletion. If it is not
577
+ # scheduled for deletion, this field is omitted. When you delete a
578
+ # secret, Secrets Manager requires a recovery window of at least 7
579
+ # days before deleting the secret. Some time after the deleted date,
580
+ # Secrets Manager deletes the secret, including all of its versions.
570
581
  #
571
582
  # If a secret is scheduled for deletion, then its details, including
572
- # the encrypted secret information, is not accessible. To cancel a
573
- # scheduled deletion and restore access, use RestoreSecret.
583
+ # the encrypted secret value, is not accessible. To cancel a scheduled
584
+ # deletion and restore access to the secret, use RestoreSecret.
585
+ # @return [Time]
586
+ #
587
+ # @!attribute [rw] next_rotation_date
588
+ # The next rotation is scheduled to occur on or before this date. If
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.
574
598
  # @return [Time]
575
599
  #
576
600
  # @!attribute [rw] tags
577
- # The list of user-defined tags that are associated with the secret.
578
- # To add tags to a secret, use TagResource. To remove tags, use
579
- # UntagResource.
601
+ # The list of tags attached to the secret. To add tags to a secret,
602
+ # use TagResource. To remove tags, use UntagResource.
580
603
  # @return [Array<Types::Tag>]
581
604
  #
582
605
  # @!attribute [rw] version_ids_to_stages
583
- # A list of all of the currently assigned `VersionStage` staging
584
- # labels and the `VersionId` that each is attached to. Staging labels
585
- # are used to keep track of the different versions during the rotation
586
- # process.
606
+ # A list of the versions of the secret that have staging labels
607
+ # attached. Versions that don't have staging labels are considered
608
+ # deprecated and Secrets Manager can delete them.
587
609
  #
588
- # <note markdown="1"> A version that does not have any staging labels attached is
589
- # considered deprecated and subject to deletion. Such versions are not
590
- # included in this list.
610
+ # Secrets Manager uses staging labels to indicate the status of a
611
+ # secret version during rotation. The three staging labels for
612
+ # rotation are:
591
613
  #
592
- # </note>
614
+ # * `AWSCURRENT`, which indicates the current version of the secret.
615
+ #
616
+ # * `AWSPENDING`, which indicates the version of the secret that
617
+ # contains new secret information that will become the next current
618
+ # version when rotation finishes.
619
+ #
620
+ # During rotation, Secrets Manager creates an `AWSPENDING` version
621
+ # ID before creating the new secret version. To check if a secret
622
+ # version exists, call GetSecretValue.
623
+ #
624
+ # * `AWSPREVIOUS`, which indicates the previous current version of the
625
+ # secret. You can use this as the *last known good* version.
626
+ #
627
+ # For more information about rotation and staging labels, see [How
628
+ # rotation works][1].
629
+ #
630
+ #
631
+ #
632
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html
593
633
  # @return [Hash<String,Array<String>>]
594
634
  #
595
635
  # @!attribute [rw] owning_service
636
+ # The ID of the service that created this secret. For more
637
+ # information, see [Secrets managed by other Amazon Web Services
638
+ # services][1].
639
+ #
640
+ #
641
+ #
642
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html
643
+ # @return [String]
644
+ #
645
+ # @!attribute [rw] created_date
646
+ # The date the secret was created.
647
+ # @return [Time]
648
+ #
649
+ # @!attribute [rw] primary_region
650
+ # The Region the secret is in. If a secret is replicated to other
651
+ # Regions, the replicas are listed in `ReplicationStatus`.
596
652
  # @return [String]
597
653
  #
654
+ # @!attribute [rw] replication_status
655
+ # A list of the replicas of this secret and their status:
656
+ #
657
+ # * `Failed`, which indicates that the replica was not created.
658
+ #
659
+ # * `InProgress`, which indicates that Secrets Manager is in the
660
+ # process of creating the replica.
661
+ #
662
+ # * `InSync`, which indicates that the replica was created.
663
+ # @return [Array<Types::ReplicationStatusType>]
664
+ #
598
665
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DescribeSecretResponse AWS API Documentation
599
666
  #
600
667
  class DescribeSecretResponse < Struct.new(
@@ -609,20 +676,25 @@ module Aws::SecretsManager
609
676
  :last_changed_date,
610
677
  :last_accessed_date,
611
678
  :deleted_date,
679
+ :next_rotation_date,
612
680
  :tags,
613
681
  :version_ids_to_stages,
614
- :owning_service)
682
+ :owning_service,
683
+ :created_date,
684
+ :primary_region,
685
+ :replication_status)
686
+ SENSITIVE = []
615
687
  include Aws::Structure
616
688
  end
617
689
 
618
690
  # Secrets Manager can't encrypt the protected secret text using the
619
- # provided KMS key. Check that the customer master key (CMK) is
620
- # available, enabled, and not in an invalid state. For more information,
621
- # see [How Key State Affects Use of a Customer Master Key][1].
691
+ # provided KMS key. Check that the KMS key is available, enabled, and
692
+ # not in an invalid state. For more information, see [Key state: Effect
693
+ # on your KMS key][1].
622
694
  #
623
695
  #
624
696
  #
625
- # [1]: http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
697
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
626
698
  #
627
699
  # @!attribute [rw] message
628
700
  # @return [String]
@@ -631,76 +703,95 @@ module Aws::SecretsManager
631
703
  #
632
704
  class EncryptionFailure < Struct.new(
633
705
  :message)
706
+ SENSITIVE = []
634
707
  include Aws::Structure
635
708
  end
636
709
 
637
- # @note When making an API call, you may pass GetRandomPasswordRequest
638
- # data as a hash:
710
+ # Allows you to add filters when you use the search function in Secrets
711
+ # Manager. For more information, see [Find secrets in Secrets
712
+ # Manager][1].
713
+ #
714
+ #
639
715
  #
640
- # {
641
- # password_length: 1,
642
- # exclude_characters: "ExcludeCharactersType",
643
- # exclude_numbers: false,
644
- # exclude_punctuation: false,
645
- # exclude_uppercase: false,
646
- # exclude_lowercase: false,
647
- # include_space: false,
648
- # require_each_included_type: false,
649
- # }
716
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/manage_search-secret.html
650
717
  #
718
+ # @!attribute [rw] key
719
+ # The following are keys you can use:
720
+ #
721
+ # * **description**: Prefix match, not case-sensitive.
722
+ #
723
+ # * **name**: Prefix match, case-sensitive.
724
+ #
725
+ # * **tag-key**: Prefix match, case-sensitive.
726
+ #
727
+ # * **tag-value**: Prefix match, case-sensitive.
728
+ #
729
+ # * **primary-region**: Prefix match, case-sensitive.
730
+ #
731
+ # * **owning-service**: Prefix match, case-sensitive.
732
+ #
733
+ # * **all**: Breaks the filter value string into words and then
734
+ # searches all attributes for matches. Not case-sensitive.
735
+ # @return [String]
736
+ #
737
+ # @!attribute [rw] values
738
+ # The keyword to filter for.
739
+ #
740
+ # You can prefix your search value with an exclamation mark (`!`) in
741
+ # order to perform negation filters.
742
+ # @return [Array<String>]
743
+ #
744
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/Filter AWS API Documentation
745
+ #
746
+ class Filter < Struct.new(
747
+ :key,
748
+ :values)
749
+ SENSITIVE = []
750
+ include Aws::Structure
751
+ end
752
+
651
753
  # @!attribute [rw] password_length
652
- # The desired length of the generated password. The default value if
653
- # you do not include this parameter is 32 characters.
754
+ # The length of the password. If you don't include this parameter,
755
+ # the default length is 32 characters.
654
756
  # @return [Integer]
655
757
  #
656
758
  # @!attribute [rw] exclude_characters
657
- # A string that includes characters that should not be included in the
658
- # generated password. The default is that all characters from the
659
- # included sets can be used.
759
+ # A string of the characters that you don't want in the password.
660
760
  # @return [String]
661
761
  #
662
762
  # @!attribute [rw] exclude_numbers
663
- # Specifies that the generated password should not include digits. The
664
- # default if you do not include this switch parameter is that digits
665
- # can be included.
763
+ # Specifies whether to exclude numbers from the password. If you
764
+ # don't include this switch, the password can contain numbers.
666
765
  # @return [Boolean]
667
766
  #
668
767
  # @!attribute [rw] exclude_punctuation
669
- # Specifies that the generated password should not include punctuation
670
- # characters. The default if you do not include this switch parameter
671
- # is that punctuation characters can be included.
672
- #
673
- # The following are the punctuation characters that *can* be included
674
- # in the generated password if you don't explicitly exclude them with
675
- # `ExcludeCharacters` or `ExcludePunctuation`\:
676
- #
677
- # `` ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` \{ | \} ~
678
- # ``
768
+ # Specifies whether to exclude the following punctuation characters
769
+ # from the password: `` ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [
770
+ # \ ] ^ _ ` { | } ~ ``. If you don't include this switch, the
771
+ # password can contain punctuation.
679
772
  # @return [Boolean]
680
773
  #
681
774
  # @!attribute [rw] exclude_uppercase
682
- # Specifies that the generated password should not include uppercase
683
- # letters. The default if you do not include this switch parameter is
684
- # that uppercase letters can be included.
775
+ # Specifies whether to exclude uppercase letters from the password. If
776
+ # you don't include this switch, the password can contain uppercase
777
+ # letters.
685
778
  # @return [Boolean]
686
779
  #
687
780
  # @!attribute [rw] exclude_lowercase
688
- # Specifies that the generated password should not include lowercase
689
- # letters. The default if you do not include this switch parameter is
690
- # that lowercase letters can be included.
781
+ # Specifies whether to exclude lowercase letters from the password. If
782
+ # you don't include this switch, the password can contain lowercase
783
+ # letters.
691
784
  # @return [Boolean]
692
785
  #
693
786
  # @!attribute [rw] include_space
694
- # Specifies that the generated password can include the space
695
- # character. The default if you do not include this switch parameter
696
- # is that the space character is not included.
787
+ # Specifies whether to include the space character. If you include
788
+ # this switch, the password can contain space characters.
697
789
  # @return [Boolean]
698
790
  #
699
791
  # @!attribute [rw] require_each_included_type
700
- # A boolean value that specifies whether the generated password must
701
- # include at least one of every allowed character type. The default
702
- # value is `True` and the operation requires at least one of every
703
- # character type.
792
+ # Specifies whether to include at least one upper and lowercase
793
+ # letter, one number, and one punctuation. If you don't include this
794
+ # switch, the password contains at least one of every character type.
704
795
  # @return [Boolean]
705
796
  #
706
797
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetRandomPasswordRequest AWS API Documentation
@@ -714,53 +805,39 @@ module Aws::SecretsManager
714
805
  :exclude_lowercase,
715
806
  :include_space,
716
807
  :require_each_included_type)
808
+ SENSITIVE = []
717
809
  include Aws::Structure
718
810
  end
719
811
 
720
812
  # @!attribute [rw] random_password
721
- # A string with the generated password.
813
+ # A string with the password.
722
814
  # @return [String]
723
815
  #
724
816
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetRandomPasswordResponse AWS API Documentation
725
817
  #
726
818
  class GetRandomPasswordResponse < Struct.new(
727
819
  :random_password)
820
+ SENSITIVE = [:random_password]
728
821
  include Aws::Structure
729
822
  end
730
823
 
731
- # @note When making an API call, you may pass GetResourcePolicyRequest
732
- # data as a hash:
824
+ # @!attribute [rw] secret_id
825
+ # The ARN or name of the secret to retrieve the attached
826
+ # resource-based policy for.
733
827
  #
734
- # {
735
- # secret_id: "SecretIdType", # required
736
- # }
828
+ # For an ARN, we recommend that you specify a complete ARN rather than
829
+ # a partial ARN. See [Finding a secret from a partial ARN][1].
737
830
  #
738
- # @!attribute [rw] secret_id
739
- # Specifies the secret that you want to retrieve the attached
740
- # resource-based policy for. You can specify either the Amazon
741
- # Resource Name (ARN) or the friendly name of the secret.
742
- #
743
- # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
744
- # complete ARN. You can specify a partial ARN too—for example, if you
745
- # don’t include the final hyphen and six random characters that
746
- # Secrets Manager adds at the end of the ARN when you created the
747
- # secret. A partial ARN match can work as long as it uniquely matches
748
- # only one secret. However, if your secret has a name that ends in a
749
- # hyphen followed by six characters (before Secrets Manager adds the
750
- # hyphen and six characters to the ARN) and you try to use that as a
751
- # partial ARN, then those characters cause Secrets Manager to assume
752
- # that you’re specifying a complete ARN. This confusion can cause
753
- # unexpected results. To avoid this situation, we recommend that you
754
- # don’t create secret names that end with a hyphen followed by six
755
- # characters.
756
831
  #
757
- # </note>
832
+ #
833
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
758
834
  # @return [String]
759
835
  #
760
836
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetResourcePolicyRequest AWS API Documentation
761
837
  #
762
838
  class GetResourcePolicyRequest < Struct.new(
763
839
  :secret_id)
840
+ SENSITIVE = []
764
841
  include Aws::Structure
765
842
  end
766
843
 
@@ -770,22 +847,19 @@ module Aws::SecretsManager
770
847
  # @return [String]
771
848
  #
772
849
  # @!attribute [rw] name
773
- # The friendly name of the secret that the resource-based policy was
774
- # retrieved for.
850
+ # The name of the secret that the resource-based policy was retrieved
851
+ # for.
775
852
  # @return [String]
776
853
  #
777
854
  # @!attribute [rw] resource_policy
778
- # A JSON-formatted string that describes the permissions that are
779
- # associated with the attached secret. These permissions are combined
780
- # with any permissions that are associated with the user or role that
781
- # attempts to access this secret. The combined permissions specify who
782
- # can access the secret and what actions they can perform. For more
783
- # information, see [Authentication and Access Control for AWS Secrets
784
- # Manager][1] in the *AWS Secrets Manager User Guide*.
855
+ # A JSON-formatted string that contains the permissions policy
856
+ # attached to the secret. For more information about permissions
857
+ # policies, see [Authentication and access control for Secrets
858
+ # Manager][1].
785
859
  #
786
860
  #
787
861
  #
788
- # [1]: http://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
862
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
789
863
  # @return [String]
790
864
  #
791
865
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetResourcePolicyResponse AWS API Documentation
@@ -794,47 +868,28 @@ module Aws::SecretsManager
794
868
  :arn,
795
869
  :name,
796
870
  :resource_policy)
871
+ SENSITIVE = []
797
872
  include Aws::Structure
798
873
  end
799
874
 
800
- # @note When making an API call, you may pass GetSecretValueRequest
801
- # data as a hash:
875
+ # @!attribute [rw] secret_id
876
+ # The ARN or name of the secret to retrieve. To retrieve a secret from
877
+ # another account, you must use an ARN.
802
878
  #
803
- # {
804
- # secret_id: "SecretIdType", # required
805
- # version_id: "SecretVersionIdType",
806
- # version_stage: "SecretVersionStageType",
807
- # }
879
+ # For an ARN, we recommend that you specify a complete ARN rather than
880
+ # a partial ARN. See [Finding a secret from a partial ARN][1].
808
881
  #
809
- # @!attribute [rw] secret_id
810
- # Specifies the secret containing the version that you want to
811
- # retrieve. You can specify either the Amazon Resource Name (ARN) or
812
- # the friendly name of the secret.
813
- #
814
- # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
815
- # complete ARN. You can specify a partial ARN too—for example, if you
816
- # don’t include the final hyphen and six random characters that
817
- # Secrets Manager adds at the end of the ARN when you created the
818
- # secret. A partial ARN match can work as long as it uniquely matches
819
- # only one secret. However, if your secret has a name that ends in a
820
- # hyphen followed by six characters (before Secrets Manager adds the
821
- # hyphen and six characters to the ARN) and you try to use that as a
822
- # partial ARN, then those characters cause Secrets Manager to assume
823
- # that you’re specifying a complete ARN. This confusion can cause
824
- # unexpected results. To avoid this situation, we recommend that you
825
- # don’t create secret names that end with a hyphen followed by six
826
- # characters.
827
882
  #
828
- # </note>
883
+ #
884
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
829
885
  # @return [String]
830
886
  #
831
887
  # @!attribute [rw] version_id
832
- # Specifies the unique identifier of the version of the secret that
833
- # you want to retrieve. If you specify this parameter then don't
834
- # specify `VersionStage`. If you don't specify either a
835
- # `VersionStage` or `VersionId` then the default is to perform the
836
- # operation on the version with the `VersionStage` value of
837
- # `AWSCURRENT`.
888
+ # The unique identifier of the version of the secret to retrieve. If
889
+ # you include both this parameter and `VersionStage`, the two
890
+ # parameters must refer to the same secret version. If you don't
891
+ # specify either a `VersionStage` or `VersionId`, then Secrets Manager
892
+ # returns the `AWSCURRENT` version.
838
893
  #
839
894
  # This value is typically a [UUID-type][1] value with 32 hexadecimal
840
895
  # digits.
@@ -845,14 +900,13 @@ module Aws::SecretsManager
845
900
  # @return [String]
846
901
  #
847
902
  # @!attribute [rw] version_stage
848
- # Specifies the secret version that you want to retrieve by the
849
- # staging label attached to the version.
903
+ # The staging label of the version of the secret to retrieve.
850
904
  #
851
- # Staging labels are used to keep track of different versions during
852
- # the rotation process. If you use this parameter then don't specify
853
- # `VersionId`. If you don't specify either a `VersionStage` or
854
- # `VersionId`, then the default is to perform the operation on the
855
- # version with the `VersionStage` value of `AWSCURRENT`.
905
+ # Secrets Manager uses staging labels to keep track of different
906
+ # versions during the rotation process. If you include both this
907
+ # parameter and `VersionId`, the two parameters must refer to the same
908
+ # secret version. If you don't specify either a `VersionStage` or
909
+ # `VersionId`, Secrets Manager returns the `AWSCURRENT` version.
856
910
  # @return [String]
857
911
  #
858
912
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetSecretValueRequest AWS API Documentation
@@ -861,6 +915,7 @@ module Aws::SecretsManager
861
915
  :secret_id,
862
916
  :version_id,
863
917
  :version_stage)
918
+ SENSITIVE = []
864
919
  include Aws::Structure
865
920
  end
866
921
 
@@ -877,37 +932,35 @@ module Aws::SecretsManager
877
932
  # @return [String]
878
933
  #
879
934
  # @!attribute [rw] secret_binary
880
- # The decrypted part of the protected secret information that was
881
- # originally provided as binary data in the form of a byte array. The
882
- # response parameter represents the binary data as a
883
- # [base64-encoded][1] string.
884
- #
885
- # This parameter is not used if the secret is created by the Secrets
886
- # Manager console.
887
- #
888
- # If you store custom information in this field of the secret, then
889
- # you must code your Lambda rotation function to parse and interpret
890
- # whatever you store in the `SecretString` or `SecretBinary` fields.
891
- #
935
+ # The decrypted secret value, if the secret value was originally
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.
892
940
  #
941
+ # If the secret was created by using the Secrets Manager console, or
942
+ # if the secret value was originally provided as a string, then this
943
+ # field is omitted. The secret value appears in `SecretString`
944
+ # instead.
893
945
  #
894
- # [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.
895
950
  # @return [String]
896
951
  #
897
952
  # @!attribute [rw] secret_string
898
- # The decrypted part of the protected secret information that was
899
- # originally provided as a string.
953
+ # The decrypted secret value, if the secret value was originally
954
+ # provided as a string or through the Secrets Manager console.
900
955
  #
901
- # If you create this secret by using the Secrets Manager console then
902
- # only the `SecretString` parameter contains data. Secrets Manager
903
- # stores the information as a JSON structure of key/value pairs that
904
- # the Lambda rotation function knows how to parse.
956
+ # If this secret was created by using the console, then Secrets
957
+ # Manager stores the information as a JSON structure of key/value
958
+ # pairs.
905
959
  #
906
- # If you store custom information in the secret by using the
907
- # CreateSecret, UpdateSecret, or PutSecretValue API operations instead
908
- # of the Secrets Manager console, or by using the **Other secret
909
- # type** in the console, then you must code your Lambda rotation
910
- # function to parse and interpret those values.
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.
911
964
  # @return [String]
912
965
  #
913
966
  # @!attribute [rw] version_stages
@@ -916,7 +969,9 @@ module Aws::SecretsManager
916
969
  # @return [Array<String>]
917
970
  #
918
971
  # @!attribute [rw] created_date
919
- # The date and time that this version of the secret was created.
972
+ # The date and time that this version of the secret was created. If
973
+ # you don't specify which version in `VersionId` or `VersionStage`,
974
+ # then Secrets Manager uses the `AWSCURRENT` version.
920
975
  # @return [Time]
921
976
  #
922
977
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetSecretValueResponse AWS API Documentation
@@ -929,6 +984,7 @@ module Aws::SecretsManager
929
984
  :secret_string,
930
985
  :version_stages,
931
986
  :created_date)
987
+ SENSITIVE = [:secret_binary, :secret_string]
932
988
  include Aws::Structure
933
989
  end
934
990
 
@@ -941,10 +997,11 @@ module Aws::SecretsManager
941
997
  #
942
998
  class InternalServiceError < Struct.new(
943
999
  :message)
1000
+ SENSITIVE = []
944
1001
  include Aws::Structure
945
1002
  end
946
1003
 
947
- # You provided an invalid `NextToken` value.
1004
+ # The `NextToken` value is invalid.
948
1005
  #
949
1006
  # @!attribute [rw] message
950
1007
  # @return [String]
@@ -953,10 +1010,11 @@ module Aws::SecretsManager
953
1010
  #
954
1011
  class InvalidNextTokenException < Struct.new(
955
1012
  :message)
1013
+ SENSITIVE = []
956
1014
  include Aws::Structure
957
1015
  end
958
1016
 
959
- # You provided an invalid value for a parameter.
1017
+ # The parameter name or value is invalid.
960
1018
  #
961
1019
  # @!attribute [rw] message
962
1020
  # @return [String]
@@ -965,21 +1023,28 @@ module Aws::SecretsManager
965
1023
  #
966
1024
  class InvalidParameterException < Struct.new(
967
1025
  :message)
1026
+ SENSITIVE = []
968
1027
  include Aws::Structure
969
1028
  end
970
1029
 
971
- # You provided a parameter value that is not valid for the current state
972
- # of the resource.
1030
+ # A parameter value is not valid for the current state of the resource.
973
1031
  #
974
1032
  # Possible causes:
975
1033
  #
976
- # * You tried to perform the operation on a secret that's currently
977
- # marked deleted.
1034
+ # * The secret is scheduled for deletion.
978
1035
  #
979
1036
  # * You tried to enable rotation on a secret that doesn't already have
980
1037
  # a Lambda function ARN configured and you didn't include such an ARN
981
1038
  # as a parameter in this call.
982
1039
  #
1040
+ # * The secret is managed by another service, and you must use that
1041
+ # service to update it. For more information, see [Secrets managed by
1042
+ # other Amazon Web Services services][1].
1043
+ #
1044
+ #
1045
+ #
1046
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html
1047
+ #
983
1048
  # @!attribute [rw] message
984
1049
  # @return [String]
985
1050
  #
@@ -987,11 +1052,12 @@ module Aws::SecretsManager
987
1052
  #
988
1053
  class InvalidRequestException < Struct.new(
989
1054
  :message)
1055
+ SENSITIVE = []
990
1056
  include Aws::Structure
991
1057
  end
992
1058
 
993
1059
  # The request failed because it would exceed one of the Secrets Manager
994
- # internal limits.
1060
+ # quotas.
995
1061
  #
996
1062
  # @!attribute [rw] message
997
1063
  # @return [String]
@@ -1000,67 +1066,41 @@ module Aws::SecretsManager
1000
1066
  #
1001
1067
  class LimitExceededException < Struct.new(
1002
1068
  :message)
1069
+ SENSITIVE = []
1003
1070
  include Aws::Structure
1004
1071
  end
1005
1072
 
1006
- # @note When making an API call, you may pass ListSecretVersionIdsRequest
1007
- # data as a hash:
1073
+ # @!attribute [rw] secret_id
1074
+ # The ARN or name of the secret whose versions you want to list.
1008
1075
  #
1009
- # {
1010
- # secret_id: "SecretIdType", # required
1011
- # max_results: 1,
1012
- # next_token: "NextTokenType",
1013
- # include_deprecated: false,
1014
- # }
1076
+ # For an ARN, we recommend that you specify a complete ARN rather than
1077
+ # a partial ARN. See [Finding a secret from a partial ARN][1].
1015
1078
  #
1016
- # @!attribute [rw] secret_id
1017
- # The identifier for the secret containing the versions you want to
1018
- # list. You can specify either the Amazon Resource Name (ARN) or the
1019
- # friendly name of the secret.
1020
- #
1021
- # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
1022
- # complete ARN. You can specify a partial ARN too—for example, if you
1023
- # don’t include the final hyphen and six random characters that
1024
- # Secrets Manager adds at the end of the ARN when you created the
1025
- # secret. A partial ARN match can work as long as it uniquely matches
1026
- # only one secret. However, if your secret has a name that ends in a
1027
- # hyphen followed by six characters (before Secrets Manager adds the
1028
- # hyphen and six characters to the ARN) and you try to use that as a
1029
- # partial ARN, then those characters cause Secrets Manager to assume
1030
- # that you’re specifying a complete ARN. This confusion can cause
1031
- # unexpected results. To avoid this situation, we recommend that you
1032
- # don’t create secret names that end with a hyphen followed by six
1033
- # characters.
1034
1079
  #
1035
- # </note>
1080
+ #
1081
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
1036
1082
  # @return [String]
1037
1083
  #
1038
1084
  # @!attribute [rw] max_results
1039
- # (Optional) Limits the number of results that you want to include in
1040
- # the response. If you don't include this parameter, it defaults to a
1041
- # value that's specific to the operation. If additional items exist
1042
- # beyond the maximum you specify, the `NextToken` response element is
1043
- # present and has a value (isn't null). Include that value as the
1044
- # `NextToken` request parameter in the next call to the operation to
1045
- # get the next part of the results. Note that Secrets Manager might
1046
- # return fewer results than the maximum even when there are more
1047
- # results available. You should check `NextToken` after every
1048
- # operation to ensure that you receive all of the results.
1085
+ # The number of results to include in the response.
1086
+ #
1087
+ # If there are more results available, in the response, Secrets
1088
+ # Manager includes `NextToken`. To get the next results, call
1089
+ # `ListSecretVersionIds` again with the value from `NextToken`.
1049
1090
  # @return [Integer]
1050
1091
  #
1051
1092
  # @!attribute [rw] next_token
1052
- # (Optional) Use this parameter in a request if you receive a
1053
- # `NextToken` response in a previous request that indicates that
1054
- # there's more output available. In a subsequent call, set it to the
1055
- # value of the previous call's `NextToken` response to indicate where
1056
- # the output should continue from.
1093
+ # A token that indicates where the output should continue from, if a
1094
+ # previous call did not show all results. To get the next results,
1095
+ # call `ListSecretVersionIds` again with this value.
1057
1096
  # @return [String]
1058
1097
  #
1059
1098
  # @!attribute [rw] include_deprecated
1060
- # (Optional) Specifies that you want the results to include versions
1061
- # that do not have any staging labels attached to them. Such versions
1099
+ # Specifies whether to include versions of secrets that don't have
1100
+ # any staging labels attached to them. Versions without staging labels
1062
1101
  # are considered deprecated and are subject to deletion by Secrets
1063
- # Manager as needed.
1102
+ # Manager. By default, versions without staging labels aren't
1103
+ # included.
1064
1104
  # @return [Boolean]
1065
1105
  #
1066
1106
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecretVersionIdsRequest AWS API Documentation
@@ -1070,41 +1110,28 @@ module Aws::SecretsManager
1070
1110
  :max_results,
1071
1111
  :next_token,
1072
1112
  :include_deprecated)
1113
+ SENSITIVE = []
1073
1114
  include Aws::Structure
1074
1115
  end
1075
1116
 
1076
1117
  # @!attribute [rw] versions
1077
- # The list of the currently available versions of the specified
1078
- # secret.
1118
+ # A list of the versions of the secret.
1079
1119
  # @return [Array<Types::SecretVersionsListEntry>]
1080
1120
  #
1081
1121
  # @!attribute [rw] next_token
1082
- # If present in the response, this value indicates that there's more
1083
- # output available than what's included in the current response. This
1084
- # can occur even when the response includes no values at all, such as
1085
- # when you ask for a filtered view of a very long list. Use this value
1086
- # in the `NextToken` request parameter in a subsequent call to the
1087
- # operation to continue processing and get the next part of the
1088
- # output. You should repeat this until the `NextToken` response
1089
- # element comes back empty (as `null`).
1122
+ # Secrets Manager includes this value if there's more output
1123
+ # available than what is included in the current response. This can
1124
+ # occur even when the response includes no values at all, such as when
1125
+ # you ask for a filtered view of a long list. To get the next results,
1126
+ # call `ListSecretVersionIds` again with this value.
1090
1127
  # @return [String]
1091
1128
  #
1092
1129
  # @!attribute [rw] arn
1093
- # The Amazon Resource Name (ARN) for the secret.
1094
- #
1095
- # <note markdown="1"> Secrets Manager automatically adds several random characters to the
1096
- # name at the end of the ARN when you initially create a secret. This
1097
- # affects only the ARN and not the actual friendly name. This ensures
1098
- # that if you create a new secret with the same name as an old secret
1099
- # that you previously deleted, then users with access to the old
1100
- # secret *don't* automatically get access to the new secret because
1101
- # the ARNs are different.
1102
- #
1103
- # </note>
1130
+ # The ARN of the secret.
1104
1131
  # @return [String]
1105
1132
  #
1106
1133
  # @!attribute [rw] name
1107
- # The friendly name of the secret.
1134
+ # The name of the secret.
1108
1135
  # @return [String]
1109
1136
  #
1110
1137
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecretVersionIdsResponse AWS API Documentation
@@ -1114,43 +1141,46 @@ module Aws::SecretsManager
1114
1141
  :next_token,
1115
1142
  :arn,
1116
1143
  :name)
1144
+ SENSITIVE = []
1117
1145
  include Aws::Structure
1118
1146
  end
1119
1147
 
1120
- # @note When making an API call, you may pass ListSecretsRequest
1121
- # data as a hash:
1122
- #
1123
- # {
1124
- # max_results: 1,
1125
- # next_token: "NextTokenType",
1126
- # }
1148
+ # @!attribute [rw] include_planned_deletion
1149
+ # Specifies whether to include secrets scheduled for deletion. By
1150
+ # default, secrets scheduled for deletion aren't included.
1151
+ # @return [Boolean]
1127
1152
  #
1128
1153
  # @!attribute [rw] max_results
1129
- # (Optional) Limits the number of results that you want to include in
1130
- # the response. If you don't include this parameter, it defaults to a
1131
- # value that's specific to the operation. If additional items exist
1132
- # beyond the maximum you specify, the `NextToken` response element is
1133
- # present and has a value (isn't null). Include that value as the
1134
- # `NextToken` request parameter in the next call to the operation to
1135
- # get the next part of the results. Note that Secrets Manager might
1136
- # return fewer results than the maximum even when there are more
1137
- # results available. You should check `NextToken` after every
1138
- # operation to ensure that you receive all of the results.
1154
+ # The number of results to include in the response.
1155
+ #
1156
+ # If there are more results available, in the response, Secrets
1157
+ # Manager includes `NextToken`. To get the next results, call
1158
+ # `ListSecrets` again with the value from `NextToken`.
1139
1159
  # @return [Integer]
1140
1160
  #
1141
1161
  # @!attribute [rw] next_token
1142
- # (Optional) Use this parameter in a request if you receive a
1143
- # `NextToken` response in a previous request that indicates that
1144
- # there's more output available. In a subsequent call, set it to the
1145
- # value of the previous call's `NextToken` response to indicate where
1146
- # the output should continue from.
1162
+ # A token that indicates where the output should continue from, if a
1163
+ # previous call did not show all results. To get the next results,
1164
+ # call `ListSecrets` again with this value.
1165
+ # @return [String]
1166
+ #
1167
+ # @!attribute [rw] filters
1168
+ # The filters to apply to the list of secrets.
1169
+ # @return [Array<Types::Filter>]
1170
+ #
1171
+ # @!attribute [rw] sort_order
1172
+ # Secrets are listed by `CreatedDate`.
1147
1173
  # @return [String]
1148
1174
  #
1149
1175
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecretsRequest AWS API Documentation
1150
1176
  #
1151
1177
  class ListSecretsRequest < Struct.new(
1178
+ :include_planned_deletion,
1152
1179
  :max_results,
1153
- :next_token)
1180
+ :next_token,
1181
+ :filters,
1182
+ :sort_order)
1183
+ SENSITIVE = []
1154
1184
  include Aws::Structure
1155
1185
  end
1156
1186
 
@@ -1159,14 +1189,11 @@ module Aws::SecretsManager
1159
1189
  # @return [Array<Types::SecretListEntry>]
1160
1190
  #
1161
1191
  # @!attribute [rw] next_token
1162
- # If present in the response, this value indicates that there's more
1163
- # output available than what's included in the current response. This
1164
- # can occur even when the response includes no values at all, such as
1165
- # when you ask for a filtered view of a very long list. Use this value
1166
- # in the `NextToken` request parameter in a subsequent call to the
1167
- # operation to continue processing and get the next part of the
1168
- # output. You should repeat this until the `NextToken` response
1169
- # element comes back empty (as `null`).
1192
+ # Secrets Manager includes this value if there's more output
1193
+ # available than what is included in the current response. This can
1194
+ # occur even when the response includes no values at all, such as when
1195
+ # you ask for a filtered view of a long list. To get the next results,
1196
+ # call `ListSecrets` again with this value.
1170
1197
  # @return [String]
1171
1198
  #
1172
1199
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecretsResponse AWS API Documentation
@@ -1174,10 +1201,11 @@ module Aws::SecretsManager
1174
1201
  class ListSecretsResponse < Struct.new(
1175
1202
  :secret_list,
1176
1203
  :next_token)
1204
+ SENSITIVE = []
1177
1205
  include Aws::Structure
1178
1206
  end
1179
1207
 
1180
- # The policy document that you provided isn't valid.
1208
+ # The resource policy has syntax errors.
1181
1209
  #
1182
1210
  # @!attribute [rw] message
1183
1211
  # @return [String]
@@ -1186,6 +1214,7 @@ module Aws::SecretsManager
1186
1214
  #
1187
1215
  class MalformedPolicyDocumentException < Struct.new(
1188
1216
  :message)
1217
+ SENSITIVE = []
1189
1218
  include Aws::Structure
1190
1219
  end
1191
1220
 
@@ -1199,68 +1228,87 @@ module Aws::SecretsManager
1199
1228
  #
1200
1229
  class PreconditionNotMetException < Struct.new(
1201
1230
  :message)
1231
+ SENSITIVE = []
1202
1232
  include Aws::Structure
1203
1233
  end
1204
1234
 
1205
- # @note When making an API call, you may pass PutResourcePolicyRequest
1206
- # data as a hash:
1235
+ # The `BlockPublicPolicy` parameter is set to true, and the resource
1236
+ # policy did not prevent broad access to the secret.
1207
1237
  #
1208
- # {
1209
- # secret_id: "SecretIdType", # required
1210
- # resource_policy: "NonEmptyResourcePolicyType", # required
1211
- # }
1238
+ # @!attribute [rw] message
1239
+ # @return [String]
1212
1240
  #
1241
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PublicPolicyException AWS API Documentation
1242
+ #
1243
+ class PublicPolicyException < Struct.new(
1244
+ :message)
1245
+ SENSITIVE = []
1246
+ include Aws::Structure
1247
+ end
1248
+
1213
1249
  # @!attribute [rw] secret_id
1214
- # Specifies the secret that you want to attach the resource-based
1215
- # policy to. You can specify either the ARN or the friendly name of
1216
- # the secret.
1217
- #
1218
- # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
1219
- # complete ARN. You can specify a partial ARN too—for example, if you
1220
- # don’t include the final hyphen and six random characters that
1221
- # Secrets Manager adds at the end of the ARN when you created the
1222
- # secret. A partial ARN match can work as long as it uniquely matches
1223
- # only one secret. However, if your secret has a name that ends in a
1224
- # hyphen followed by six characters (before Secrets Manager adds the
1225
- # hyphen and six characters to the ARN) and you try to use that as a
1226
- # partial ARN, then those characters cause Secrets Manager to assume
1227
- # that you’re specifying a complete ARN. This confusion can cause
1228
- # unexpected results. To avoid this situation, we recommend that you
1229
- # don’t create secret names that end with a hyphen followed by six
1230
- # characters.
1250
+ # The ARN or name of the secret to attach the resource-based policy.
1231
1251
  #
1232
- # </note>
1252
+ # For an ARN, we recommend that you specify a complete ARN rather than
1253
+ # a partial ARN. See [Finding a secret from a partial ARN][1].
1254
+ #
1255
+ #
1256
+ #
1257
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
1233
1258
  # @return [String]
1234
1259
  #
1235
1260
  # @!attribute [rw] resource_policy
1236
- # A JSON-formatted string that's constructed according to the grammar
1237
- # and syntax for an AWS resource-based policy. The policy in the
1238
- # string identifies who can access or manage this secret and its
1239
- # versions. For information on how to format a JSON parameter for the
1240
- # various command line tool environments, see [Using JSON for
1241
- # Parameters][1] in the *AWS CLI User Guide*.
1261
+ # A JSON-formatted string for an Amazon Web Services resource-based
1262
+ # policy. For example policies, see [Permissions policy examples][1].
1242
1263
  #
1243
1264
  #
1244
1265
  #
1245
- # [1]: http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json
1266
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html
1246
1267
  # @return [String]
1247
1268
  #
1269
+ # @!attribute [rw] block_public_policy
1270
+ # Specifies whether to block resource-based policies that allow broad
1271
+ # access to the secret, for example those that use a wildcard for the
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
1294
+ # @return [Boolean]
1295
+ #
1248
1296
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutResourcePolicyRequest AWS API Documentation
1249
1297
  #
1250
1298
  class PutResourcePolicyRequest < Struct.new(
1251
1299
  :secret_id,
1252
- :resource_policy)
1300
+ :resource_policy,
1301
+ :block_public_policy)
1302
+ SENSITIVE = []
1253
1303
  include Aws::Structure
1254
1304
  end
1255
1305
 
1256
1306
  # @!attribute [rw] arn
1257
- # The ARN of the secret that the resource-based policy was retrieved
1258
- # for.
1307
+ # The ARN of the secret.
1259
1308
  # @return [String]
1260
1309
  #
1261
1310
  # @!attribute [rw] name
1262
- # The friendly name of the secret that the resource-based policy was
1263
- # retrieved for.
1311
+ # The name of the secret.
1264
1312
  # @return [String]
1265
1313
  #
1266
1314
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutResourcePolicyResponse AWS API Documentation
@@ -1268,75 +1316,56 @@ module Aws::SecretsManager
1268
1316
  class PutResourcePolicyResponse < Struct.new(
1269
1317
  :arn,
1270
1318
  :name)
1319
+ SENSITIVE = []
1271
1320
  include Aws::Structure
1272
1321
  end
1273
1322
 
1274
- # @note When making an API call, you may pass PutSecretValueRequest
1275
- # data as a hash:
1323
+ # @!attribute [rw] secret_id
1324
+ # The ARN or name of the secret to add a new version to.
1276
1325
  #
1277
- # {
1278
- # secret_id: "SecretIdType", # required
1279
- # client_request_token: "ClientRequestTokenType",
1280
- # secret_binary: "data",
1281
- # secret_string: "SecretStringType",
1282
- # version_stages: ["SecretVersionStageType"],
1283
- # }
1326
+ # For an ARN, we recommend that you specify a complete ARN rather than
1327
+ # a partial ARN. See [Finding a secret from a partial ARN][1].
1284
1328
  #
1285
- # @!attribute [rw] secret_id
1286
- # Specifies the secret to which you want to add a new version. You can
1287
- # specify either the Amazon Resource Name (ARN) or the friendly name
1288
- # of the secret. The secret must already exist.
1289
- #
1290
- # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
1291
- # complete ARN. You can specify a partial ARN too—for example, if you
1292
- # don’t include the final hyphen and six random characters that
1293
- # Secrets Manager adds at the end of the ARN when you created the
1294
- # secret. A partial ARN match can work as long as it uniquely matches
1295
- # only one secret. However, if your secret has a name that ends in a
1296
- # hyphen followed by six characters (before Secrets Manager adds the
1297
- # hyphen and six characters to the ARN) and you try to use that as a
1298
- # partial ARN, then those characters cause Secrets Manager to assume
1299
- # that you’re specifying a complete ARN. This confusion can cause
1300
- # unexpected results. To avoid this situation, we recommend that you
1301
- # don’t create secret names that end with a hyphen followed by six
1302
- # characters.
1329
+ # If the secret doesn't already exist, use `CreateSecret` instead.
1303
1330
  #
1304
- # </note>
1331
+ #
1332
+ #
1333
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
1305
1334
  # @return [String]
1306
1335
  #
1307
1336
  # @!attribute [rw] client_request_token
1308
- # (Optional) Specifies a unique identifier for the new version of the
1309
- # secret.
1337
+ # A unique identifier for the new version of the secret.
1310
1338
  #
1311
- # <note markdown="1"> If you use the AWS CLI or one of the AWS SDK to call this operation,
1312
- # then you can leave this parameter empty. The CLI or SDK generates a
1313
- # random UUID for you and includes that in the request. If you don't
1314
- # use the SDK and instead generate a raw HTTP request to the Secrets
1315
- # Manager service endpoint, then you must generate a
1316
- # `ClientRequestToken` yourself for new versions and include that
1317
- # value in the request.
1339
+ # <note markdown="1"> If you use the Amazon Web Services CLI or one of the Amazon Web
1340
+ # Services SDKs to call this operation, then you can leave this
1341
+ # parameter empty. The CLI or SDK generates a random UUID for you and
1342
+ # includes it as the value for this parameter in the request.
1318
1343
  #
1319
1344
  # </note>
1320
1345
  #
1346
+ # If you generate a raw HTTP request to the Secrets Manager service
1347
+ # endpoint, then you must generate a `ClientRequestToken` and include
1348
+ # it in the request.
1349
+ #
1321
1350
  # This value helps ensure idempotency. Secrets Manager uses this value
1322
1351
  # to prevent the accidental creation of duplicate versions if there
1323
- # are failures and retries during the Lambda rotation function's
1324
- # processing. We recommend that you generate a [UUID-type][1] value to
1325
- # ensure uniqueness within the specified secret.
1352
+ # are failures and retries during a rotation. We recommend that you
1353
+ # generate a [UUID-type][1] value to ensure uniqueness of your
1354
+ # versions within the specified secret.
1326
1355
  #
1327
1356
  # * If the `ClientRequestToken` value isn't already associated with a
1328
1357
  # version of the secret then a new version of the secret is created.
1329
1358
  #
1330
1359
  # * If a version with this value already exists and that version's
1331
1360
  # `SecretString` or `SecretBinary` values are the same as those in
1332
- # the request then the request is ignored (the operation is
1333
- # idempotent).
1361
+ # the request then the request is ignored. The operation is
1362
+ # idempotent.
1334
1363
  #
1335
- # * If a version with this value already exists and that version's
1364
+ # * If a version with this value already exists and the version of the
1336
1365
  # `SecretString` and `SecretBinary` values are different from those
1337
- # in the request then the request fails because you cannot modify an
1338
- # existing secret version. You can only create new versions to store
1339
- # new secret values.
1366
+ # in the request, then the request fails because you can't modify a
1367
+ # secret version. You can only create new versions to store new
1368
+ # secret values.
1340
1369
  #
1341
1370
  # This value becomes the `VersionId` of the new version.
1342
1371
  #
@@ -1349,65 +1378,68 @@ module Aws::SecretsManager
1349
1378
  # @return [String]
1350
1379
  #
1351
1380
  # @!attribute [rw] secret_binary
1352
- # (Optional) Specifies binary data that you want to encrypt and store
1353
- # in the new version of the secret. To use this parameter in the
1354
- # command-line tools, we recommend that you store your binary data in
1355
- # a file and then use the appropriate technique for your tool to pass
1356
- # the contents of the file as a parameter. Either `SecretBinary` or
1357
- # `SecretString` must have a value, but not both. They cannot both be
1358
- # empty.
1381
+ # The binary data to encrypt and store in the new version of the
1382
+ # secret. To use this parameter in the command-line tools, we
1383
+ # recommend that you store your binary data in a file and then pass
1384
+ # the contents of the file as a parameter.
1359
1385
  #
1360
- # This parameter is not accessible if the secret using the Secrets
1361
- # Manager console.
1386
+ # You must include `SecretBinary` or `SecretString`, but not both.
1387
+ #
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.
1362
1394
  # @return [String]
1363
1395
  #
1364
1396
  # @!attribute [rw] secret_string
1365
- # (Optional) Specifies text data that you want to encrypt and store in
1366
- # this new version of the secret. Either `SecretString` or
1367
- # `SecretBinary` must have a value, but not both. They cannot both be
1368
- # empty.
1397
+ # The text to encrypt and store in the new version of the secret.
1369
1398
  #
1370
- # If you create this secret by using the Secrets Manager console then
1371
- # Secrets Manager puts the protected secret text in only the
1372
- # `SecretString` parameter. The Secrets Manager console stores the
1373
- # information as a JSON structure of key/value pairs that the default
1374
- # Lambda rotation function knows how to parse.
1399
+ # You must include `SecretBinary` or `SecretString`, but not both.
1375
1400
  #
1376
- # For storing multiple values, we recommend that you use a JSON text
1377
- # string argument and specify key/value pairs. For information on how
1378
- # to format a JSON parameter for the various command line tool
1379
- # environments, see [Using JSON for Parameters][1] in the *AWS CLI
1380
- # User Guide*.
1401
+ # We recommend you create the secret string as JSON key/value pairs,
1402
+ # as shown in the example.
1381
1403
  #
1382
- # For example:
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.
1408
+ # @return [String]
1383
1409
  #
1384
- # `[\{"username":"bob"\},\{"password":"abc123xyz456"\}]`
1410
+ # @!attribute [rw] version_stages
1411
+ # A list of staging labels to attach to this version of the secret.
1412
+ # Secrets Manager uses staging labels to track versions of a secret
1413
+ # through the rotation process.
1414
+ #
1415
+ # If you specify a staging label that's already associated with a
1416
+ # different version of the same secret, then Secrets Manager removes
1417
+ # the label from the other version and attaches it to this version. If
1418
+ # you specify `AWSCURRENT`, and it is already attached to another
1419
+ # version, then Secrets Manager also moves the staging label
1420
+ # `AWSPREVIOUS` to the version that `AWSCURRENT` was removed from.
1421
+ #
1422
+ # If you don't include `VersionStages`, then Secrets Manager
1423
+ # automatically moves the staging label `AWSCURRENT` to this version.
1424
+ # @return [Array<String>]
1385
1425
  #
1386
- # If your command-line tool or SDK requires quotation marks around the
1387
- # parameter, you should use single quotes to avoid confusion with the
1388
- # double quotes required in the JSON text.
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].
1389
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.
1390
1438
  #
1391
1439
  #
1392
- # [1]: https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json
1393
- # @return [String]
1394
1440
  #
1395
- # @!attribute [rw] version_stages
1396
- # (Optional) Specifies a list of staging labels that are attached to
1397
- # this version of the secret. These staging labels are used to track
1398
- # the versions through the rotation process by the Lambda rotation
1399
- # function.
1400
- #
1401
- # A staging label must be unique to a single version of the secret. If
1402
- # you specify a staging label that's already associated with a
1403
- # different version of the same secret then that staging label is
1404
- # automatically removed from the other version and attached to this
1405
- # version.
1406
- #
1407
- # If you do not specify a value for `VersionStages` then Secrets
1408
- # Manager automatically moves the staging label `AWSCURRENT` to this
1409
- # new version.
1410
- # @return [Array<String>]
1441
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html
1442
+ # @return [String]
1411
1443
  #
1412
1444
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutSecretValueRequest AWS API Documentation
1413
1445
  #
@@ -1416,29 +1448,28 @@ module Aws::SecretsManager
1416
1448
  :client_request_token,
1417
1449
  :secret_binary,
1418
1450
  :secret_string,
1419
- :version_stages)
1451
+ :version_stages,
1452
+ :rotation_token)
1453
+ SENSITIVE = [:secret_binary, :secret_string, :rotation_token]
1420
1454
  include Aws::Structure
1421
1455
  end
1422
1456
 
1423
1457
  # @!attribute [rw] arn
1424
- # The Amazon Resource Name (ARN) for the secret for which you just
1425
- # created a version.
1458
+ # The ARN of the secret.
1426
1459
  # @return [String]
1427
1460
  #
1428
1461
  # @!attribute [rw] name
1429
- # The friendly name of the secret for which you just created or
1430
- # updated a version.
1462
+ # The name of the secret.
1431
1463
  # @return [String]
1432
1464
  #
1433
1465
  # @!attribute [rw] version_id
1434
- # The unique identifier of the version of the secret you just created
1435
- # or updated.
1466
+ # The unique identifier of the version of the secret.
1436
1467
  # @return [String]
1437
1468
  #
1438
1469
  # @!attribute [rw] version_stages
1439
1470
  # The list of staging labels that are currently attached to this
1440
- # version of the secret. Staging labels are used to track a version as
1441
- # it progresses through the secret rotation process.
1471
+ # version of the secret. Secrets Manager uses staging labels to track
1472
+ # a version as it progresses through the secret rotation process.
1442
1473
  # @return [Array<String>]
1443
1474
  #
1444
1475
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutSecretValueResponse AWS API Documentation
@@ -1448,66 +1479,190 @@ module Aws::SecretsManager
1448
1479
  :name,
1449
1480
  :version_id,
1450
1481
  :version_stages)
1482
+ SENSITIVE = []
1451
1483
  include Aws::Structure
1452
1484
  end
1453
1485
 
1454
- # A resource with the ID you requested already exists.
1455
- #
1456
- # @!attribute [rw] message
1486
+ # @!attribute [rw] secret_id
1487
+ # The ARN or name of the secret.
1457
1488
  # @return [String]
1458
1489
  #
1459
- # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ResourceExistsException AWS API Documentation
1490
+ # @!attribute [rw] remove_replica_regions
1491
+ # The Regions of the replicas to remove.
1492
+ # @return [Array<String>]
1460
1493
  #
1461
- class ResourceExistsException < Struct.new(
1462
- :message)
1494
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RemoveRegionsFromReplicationRequest AWS API Documentation
1495
+ #
1496
+ class RemoveRegionsFromReplicationRequest < Struct.new(
1497
+ :secret_id,
1498
+ :remove_replica_regions)
1499
+ SENSITIVE = []
1463
1500
  include Aws::Structure
1464
1501
  end
1465
1502
 
1466
- # We can't find the resource that you asked for.
1467
- #
1468
- # @!attribute [rw] message
1503
+ # @!attribute [rw] arn
1504
+ # The ARN of the primary secret.
1469
1505
  # @return [String]
1470
1506
  #
1471
- # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ResourceNotFoundException AWS API Documentation
1507
+ # @!attribute [rw] replication_status
1508
+ # The status of replicas for this secret after you remove Regions.
1509
+ # @return [Array<Types::ReplicationStatusType>]
1472
1510
  #
1473
- class ResourceNotFoundException < Struct.new(
1474
- :message)
1475
- include Aws::Structure
1511
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RemoveRegionsFromReplicationResponse AWS API Documentation
1512
+ #
1513
+ class RemoveRegionsFromReplicationResponse < Struct.new(
1514
+ :arn,
1515
+ :replication_status)
1516
+ SENSITIVE = []
1517
+ include Aws::Structure
1476
1518
  end
1477
1519
 
1478
- # @note When making an API call, you may pass RestoreSecretRequest
1479
- # data as a hash:
1520
+ # A custom type that specifies a `Region` and the `KmsKeyId` for a
1521
+ # replica secret.
1522
+ #
1523
+ # @!attribute [rw] region
1524
+ # A Region code. For a list of Region codes, see [Name and code of
1525
+ # Regions][1].
1526
+ #
1480
1527
  #
1481
- # {
1482
- # secret_id: "SecretIdType", # required
1483
- # }
1484
1528
  #
1529
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints
1530
+ # @return [String]
1531
+ #
1532
+ # @!attribute [rw] kms_key_id
1533
+ # The ARN, key ID, or alias of the KMS key to encrypt the secret. If
1534
+ # you don't include this field, Secrets Manager uses
1535
+ # `aws/secretsmanager`.
1536
+ # @return [String]
1537
+ #
1538
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ReplicaRegionType AWS API Documentation
1539
+ #
1540
+ class ReplicaRegionType < Struct.new(
1541
+ :region,
1542
+ :kms_key_id)
1543
+ SENSITIVE = []
1544
+ include Aws::Structure
1545
+ end
1546
+
1485
1547
  # @!attribute [rw] secret_id
1486
- # Specifies the secret that you want to restore from a previously
1487
- # scheduled deletion. You can specify either the Amazon Resource Name
1488
- # (ARN) or the friendly name of the secret.
1489
- #
1490
- # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
1491
- # complete ARN. You can specify a partial ARN too—for example, if you
1492
- # don’t include the final hyphen and six random characters that
1493
- # Secrets Manager adds at the end of the ARN when you created the
1494
- # secret. A partial ARN match can work as long as it uniquely matches
1495
- # only one secret. However, if your secret has a name that ends in a
1496
- # hyphen followed by six characters (before Secrets Manager adds the
1497
- # hyphen and six characters to the ARN) and you try to use that as a
1498
- # partial ARN, then those characters cause Secrets Manager to assume
1499
- # that you’re specifying a complete ARN. This confusion can cause
1500
- # unexpected results. To avoid this situation, we recommend that you
1501
- # don’t create secret names that end with a hyphen followed by six
1502
- # characters.
1548
+ # The ARN or name of the secret to replicate.
1549
+ # @return [String]
1503
1550
  #
1504
- # </note>
1551
+ # @!attribute [rw] add_replica_regions
1552
+ # A list of Regions in which to replicate the secret.
1553
+ # @return [Array<Types::ReplicaRegionType>]
1554
+ #
1555
+ # @!attribute [rw] force_overwrite_replica_secret
1556
+ # Specifies whether to overwrite a secret with the same name in the
1557
+ # destination Region. By default, secrets aren't overwritten.
1558
+ # @return [Boolean]
1559
+ #
1560
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ReplicateSecretToRegionsRequest AWS API Documentation
1561
+ #
1562
+ class ReplicateSecretToRegionsRequest < Struct.new(
1563
+ :secret_id,
1564
+ :add_replica_regions,
1565
+ :force_overwrite_replica_secret)
1566
+ SENSITIVE = []
1567
+ include Aws::Structure
1568
+ end
1569
+
1570
+ # @!attribute [rw] arn
1571
+ # The ARN of the primary secret.
1572
+ # @return [String]
1573
+ #
1574
+ # @!attribute [rw] replication_status
1575
+ # The status of replication.
1576
+ # @return [Array<Types::ReplicationStatusType>]
1577
+ #
1578
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ReplicateSecretToRegionsResponse AWS API Documentation
1579
+ #
1580
+ class ReplicateSecretToRegionsResponse < Struct.new(
1581
+ :arn,
1582
+ :replication_status)
1583
+ SENSITIVE = []
1584
+ include Aws::Structure
1585
+ end
1586
+
1587
+ # A replication object consisting of a `RegionReplicationStatus` object
1588
+ # and includes a Region, KMSKeyId, status, and status message.
1589
+ #
1590
+ # @!attribute [rw] region
1591
+ # The Region where replication occurs.
1592
+ # @return [String]
1593
+ #
1594
+ # @!attribute [rw] kms_key_id
1595
+ # Can be an `ARN`, `Key ID`, or `Alias`.
1596
+ # @return [String]
1597
+ #
1598
+ # @!attribute [rw] status
1599
+ # The status can be `InProgress`, `Failed`, or `InSync`.
1600
+ # @return [String]
1601
+ #
1602
+ # @!attribute [rw] status_message
1603
+ # Status message such as "*Secret with this name already exists in
1604
+ # this region*".
1605
+ # @return [String]
1606
+ #
1607
+ # @!attribute [rw] last_accessed_date
1608
+ # The date that the secret was last accessed in the Region. This field
1609
+ # is omitted if the secret has never been retrieved in the Region.
1610
+ # @return [Time]
1611
+ #
1612
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ReplicationStatusType AWS API Documentation
1613
+ #
1614
+ class ReplicationStatusType < Struct.new(
1615
+ :region,
1616
+ :kms_key_id,
1617
+ :status,
1618
+ :status_message,
1619
+ :last_accessed_date)
1620
+ SENSITIVE = []
1621
+ include Aws::Structure
1622
+ end
1623
+
1624
+ # A resource with the ID you requested already exists.
1625
+ #
1626
+ # @!attribute [rw] message
1627
+ # @return [String]
1628
+ #
1629
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ResourceExistsException AWS API Documentation
1630
+ #
1631
+ class ResourceExistsException < Struct.new(
1632
+ :message)
1633
+ SENSITIVE = []
1634
+ include Aws::Structure
1635
+ end
1636
+
1637
+ # Secrets Manager can't find the resource that you asked for.
1638
+ #
1639
+ # @!attribute [rw] message
1640
+ # @return [String]
1641
+ #
1642
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ResourceNotFoundException AWS API Documentation
1643
+ #
1644
+ class ResourceNotFoundException < Struct.new(
1645
+ :message)
1646
+ SENSITIVE = []
1647
+ include Aws::Structure
1648
+ end
1649
+
1650
+ # @!attribute [rw] secret_id
1651
+ # The ARN or name of the secret to restore.
1652
+ #
1653
+ # For an ARN, we recommend that you specify a complete ARN rather than
1654
+ # a partial ARN. See [Finding a secret from a partial ARN][1].
1655
+ #
1656
+ #
1657
+ #
1658
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
1505
1659
  # @return [String]
1506
1660
  #
1507
1661
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RestoreSecretRequest AWS API Documentation
1508
1662
  #
1509
1663
  class RestoreSecretRequest < Struct.new(
1510
1664
  :secret_id)
1665
+ SENSITIVE = []
1511
1666
  include Aws::Structure
1512
1667
  end
1513
1668
 
@@ -1516,7 +1671,7 @@ module Aws::SecretsManager
1516
1671
  # @return [String]
1517
1672
  #
1518
1673
  # @!attribute [rw] name
1519
- # The friendly name of the secret that was restored.
1674
+ # The name of the secret that was restored.
1520
1675
  # @return [String]
1521
1676
  #
1522
1677
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RestoreSecretResponse AWS API Documentation
@@ -1524,63 +1679,43 @@ module Aws::SecretsManager
1524
1679
  class RestoreSecretResponse < Struct.new(
1525
1680
  :arn,
1526
1681
  :name)
1682
+ SENSITIVE = []
1527
1683
  include Aws::Structure
1528
1684
  end
1529
1685
 
1530
- # @note When making an API call, you may pass RotateSecretRequest
1531
- # data as a hash:
1686
+ # @!attribute [rw] secret_id
1687
+ # The ARN or name of the secret to rotate.
1532
1688
  #
1533
- # {
1534
- # secret_id: "SecretIdType", # required
1535
- # client_request_token: "ClientRequestTokenType",
1536
- # rotation_lambda_arn: "RotationLambdaARNType",
1537
- # rotation_rules: {
1538
- # automatically_after_days: 1,
1539
- # },
1540
- # }
1689
+ # For an ARN, we recommend that you specify a complete ARN rather than
1690
+ # a partial ARN. See [Finding a secret from a partial ARN][1].
1541
1691
  #
1542
- # @!attribute [rw] secret_id
1543
- # Specifies the secret that you want to rotate. You can specify either
1544
- # the Amazon Resource Name (ARN) or the friendly name of the secret.
1545
- #
1546
- # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
1547
- # complete ARN. You can specify a partial ARN too—for example, if you
1548
- # don’t include the final hyphen and six random characters that
1549
- # Secrets Manager adds at the end of the ARN when you created the
1550
- # secret. A partial ARN match can work as long as it uniquely matches
1551
- # only one secret. However, if your secret has a name that ends in a
1552
- # hyphen followed by six characters (before Secrets Manager adds the
1553
- # hyphen and six characters to the ARN) and you try to use that as a
1554
- # partial ARN, then those characters cause Secrets Manager to assume
1555
- # that you’re specifying a complete ARN. This confusion can cause
1556
- # unexpected results. To avoid this situation, we recommend that you
1557
- # don’t create secret names that end with a hyphen followed by six
1558
- # characters.
1559
1692
  #
1560
- # </note>
1693
+ #
1694
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
1561
1695
  # @return [String]
1562
1696
  #
1563
1697
  # @!attribute [rw] client_request_token
1564
- # (Optional) Specifies a unique identifier for the new version of the
1565
- # secret that helps ensure idempotency.
1566
- #
1567
- # If you use the AWS CLI or one of the AWS SDK to call this operation,
1568
- # then you can leave this parameter empty. The CLI or SDK generates a
1569
- # random UUID for you and includes that in the request for this
1570
- # parameter. If you don't use the SDK and instead generate a raw HTTP
1571
- # request to the Secrets Manager service endpoint, then you must
1572
- # generate a `ClientRequestToken` yourself for new versions and
1573
- # include that value in the request.
1574
- #
1575
- # You only need to specify your own value if you are implementing your
1576
- # own retry logic and want to ensure that a given secret is not
1577
- # created twice. We recommend that you generate a [UUID-type][1] value
1578
- # to ensure uniqueness within the specified secret.
1579
- #
1580
- # Secrets Manager uses this value to prevent the accidental creation
1581
- # of duplicate versions if there are failures and retries during the
1582
- # function's processing. This value becomes the `VersionId` of the
1583
- # new version.
1698
+ # A unique identifier for the new version of the secret. You only need
1699
+ # to specify this value if you implement your own retry logic and you
1700
+ # want to ensure that Secrets Manager doesn't attempt to create a
1701
+ # secret version twice.
1702
+ #
1703
+ # <note markdown="1"> If you use the Amazon Web Services CLI or one of the Amazon Web
1704
+ # Services SDKs to call this operation, then you can leave this
1705
+ # parameter empty. The CLI or SDK generates a random UUID for you and
1706
+ # includes it as the value for this parameter in the request.
1707
+ #
1708
+ # </note>
1709
+ #
1710
+ # If you generate a raw HTTP request to the Secrets Manager service
1711
+ # endpoint, then you must generate a `ClientRequestToken` and include
1712
+ # it in the request.
1713
+ #
1714
+ # This value helps ensure idempotency. Secrets Manager uses this value
1715
+ # to prevent the accidental creation of duplicate versions if there
1716
+ # are failures and retries during a rotation. We recommend that you
1717
+ # generate a [UUID-type][1] value to ensure uniqueness of your
1718
+ # versions within the specified secret.
1584
1719
  #
1585
1720
  # **A suitable default value is auto-generated.** You should normally
1586
1721
  # not need to pass this option.
@@ -1591,21 +1726,49 @@ module Aws::SecretsManager
1591
1726
  # @return [String]
1592
1727
  #
1593
1728
  # @!attribute [rw] rotation_lambda_arn
1594
- # (Optional) Specifies the ARN of the Lambda function that can rotate
1595
- # the secret.
1729
+ # For secrets that use a Lambda rotation function to rotate, the ARN
1730
+ # of the Lambda rotation function.
1731
+ #
1732
+ # For secrets that use *managed rotation*, omit this field. For more
1733
+ # information, see [Managed rotation][1] in the *Secrets Manager User
1734
+ # Guide*.
1735
+ #
1736
+ #
1737
+ #
1738
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_managed.html
1596
1739
  # @return [String]
1597
1740
  #
1598
1741
  # @!attribute [rw] rotation_rules
1599
1742
  # A structure that defines the rotation configuration for this secret.
1600
1743
  # @return [Types::RotationRulesType]
1601
1744
  #
1745
+ # @!attribute [rw] rotate_immediately
1746
+ # Specifies whether to rotate the secret immediately or wait until the
1747
+ # next scheduled rotation window. The rotation schedule is defined in
1748
+ # RotateSecretRequest$RotationRules.
1749
+ #
1750
+ # For secrets that use a Lambda rotation function to rotate, if you
1751
+ # don't immediately rotate the secret, Secrets Manager tests the
1752
+ # rotation configuration by running the [ `testSecret` step][1] of the
1753
+ # Lambda rotation function. The test creates an `AWSPENDING` version
1754
+ # of the secret and then removes it.
1755
+ #
1756
+ # By default, Secrets Manager rotates the secret immediately.
1757
+ #
1758
+ #
1759
+ #
1760
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_lambda-functions.html#rotate-secrets_lambda-functions-code
1761
+ # @return [Boolean]
1762
+ #
1602
1763
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RotateSecretRequest AWS API Documentation
1603
1764
  #
1604
1765
  class RotateSecretRequest < Struct.new(
1605
1766
  :secret_id,
1606
1767
  :client_request_token,
1607
1768
  :rotation_lambda_arn,
1608
- :rotation_rules)
1769
+ :rotation_rules,
1770
+ :rotate_immediately)
1771
+ SENSITIVE = []
1609
1772
  include Aws::Structure
1610
1773
  end
1611
1774
 
@@ -1614,12 +1777,11 @@ module Aws::SecretsManager
1614
1777
  # @return [String]
1615
1778
  #
1616
1779
  # @!attribute [rw] name
1617
- # The friendly name of the secret.
1780
+ # The name of the secret.
1618
1781
  # @return [String]
1619
1782
  #
1620
1783
  # @!attribute [rw] version_id
1621
- # The ID of the new version of the secret created by the rotation
1622
- # started by this request.
1784
+ # The ID of the new version of the secret.
1623
1785
  # @return [String]
1624
1786
  #
1625
1787
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RotateSecretResponse AWS API Documentation
@@ -1628,58 +1790,101 @@ module Aws::SecretsManager
1628
1790
  :arn,
1629
1791
  :name,
1630
1792
  :version_id)
1793
+ SENSITIVE = []
1631
1794
  include Aws::Structure
1632
1795
  end
1633
1796
 
1634
1797
  # A structure that defines the rotation configuration for the secret.
1635
1798
  #
1636
- # @note When making an API call, you may pass RotationRulesType
1637
- # data as a hash:
1638
- #
1639
- # {
1640
- # automatically_after_days: 1,
1641
- # }
1642
- #
1643
1799
  # @!attribute [rw] automatically_after_days
1644
- # Specifies the number of days between automatic scheduled rotations
1645
- # of the secret.
1646
- #
1647
- # Secrets Manager schedules the next rotation when the previous one is
1648
- # complete. Secrets Manager schedules the date by adding the rotation
1649
- # interval (number of days) to the actual date of the last rotation.
1650
- # The service chooses the hour within that 24-hour date window
1651
- # randomly. The minute is also chosen somewhat randomly, but weighted
1652
- # towards the top of the hour and influenced by a variety of factors
1653
- # that help distribute load.
1800
+ # The number of days between rotations of the secret. You can use this
1801
+ # value to check that your secret meets your compliance guidelines for
1802
+ # how often secrets must be rotated. If you use this field to set the
1803
+ # rotation schedule, Secrets Manager calculates the next rotation date
1804
+ # based on the previous rotation. Manually updating the secret value
1805
+ # by calling `PutSecretValue` or `UpdateSecret` is considered a valid
1806
+ # rotation.
1807
+ #
1808
+ # In `DescribeSecret` and `ListSecrets`, this value is calculated from
1809
+ # the rotation schedule after every successful rotation. In
1810
+ # `RotateSecret`, you can set the rotation schedule in `RotationRules`
1811
+ # with `AutomaticallyAfterDays` or `ScheduleExpression`, but not both.
1812
+ # To set a rotation schedule in hours, use `ScheduleExpression`.
1654
1813
  # @return [Integer]
1655
1814
  #
1815
+ # @!attribute [rw] duration
1816
+ # The length of the rotation window in hours, for example `3h` for a
1817
+ # three hour window. Secrets Manager rotates your secret at any time
1818
+ # during this window. The window must not extend into the next
1819
+ # rotation window or the next UTC day. The window starts according to
1820
+ # the `ScheduleExpression`. If you don't specify a `Duration`, for a
1821
+ # `ScheduleExpression` in hours, the window automatically closes after
1822
+ # one hour. For a `ScheduleExpression` in days, the window
1823
+ # automatically closes at the end of the UTC day. For more
1824
+ # information, including examples, see [Schedule expressions in
1825
+ # Secrets Manager rotation][1] in the *Secrets Manager Users Guide*.
1826
+ #
1827
+ #
1828
+ #
1829
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_schedule.html
1830
+ # @return [String]
1831
+ #
1832
+ # @!attribute [rw] schedule_expression
1833
+ # A `cron()` or `rate()` expression that defines the schedule for
1834
+ # rotating your secret. Secrets Manager rotation schedules use UTC
1835
+ # time zone. Secrets Manager rotates your secret any time during a
1836
+ # rotation window.
1837
+ #
1838
+ # Secrets Manager `rate()` expressions represent the interval in hours
1839
+ # or days that you want to rotate your secret, for example `rate(12
1840
+ # hours)` or `rate(10 days)`. You can rotate a secret as often as
1841
+ # every four hours. If you use a `rate()` expression, the rotation
1842
+ # window starts at midnight. For a rate in hours, the default rotation
1843
+ # window closes after one hour. For a rate in days, the default
1844
+ # rotation window closes at the end of the day. You can set the
1845
+ # `Duration` to change the rotation window. The rotation window must
1846
+ # not extend into the next UTC day or into the next rotation window.
1847
+ #
1848
+ # You can use a `cron()` expression to create a rotation schedule that
1849
+ # is more detailed than a rotation interval. For more information,
1850
+ # including examples, see [Schedule expressions in Secrets Manager
1851
+ # rotation][1] in the *Secrets Manager Users Guide*. For a cron
1852
+ # expression that represents a schedule in hours, the default rotation
1853
+ # window closes after one hour. For a cron expression that represents
1854
+ # a schedule in days, the default rotation window closes at the end of
1855
+ # the day. You can set the `Duration` to change the rotation window.
1856
+ # The rotation window must not extend into the next UTC day or into
1857
+ # the next rotation window.
1858
+ #
1859
+ #
1860
+ #
1861
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_schedule.html
1862
+ # @return [String]
1863
+ #
1656
1864
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RotationRulesType AWS API Documentation
1657
1865
  #
1658
1866
  class RotationRulesType < Struct.new(
1659
- :automatically_after_days)
1867
+ :automatically_after_days,
1868
+ :duration,
1869
+ :schedule_expression)
1870
+ SENSITIVE = []
1660
1871
  include Aws::Structure
1661
1872
  end
1662
1873
 
1663
1874
  # A structure that contains the details about a secret. It does not
1664
1875
  # include the encrypted `SecretString` and `SecretBinary` values. To get
1665
- # those values, use the GetSecretValue operation.
1876
+ # those values, use [GetSecretValue][1] .
1666
1877
  #
1667
- # @!attribute [rw] arn
1668
- # The Amazon Resource Name (ARN) of the secret.
1669
1878
  #
1670
- # For more information about ARNs in Secrets Manager, see [Policy
1671
- # Resources][1] in the *AWS Secrets Manager User Guide*.
1672
1879
  #
1880
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_GetSecretValue.html
1673
1881
  #
1674
- #
1675
- # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#iam-resources
1882
+ # @!attribute [rw] arn
1883
+ # The Amazon Resource Name (ARN) of the secret.
1676
1884
  # @return [String]
1677
1885
  #
1678
1886
  # @!attribute [rw] name
1679
- # The friendly name of the secret. You can use forward slashes in the
1680
- # name to represent a path hierarchy. For example,
1681
- # `/prod/databases/dbserver1` could represent the secret for a server
1682
- # named `dbserver1` in the folder `databases` in the folder `prod`.
1887
+ # The friendly name of the secret.
1683
1888
  # @return [String]
1684
1889
  #
1685
1890
  # @!attribute [rw] description
@@ -1687,22 +1892,24 @@ module Aws::SecretsManager
1687
1892
  # @return [String]
1688
1893
  #
1689
1894
  # @!attribute [rw] kms_key_id
1690
- # The ARN or alias of the AWS KMS customer master key (CMK) that's
1691
- # used to encrypt the `SecretString` and `SecretBinary` fields in each
1692
- # version of the secret. If you don't provide a key, then Secrets
1693
- # Manager defaults to encrypting the secret fields with the default
1694
- # KMS CMK (the one named `awssecretsmanager`) for this account.
1895
+ # The ARN of the KMS key that Secrets Manager uses to encrypt the
1896
+ # secret value. If the secret is encrypted with the Amazon Web
1897
+ # Services managed key `aws/secretsmanager`, this field is omitted.
1695
1898
  # @return [String]
1696
1899
  #
1697
1900
  # @!attribute [rw] rotation_enabled
1698
- # Indicated whether automatic, scheduled rotation is enabled for this
1901
+ # Indicates whether automatic, scheduled rotation is enabled for this
1699
1902
  # secret.
1700
1903
  # @return [Boolean]
1701
1904
  #
1702
1905
  # @!attribute [rw] rotation_lambda_arn
1703
- # The ARN of an AWS Lambda function that's invoked by Secrets Manager
1704
- # to rotate and expire the secret either automatically per the
1705
- # schedule or manually by a call to RotateSecret.
1906
+ # The ARN of an Amazon Web Services Lambda function invoked by Secrets
1907
+ # Manager to rotate and expire the secret either automatically per the
1908
+ # schedule or manually by a call to [ `RotateSecret` ][1].
1909
+ #
1910
+ #
1911
+ #
1912
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_RotateSecret.html
1706
1913
  # @return [String]
1707
1914
  #
1708
1915
  # @!attribute [rw] rotation_rules
@@ -1710,8 +1917,9 @@ module Aws::SecretsManager
1710
1917
  # @return [Types::RotationRulesType]
1711
1918
  #
1712
1919
  # @!attribute [rw] last_rotated_date
1713
- # The last date and time that the rotation process for this secret was
1714
- # invoked.
1920
+ # The most recent date and time that the Secrets Manager rotation
1921
+ # process was successfully completed. This value is null if the secret
1922
+ # hasn't ever rotated.
1715
1923
  # @return [Time]
1716
1924
  #
1717
1925
  # @!attribute [rw] last_changed_date
@@ -1719,27 +1927,42 @@ module Aws::SecretsManager
1719
1927
  # @return [Time]
1720
1928
  #
1721
1929
  # @!attribute [rw] last_accessed_date
1722
- # The last date that this secret was accessed. This value is truncated
1723
- # to midnight of the date and therefore shows only the date, not the
1724
- # time.
1930
+ # The date that the secret was last accessed in the Region. This field
1931
+ # is omitted if the secret has never been retrieved in the Region.
1725
1932
  # @return [Time]
1726
1933
  #
1727
1934
  # @!attribute [rw] deleted_date
1728
- # The date and time on which this secret was deleted. Not present on
1729
- # active secrets. The secret can be recovered until the number of days
1730
- # in the recovery window has passed, as specified in the
1731
- # `RecoveryWindowInDays` parameter of the DeleteSecret operation.
1935
+ # The date and time the deletion of the secret occurred. Not present
1936
+ # on active secrets. The secret can be recovered until the number of
1937
+ # days in the recovery window has passed, as specified in the
1938
+ # `RecoveryWindowInDays` parameter of the [ `DeleteSecret` ][1]
1939
+ # operation.
1940
+ #
1941
+ #
1942
+ #
1943
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_DeleteSecret.html
1944
+ # @return [Time]
1945
+ #
1946
+ # @!attribute [rw] next_rotation_date
1947
+ # The next rotation is scheduled to occur on or before this date. If
1948
+ # the secret isn't configured for rotation or rotation has been
1949
+ # disabled, Secrets Manager returns null.
1732
1950
  # @return [Time]
1733
1951
  #
1734
1952
  # @!attribute [rw] tags
1735
- # The list of user-defined tags that are associated with the secret.
1736
- # To add tags to a secret, use TagResource. To remove tags, use
1737
- # UntagResource.
1953
+ # The list of user-defined tags associated with the secret. To add
1954
+ # tags to a secret, use [ `TagResource` ][1]. To remove tags, use [
1955
+ # `UntagResource` ][2].
1956
+ #
1957
+ #
1958
+ #
1959
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_TagResource.html
1960
+ # [2]: https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_UntagResource.html
1738
1961
  # @return [Array<Types::Tag>]
1739
1962
  #
1740
1963
  # @!attribute [rw] secret_versions_to_stages
1741
1964
  # A list of all of the currently assigned `SecretVersionStage` staging
1742
- # labels and the `SecretVersionId` that each is attached to. Staging
1965
+ # labels and the `SecretVersionId` attached to each one. Staging
1743
1966
  # labels are used to keep track of the different versions during the
1744
1967
  # rotation process.
1745
1968
  #
@@ -1751,6 +1974,15 @@ module Aws::SecretsManager
1751
1974
  # @return [Hash<String,Array<String>>]
1752
1975
  #
1753
1976
  # @!attribute [rw] owning_service
1977
+ # Returns the name of the service that created the secret.
1978
+ # @return [String]
1979
+ #
1980
+ # @!attribute [rw] created_date
1981
+ # The date and time when a secret was created.
1982
+ # @return [Time]
1983
+ #
1984
+ # @!attribute [rw] primary_region
1985
+ # The Region where Secrets Manager originated the secret.
1754
1986
  # @return [String]
1755
1987
  #
1756
1988
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/SecretListEntry AWS API Documentation
@@ -1767,9 +1999,66 @@ module Aws::SecretsManager
1767
1999
  :last_changed_date,
1768
2000
  :last_accessed_date,
1769
2001
  :deleted_date,
2002
+ :next_rotation_date,
1770
2003
  :tags,
1771
2004
  :secret_versions_to_stages,
1772
- :owning_service)
2005
+ :owning_service,
2006
+ :created_date,
2007
+ :primary_region)
2008
+ SENSITIVE = []
2009
+ include Aws::Structure
2010
+ end
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]
1773
2062
  include Aws::Structure
1774
2063
  end
1775
2064
 
@@ -1794,32 +2083,55 @@ module Aws::SecretsManager
1794
2083
  # The date and time this version of the secret was created.
1795
2084
  # @return [Time]
1796
2085
  #
2086
+ # @!attribute [rw] kms_key_ids
2087
+ # The KMS keys used to encrypt the secret version.
2088
+ # @return [Array<String>]
2089
+ #
1797
2090
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/SecretVersionsListEntry AWS API Documentation
1798
2091
  #
1799
2092
  class SecretVersionsListEntry < Struct.new(
1800
2093
  :version_id,
1801
2094
  :version_stages,
1802
2095
  :last_accessed_date,
1803
- :created_date)
2096
+ :created_date,
2097
+ :kms_key_ids)
2098
+ SENSITIVE = []
1804
2099
  include Aws::Structure
1805
2100
  end
1806
2101
 
1807
- # A structure that contains information about a tag.
2102
+ # @!attribute [rw] secret_id
2103
+ # The ARN of the primary secret.
2104
+ # @return [String]
2105
+ #
2106
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/StopReplicationToReplicaRequest AWS API Documentation
2107
+ #
2108
+ class StopReplicationToReplicaRequest < Struct.new(
2109
+ :secret_id)
2110
+ SENSITIVE = []
2111
+ include Aws::Structure
2112
+ end
2113
+
2114
+ # @!attribute [rw] arn
2115
+ # The ARN of the promoted secret. The ARN is the same as the original
2116
+ # primary secret except the Region is changed.
2117
+ # @return [String]
1808
2118
  #
1809
- # @note When making an API call, you may pass Tag
1810
- # data as a hash:
2119
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/StopReplicationToReplicaResponse AWS API Documentation
1811
2120
  #
1812
- # {
1813
- # key: "TagKeyType",
1814
- # value: "TagValueType",
1815
- # }
2121
+ class StopReplicationToReplicaResponse < Struct.new(
2122
+ :arn)
2123
+ SENSITIVE = []
2124
+ include Aws::Structure
2125
+ end
2126
+
2127
+ # A structure that contains information about a tag.
1816
2128
  #
1817
2129
  # @!attribute [rw] key
1818
2130
  # The key identifier, or name, of the tag.
1819
2131
  # @return [String]
1820
2132
  #
1821
2133
  # @!attribute [rw] value
1822
- # The string value that's associated with the key of the tag.
2134
+ # The string value associated with the key of the tag.
1823
2135
  # @return [String]
1824
2136
  #
1825
2137
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/Tag AWS API Documentation
@@ -1827,58 +2139,35 @@ module Aws::SecretsManager
1827
2139
  class Tag < Struct.new(
1828
2140
  :key,
1829
2141
  :value)
2142
+ SENSITIVE = []
1830
2143
  include Aws::Structure
1831
2144
  end
1832
2145
 
1833
- # @note When making an API call, you may pass TagResourceRequest
1834
- # data as a hash:
2146
+ # @!attribute [rw] secret_id
2147
+ # The identifier for the secret to attach tags to. You can specify
2148
+ # either the Amazon Resource Name (ARN) or the friendly name of the
2149
+ # secret.
1835
2150
  #
1836
- # {
1837
- # secret_id: "SecretIdType", # required
1838
- # tags: [ # required
1839
- # {
1840
- # key: "TagKeyType",
1841
- # value: "TagValueType",
1842
- # },
1843
- # ],
1844
- # }
2151
+ # For an ARN, we recommend that you specify a complete ARN rather than
2152
+ # a partial ARN. See [Finding a secret from a partial ARN][1].
1845
2153
  #
1846
- # @!attribute [rw] secret_id
1847
- # The identifier for the secret that you want to attach tags to. You
1848
- # can specify either the Amazon Resource Name (ARN) or the friendly
1849
- # name of the secret.
1850
- #
1851
- # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
1852
- # complete ARN. You can specify a partial ARN too—for example, if you
1853
- # don’t include the final hyphen and six random characters that
1854
- # Secrets Manager adds at the end of the ARN when you created the
1855
- # secret. A partial ARN match can work as long as it uniquely matches
1856
- # only one secret. However, if your secret has a name that ends in a
1857
- # hyphen followed by six characters (before Secrets Manager adds the
1858
- # hyphen and six characters to the ARN) and you try to use that as a
1859
- # partial ARN, then those characters cause Secrets Manager to assume
1860
- # that you’re specifying a complete ARN. This confusion can cause
1861
- # unexpected results. To avoid this situation, we recommend that you
1862
- # don’t create secret names that end with a hyphen followed by six
1863
- # characters.
1864
2154
  #
1865
- # </note>
2155
+ #
2156
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
1866
2157
  # @return [String]
1867
2158
  #
1868
2159
  # @!attribute [rw] tags
1869
- # The tags to attach to the secret. Each element in the list consists
1870
- # of a `Key` and a `Value`.
2160
+ # The tags to attach to the secret as a JSON text string argument.
2161
+ # Each element in the list consists of a `Key` and a `Value`.
1871
2162
  #
1872
- # This parameter to the API requires a JSON text string argument. For
1873
- # information on how to format a JSON parameter for the various
1874
- # command line tool environments, see [Using JSON for Parameters][1]
1875
- # in the *AWS CLI User Guide*. For the AWS CLI, you can also use the
1876
- # syntax: `--Tags
1877
- # Key="Key1",Value="Value1",Key="Key2",Value="Value2"[,…]`
2163
+ # For storing multiple values, we recommend that you use a JSON text
2164
+ # string argument and specify key/value pairs. For more information,
2165
+ # see [Specifying parameter values for the Amazon Web Services CLI][1]
2166
+ # in the Amazon Web Services CLI User Guide.
1878
2167
  #
1879
2168
  #
1880
2169
  #
1881
- # [1]: https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json
2170
+ # [1]: https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html
1882
2171
  # @return [Array<Types::Tag>]
1883
2172
  #
1884
2173
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/TagResourceRequest AWS API Documentation
@@ -1886,37 +2175,19 @@ module Aws::SecretsManager
1886
2175
  class TagResourceRequest < Struct.new(
1887
2176
  :secret_id,
1888
2177
  :tags)
2178
+ SENSITIVE = []
1889
2179
  include Aws::Structure
1890
2180
  end
1891
2181
 
1892
- # @note When making an API call, you may pass UntagResourceRequest
1893
- # data as a hash:
2182
+ # @!attribute [rw] secret_id
2183
+ # The ARN or name of the secret.
1894
2184
  #
1895
- # {
1896
- # secret_id: "SecretIdType", # required
1897
- # tag_keys: ["TagKeyType"], # required
1898
- # }
2185
+ # For an ARN, we recommend that you specify a complete ARN rather than
2186
+ # a partial ARN. See [Finding a secret from a partial ARN][1].
1899
2187
  #
1900
- # @!attribute [rw] secret_id
1901
- # The identifier for the secret that you want to remove tags from. You
1902
- # can specify either the Amazon Resource Name (ARN) or the friendly
1903
- # name of the secret.
1904
- #
1905
- # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
1906
- # complete ARN. You can specify a partial ARN too—for example, if you
1907
- # don’t include the final hyphen and six random characters that
1908
- # Secrets Manager adds at the end of the ARN when you created the
1909
- # secret. A partial ARN match can work as long as it uniquely matches
1910
- # only one secret. However, if your secret has a name that ends in a
1911
- # hyphen followed by six characters (before Secrets Manager adds the
1912
- # hyphen and six characters to the ARN) and you try to use that as a
1913
- # partial ARN, then those characters cause Secrets Manager to assume
1914
- # that you’re specifying a complete ARN. This confusion can cause
1915
- # unexpected results. To avoid this situation, we recommend that you
1916
- # don’t create secret names that end with a hyphen followed by six
1917
- # characters.
1918
2188
  #
1919
- # </note>
2189
+ #
2190
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
1920
2191
  # @return [String]
1921
2192
  #
1922
2193
  # @!attribute [rw] tag_keys
@@ -1924,14 +2195,16 @@ module Aws::SecretsManager
1924
2195
  # specify the value. Both the key and its associated value are
1925
2196
  # removed.
1926
2197
  #
1927
- # This parameter to the API requires a JSON text string argument. For
1928
- # information on how to format a JSON parameter for the various
1929
- # command line tool environments, see [Using JSON for Parameters][1]
1930
- # in the *AWS CLI User Guide*.
2198
+ # This parameter requires a JSON text string argument.
2199
+ #
2200
+ # For storing multiple values, we recommend that you use a JSON text
2201
+ # string argument and specify key/value pairs. For more information,
2202
+ # see [Specifying parameter values for the Amazon Web Services CLI][1]
2203
+ # in the Amazon Web Services CLI User Guide.
1931
2204
  #
1932
2205
  #
1933
2206
  #
1934
- # [1]: https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json
2207
+ # [1]: https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html
1935
2208
  # @return [Array<String>]
1936
2209
  #
1937
2210
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UntagResourceRequest AWS API Documentation
@@ -1939,79 +2212,42 @@ module Aws::SecretsManager
1939
2212
  class UntagResourceRequest < Struct.new(
1940
2213
  :secret_id,
1941
2214
  :tag_keys)
2215
+ SENSITIVE = []
1942
2216
  include Aws::Structure
1943
2217
  end
1944
2218
 
1945
- # @note When making an API call, you may pass UpdateSecretRequest
1946
- # data as a hash:
2219
+ # @!attribute [rw] secret_id
2220
+ # The ARN or name of the secret.
1947
2221
  #
1948
- # {
1949
- # secret_id: "SecretIdType", # required
1950
- # client_request_token: "ClientRequestTokenType",
1951
- # description: "DescriptionType",
1952
- # kms_key_id: "KmsKeyIdType",
1953
- # secret_binary: "data",
1954
- # secret_string: "SecretStringType",
1955
- # }
2222
+ # For an ARN, we recommend that you specify a complete ARN rather than
2223
+ # a partial ARN. See [Finding a secret from a partial ARN][1].
1956
2224
  #
1957
- # @!attribute [rw] secret_id
1958
- # Specifies the secret that you want to modify or to which you want to
1959
- # add a new version. You can specify either the Amazon Resource Name
1960
- # (ARN) or the friendly name of the secret.
1961
- #
1962
- # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
1963
- # complete ARN. You can specify a partial ARN too—for example, if you
1964
- # don’t include the final hyphen and six random characters that
1965
- # Secrets Manager adds at the end of the ARN when you created the
1966
- # secret. A partial ARN match can work as long as it uniquely matches
1967
- # only one secret. However, if your secret has a name that ends in a
1968
- # hyphen followed by six characters (before Secrets Manager adds the
1969
- # hyphen and six characters to the ARN) and you try to use that as a
1970
- # partial ARN, then those characters cause Secrets Manager to assume
1971
- # that you’re specifying a complete ARN. This confusion can cause
1972
- # unexpected results. To avoid this situation, we recommend that you
1973
- # don’t create secret names that end with a hyphen followed by six
1974
- # characters.
1975
2225
  #
1976
- # </note>
2226
+ #
2227
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
1977
2228
  # @return [String]
1978
2229
  #
1979
2230
  # @!attribute [rw] client_request_token
1980
- # (Optional) If you want to add a new version to the secret, this
1981
- # parameter specifies a unique identifier for the new version that
1982
- # helps ensure idempotency.
1983
- #
1984
- # If you use the AWS CLI or one of the AWS SDK to call this operation,
1985
- # then you can leave this parameter empty. The CLI or SDK generates a
1986
- # random UUID for you and includes that in the request. If you don't
1987
- # use the SDK and instead generate a raw HTTP request to the Secrets
1988
- # Manager service endpoint, then you must generate a
1989
- # `ClientRequestToken` yourself for new versions and include that
1990
- # value in the request.
1991
- #
1992
- # You typically only need to interact with this value if you implement
1993
- # your own retry logic and want to ensure that a given secret is not
1994
- # created twice. We recommend that you generate a [UUID-type][1] value
1995
- # to ensure uniqueness within the specified secret.
1996
- #
1997
- # Secrets Manager uses this value to prevent the accidental creation
1998
- # of duplicate versions if there are failures and retries during the
1999
- # Lambda rotation function's processing.
2231
+ # If you include `SecretString` or `SecretBinary`, then Secrets
2232
+ # Manager creates a new version for the secret, and this parameter
2233
+ # specifies the unique identifier for the new version.
2000
2234
  #
2001
- # * If the `ClientRequestToken` value isn't already associated with a
2002
- # version of the secret then a new version of the secret is created.
2235
+ # <note markdown="1"> If you use the Amazon Web Services CLI or one of the Amazon Web
2236
+ # Services SDKs to call this operation, then you can leave this
2237
+ # parameter empty. The CLI or SDK generates a random UUID for you and
2238
+ # includes it as the value for this parameter in the request.
2003
2239
  #
2004
- # * If a version with this value already exists and that version's
2005
- # `SecretString` and `SecretBinary` values are the same as those in
2006
- # the request then the request is ignored (the operation is
2007
- # idempotent).
2240
+ # </note>
2008
2241
  #
2009
- # * If a version with this value already exists and that version's
2010
- # `SecretString` and `SecretBinary` values are different from the
2011
- # request then an error occurs because you cannot modify an existing
2012
- # secret value.
2242
+ # If you generate a raw HTTP request to the Secrets Manager service
2243
+ # endpoint, then you must generate a `ClientRequestToken` and include
2244
+ # it in the request.
2013
2245
  #
2014
- # This value becomes the `VersionId` of the new version.
2246
+ # This value helps ensure idempotency. Secrets Manager uses this value
2247
+ # to prevent the accidental creation of duplicate versions if there
2248
+ # are failures and retries during a rotation. We recommend that you
2249
+ # generate a [UUID-type][1] value to ensure uniqueness of your
2250
+ # versions within the specified secret.
2015
2251
  #
2016
2252
  # **A suitable default value is auto-generated.** You should normally
2017
2253
  # not need to pass this option.
@@ -2022,67 +2258,72 @@ module Aws::SecretsManager
2022
2258
  # @return [String]
2023
2259
  #
2024
2260
  # @!attribute [rw] description
2025
- # (Optional) Specifies an updated user-provided description of the
2026
- # secret.
2261
+ # The description of the secret.
2027
2262
  # @return [String]
2028
2263
  #
2029
2264
  # @!attribute [rw] kms_key_id
2030
- # (Optional) Specifies an updated ARN or alias of the AWS KMS customer
2031
- # master key (CMK) to be used to encrypt the protected text in new
2032
- # versions of this secret.
2265
+ # The ARN, key ID, or alias of the KMS key that Secrets Manager uses
2266
+ # to encrypt new secret versions as well as any existing versions with
2267
+ # the staging labels `AWSCURRENT`, `AWSPENDING`, or `AWSPREVIOUS`. If
2268
+ # you don't have `kms:Encrypt` permission to the new key, Secrets
2269
+ # Manager does not re-encrypt existing secret versions with the new
2270
+ # key. For more information about versions and staging labels, see
2271
+ # [Concepts: Version][1].
2033
2272
  #
2034
- # You can only use the account's default CMK to encrypt and decrypt
2035
- # if you call this operation using credentials from the same account
2036
- # that owns the secret. If the secret is in a different account, then
2037
- # you must create a custom CMK and provide the ARN of that CMK in this
2038
- # field. The user making the call must have permissions to both the
2039
- # secret and the CMK in their respective accounts.
2040
- # @return [String]
2273
+ # A key alias is always prefixed by `alias/`, for example
2274
+ # `alias/aws/secretsmanager`. For more information, see [About
2275
+ # aliases][2].
2041
2276
  #
2042
- # @!attribute [rw] secret_binary
2043
- # (Optional) Specifies updated binary data that you want to encrypt
2044
- # and store in the new version of the secret. To use this parameter in
2045
- # the command-line tools, we recommend that you store your binary data
2046
- # in a file and then use the appropriate technique for your tool to
2047
- # pass the contents of the file as a parameter. Either `SecretBinary`
2048
- # or `SecretString` must have a value, but not both. They cannot both
2049
- # be empty.
2277
+ # If you set this to an empty string, Secrets Manager uses the Amazon
2278
+ # Web Services managed key `aws/secretsmanager`. If this key doesn't
2279
+ # already exist in your account, then Secrets Manager creates it for
2280
+ # you automatically. All users and roles in the Amazon Web Services
2281
+ # account automatically have access to use `aws/secretsmanager`.
2282
+ # Creating `aws/secretsmanager` can result in a one-time significant
2283
+ # delay in returning the result.
2050
2284
  #
2051
- # This parameter is not accessible using the Secrets Manager console.
2052
- # @return [String]
2285
+ # You can only use the Amazon Web Services managed key
2286
+ # `aws/secretsmanager` if you call this operation using credentials
2287
+ # from the same Amazon Web Services account that owns the secret. If
2288
+ # the secret is in a different account, then you must use a customer
2289
+ # managed key and provide the ARN of that KMS key in this field. The
2290
+ # user making the call must have permissions to both the secret and
2291
+ # the KMS key in their respective accounts.
2053
2292
  #
2054
- # @!attribute [rw] secret_string
2055
- # (Optional) Specifies updated text data that you want to encrypt and
2056
- # store in this new version of the secret. Either `SecretBinary` or
2057
- # `SecretString` must have a value, but not both. They cannot both be
2058
- # empty.
2059
2293
  #
2060
- # If you create this secret by using the Secrets Manager console then
2061
- # Secrets Manager puts the protected secret text in only the
2062
- # `SecretString` parameter. The Secrets Manager console stores the
2063
- # information as a JSON structure of key/value pairs that the default
2064
- # Lambda rotation function knows how to parse.
2065
2294
  #
2066
- # For storing multiple values, we recommend that you use a JSON text
2067
- # string argument and specify key/value pairs. For information on how
2068
- # to format a JSON parameter for the various command line tool
2069
- # environments, see [Using JSON for Parameters][1] in the *AWS CLI
2070
- # User Guide*. For example:
2295
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/getting-started.html#term_version
2296
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/alias-about.html
2297
+ # @return [String]
2071
2298
  #
2072
- # `[\{"username":"bob"\},\{"password":"abc123xyz456"\}]`
2299
+ # @!attribute [rw] secret_binary
2300
+ # The binary data to encrypt and store in the new version of the
2301
+ # secret. We recommend that you store your binary data in a file and
2302
+ # then pass the contents of the file as a parameter.
2073
2303
  #
2074
- # If your command-line tool or SDK requires quotation marks around the
2075
- # parameter, you should use single quotes to avoid confusion with the
2076
- # double quotes required in the JSON text. You can also 'escape' the
2077
- # double quote character in the embedded JSON text by prefacing each
2078
- # with a backslash. For example, the following string is surrounded by
2079
- # double-quotes. All of the embedded double quotes are escaped:
2304
+ # Either `SecretBinary` or `SecretString` must have a value, but not
2305
+ # both.
2080
2306
  #
2081
- # `"[\{"username":"bob"\},\{"password":"abc123xyz456"\}]"`
2307
+ # You can't access this parameter in the Secrets Manager console.
2082
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.
2313
+ # @return [String]
2314
+ #
2315
+ # @!attribute [rw] secret_string
2316
+ # The text data to encrypt and store in the new version of the secret.
2317
+ # We recommend you use a JSON structure of key/value pairs for your
2318
+ # secret value.
2083
2319
  #
2320
+ # Either `SecretBinary` or `SecretString` must have a value, but not
2321
+ # both.
2084
2322
  #
2085
- # [1]: https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json
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.
2086
2327
  # @return [String]
2087
2328
  #
2088
2329
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecretRequest AWS API Documentation
@@ -2094,30 +2335,22 @@ module Aws::SecretsManager
2094
2335
  :kms_key_id,
2095
2336
  :secret_binary,
2096
2337
  :secret_string)
2338
+ SENSITIVE = [:secret_binary, :secret_string]
2097
2339
  include Aws::Structure
2098
2340
  end
2099
2341
 
2100
2342
  # @!attribute [rw] arn
2101
2343
  # The ARN of the secret that was updated.
2102
- #
2103
- # <note markdown="1"> Secrets Manager automatically adds several random characters to the
2104
- # name at the end of the ARN when you initially create a secret. This
2105
- # affects only the ARN and not the actual friendly name. This ensures
2106
- # that if you create a new secret with the same name as an old secret
2107
- # that you previously deleted, then users with access to the old
2108
- # secret *don't* automatically get access to the new secret because
2109
- # the ARNs are different.
2110
- #
2111
- # </note>
2112
2344
  # @return [String]
2113
2345
  #
2114
2346
  # @!attribute [rw] name
2115
- # The friendly name of the secret that was updated.
2347
+ # The name of the secret that was updated.
2116
2348
  # @return [String]
2117
2349
  #
2118
2350
  # @!attribute [rw] version_id
2119
- # If a new version of the secret was created by this operation, then
2120
- # `VersionId` contains the unique identifier of the new version.
2351
+ # If Secrets Manager created a new version of the secret during this
2352
+ # operation, then `VersionId` contains the unique identifier of the
2353
+ # new version.
2121
2354
  # @return [String]
2122
2355
  #
2123
2356
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecretResponse AWS API Documentation
@@ -2126,39 +2359,20 @@ module Aws::SecretsManager
2126
2359
  :arn,
2127
2360
  :name,
2128
2361
  :version_id)
2362
+ SENSITIVE = []
2129
2363
  include Aws::Structure
2130
2364
  end
2131
2365
 
2132
- # @note When making an API call, you may pass UpdateSecretVersionStageRequest
2133
- # data as a hash:
2366
+ # @!attribute [rw] secret_id
2367
+ # The ARN or the name of the secret with the version and staging
2368
+ # labelsto modify.
2134
2369
  #
2135
- # {
2136
- # secret_id: "SecretIdType", # required
2137
- # version_stage: "SecretVersionStageType", # required
2138
- # remove_from_version_id: "SecretVersionIdType",
2139
- # move_to_version_id: "SecretVersionIdType",
2140
- # }
2370
+ # For an ARN, we recommend that you specify a complete ARN rather than
2371
+ # a partial ARN. See [Finding a secret from a partial ARN][1].
2141
2372
  #
2142
- # @!attribute [rw] secret_id
2143
- # Specifies the secret with the version whose list of staging labels
2144
- # you want to modify. You can specify either the Amazon Resource Name
2145
- # (ARN) or the friendly name of the secret.
2146
- #
2147
- # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
2148
- # complete ARN. You can specify a partial ARN too—for example, if you
2149
- # don’t include the final hyphen and six random characters that
2150
- # Secrets Manager adds at the end of the ARN when you created the
2151
- # secret. A partial ARN match can work as long as it uniquely matches
2152
- # only one secret. However, if your secret has a name that ends in a
2153
- # hyphen followed by six characters (before Secrets Manager adds the
2154
- # hyphen and six characters to the ARN) and you try to use that as a
2155
- # partial ARN, then those characters cause Secrets Manager to assume
2156
- # that you’re specifying a complete ARN. This confusion can cause
2157
- # unexpected results. To avoid this situation, we recommend that you
2158
- # don’t create secret names that end with a hyphen followed by six
2159
- # characters.
2160
2373
  #
2161
- # </note>
2374
+ #
2375
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
2162
2376
  # @return [String]
2163
2377
  #
2164
2378
  # @!attribute [rw] version_stage
@@ -2166,19 +2380,18 @@ module Aws::SecretsManager
2166
2380
  # @return [String]
2167
2381
  #
2168
2382
  # @!attribute [rw] remove_from_version_id
2169
- # Specifies the secret version ID of the version that the staging
2170
- # label is to be removed from. If the staging label you are trying to
2171
- # attach to one version is already attached to a different version,
2172
- # then you must include this parameter and specify the version that
2173
- # the label is to be removed from. If the label is attached and you
2174
- # either do not specify this parameter, or the version ID does not
2175
- # match, then the operation fails.
2383
+ # The ID of the version that the staging label is to be removed from.
2384
+ # If the staging label you are trying to attach to one version is
2385
+ # already attached to a different version, then you must include this
2386
+ # parameter and specify the version that the label is to be removed
2387
+ # from. If the label is attached and you either do not specify this
2388
+ # parameter, or the version ID does not match, then the operation
2389
+ # fails.
2176
2390
  # @return [String]
2177
2391
  #
2178
2392
  # @!attribute [rw] move_to_version_id
2179
- # (Optional) The secret version ID that you want to add the staging
2180
- # label to. If you want to remove a label from a version, then do not
2181
- # specify this parameter.
2393
+ # The ID of the version to add the staging label to. To remove a label
2394
+ # from a version, then do not specify this parameter.
2182
2395
  #
2183
2396
  # If the staging label is already attached to a different version of
2184
2397
  # the secret, then you must also specify the `RemoveFromVersionId`
@@ -2192,16 +2405,16 @@ module Aws::SecretsManager
2192
2405
  :version_stage,
2193
2406
  :remove_from_version_id,
2194
2407
  :move_to_version_id)
2408
+ SENSITIVE = []
2195
2409
  include Aws::Structure
2196
2410
  end
2197
2411
 
2198
2412
  # @!attribute [rw] arn
2199
- # The ARN of the secret with the staging label that was modified.
2413
+ # The ARN of the secret that was updated.
2200
2414
  # @return [String]
2201
2415
  #
2202
2416
  # @!attribute [rw] name
2203
- # The friendly name of the secret with the staging label that was
2204
- # modified.
2417
+ # The name of the secret that was updated.
2205
2418
  # @return [String]
2206
2419
  #
2207
2420
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecretVersionStageResponse AWS API Documentation
@@ -2209,8 +2422,73 @@ module Aws::SecretsManager
2209
2422
  class UpdateSecretVersionStageResponse < Struct.new(
2210
2423
  :arn,
2211
2424
  :name)
2425
+ SENSITIVE = []
2426
+ include Aws::Structure
2427
+ end
2428
+
2429
+ # @!attribute [rw] secret_id
2430
+ # The ARN or name of the secret with the resource-based policy you
2431
+ # want to validate.
2432
+ # @return [String]
2433
+ #
2434
+ # @!attribute [rw] resource_policy
2435
+ # A JSON-formatted string that contains an Amazon Web Services
2436
+ # resource-based policy. The policy in the string identifies who can
2437
+ # access or manage this secret and its versions. For example policies,
2438
+ # see [Permissions policy examples][1].
2439
+ #
2440
+ #
2441
+ #
2442
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html
2443
+ # @return [String]
2444
+ #
2445
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ValidateResourcePolicyRequest AWS API Documentation
2446
+ #
2447
+ class ValidateResourcePolicyRequest < Struct.new(
2448
+ :secret_id,
2449
+ :resource_policy)
2450
+ SENSITIVE = []
2451
+ include Aws::Structure
2452
+ end
2453
+
2454
+ # @!attribute [rw] policy_validation_passed
2455
+ # True if your policy passes validation, otherwise false.
2456
+ # @return [Boolean]
2457
+ #
2458
+ # @!attribute [rw] validation_errors
2459
+ # Validation errors if your policy didn't pass validation.
2460
+ # @return [Array<Types::ValidationErrorsEntry>]
2461
+ #
2462
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ValidateResourcePolicyResponse AWS API Documentation
2463
+ #
2464
+ class ValidateResourcePolicyResponse < Struct.new(
2465
+ :policy_validation_passed,
2466
+ :validation_errors)
2467
+ SENSITIVE = []
2468
+ include Aws::Structure
2469
+ end
2470
+
2471
+ # Displays errors that occurred during validation of the resource
2472
+ # policy.
2473
+ #
2474
+ # @!attribute [rw] check_name
2475
+ # Checks the name of the policy.
2476
+ # @return [String]
2477
+ #
2478
+ # @!attribute [rw] error_message
2479
+ # Displays error messages if validation encounters problems during
2480
+ # validation of the resource policy.
2481
+ # @return [String]
2482
+ #
2483
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ValidationErrorsEntry AWS API Documentation
2484
+ #
2485
+ class ValidationErrorsEntry < Struct.new(
2486
+ :check_name,
2487
+ :error_message)
2488
+ SENSITIVE = []
2212
2489
  include Aws::Structure
2213
2490
  end
2214
2491
 
2215
2492
  end
2216
2493
  end
2494
+