aws-sdk-secretsmanager 1.39.0 → 1.40.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -38,6 +38,11 @@ module Aws::SecretsManager
38
38
  ExcludeNumbersType = Shapes::BooleanShape.new(name: 'ExcludeNumbersType')
39
39
  ExcludePunctuationType = Shapes::BooleanShape.new(name: 'ExcludePunctuationType')
40
40
  ExcludeUppercaseType = Shapes::BooleanShape.new(name: 'ExcludeUppercaseType')
41
+ Filter = Shapes::StructureShape.new(name: 'Filter')
42
+ FilterNameStringType = Shapes::StringShape.new(name: 'FilterNameStringType')
43
+ FilterValueStringType = Shapes::StringShape.new(name: 'FilterValueStringType')
44
+ FilterValuesStringList = Shapes::ListShape.new(name: 'FilterValuesStringList')
45
+ FiltersListType = Shapes::ListShape.new(name: 'FiltersListType')
41
46
  GetRandomPasswordRequest = Shapes::StructureShape.new(name: 'GetRandomPasswordRequest')
42
47
  GetRandomPasswordResponse = Shapes::StructureShape.new(name: 'GetRandomPasswordResponse')
43
48
  GetResourcePolicyRequest = Shapes::StructureShape.new(name: 'GetResourcePolicyRequest')
@@ -66,6 +71,7 @@ module Aws::SecretsManager
66
71
  OwningServiceType = Shapes::StringShape.new(name: 'OwningServiceType')
67
72
  PasswordLengthType = Shapes::IntegerShape.new(name: 'PasswordLengthType')
68
73
  PreconditionNotMetException = Shapes::StructureShape.new(name: 'PreconditionNotMetException')
74
+ PublicPolicyException = Shapes::StructureShape.new(name: 'PublicPolicyException')
69
75
  PutResourcePolicyRequest = Shapes::StructureShape.new(name: 'PutResourcePolicyRequest')
70
76
  PutResourcePolicyResponse = Shapes::StructureShape.new(name: 'PutResourcePolicyResponse')
71
77
  PutSecretValueRequest = Shapes::StructureShape.new(name: 'PutSecretValueRequest')
@@ -95,17 +101,23 @@ module Aws::SecretsManager
95
101
  SecretVersionsListEntry = Shapes::StructureShape.new(name: 'SecretVersionsListEntry')
96
102
  SecretVersionsListType = Shapes::ListShape.new(name: 'SecretVersionsListType')
97
103
  SecretVersionsToStagesMapType = Shapes::MapShape.new(name: 'SecretVersionsToStagesMapType')
104
+ SortOrderType = Shapes::StringShape.new(name: 'SortOrderType')
98
105
  Tag = Shapes::StructureShape.new(name: 'Tag')
99
106
  TagKeyListType = Shapes::ListShape.new(name: 'TagKeyListType')
100
107
  TagKeyType = Shapes::StringShape.new(name: 'TagKeyType')
101
108
  TagListType = Shapes::ListShape.new(name: 'TagListType')
102
109
  TagResourceRequest = Shapes::StructureShape.new(name: 'TagResourceRequest')
103
110
  TagValueType = Shapes::StringShape.new(name: 'TagValueType')
111
+ TimestampType = Shapes::TimestampShape.new(name: 'TimestampType')
104
112
  UntagResourceRequest = Shapes::StructureShape.new(name: 'UntagResourceRequest')
105
113
  UpdateSecretRequest = Shapes::StructureShape.new(name: 'UpdateSecretRequest')
106
114
  UpdateSecretResponse = Shapes::StructureShape.new(name: 'UpdateSecretResponse')
107
115
  UpdateSecretVersionStageRequest = Shapes::StructureShape.new(name: 'UpdateSecretVersionStageRequest')
108
116
  UpdateSecretVersionStageResponse = Shapes::StructureShape.new(name: 'UpdateSecretVersionStageResponse')
117
+ ValidateResourcePolicyRequest = Shapes::StructureShape.new(name: 'ValidateResourcePolicyRequest')
118
+ ValidateResourcePolicyResponse = Shapes::StructureShape.new(name: 'ValidateResourcePolicyResponse')
119
+ ValidationErrorsEntry = Shapes::StructureShape.new(name: 'ValidationErrorsEntry')
120
+ ValidationErrorsType = Shapes::ListShape.new(name: 'ValidationErrorsType')
109
121
 
110
122
  CancelRotateSecretRequest.add_member(:secret_id, Shapes::ShapeRef.new(shape: SecretIdType, required: true, location_name: "SecretId"))
111
123
  CancelRotateSecretRequest.struct_class = Types::CancelRotateSecretRequest
@@ -166,11 +178,20 @@ module Aws::SecretsManager
166
178
  DescribeSecretResponse.add_member(:tags, Shapes::ShapeRef.new(shape: TagListType, location_name: "Tags"))
167
179
  DescribeSecretResponse.add_member(:version_ids_to_stages, Shapes::ShapeRef.new(shape: SecretVersionsToStagesMapType, location_name: "VersionIdsToStages"))
168
180
  DescribeSecretResponse.add_member(:owning_service, Shapes::ShapeRef.new(shape: OwningServiceType, location_name: "OwningService"))
181
+ DescribeSecretResponse.add_member(:created_date, Shapes::ShapeRef.new(shape: TimestampType, location_name: "CreatedDate", metadata: {"box"=>true}))
169
182
  DescribeSecretResponse.struct_class = Types::DescribeSecretResponse
170
183
 
171
184
  EncryptionFailure.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
172
185
  EncryptionFailure.struct_class = Types::EncryptionFailure
173
186
 
187
+ Filter.add_member(:key, Shapes::ShapeRef.new(shape: FilterNameStringType, location_name: "Key"))
188
+ Filter.add_member(:values, Shapes::ShapeRef.new(shape: FilterValuesStringList, location_name: "Values"))
189
+ Filter.struct_class = Types::Filter
190
+
191
+ FilterValuesStringList.member = Shapes::ShapeRef.new(shape: FilterValueStringType)
192
+
193
+ FiltersListType.member = Shapes::ShapeRef.new(shape: Filter)
194
+
174
195
  GetRandomPasswordRequest.add_member(:password_length, Shapes::ShapeRef.new(shape: PasswordLengthType, location_name: "PasswordLength", metadata: {"box"=>true}))
175
196
  GetRandomPasswordRequest.add_member(:exclude_characters, Shapes::ShapeRef.new(shape: ExcludeCharactersType, location_name: "ExcludeCharacters"))
176
197
  GetRandomPasswordRequest.add_member(:exclude_numbers, Shapes::ShapeRef.new(shape: ExcludeNumbersType, location_name: "ExcludeNumbers", metadata: {"box"=>true}))
@@ -235,6 +256,8 @@ module Aws::SecretsManager
235
256
 
236
257
  ListSecretsRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResultsType, location_name: "MaxResults", metadata: {"box"=>true}))
237
258
  ListSecretsRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: NextTokenType, location_name: "NextToken"))
259
+ ListSecretsRequest.add_member(:filters, Shapes::ShapeRef.new(shape: FiltersListType, location_name: "Filters"))
260
+ ListSecretsRequest.add_member(:sort_order, Shapes::ShapeRef.new(shape: SortOrderType, location_name: "SortOrder"))
238
261
  ListSecretsRequest.struct_class = Types::ListSecretsRequest
239
262
 
240
263
  ListSecretsResponse.add_member(:secret_list, Shapes::ShapeRef.new(shape: SecretListType, location_name: "SecretList"))
@@ -247,8 +270,12 @@ module Aws::SecretsManager
247
270
  PreconditionNotMetException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
248
271
  PreconditionNotMetException.struct_class = Types::PreconditionNotMetException
249
272
 
273
+ PublicPolicyException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
274
+ PublicPolicyException.struct_class = Types::PublicPolicyException
275
+
250
276
  PutResourcePolicyRequest.add_member(:secret_id, Shapes::ShapeRef.new(shape: SecretIdType, required: true, location_name: "SecretId"))
251
277
  PutResourcePolicyRequest.add_member(:resource_policy, Shapes::ShapeRef.new(shape: NonEmptyResourcePolicyType, required: true, location_name: "ResourcePolicy"))
278
+ PutResourcePolicyRequest.add_member(:block_public_policy, Shapes::ShapeRef.new(shape: BooleanType, location_name: "BlockPublicPolicy", metadata: {"box"=>true}))
252
279
  PutResourcePolicyRequest.struct_class = Types::PutResourcePolicyRequest
253
280
 
254
281
  PutResourcePolicyResponse.add_member(:arn, Shapes::ShapeRef.new(shape: SecretARNType, location_name: "ARN"))
@@ -309,6 +336,7 @@ module Aws::SecretsManager
309
336
  SecretListEntry.add_member(:tags, Shapes::ShapeRef.new(shape: TagListType, location_name: "Tags"))
310
337
  SecretListEntry.add_member(:secret_versions_to_stages, Shapes::ShapeRef.new(shape: SecretVersionsToStagesMapType, location_name: "SecretVersionsToStages"))
311
338
  SecretListEntry.add_member(:owning_service, Shapes::ShapeRef.new(shape: OwningServiceType, location_name: "OwningService"))
339
+ SecretListEntry.add_member(:created_date, Shapes::ShapeRef.new(shape: TimestampType, location_name: "CreatedDate", metadata: {"box"=>true}))
312
340
  SecretListEntry.struct_class = Types::SecretListEntry
313
341
 
314
342
  SecretListType.member = Shapes::ShapeRef.new(shape: SecretListEntry)
@@ -365,6 +393,20 @@ module Aws::SecretsManager
365
393
  UpdateSecretVersionStageResponse.add_member(:name, Shapes::ShapeRef.new(shape: SecretNameType, location_name: "Name"))
366
394
  UpdateSecretVersionStageResponse.struct_class = Types::UpdateSecretVersionStageResponse
367
395
 
396
+ ValidateResourcePolicyRequest.add_member(:secret_id, Shapes::ShapeRef.new(shape: SecretIdType, location_name: "SecretId"))
397
+ ValidateResourcePolicyRequest.add_member(:resource_policy, Shapes::ShapeRef.new(shape: NonEmptyResourcePolicyType, required: true, location_name: "ResourcePolicy"))
398
+ ValidateResourcePolicyRequest.struct_class = Types::ValidateResourcePolicyRequest
399
+
400
+ ValidateResourcePolicyResponse.add_member(:policy_validation_passed, Shapes::ShapeRef.new(shape: BooleanType, location_name: "PolicyValidationPassed"))
401
+ ValidateResourcePolicyResponse.add_member(:validation_errors, Shapes::ShapeRef.new(shape: ValidationErrorsType, location_name: "ValidationErrors"))
402
+ ValidateResourcePolicyResponse.struct_class = Types::ValidateResourcePolicyResponse
403
+
404
+ ValidationErrorsEntry.add_member(:check_name, Shapes::ShapeRef.new(shape: NameType, location_name: "CheckName"))
405
+ ValidationErrorsEntry.add_member(:error_message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "ErrorMessage"))
406
+ ValidationErrorsEntry.struct_class = Types::ValidationErrorsEntry
407
+
408
+ ValidationErrorsType.member = Shapes::ShapeRef.new(shape: ValidationErrorsEntry)
409
+
368
410
 
369
411
  # @api private
370
412
  API = Seahorse::Model::Api.new.tap do |api|
@@ -526,6 +568,7 @@ module Aws::SecretsManager
526
568
  o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
527
569
  o.errors << Shapes::ShapeRef.new(shape: InternalServiceError)
528
570
  o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
571
+ o.errors << Shapes::ShapeRef.new(shape: PublicPolicyException)
529
572
  end)
530
573
 
531
574
  api.add_operation(:put_secret_value, Seahorse::Model::Operation.new.tap do |o|
@@ -620,6 +663,19 @@ module Aws::SecretsManager
620
663
  o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
621
664
  o.errors << Shapes::ShapeRef.new(shape: InternalServiceError)
622
665
  end)
666
+
667
+ api.add_operation(:validate_resource_policy, Seahorse::Model::Operation.new.tap do |o|
668
+ o.name = "ValidateResourcePolicy"
669
+ o.http_method = "POST"
670
+ o.http_request_uri = "/"
671
+ o.input = Shapes::ShapeRef.new(shape: ValidateResourcePolicyRequest)
672
+ o.output = Shapes::ShapeRef.new(shape: ValidateResourcePolicyResponse)
673
+ o.errors << Shapes::ShapeRef.new(shape: MalformedPolicyDocumentException)
674
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
675
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
676
+ o.errors << Shapes::ShapeRef.new(shape: InternalServiceError)
677
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
678
+ end)
623
679
  end
624
680
 
625
681
  end
@@ -36,6 +36,7 @@ module Aws::SecretsManager
36
36
  # * {LimitExceededException}
37
37
  # * {MalformedPolicyDocumentException}
38
38
  # * {PreconditionNotMetException}
39
+ # * {PublicPolicyException}
39
40
  # * {ResourceExistsException}
40
41
  # * {ResourceNotFoundException}
41
42
  #
@@ -180,6 +181,21 @@ module Aws::SecretsManager
180
181
  end
181
182
  end
182
183
 
184
+ class PublicPolicyException < ServiceError
185
+
186
+ # @param [Seahorse::Client::RequestContext] context
187
+ # @param [String] message
188
+ # @param [Aws::SecretsManager::Types::PublicPolicyException] data
189
+ def initialize(context, message, data = Aws::EmptyStructure.new)
190
+ super(context, message, data)
191
+ end
192
+
193
+ # @return [String]
194
+ def message
195
+ @message || @data[:message]
196
+ end
197
+ end
198
+
183
199
  class ResourceExistsException < ServiceError
184
200
 
185
201
  # @param [Seahorse::Client::RequestContext] context
@@ -18,9 +18,9 @@ module Aws::SecretsManager
18
18
  # }
19
19
  #
20
20
  # @!attribute [rw] secret_id
21
- # Specifies the secret for which you want to cancel a rotation
22
- # request. You can specify either the Amazon Resource Name (ARN) or
23
- # the friendly name of the secret.
21
+ # Specifies the secret to cancel a rotation request. You can specify
22
+ # either the Amazon Resource Name (ARN) or the friendly name of the
23
+ # secret.
24
24
  #
25
25
  # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
26
26
  # complete ARN. You can specify a partial ARN too—for example, if you
@@ -33,9 +33,15 @@ module Aws::SecretsManager
33
33
  # partial ARN, then those characters cause Secrets Manager to assume
34
34
  # that you’re specifying a complete ARN. This confusion can cause
35
35
  # unexpected results. To avoid this situation, we recommend that you
36
- # don’t create secret names that end with a hyphen followed by six
36
+ # don’t create secret names ending with a hyphen followed by six
37
37
  # characters.
38
38
  #
39
+ # If you specify an incomplete ARN without the random suffix, and
40
+ # instead provide the 'friendly name', you *must* not include the
41
+ # random suffix. If you do include the random suffix added by Secrets
42
+ # Manager, you receive either a *ResourceNotFoundException* or an
43
+ # *AccessDeniedException* error, depending on your permissions.
44
+ #
39
45
  # </note>
40
46
  # @return [String]
41
47
  #
@@ -56,9 +62,9 @@ module Aws::SecretsManager
56
62
  # @return [String]
57
63
  #
58
64
  # @!attribute [rw] version_id
59
- # The unique identifier of the version of the secret that was created
60
- # during the rotation. This version might not be complete, and should
61
- # be evaluated for possible deletion. At the very least, you should
65
+ # The unique identifier of the version of the secret created during
66
+ # the rotation. This version might not be complete, and should be
67
+ # evaluated for possible deletion. At the very least, you should
62
68
  # remove the `VersionStage` value `AWSPENDING` to enable this version
63
69
  # to be deleted. Failing to clean up a cancelled rotation can block
64
70
  # you from successfully starting future rotations.
@@ -98,11 +104,11 @@ module Aws::SecretsManager
98
104
  # The secret name must be ASCII letters, digits, or the following
99
105
  # characters : /\_+=.@-
100
106
  #
101
- # <note markdown="1"> Don't end your secret name with a hyphen followed by six
107
+ # <note markdown="1"> Do not end your secret name with a hyphen followed by six
102
108
  # characters. If you do so, you risk confusion and unexpected results
103
- # when searching for a secret by partial ARN. This is because Secrets
104
- # Manager automatically adds a hyphen and six random characters at the
105
- # end of the ARN.
109
+ # when searching for a secret by partial ARN. Secrets Manager
110
+ # automatically adds a hyphen and six random characters at the end of
111
+ # the ARN.
106
112
  #
107
113
  # </note>
108
114
  # @return [String]
@@ -118,7 +124,7 @@ module Aws::SecretsManager
118
124
  # in the request. If you don't use the SDK and instead generate a raw
119
125
  # HTTP request to the Secrets Manager service endpoint, then you must
120
126
  # generate a `ClientRequestToken` yourself for the new version and
121
- # include that value in the request.
127
+ # include the value in the request.
122
128
  #
123
129
  # </note>
124
130
  #
@@ -131,10 +137,9 @@ module Aws::SecretsManager
131
137
  # * If the `ClientRequestToken` value isn't already associated with a
132
138
  # version of the secret then a new version of the secret is created.
133
139
  #
134
- # * If a version with this value already exists and that version's
140
+ # * If a version with this value already exists and the version
135
141
  # `SecretString` and `SecretBinary` values are the same as those in
136
- # the request, then the request is ignored (the operation is
137
- # idempotent).
142
+ # the request, then the request is ignored.
138
143
  #
139
144
  # * If a version with this value already exists and that version's
140
145
  # `SecretString` and `SecretBinary` values are different from those
@@ -172,9 +177,9 @@ module Aws::SecretsManager
172
177
  # first time it needs to encrypt a version's `SecretString` or
173
178
  # `SecretBinary` fields.
174
179
  #
175
- # You can use the account's default CMK to encrypt and decrypt only
176
- # if you call this operation using credentials from the same account
177
- # that owns the secret. If the secret is in a different account, then
180
+ # You can use the account default CMK to encrypt and decrypt only if
181
+ # you call this operation using credentials from the same account that
182
+ # owns the secret. If the secret resides in a different account, then
178
183
  # you must create a custom CMK and specify the ARN in this field.
179
184
  # @return [String]
180
185
  #
@@ -211,7 +216,7 @@ module Aws::SecretsManager
211
216
  # environments, see [Using JSON for Parameters][1] in the *AWS CLI
212
217
  # User Guide*. For example:
213
218
  #
214
- # `[\{"username":"bob"\},\{"password":"abc123xyz456"\}]`
219
+ # `\{"username":"bob","password":"abc123xyz456"\}`
215
220
  #
216
221
  # If your command-line tool or SDK requires quotation marks around the
217
222
  # parameter, you should use single quotes to avoid confusion with the
@@ -259,15 +264,15 @@ module Aws::SecretsManager
259
264
  # * Tag keys and values are case sensitive.
260
265
  #
261
266
  # * Do not use the `aws:` prefix in your tag names or values because
262
- # it is reserved for AWS use. You can't edit or delete tag names or
263
- # values with this prefix. Tags with this prefix do not count
267
+ # AWS reserves it for AWS use. You can't edit or delete tag names
268
+ # or values with this prefix. Tags with this prefix do not count
264
269
  # against your tags per secret limit.
265
270
  #
266
- # * If your tagging schema will be used across multiple services and
267
- # resources, remember that other services might have restrictions on
268
- # allowed characters. Generally allowed characters are: letters,
269
- # spaces, and numbers representable in UTF-8, plus the following
270
- # special characters: + - = . \_ : / @.
271
+ # * If you use your tagging schema across multiple services and
272
+ # resources, remember other services might have restrictions on
273
+ # allowed characters. Generally allowed characters: letters, spaces,
274
+ # and numbers representable in UTF-8, plus the following special
275
+ # characters: + - = . \_ : / @.
271
276
  #
272
277
  #
273
278
  #
@@ -307,8 +312,8 @@ module Aws::SecretsManager
307
312
  # @return [String]
308
313
  #
309
314
  # @!attribute [rw] version_id
310
- # The unique identifier that's associated with the version of the
311
- # secret you just created.
315
+ # The unique identifier associated with the version of the secret you
316
+ # just created.
312
317
  # @return [String]
313
318
  #
314
319
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CreateSecretResponse AWS API Documentation
@@ -358,9 +363,15 @@ module Aws::SecretsManager
358
363
  # partial ARN, then those characters cause Secrets Manager to assume
359
364
  # that you’re specifying a complete ARN. This confusion can cause
360
365
  # unexpected results. To avoid this situation, we recommend that you
361
- # don’t create secret names that end with a hyphen followed by six
366
+ # don’t create secret names ending with a hyphen followed by six
362
367
  # characters.
363
368
  #
369
+ # If you specify an incomplete ARN without the random suffix, and
370
+ # instead provide the 'friendly name', you *must* not include the
371
+ # random suffix. If you do include the random suffix added by Secrets
372
+ # Manager, you receive either a *ResourceNotFoundException* or an
373
+ # *AccessDeniedException* error, depending on your permissions.
374
+ #
364
375
  # </note>
365
376
  # @return [String]
366
377
  #
@@ -415,9 +426,15 @@ module Aws::SecretsManager
415
426
  # partial ARN, then those characters cause Secrets Manager to assume
416
427
  # that you’re specifying a complete ARN. This confusion can cause
417
428
  # unexpected results. To avoid this situation, we recommend that you
418
- # don’t create secret names that end with a hyphen followed by six
429
+ # don’t create secret names ending with a hyphen followed by six
419
430
  # characters.
420
431
  #
432
+ # If you specify an incomplete ARN without the random suffix, and
433
+ # instead provide the 'friendly name', you *must* not include the
434
+ # random suffix. If you do include the random suffix added by Secrets
435
+ # Manager, you receive either a *ResourceNotFoundException* or an
436
+ # *AccessDeniedException* error, depending on your permissions.
437
+ #
421
438
  # </note>
422
439
  # @return [String]
423
440
  #
@@ -506,9 +523,15 @@ module Aws::SecretsManager
506
523
  # partial ARN, then those characters cause Secrets Manager to assume
507
524
  # that you’re specifying a complete ARN. This confusion can cause
508
525
  # unexpected results. To avoid this situation, we recommend that you
509
- # don’t create secret names that end with a hyphen followed by six
526
+ # don’t create secret names ending with a hyphen followed by six
510
527
  # characters.
511
528
  #
529
+ # If you specify an incomplete ARN without the random suffix, and
530
+ # instead provide the 'friendly name', you *must* not include the
531
+ # random suffix. If you do include the random suffix added by Secrets
532
+ # Manager, you receive either a *ResourceNotFoundException* or an
533
+ # *AccessDeniedException* error, depending on your permissions.
534
+ #
512
535
  # </note>
513
536
  # @return [String]
514
537
  #
@@ -608,6 +631,10 @@ module Aws::SecretsManager
608
631
  # Returns the name of the service that created this secret.
609
632
  # @return [String]
610
633
  #
634
+ # @!attribute [rw] created_date
635
+ # The date that the secret was created.
636
+ # @return [Time]
637
+ #
611
638
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DescribeSecretResponse AWS API Documentation
612
639
  #
613
640
  class DescribeSecretResponse < Struct.new(
@@ -624,7 +651,8 @@ module Aws::SecretsManager
624
651
  :deleted_date,
625
652
  :tags,
626
653
  :version_ids_to_stages,
627
- :owning_service)
654
+ :owning_service,
655
+ :created_date)
628
656
  SENSITIVE = []
629
657
  include Aws::Structure
630
658
  end
@@ -649,6 +677,33 @@ module Aws::SecretsManager
649
677
  include Aws::Structure
650
678
  end
651
679
 
680
+ # Allows you to filter your list of secrets.
681
+ #
682
+ # @note When making an API call, you may pass Filter
683
+ # data as a hash:
684
+ #
685
+ # {
686
+ # key: "description", # accepts description, name, tag-key, tag-value, all
687
+ # values: ["FilterValueStringType"],
688
+ # }
689
+ #
690
+ # @!attribute [rw] key
691
+ # Filters your list of secrets by a specific key.
692
+ # @return [String]
693
+ #
694
+ # @!attribute [rw] values
695
+ # Filters your list of secrets by a specific value.
696
+ # @return [Array<String>]
697
+ #
698
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/Filter AWS API Documentation
699
+ #
700
+ class Filter < Struct.new(
701
+ :key,
702
+ :values)
703
+ SENSITIVE = []
704
+ include Aws::Structure
705
+ end
706
+
652
707
  # @note When making an API call, you may pass GetRandomPasswordRequest
653
708
  # data as a hash:
654
709
  #
@@ -768,9 +823,15 @@ module Aws::SecretsManager
768
823
  # partial ARN, then those characters cause Secrets Manager to assume
769
824
  # that you’re specifying a complete ARN. This confusion can cause
770
825
  # unexpected results. To avoid this situation, we recommend that you
771
- # don’t create secret names that end with a hyphen followed by six
826
+ # don’t create secret names ending with a hyphen followed by six
772
827
  # characters.
773
828
  #
829
+ # If you specify an incomplete ARN without the random suffix, and
830
+ # instead provide the 'friendly name', you *must* not include the
831
+ # random suffix. If you do include the random suffix added by Secrets
832
+ # Manager, you receive either a *ResourceNotFoundException* or an
833
+ # *AccessDeniedException* error, depending on your permissions.
834
+ #
774
835
  # </note>
775
836
  # @return [String]
776
837
  #
@@ -841,9 +902,15 @@ module Aws::SecretsManager
841
902
  # partial ARN, then those characters cause Secrets Manager to assume
842
903
  # that you’re specifying a complete ARN. This confusion can cause
843
904
  # unexpected results. To avoid this situation, we recommend that you
844
- # don’t create secret names that end with a hyphen followed by six
905
+ # don’t create secret names ending with a hyphen followed by six
845
906
  # characters.
846
907
  #
908
+ # If you specify an incomplete ARN without the random suffix, and
909
+ # instead provide the 'friendly name', you *must* not include the
910
+ # random suffix. If you do include the random suffix added by Secrets
911
+ # Manager, you receive either a *ResourceNotFoundException* or an
912
+ # *AccessDeniedException* error, depending on your permissions.
913
+ #
847
914
  # </note>
848
915
  # @return [String]
849
916
  #
@@ -1055,15 +1122,21 @@ module Aws::SecretsManager
1055
1122
  # partial ARN, then those characters cause Secrets Manager to assume
1056
1123
  # that you’re specifying a complete ARN. This confusion can cause
1057
1124
  # unexpected results. To avoid this situation, we recommend that you
1058
- # don’t create secret names that end with a hyphen followed by six
1125
+ # don’t create secret names ending with a hyphen followed by six
1059
1126
  # characters.
1060
1127
  #
1128
+ # If you specify an incomplete ARN without the random suffix, and
1129
+ # instead provide the 'friendly name', you *must* not include the
1130
+ # random suffix. If you do include the random suffix added by Secrets
1131
+ # Manager, you receive either a *ResourceNotFoundException* or an
1132
+ # *AccessDeniedException* error, depending on your permissions.
1133
+ #
1061
1134
  # </note>
1062
1135
  # @return [String]
1063
1136
  #
1064
1137
  # @!attribute [rw] max_results
1065
- # (Optional) Limits the number of results that you want to include in
1066
- # the response. If you don't include this parameter, it defaults to a
1138
+ # (Optional) Limits the number of results you want to include in the
1139
+ # response. If you don't include this parameter, it defaults to a
1067
1140
  # value that's specific to the operation. If additional items exist
1068
1141
  # beyond the maximum you specify, the `NextToken` response element is
1069
1142
  # present and has a value (isn't null). Include that value as the
@@ -1076,10 +1149,10 @@ module Aws::SecretsManager
1076
1149
  #
1077
1150
  # @!attribute [rw] next_token
1078
1151
  # (Optional) Use this parameter in a request if you receive a
1079
- # `NextToken` response in a previous request that indicates that
1080
- # there's more output available. In a subsequent call, set it to the
1081
- # value of the previous call's `NextToken` response to indicate where
1082
- # the output should continue from.
1152
+ # `NextToken` response in a previous request indicating there's more
1153
+ # output available. In a subsequent call, set it to the value of the
1154
+ # previous call `NextToken` response to indicate where the output
1155
+ # should continue from.
1083
1156
  # @return [String]
1084
1157
  #
1085
1158
  # @!attribute [rw] include_deprecated
@@ -1107,10 +1180,10 @@ module Aws::SecretsManager
1107
1180
  #
1108
1181
  # @!attribute [rw] next_token
1109
1182
  # If present in the response, this value indicates that there's more
1110
- # output available than what's included in the current response. This
1111
- # can occur even when the response includes no values at all, such as
1112
- # when you ask for a filtered view of a very long list. Use this value
1113
- # in the `NextToken` request parameter in a subsequent call to the
1183
+ # output available than included in the current response. This can
1184
+ # occur even when the response includes no values at all, such as when
1185
+ # you ask for a filtered view of a very long list. Use this value in
1186
+ # the `NextToken` request parameter in a subsequent call to the
1114
1187
  # operation to continue processing and get the next part of the
1115
1188
  # output. You should repeat this until the `NextToken` response
1116
1189
  # element comes back empty (as `null`).
@@ -1151,11 +1224,18 @@ module Aws::SecretsManager
1151
1224
  # {
1152
1225
  # max_results: 1,
1153
1226
  # next_token: "NextTokenType",
1227
+ # filters: [
1228
+ # {
1229
+ # key: "description", # accepts description, name, tag-key, tag-value, all
1230
+ # values: ["FilterValueStringType"],
1231
+ # },
1232
+ # ],
1233
+ # sort_order: "asc", # accepts asc, desc
1154
1234
  # }
1155
1235
  #
1156
1236
  # @!attribute [rw] max_results
1157
- # (Optional) Limits the number of results that you want to include in
1158
- # the response. If you don't include this parameter, it defaults to a
1237
+ # (Optional) Limits the number of results you want to include in the
1238
+ # response. If you don't include this parameter, it defaults to a
1159
1239
  # value that's specific to the operation. If additional items exist
1160
1240
  # beyond the maximum you specify, the `NextToken` response element is
1161
1241
  # present and has a value (isn't null). Include that value as the
@@ -1168,17 +1248,27 @@ module Aws::SecretsManager
1168
1248
  #
1169
1249
  # @!attribute [rw] next_token
1170
1250
  # (Optional) Use this parameter in a request if you receive a
1171
- # `NextToken` response in a previous request that indicates that
1172
- # there's more output available. In a subsequent call, set it to the
1173
- # value of the previous call's `NextToken` response to indicate where
1174
- # the output should continue from.
1251
+ # `NextToken` response in a previous request indicating there's more
1252
+ # output available. In a subsequent call, set it to the value of the
1253
+ # previous call `NextToken` response to indicate where the output
1254
+ # should continue from.
1255
+ # @return [String]
1256
+ #
1257
+ # @!attribute [rw] filters
1258
+ # Lists the secret request filters.
1259
+ # @return [Array<Types::Filter>]
1260
+ #
1261
+ # @!attribute [rw] sort_order
1262
+ # Lists secrets in the requested order.
1175
1263
  # @return [String]
1176
1264
  #
1177
1265
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecretsRequest AWS API Documentation
1178
1266
  #
1179
1267
  class ListSecretsRequest < Struct.new(
1180
1268
  :max_results,
1181
- :next_token)
1269
+ :next_token,
1270
+ :filters,
1271
+ :sort_order)
1182
1272
  SENSITIVE = []
1183
1273
  include Aws::Structure
1184
1274
  end
@@ -1189,10 +1279,10 @@ module Aws::SecretsManager
1189
1279
  #
1190
1280
  # @!attribute [rw] next_token
1191
1281
  # If present in the response, this value indicates that there's more
1192
- # output available than what's included in the current response. This
1193
- # can occur even when the response includes no values at all, such as
1194
- # when you ask for a filtered view of a very long list. Use this value
1195
- # in the `NextToken` request parameter in a subsequent call to the
1282
+ # output available than included in the current response. This can
1283
+ # occur even when the response includes no values at all, such as when
1284
+ # you ask for a filtered view of a very long list. Use this value in
1285
+ # the `NextToken` request parameter in a subsequent call to the
1196
1286
  # operation to continue processing and get the next part of the
1197
1287
  # output. You should repeat this until the `NextToken` response
1198
1288
  # element comes back empty (as `null`).
@@ -1234,12 +1324,26 @@ module Aws::SecretsManager
1234
1324
  include Aws::Structure
1235
1325
  end
1236
1326
 
1327
+ # The resource policy did not prevent broad access to the secret.
1328
+ #
1329
+ # @!attribute [rw] message
1330
+ # @return [String]
1331
+ #
1332
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PublicPolicyException AWS API Documentation
1333
+ #
1334
+ class PublicPolicyException < Struct.new(
1335
+ :message)
1336
+ SENSITIVE = []
1337
+ include Aws::Structure
1338
+ end
1339
+
1237
1340
  # @note When making an API call, you may pass PutResourcePolicyRequest
1238
1341
  # data as a hash:
1239
1342
  #
1240
1343
  # {
1241
1344
  # secret_id: "SecretIdType", # required
1242
1345
  # resource_policy: "NonEmptyResourcePolicyType", # required
1346
+ # block_public_policy: false,
1243
1347
  # }
1244
1348
  #
1245
1349
  # @!attribute [rw] secret_id
@@ -1258,9 +1362,15 @@ module Aws::SecretsManager
1258
1362
  # partial ARN, then those characters cause Secrets Manager to assume
1259
1363
  # that you’re specifying a complete ARN. This confusion can cause
1260
1364
  # unexpected results. To avoid this situation, we recommend that you
1261
- # don’t create secret names that end with a hyphen followed by six
1365
+ # don’t create secret names ending with a hyphen followed by six
1262
1366
  # characters.
1263
1367
  #
1368
+ # If you specify an incomplete ARN without the random suffix, and
1369
+ # instead provide the 'friendly name', you *must* not include the
1370
+ # random suffix. If you do include the random suffix added by Secrets
1371
+ # Manager, you receive either a *ResourceNotFoundException* or an
1372
+ # *AccessDeniedException* error, depending on your permissions.
1373
+ #
1264
1374
  # </note>
1265
1375
  # @return [String]
1266
1376
  #
@@ -1277,23 +1387,28 @@ module Aws::SecretsManager
1277
1387
  # [1]: http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json
1278
1388
  # @return [String]
1279
1389
  #
1390
+ # @!attribute [rw] block_public_policy
1391
+ # Makes an optional API call to Zelkova to validate the Resource
1392
+ # Policy to prevent broad access to your secret.
1393
+ # @return [Boolean]
1394
+ #
1280
1395
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutResourcePolicyRequest AWS API Documentation
1281
1396
  #
1282
1397
  class PutResourcePolicyRequest < Struct.new(
1283
1398
  :secret_id,
1284
- :resource_policy)
1399
+ :resource_policy,
1400
+ :block_public_policy)
1285
1401
  SENSITIVE = []
1286
1402
  include Aws::Structure
1287
1403
  end
1288
1404
 
1289
1405
  # @!attribute [rw] arn
1290
- # The ARN of the secret that the resource-based policy was retrieved
1291
- # for.
1406
+ # The ARN of the secret retrieved by the resource-based policy.
1292
1407
  # @return [String]
1293
1408
  #
1294
1409
  # @!attribute [rw] name
1295
- # The friendly name of the secret that the resource-based policy was
1296
- # retrieved for.
1410
+ # The friendly name of the secret that the retrieved by the
1411
+ # resource-based policy.
1297
1412
  # @return [String]
1298
1413
  #
1299
1414
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutResourcePolicyResponse AWS API Documentation
@@ -1332,9 +1447,15 @@ module Aws::SecretsManager
1332
1447
  # partial ARN, then those characters cause Secrets Manager to assume
1333
1448
  # that you’re specifying a complete ARN. This confusion can cause
1334
1449
  # unexpected results. To avoid this situation, we recommend that you
1335
- # don’t create secret names that end with a hyphen followed by six
1450
+ # don’t create secret names ending with a hyphen followed by six
1336
1451
  # characters.
1337
1452
  #
1453
+ # If you specify an incomplete ARN without the random suffix, and
1454
+ # instead provide the 'friendly name', you *must* not include the
1455
+ # random suffix. If you do include the random suffix added by Secrets
1456
+ # Manager, you receive either a *ResourceNotFoundException* or an
1457
+ # *AccessDeniedException* error, depending on your permissions.
1458
+ #
1338
1459
  # </note>
1339
1460
  # @return [String]
1340
1461
  #
@@ -1366,7 +1487,7 @@ module Aws::SecretsManager
1366
1487
  # the request then the request is ignored (the operation is
1367
1488
  # idempotent).
1368
1489
  #
1369
- # * If a version with this value already exists and that version's
1490
+ # * If a version with this value already exists and the version of the
1370
1491
  # `SecretString` and `SecretBinary` values are different from those
1371
1492
  # in the request then the request fails because you cannot modify an
1372
1493
  # existing secret version. You can only create new versions to store
@@ -1536,9 +1657,15 @@ module Aws::SecretsManager
1536
1657
  # partial ARN, then those characters cause Secrets Manager to assume
1537
1658
  # that you’re specifying a complete ARN. This confusion can cause
1538
1659
  # unexpected results. To avoid this situation, we recommend that you
1539
- # don’t create secret names that end with a hyphen followed by six
1660
+ # don’t create secret names ending with a hyphen followed by six
1540
1661
  # characters.
1541
1662
  #
1663
+ # If you specify an incomplete ARN without the random suffix, and
1664
+ # instead provide the 'friendly name', you *must* not include the
1665
+ # random suffix. If you do include the random suffix added by Secrets
1666
+ # Manager, you receive either a *ResourceNotFoundException* or an
1667
+ # *AccessDeniedException* error, depending on your permissions.
1668
+ #
1542
1669
  # </note>
1543
1670
  # @return [String]
1544
1671
  #
@@ -1594,9 +1721,15 @@ module Aws::SecretsManager
1594
1721
  # partial ARN, then those characters cause Secrets Manager to assume
1595
1722
  # that you’re specifying a complete ARN. This confusion can cause
1596
1723
  # unexpected results. To avoid this situation, we recommend that you
1597
- # don’t create secret names that end with a hyphen followed by six
1724
+ # don’t create secret names ending with a hyphen followed by six
1598
1725
  # characters.
1599
1726
  #
1727
+ # If you specify an incomplete ARN without the random suffix, and
1728
+ # instead provide the 'friendly name', you *must* not include the
1729
+ # random suffix. If you do include the random suffix added by Secrets
1730
+ # Manager, you receive either a *ResourceNotFoundException* or an
1731
+ # *AccessDeniedException* error, depending on your permissions.
1732
+ #
1600
1733
  # </note>
1601
1734
  # @return [String]
1602
1735
  #
@@ -1612,10 +1745,10 @@ module Aws::SecretsManager
1612
1745
  # generate a `ClientRequestToken` yourself for new versions and
1613
1746
  # include that value in the request.
1614
1747
  #
1615
- # You only need to specify your own value if you are implementing your
1616
- # own retry logic and want to ensure that a given secret is not
1617
- # created twice. We recommend that you generate a [UUID-type][1] value
1618
- # to ensure uniqueness within the specified secret.
1748
+ # You only need to specify your own value if you implement your own
1749
+ # retry logic and want to ensure that a given secret is not created
1750
+ # twice. We recommend that you generate a [UUID-type][1] value to
1751
+ # ensure uniqueness within the specified secret.
1619
1752
  #
1620
1753
  # Secrets Manager uses this value to prevent the accidental creation
1621
1754
  # of duplicate versions if there are failures and retries during the
@@ -1730,11 +1863,11 @@ module Aws::SecretsManager
1730
1863
  # @return [String]
1731
1864
  #
1732
1865
  # @!attribute [rw] kms_key_id
1733
- # The ARN or alias of the AWS KMS customer master key (CMK) that's
1734
- # used to encrypt the `SecretString` and `SecretBinary` fields in each
1735
- # version of the secret. If you don't provide a key, then Secrets
1736
- # Manager defaults to encrypting the secret fields with the default
1737
- # KMS CMK (the one named `awssecretsmanager`) for this account.
1866
+ # The ARN or alias of the AWS KMS customer master key (CMK) used to
1867
+ # encrypt the `SecretString` and `SecretBinary` fields in each version
1868
+ # of the secret. If you don't provide a key, then Secrets Manager
1869
+ # defaults to encrypting the secret fields with the default KMS CMK,
1870
+ # the key named `awssecretsmanager`, for this account.
1738
1871
  # @return [String]
1739
1872
  #
1740
1873
  # @!attribute [rw] rotation_enabled
@@ -1743,9 +1876,9 @@ module Aws::SecretsManager
1743
1876
  # @return [Boolean]
1744
1877
  #
1745
1878
  # @!attribute [rw] rotation_lambda_arn
1746
- # The ARN of an AWS Lambda function that's invoked by Secrets Manager
1747
- # to rotate and expire the secret either automatically per the
1748
- # schedule or manually by a call to RotateSecret.
1879
+ # The ARN of an AWS Lambda function invoked by Secrets Manager to
1880
+ # rotate and expire the secret either automatically per the schedule
1881
+ # or manually by a call to RotateSecret.
1749
1882
  # @return [String]
1750
1883
  #
1751
1884
  # @!attribute [rw] rotation_rules
@@ -1768,21 +1901,21 @@ module Aws::SecretsManager
1768
1901
  # @return [Time]
1769
1902
  #
1770
1903
  # @!attribute [rw] deleted_date
1771
- # The date and time on which this secret was deleted. Not present on
1772
- # active secrets. The secret can be recovered until the number of days
1773
- # in the recovery window has passed, as specified in the
1904
+ # The date and time the deletion of the secret occurred. Not present
1905
+ # on active secrets. The secret can be recovered until the number of
1906
+ # days in the recovery window has passed, as specified in the
1774
1907
  # `RecoveryWindowInDays` parameter of the DeleteSecret operation.
1775
1908
  # @return [Time]
1776
1909
  #
1777
1910
  # @!attribute [rw] tags
1778
- # The list of user-defined tags that are associated with the secret.
1779
- # To add tags to a secret, use TagResource. To remove tags, use
1911
+ # The list of user-defined tags associated with the secret. To add
1912
+ # tags to a secret, use TagResource. To remove tags, use
1780
1913
  # UntagResource.
1781
1914
  # @return [Array<Types::Tag>]
1782
1915
  #
1783
1916
  # @!attribute [rw] secret_versions_to_stages
1784
1917
  # A list of all of the currently assigned `SecretVersionStage` staging
1785
- # labels and the `SecretVersionId` that each is attached to. Staging
1918
+ # labels and the `SecretVersionId` attached to each one. Staging
1786
1919
  # labels are used to keep track of the different versions during the
1787
1920
  # rotation process.
1788
1921
  #
@@ -1797,6 +1930,10 @@ module Aws::SecretsManager
1797
1930
  # Returns the name of the service that created the secret.
1798
1931
  # @return [String]
1799
1932
  #
1933
+ # @!attribute [rw] created_date
1934
+ # The date and time when a secret was created.
1935
+ # @return [Time]
1936
+ #
1800
1937
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/SecretListEntry AWS API Documentation
1801
1938
  #
1802
1939
  class SecretListEntry < Struct.new(
@@ -1813,7 +1950,8 @@ module Aws::SecretsManager
1813
1950
  :deleted_date,
1814
1951
  :tags,
1815
1952
  :secret_versions_to_stages,
1816
- :owning_service)
1953
+ :owning_service,
1954
+ :created_date)
1817
1955
  SENSITIVE = []
1818
1956
  include Aws::Structure
1819
1957
  end
@@ -1865,7 +2003,7 @@ module Aws::SecretsManager
1865
2003
  # @return [String]
1866
2004
  #
1867
2005
  # @!attribute [rw] value
1868
- # The string value that's associated with the key of the tag.
2006
+ # The string value associated with the key of the tag.
1869
2007
  # @return [String]
1870
2008
  #
1871
2009
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/Tag AWS API Documentation
@@ -1906,9 +2044,15 @@ module Aws::SecretsManager
1906
2044
  # partial ARN, then those characters cause Secrets Manager to assume
1907
2045
  # that you’re specifying a complete ARN. This confusion can cause
1908
2046
  # unexpected results. To avoid this situation, we recommend that you
1909
- # don’t create secret names that end with a hyphen followed by six
2047
+ # don’t create secret names ending with a hyphen followed by six
1910
2048
  # characters.
1911
2049
  #
2050
+ # If you specify an incomplete ARN without the random suffix, and
2051
+ # instead provide the 'friendly name', you *must* not include the
2052
+ # random suffix. If you do include the random suffix added by Secrets
2053
+ # Manager, you receive either a *ResourceNotFoundException* or an
2054
+ # *AccessDeniedException* error, depending on your permissions.
2055
+ #
1912
2056
  # </note>
1913
2057
  # @return [String]
1914
2058
  #
@@ -1961,9 +2105,15 @@ module Aws::SecretsManager
1961
2105
  # partial ARN, then those characters cause Secrets Manager to assume
1962
2106
  # that you’re specifying a complete ARN. This confusion can cause
1963
2107
  # unexpected results. To avoid this situation, we recommend that you
1964
- # don’t create secret names that end with a hyphen followed by six
2108
+ # don’t create secret names ending with a hyphen followed by six
1965
2109
  # characters.
1966
2110
  #
2111
+ # If you specify an incomplete ARN without the random suffix, and
2112
+ # instead provide the 'friendly name', you *must* not include the
2113
+ # random suffix. If you do include the random suffix added by Secrets
2114
+ # Manager, you receive either a *ResourceNotFoundException* or an
2115
+ # *AccessDeniedException* error, depending on your permissions.
2116
+ #
1967
2117
  # </note>
1968
2118
  # @return [String]
1969
2119
  #
@@ -2019,9 +2169,15 @@ module Aws::SecretsManager
2019
2169
  # partial ARN, then those characters cause Secrets Manager to assume
2020
2170
  # that you’re specifying a complete ARN. This confusion can cause
2021
2171
  # unexpected results. To avoid this situation, we recommend that you
2022
- # don’t create secret names that end with a hyphen followed by six
2172
+ # don’t create secret names ending with a hyphen followed by six
2023
2173
  # characters.
2024
2174
  #
2175
+ # If you specify an incomplete ARN without the random suffix, and
2176
+ # instead provide the 'friendly name', you *must* not include the
2177
+ # random suffix. If you do include the random suffix added by Secrets
2178
+ # Manager, you receive either a *ResourceNotFoundException* or an
2179
+ # *AccessDeniedException* error, depending on your permissions.
2180
+ #
2025
2181
  # </note>
2026
2182
  # @return [String]
2027
2183
  #
@@ -2191,9 +2347,9 @@ module Aws::SecretsManager
2191
2347
  # }
2192
2348
  #
2193
2349
  # @!attribute [rw] secret_id
2194
- # Specifies the secret with the version whose list of staging labels
2195
- # you want to modify. You can specify either the Amazon Resource Name
2196
- # (ARN) or the friendly name of the secret.
2350
+ # Specifies the secret with the version with the list of staging
2351
+ # labels you want to modify. You can specify either the Amazon
2352
+ # Resource Name (ARN) or the friendly name of the secret.
2197
2353
  #
2198
2354
  # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
2199
2355
  # complete ARN. You can specify a partial ARN too—for example, if you
@@ -2206,9 +2362,15 @@ module Aws::SecretsManager
2206
2362
  # partial ARN, then those characters cause Secrets Manager to assume
2207
2363
  # that you’re specifying a complete ARN. This confusion can cause
2208
2364
  # unexpected results. To avoid this situation, we recommend that you
2209
- # don’t create secret names that end with a hyphen followed by six
2365
+ # don’t create secret names ending with a hyphen followed by six
2210
2366
  # characters.
2211
2367
  #
2368
+ # If you specify an incomplete ARN without the random suffix, and
2369
+ # instead provide the 'friendly name', you *must* not include the
2370
+ # random suffix. If you do include the random suffix added by Secrets
2371
+ # Manager, you receive either a *ResourceNotFoundException* or an
2372
+ # *AccessDeniedException* error, depending on your permissions.
2373
+ #
2212
2374
  # </note>
2213
2375
  # @return [String]
2214
2376
  #
@@ -2228,7 +2390,7 @@ module Aws::SecretsManager
2228
2390
  #
2229
2391
  # @!attribute [rw] move_to_version_id
2230
2392
  # (Optional) The secret version ID that you want to add the staging
2231
- # label to. If you want to remove a label from a version, then do not
2393
+ # label. If you want to remove a label from a version, then do not
2232
2394
  # specify this parameter.
2233
2395
  #
2234
2396
  # If the staging label is already attached to a different version of
@@ -2248,12 +2410,11 @@ module Aws::SecretsManager
2248
2410
  end
2249
2411
 
2250
2412
  # @!attribute [rw] arn
2251
- # The ARN of the secret with the staging label that was modified.
2413
+ # The ARN of the secret with the modified staging label.
2252
2414
  # @return [String]
2253
2415
  #
2254
2416
  # @!attribute [rw] name
2255
- # The friendly name of the secret with the staging label that was
2256
- # modified.
2417
+ # The friendly name of the secret with the modified staging label.
2257
2418
  # @return [String]
2258
2419
  #
2259
2420
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecretVersionStageResponse AWS API Documentation
@@ -2265,5 +2426,93 @@ module Aws::SecretsManager
2265
2426
  include Aws::Structure
2266
2427
  end
2267
2428
 
2429
+ # @note When making an API call, you may pass ValidateResourcePolicyRequest
2430
+ # data as a hash:
2431
+ #
2432
+ # {
2433
+ # secret_id: "SecretIdType",
2434
+ # resource_policy: "NonEmptyResourcePolicyType", # required
2435
+ # }
2436
+ #
2437
+ # @!attribute [rw] secret_id
2438
+ # The identifier for the secret that you want to validate a resource
2439
+ # policy. You can specify either the Amazon Resource Name (ARN) or the
2440
+ # friendly name of the secret.
2441
+ #
2442
+ # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
2443
+ # complete ARN. You can specify a partial ARN too—for example, if you
2444
+ # don’t include the final hyphen and six random characters that
2445
+ # Secrets Manager adds at the end of the ARN when you created the
2446
+ # secret. A partial ARN match can work as long as it uniquely matches
2447
+ # only one secret. However, if your secret has a name that ends in a
2448
+ # hyphen followed by six characters (before Secrets Manager adds the
2449
+ # hyphen and six characters to the ARN) and you try to use that as a
2450
+ # partial ARN, then those characters cause Secrets Manager to assume
2451
+ # that you’re specifying a complete ARN. This confusion can cause
2452
+ # unexpected results. To avoid this situation, we recommend that you
2453
+ # don’t create secret names ending with a hyphen followed by six
2454
+ # characters.
2455
+ #
2456
+ # If you specify an incomplete ARN without the random suffix, and
2457
+ # instead provide the 'friendly name', you *must* not include the
2458
+ # random suffix. If you do include the random suffix added by Secrets
2459
+ # Manager, you receive either a *ResourceNotFoundException* or an
2460
+ # *AccessDeniedException* error, depending on your permissions.
2461
+ #
2462
+ # </note>
2463
+ # @return [String]
2464
+ #
2465
+ # @!attribute [rw] resource_policy
2466
+ # Identifies the Resource Policy attached to the secret.
2467
+ # @return [String]
2468
+ #
2469
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ValidateResourcePolicyRequest AWS API Documentation
2470
+ #
2471
+ class ValidateResourcePolicyRequest < Struct.new(
2472
+ :secret_id,
2473
+ :resource_policy)
2474
+ SENSITIVE = []
2475
+ include Aws::Structure
2476
+ end
2477
+
2478
+ # @!attribute [rw] policy_validation_passed
2479
+ # Returns a message stating that your Reource Policy passed
2480
+ # validation.
2481
+ # @return [Boolean]
2482
+ #
2483
+ # @!attribute [rw] validation_errors
2484
+ # Returns an error message if your policy doesn't pass validatation.
2485
+ # @return [Array<Types::ValidationErrorsEntry>]
2486
+ #
2487
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ValidateResourcePolicyResponse AWS API Documentation
2488
+ #
2489
+ class ValidateResourcePolicyResponse < Struct.new(
2490
+ :policy_validation_passed,
2491
+ :validation_errors)
2492
+ SENSITIVE = []
2493
+ include Aws::Structure
2494
+ end
2495
+
2496
+ # Displays errors that occurred during validation of the resource
2497
+ # policy.
2498
+ #
2499
+ # @!attribute [rw] check_name
2500
+ # Checks the name of the policy.
2501
+ # @return [String]
2502
+ #
2503
+ # @!attribute [rw] error_message
2504
+ # Displays error messages if validation encounters problems during
2505
+ # validation of the resource policy.
2506
+ # @return [String]
2507
+ #
2508
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ValidationErrorsEntry AWS API Documentation
2509
+ #
2510
+ class ValidationErrorsEntry < Struct.new(
2511
+ :check_name,
2512
+ :error_message)
2513
+ SENSITIVE = []
2514
+ include Aws::Structure
2515
+ end
2516
+
2268
2517
  end
2269
2518
  end