aws-sdk-verifiedpermissions 1.18.0 → 1.20.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2e2e4bc3c9002c9339678fb29f3c6ce9c8ad6c017b6c3e16528f4dd22c5ab32
4
- data.tar.gz: 32987a27b39ea1e5ee5dac39c0bb0e339faea04b805c9d0cb7270168685efcdc
3
+ metadata.gz: 4d85723138c59a3b88a56eeb9871fd0bc7171ee2301ab165883c2fe7b34005c8
4
+ data.tar.gz: 7ca6c98dd89c12f2e2153b5db098b79d81cffc38d52a27813b360d54607daebd
5
5
  SHA512:
6
- metadata.gz: 224a6f6b501cec475a0a375b1f4df6a1adc5973a7d6696e59eade5c53493f0b1d3329458a6db844f74be81caed71a8436342312fb0902192fc13e8df587657d4
7
- data.tar.gz: 17cb9addf43c47fab588adcbb689dcf88256ebd5927e274c8092395703d38d57bdfbba8cfc9cf6b4f6761c44799636569aff4eca1c88f52e32ae32894d1e7870
6
+ metadata.gz: '08756b93ef50e0b4f20d509327137497d4931c2349f6cb1301f427f506691b87fa96a8579ad0cbc533a18a7ff9d24d39914cbaa4982a51d02e0a5d1191bb0bec'
7
+ data.tar.gz: d83e6fef4e10e634a9eb8aba8ab10577419e1e5373cbe9521a90698948e23d771d245cb2e62e4a64a7eacb4f61dabbb04efcd05c88584ff54bd27bb643fff227
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.20.0 (2024-04-25)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ 1.19.0 (2024-04-05)
10
+ ------------------
11
+
12
+ * Feature - Adding BatchIsAuthorizedWithToken API which supports multiple authorization requests against a PolicyStore given a bearer token.
13
+
4
14
  1.18.0 (2024-04-04)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.18.0
1
+ 1.20.0
@@ -22,6 +22,7 @@ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
22
22
  require 'aws-sdk-core/plugins/response_paging.rb'
23
23
  require 'aws-sdk-core/plugins/stub_responses.rb'
24
24
  require 'aws-sdk-core/plugins/idempotency_token.rb'
25
+ require 'aws-sdk-core/plugins/invocation_id.rb'
25
26
  require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
26
27
  require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
27
28
  require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
@@ -72,6 +73,7 @@ module Aws::VerifiedPermissions
72
73
  add_plugin(Aws::Plugins::ResponsePaging)
73
74
  add_plugin(Aws::Plugins::StubResponses)
74
75
  add_plugin(Aws::Plugins::IdempotencyToken)
76
+ add_plugin(Aws::Plugins::InvocationId)
75
77
  add_plugin(Aws::Plugins::JsonvalueConverter)
76
78
  add_plugin(Aws::Plugins::ClientMetricsPlugin)
77
79
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
@@ -196,10 +198,17 @@ module Aws::VerifiedPermissions
196
198
  # When set to 'true' the request body will not be compressed
197
199
  # for supported operations.
198
200
  #
199
- # @option options [String] :endpoint
200
- # The client endpoint is normally constructed from the `:region`
201
- # option. You should only configure an `:endpoint` when connecting
202
- # to test or custom endpoints. This should be a valid HTTP(S) URI.
201
+ # @option options [String, URI::HTTPS, URI::HTTP] :endpoint
202
+ # Normally you should not configure the `:endpoint` option
203
+ # directly. This is normally constructed from the `:region`
204
+ # option. Configuring `:endpoint` is normally reserved for
205
+ # connecting to test or custom endpoints. The endpoint should
206
+ # be a URI formatted like:
207
+ #
208
+ # 'http://example.com'
209
+ # 'https://example.com'
210
+ # 'http://example.com:123'
211
+ #
203
212
  #
204
213
  # @option options [Integer] :endpoint_cache_max_entries (1000)
205
214
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -347,50 +356,65 @@ module Aws::VerifiedPermissions
347
356
  # @option options [Aws::VerifiedPermissions::EndpointProvider] :endpoint_provider
348
357
  # The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::VerifiedPermissions::EndpointParameters`
349
358
  #
350
- # @option options [URI::HTTP,String] :http_proxy A proxy to send
351
- # requests through. Formatted like 'http://proxy.com:123'.
352
- #
353
- # @option options [Float] :http_open_timeout (15) The number of
354
- # seconds to wait when opening a HTTP session before raising a
355
- # `Timeout::Error`.
356
- #
357
- # @option options [Float] :http_read_timeout (60) The default
358
- # number of seconds to wait for response data. This value can
359
- # safely be set per-request on the session.
360
- #
361
- # @option options [Float] :http_idle_timeout (5) The number of
362
- # seconds a connection is allowed to sit idle before it is
363
- # considered stale. Stale connections are closed and removed
364
- # from the pool before making a request.
365
- #
366
- # @option options [Float] :http_continue_timeout (1) The number of
367
- # seconds to wait for a 100-continue response before sending the
368
- # request body. This option has no effect unless the request has
369
- # "Expect" header set to "100-continue". Defaults to `nil` which
370
- # disables this behaviour. This value can safely be set per
371
- # request on the session.
372
- #
373
- # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
374
- # in seconds.
375
- #
376
- # @option options [Boolean] :http_wire_trace (false) When `true`,
377
- # HTTP debug output will be sent to the `:logger`.
359
+ # @option options [Float] :http_continue_timeout (1)
360
+ # The number of seconds to wait for a 100-continue response before sending the
361
+ # request body. This option has no effect unless the request has "Expect"
362
+ # header set to "100-continue". Defaults to `nil` which disables this
363
+ # behaviour. This value can safely be set per request on the session.
364
+ #
365
+ # @option options [Float] :http_idle_timeout (5)
366
+ # The number of seconds a connection is allowed to sit idle before it
367
+ # is considered stale. Stale connections are closed and removed from the
368
+ # pool before making a request.
369
+ #
370
+ # @option options [Float] :http_open_timeout (15)
371
+ # The default number of seconds to wait for response data.
372
+ # This value can safely be set per-request on the session.
373
+ #
374
+ # @option options [URI::HTTP,String] :http_proxy
375
+ # A proxy to send requests through. Formatted like 'http://proxy.com:123'.
376
+ #
377
+ # @option options [Float] :http_read_timeout (60)
378
+ # The default number of seconds to wait for response data.
379
+ # This value can safely be set per-request on the session.
380
+ #
381
+ # @option options [Boolean] :http_wire_trace (false)
382
+ # When `true`, HTTP debug output will be sent to the `:logger`.
383
+ #
384
+ # @option options [Proc] :on_chunk_received
385
+ # When a Proc object is provided, it will be used as callback when each chunk
386
+ # of the response body is received. It provides three arguments: the chunk,
387
+ # the number of bytes received, and the total number of
388
+ # bytes in the response (or nil if the server did not send a `content-length`).
389
+ #
390
+ # @option options [Proc] :on_chunk_sent
391
+ # When a Proc object is provided, it will be used as callback when each chunk
392
+ # of the request body is sent. It provides three arguments: the chunk,
393
+ # the number of bytes read from the body, and the total number of
394
+ # bytes in the body.
395
+ #
396
+ # @option options [Boolean] :raise_response_errors (true)
397
+ # When `true`, response errors are raised.
398
+ #
399
+ # @option options [String] :ssl_ca_bundle
400
+ # Full path to the SSL certificate authority bundle file that should be used when
401
+ # verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
402
+ # `:ssl_ca_directory` the the system default will be used if available.
403
+ #
404
+ # @option options [String] :ssl_ca_directory
405
+ # Full path of the directory that contains the unbundled SSL certificate
406
+ # authority files for verifying peer certificates. If you do
407
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
408
+ # default will be used if available.
378
409
  #
379
- # @option options [Boolean] :ssl_verify_peer (true) When `true`,
380
- # SSL peer certificates are verified when establishing a
381
- # connection.
410
+ # @option options [String] :ssl_ca_store
411
+ # Sets the X509::Store to verify peer certificate.
382
412
  #
383
- # @option options [String] :ssl_ca_bundle Full path to the SSL
384
- # certificate authority bundle file that should be used when
385
- # verifying peer certificates. If you do not pass
386
- # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
387
- # will be used if available.
413
+ # @option options [Float] :ssl_timeout
414
+ # Sets the SSL timeout in seconds
388
415
  #
389
- # @option options [String] :ssl_ca_directory Full path of the
390
- # directory that contains the unbundled SSL certificate
391
- # authority files for verifying peer certificates. If you do
392
- # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
393
- # system default will be used if available.
416
+ # @option options [Boolean] :ssl_verify_peer (true)
417
+ # When `true`, SSL peer certificates are verified when establishing a connection.
394
418
  #
395
419
  def initialize(*args)
396
420
  super
@@ -518,6 +542,152 @@ module Aws::VerifiedPermissions
518
542
  req.send_request(options)
519
543
  end
520
544
 
545
+ # Makes a series of decisions about multiple authorization requests for
546
+ # one token. The principal in this request comes from an external
547
+ # identity source in the form of an identity or access token, formatted
548
+ # as a [JSON web token (JWT)][1]. The information in the parameters can
549
+ # also define additional context that Verified Permissions can include
550
+ # in the evaluations.
551
+ #
552
+ # The request is evaluated against all policies in the specified policy
553
+ # store that match the entities that you provide in the entities
554
+ # declaration and in the token. The result of the decisions is a series
555
+ # of `Allow` or `Deny` responses, along with the IDs of the policies
556
+ # that produced each decision.
557
+ #
558
+ # The `entities` of a `BatchIsAuthorizedWithToken` API request can
559
+ # contain up to 100 resources and up to 99 user groups. The `requests`
560
+ # of a `BatchIsAuthorizedWithToken` API request can contain up to 30
561
+ # requests.
562
+ #
563
+ # <note markdown="1"> The `BatchIsAuthorizedWithToken` operation doesn't have its own IAM
564
+ # permission. To authorize this operation for Amazon Web Services
565
+ # principals, include the permission
566
+ # `verifiedpermissions:IsAuthorizedWithToken` in their IAM policies.
567
+ #
568
+ # </note>
569
+ #
570
+ #
571
+ #
572
+ # [1]: https://wikipedia.org/wiki/JSON_Web_Token
573
+ #
574
+ # @option params [required, String] :policy_store_id
575
+ # Specifies the ID of the policy store. Policies in this policy store
576
+ # will be used to make an authorization decision for the input.
577
+ #
578
+ # @option params [String] :identity_token
579
+ # Specifies an identity (ID) token for the principal that you want to
580
+ # authorize in each request. This token is provided to you by the
581
+ # identity provider (IdP) associated with the specified identity source.
582
+ # You must specify either an `accessToken`, an `identityToken`, or both.
583
+ #
584
+ # Must be an ID token. Verified Permissions returns an error if the
585
+ # `token_use` claim in the submitted token isn't `id`.
586
+ #
587
+ # @option params [String] :access_token
588
+ # Specifies an access token for the principal that you want to authorize
589
+ # in each request. This token is provided to you by the identity
590
+ # provider (IdP) associated with the specified identity source. You must
591
+ # specify either an `accessToken`, an `identityToken`, or both.
592
+ #
593
+ # Must be an access token. Verified Permissions returns an error if the
594
+ # `token_use` claim in the submitted token isn't `access`.
595
+ #
596
+ # @option params [Types::EntitiesDefinition] :entities
597
+ # Specifies the list of resources and their associated attributes that
598
+ # Verified Permissions can examine when evaluating the policies.
599
+ #
600
+ # You can't include principals in this parameter, only resource and
601
+ # action entities. This parameter can't include any entities of a type
602
+ # that matches the user or group entity types that you defined in your
603
+ # identity source.
604
+ #
605
+ # * The `BatchIsAuthorizedWithToken` operation takes principal
606
+ # attributes from <b> <i>only</i> </b> the `identityToken` or
607
+ # `accessToken` passed to the operation.
608
+ #
609
+ # * For action entities, you can include only their `Identifier` and
610
+ # `EntityType`.
611
+ #
612
+ # @option params [required, Array<Types::BatchIsAuthorizedWithTokenInputItem>] :requests
613
+ # An array of up to 30 requests that you want Verified Permissions to
614
+ # evaluate.
615
+ #
616
+ # @return [Types::BatchIsAuthorizedWithTokenOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
617
+ #
618
+ # * {Types::BatchIsAuthorizedWithTokenOutput#principal #principal} => Types::EntityIdentifier
619
+ # * {Types::BatchIsAuthorizedWithTokenOutput#results #results} => Array&lt;Types::BatchIsAuthorizedWithTokenOutputItem&gt;
620
+ #
621
+ # @example Request syntax with placeholder values
622
+ #
623
+ # resp = client.batch_is_authorized_with_token({
624
+ # policy_store_id: "PolicyStoreId", # required
625
+ # identity_token: "Token",
626
+ # access_token: "Token",
627
+ # entities: {
628
+ # entity_list: [
629
+ # {
630
+ # identifier: { # required
631
+ # entity_type: "EntityType", # required
632
+ # entity_id: "EntityId", # required
633
+ # },
634
+ # attributes: {
635
+ # "String" => "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
636
+ # },
637
+ # parents: [
638
+ # {
639
+ # entity_type: "EntityType", # required
640
+ # entity_id: "EntityId", # required
641
+ # },
642
+ # ],
643
+ # },
644
+ # ],
645
+ # },
646
+ # requests: [ # required
647
+ # {
648
+ # action: {
649
+ # action_type: "ActionType", # required
650
+ # action_id: "ActionId", # required
651
+ # },
652
+ # resource: {
653
+ # entity_type: "EntityType", # required
654
+ # entity_id: "EntityId", # required
655
+ # },
656
+ # context: {
657
+ # context_map: {
658
+ # "String" => "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
659
+ # },
660
+ # },
661
+ # },
662
+ # ],
663
+ # })
664
+ #
665
+ # @example Response structure
666
+ #
667
+ # resp.principal.entity_type #=> String
668
+ # resp.principal.entity_id #=> String
669
+ # resp.results #=> Array
670
+ # resp.results[0].request.action.action_type #=> String
671
+ # resp.results[0].request.action.action_id #=> String
672
+ # resp.results[0].request.resource.entity_type #=> String
673
+ # resp.results[0].request.resource.entity_id #=> String
674
+ # resp.results[0].request.context.context_map #=> Hash
675
+ # resp.results[0].request.context.context_map["String"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
676
+ # resp.results[0].decision #=> String, one of "ALLOW", "DENY"
677
+ # resp.results[0].determining_policies #=> Array
678
+ # resp.results[0].determining_policies[0].policy_id #=> String
679
+ # resp.results[0].errors #=> Array
680
+ # resp.results[0].errors[0].error_description #=> String
681
+ #
682
+ # @see http://docs.aws.amazon.com/goto/WebAPI/verifiedpermissions-2021-12-01/BatchIsAuthorizedWithToken AWS API Documentation
683
+ #
684
+ # @overload batch_is_authorized_with_token(params = {})
685
+ # @param [Hash] params ({})
686
+ def batch_is_authorized_with_token(params = {}, options = {})
687
+ req = build_request(:batch_is_authorized_with_token, params)
688
+ req.send_request(options)
689
+ end
690
+
521
691
  # Creates a reference to an Amazon Cognito user pool as an external
522
692
  # identity provider (IdP).
523
693
  #
@@ -1421,14 +1591,6 @@ module Aws::VerifiedPermissions
1421
1591
  # `Allow` or `Deny`, along with a list of the policies that resulted in
1422
1592
  # the decision.
1423
1593
  #
1424
- # If you specify the `identityToken` parameter, then this operation
1425
- # derives the principal from that token. You must not also include that
1426
- # principal in the `entities` parameter or the operation fails and
1427
- # reports a conflict between the two entity sources.
1428
- #
1429
- # If you provide only an `accessToken`, then you can include the entity
1430
- # as part of the `entities` parameter to provide additional attributes.
1431
- #
1432
1594
  # At this time, Verified Permissions accepts tokens from only Amazon
1433
1595
  # Cognito.
1434
1596
  #
@@ -1482,8 +1644,10 @@ module Aws::VerifiedPermissions
1482
1644
  # Specifies the list of resources and their associated attributes that
1483
1645
  # Verified Permissions can examine when evaluating the policies.
1484
1646
  #
1485
- # <note markdown="1"> You can include only resource and action entities in this parameter;
1486
- # you can't include principals.
1647
+ # You can't include principals in this parameter, only resource and
1648
+ # action entities. This parameter can't include any entities of a type
1649
+ # that matches the user or group entity types that you defined in your
1650
+ # identity source.
1487
1651
  #
1488
1652
  # * The `IsAuthorizedWithToken` operation takes principal attributes
1489
1653
  # from <b> <i>only</i> </b> the `identityToken` or `accessToken`
@@ -1492,8 +1656,6 @@ module Aws::VerifiedPermissions
1492
1656
  # * For action entities, you can include only their `Identifier` and
1493
1657
  # `EntityType`.
1494
1658
  #
1495
- # </note>
1496
- #
1497
1659
  # @return [Types::IsAuthorizedWithTokenOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1498
1660
  #
1499
1661
  # * {Types::IsAuthorizedWithTokenOutput#decision #decision} => String
@@ -2256,7 +2418,7 @@ module Aws::VerifiedPermissions
2256
2418
  params: params,
2257
2419
  config: config)
2258
2420
  context[:gem_name] = 'aws-sdk-verifiedpermissions'
2259
- context[:gem_version] = '1.18.0'
2421
+ context[:gem_version] = '1.20.0'
2260
2422
  Seahorse::Client::Request.new(handlers, context)
2261
2423
  end
2262
2424
 
@@ -24,6 +24,12 @@ module Aws::VerifiedPermissions
24
24
  BatchIsAuthorizedOutput = Shapes::StructureShape.new(name: 'BatchIsAuthorizedOutput')
25
25
  BatchIsAuthorizedOutputItem = Shapes::StructureShape.new(name: 'BatchIsAuthorizedOutputItem')
26
26
  BatchIsAuthorizedOutputList = Shapes::ListShape.new(name: 'BatchIsAuthorizedOutputList')
27
+ BatchIsAuthorizedWithTokenInput = Shapes::StructureShape.new(name: 'BatchIsAuthorizedWithTokenInput')
28
+ BatchIsAuthorizedWithTokenInputItem = Shapes::StructureShape.new(name: 'BatchIsAuthorizedWithTokenInputItem')
29
+ BatchIsAuthorizedWithTokenInputList = Shapes::ListShape.new(name: 'BatchIsAuthorizedWithTokenInputList')
30
+ BatchIsAuthorizedWithTokenOutput = Shapes::StructureShape.new(name: 'BatchIsAuthorizedWithTokenOutput')
31
+ BatchIsAuthorizedWithTokenOutputItem = Shapes::StructureShape.new(name: 'BatchIsAuthorizedWithTokenOutputItem')
32
+ BatchIsAuthorizedWithTokenOutputList = Shapes::ListShape.new(name: 'BatchIsAuthorizedWithTokenOutputList')
27
33
  Boolean = Shapes::BooleanShape.new(name: 'Boolean')
28
34
  BooleanAttribute = Shapes::BooleanShape.new(name: 'BooleanAttribute')
29
35
  ClientId = Shapes::StringShape.new(name: 'ClientId')
@@ -220,6 +226,32 @@ module Aws::VerifiedPermissions
220
226
 
221
227
  BatchIsAuthorizedOutputList.member = Shapes::ShapeRef.new(shape: BatchIsAuthorizedOutputItem)
222
228
 
229
+ BatchIsAuthorizedWithTokenInput.add_member(:policy_store_id, Shapes::ShapeRef.new(shape: PolicyStoreId, required: true, location_name: "policyStoreId"))
230
+ BatchIsAuthorizedWithTokenInput.add_member(:identity_token, Shapes::ShapeRef.new(shape: Token, location_name: "identityToken"))
231
+ BatchIsAuthorizedWithTokenInput.add_member(:access_token, Shapes::ShapeRef.new(shape: Token, location_name: "accessToken"))
232
+ BatchIsAuthorizedWithTokenInput.add_member(:entities, Shapes::ShapeRef.new(shape: EntitiesDefinition, location_name: "entities"))
233
+ BatchIsAuthorizedWithTokenInput.add_member(:requests, Shapes::ShapeRef.new(shape: BatchIsAuthorizedWithTokenInputList, required: true, location_name: "requests"))
234
+ BatchIsAuthorizedWithTokenInput.struct_class = Types::BatchIsAuthorizedWithTokenInput
235
+
236
+ BatchIsAuthorizedWithTokenInputItem.add_member(:action, Shapes::ShapeRef.new(shape: ActionIdentifier, location_name: "action"))
237
+ BatchIsAuthorizedWithTokenInputItem.add_member(:resource, Shapes::ShapeRef.new(shape: EntityIdentifier, location_name: "resource"))
238
+ BatchIsAuthorizedWithTokenInputItem.add_member(:context, Shapes::ShapeRef.new(shape: ContextDefinition, location_name: "context"))
239
+ BatchIsAuthorizedWithTokenInputItem.struct_class = Types::BatchIsAuthorizedWithTokenInputItem
240
+
241
+ BatchIsAuthorizedWithTokenInputList.member = Shapes::ShapeRef.new(shape: BatchIsAuthorizedWithTokenInputItem)
242
+
243
+ BatchIsAuthorizedWithTokenOutput.add_member(:principal, Shapes::ShapeRef.new(shape: EntityIdentifier, location_name: "principal"))
244
+ BatchIsAuthorizedWithTokenOutput.add_member(:results, Shapes::ShapeRef.new(shape: BatchIsAuthorizedWithTokenOutputList, required: true, location_name: "results"))
245
+ BatchIsAuthorizedWithTokenOutput.struct_class = Types::BatchIsAuthorizedWithTokenOutput
246
+
247
+ BatchIsAuthorizedWithTokenOutputItem.add_member(:request, Shapes::ShapeRef.new(shape: BatchIsAuthorizedWithTokenInputItem, required: true, location_name: "request"))
248
+ BatchIsAuthorizedWithTokenOutputItem.add_member(:decision, Shapes::ShapeRef.new(shape: Decision, required: true, location_name: "decision"))
249
+ BatchIsAuthorizedWithTokenOutputItem.add_member(:determining_policies, Shapes::ShapeRef.new(shape: DeterminingPolicyList, required: true, location_name: "determiningPolicies"))
250
+ BatchIsAuthorizedWithTokenOutputItem.add_member(:errors, Shapes::ShapeRef.new(shape: EvaluationErrorList, required: true, location_name: "errors"))
251
+ BatchIsAuthorizedWithTokenOutputItem.struct_class = Types::BatchIsAuthorizedWithTokenOutputItem
252
+
253
+ BatchIsAuthorizedWithTokenOutputList.member = Shapes::ShapeRef.new(shape: BatchIsAuthorizedWithTokenOutputItem)
254
+
223
255
  ClientIds.member = Shapes::ShapeRef.new(shape: ClientId)
224
256
 
225
257
  CognitoGroupConfiguration.add_member(:group_entity_type, Shapes::ShapeRef.new(shape: GroupEntityType, required: true, location_name: "groupEntityType"))
@@ -797,6 +829,19 @@ module Aws::VerifiedPermissions
797
829
  o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
798
830
  end)
799
831
 
832
+ api.add_operation(:batch_is_authorized_with_token, Seahorse::Model::Operation.new.tap do |o|
833
+ o.name = "BatchIsAuthorizedWithToken"
834
+ o.http_method = "POST"
835
+ o.http_request_uri = "/"
836
+ o.input = Shapes::ShapeRef.new(shape: BatchIsAuthorizedWithTokenInput)
837
+ o.output = Shapes::ShapeRef.new(shape: BatchIsAuthorizedWithTokenOutput)
838
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
839
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
840
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
841
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
842
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
843
+ end)
844
+
800
845
  api.add_operation(:create_identity_source, Seahorse::Model::Operation.new.tap do |o|
801
846
  o.name = "CreateIdentitySource"
802
847
  o.http_method = "POST"
@@ -26,6 +26,20 @@ module Aws::VerifiedPermissions
26
26
  end
27
27
  end
28
28
 
29
+ class BatchIsAuthorizedWithToken
30
+ def self.build(context)
31
+ unless context.config.regional_endpoint
32
+ endpoint = context.config.endpoint.to_s
33
+ end
34
+ Aws::VerifiedPermissions::EndpointParameters.new(
35
+ region: context.config.region,
36
+ use_dual_stack: context.config.use_dualstack_endpoint,
37
+ use_fips: context.config.use_fips_endpoint,
38
+ endpoint: endpoint,
39
+ )
40
+ end
41
+ end
42
+
29
43
  class CreateIdentitySource
30
44
  def self.build(context)
31
45
  unless context.config.regional_endpoint
@@ -60,6 +60,8 @@ module Aws::VerifiedPermissions
60
60
  case context.operation_name
61
61
  when :batch_is_authorized
62
62
  Aws::VerifiedPermissions::Endpoints::BatchIsAuthorized.build(context)
63
+ when :batch_is_authorized_with_token
64
+ Aws::VerifiedPermissions::Endpoints::BatchIsAuthorizedWithToken.build(context)
63
65
  when :create_identity_source
64
66
  Aws::VerifiedPermissions::Endpoints::CreateIdentitySource.build(context)
65
67
  when :create_policy
@@ -278,8 +278,154 @@ module Aws::VerifiedPermissions
278
278
  include Aws::Structure
279
279
  end
280
280
 
281
- # The type of entity that a policy store maps to groups from an Amazon
282
- # Cognito user pool identity source.
281
+ # @!attribute [rw] policy_store_id
282
+ # Specifies the ID of the policy store. Policies in this policy store
283
+ # will be used to make an authorization decision for the input.
284
+ # @return [String]
285
+ #
286
+ # @!attribute [rw] identity_token
287
+ # Specifies an identity (ID) token for the principal that you want to
288
+ # authorize in each request. This token is provided to you by the
289
+ # identity provider (IdP) associated with the specified identity
290
+ # source. You must specify either an `accessToken`, an
291
+ # `identityToken`, or both.
292
+ #
293
+ # Must be an ID token. Verified Permissions returns an error if the
294
+ # `token_use` claim in the submitted token isn't `id`.
295
+ # @return [String]
296
+ #
297
+ # @!attribute [rw] access_token
298
+ # Specifies an access token for the principal that you want to
299
+ # authorize in each request. This token is provided to you by the
300
+ # identity provider (IdP) associated with the specified identity
301
+ # source. You must specify either an `accessToken`, an
302
+ # `identityToken`, or both.
303
+ #
304
+ # Must be an access token. Verified Permissions returns an error if
305
+ # the `token_use` claim in the submitted token isn't `access`.
306
+ # @return [String]
307
+ #
308
+ # @!attribute [rw] entities
309
+ # Specifies the list of resources and their associated attributes that
310
+ # Verified Permissions can examine when evaluating the policies.
311
+ #
312
+ # You can't include principals in this parameter, only resource and
313
+ # action entities. This parameter can't include any entities of a
314
+ # type that matches the user or group entity types that you defined in
315
+ # your identity source.
316
+ #
317
+ # * The `BatchIsAuthorizedWithToken` operation takes principal
318
+ # attributes from <b> <i>only</i> </b> the `identityToken` or
319
+ # `accessToken` passed to the operation.
320
+ #
321
+ # * For action entities, you can include only their `Identifier` and
322
+ # `EntityType`.
323
+ # @return [Types::EntitiesDefinition]
324
+ #
325
+ # @!attribute [rw] requests
326
+ # An array of up to 30 requests that you want Verified Permissions to
327
+ # evaluate.
328
+ # @return [Array<Types::BatchIsAuthorizedWithTokenInputItem>]
329
+ #
330
+ # @see http://docs.aws.amazon.com/goto/WebAPI/verifiedpermissions-2021-12-01/BatchIsAuthorizedWithTokenInput AWS API Documentation
331
+ #
332
+ class BatchIsAuthorizedWithTokenInput < Struct.new(
333
+ :policy_store_id,
334
+ :identity_token,
335
+ :access_token,
336
+ :entities,
337
+ :requests)
338
+ SENSITIVE = [:identity_token, :access_token]
339
+ include Aws::Structure
340
+ end
341
+
342
+ # An authorization request that you include in a
343
+ # `BatchIsAuthorizedWithToken` API request.
344
+ #
345
+ # @!attribute [rw] action
346
+ # Specifies the requested action to be authorized. For example,
347
+ # `PhotoFlash::ReadPhoto`.
348
+ # @return [Types::ActionIdentifier]
349
+ #
350
+ # @!attribute [rw] resource
351
+ # Specifies the resource that you want an authorization decision for.
352
+ # For example, `PhotoFlash::Photo`.
353
+ # @return [Types::EntityIdentifier]
354
+ #
355
+ # @!attribute [rw] context
356
+ # Specifies additional context that can be used to make more granular
357
+ # authorization decisions.
358
+ # @return [Types::ContextDefinition]
359
+ #
360
+ # @see http://docs.aws.amazon.com/goto/WebAPI/verifiedpermissions-2021-12-01/BatchIsAuthorizedWithTokenInputItem AWS API Documentation
361
+ #
362
+ class BatchIsAuthorizedWithTokenInputItem < Struct.new(
363
+ :action,
364
+ :resource,
365
+ :context)
366
+ SENSITIVE = []
367
+ include Aws::Structure
368
+ end
369
+
370
+ # @!attribute [rw] principal
371
+ # The identifier of the principal in the ID or access token.
372
+ # @return [Types::EntityIdentifier]
373
+ #
374
+ # @!attribute [rw] results
375
+ # A series of `Allow` or `Deny` decisions for each request, and the
376
+ # policies that produced them.
377
+ # @return [Array<Types::BatchIsAuthorizedWithTokenOutputItem>]
378
+ #
379
+ # @see http://docs.aws.amazon.com/goto/WebAPI/verifiedpermissions-2021-12-01/BatchIsAuthorizedWithTokenOutput AWS API Documentation
380
+ #
381
+ class BatchIsAuthorizedWithTokenOutput < Struct.new(
382
+ :principal,
383
+ :results)
384
+ SENSITIVE = []
385
+ include Aws::Structure
386
+ end
387
+
388
+ # The decision, based on policy evaluation, from an individual
389
+ # authorization request in a `BatchIsAuthorizedWithToken` API request.
390
+ #
391
+ # @!attribute [rw] request
392
+ # The authorization request that initiated the decision.
393
+ # @return [Types::BatchIsAuthorizedWithTokenInputItem]
394
+ #
395
+ # @!attribute [rw] decision
396
+ # An authorization decision that indicates if the authorization
397
+ # request should be allowed or denied.
398
+ # @return [String]
399
+ #
400
+ # @!attribute [rw] determining_policies
401
+ # The list of determining policies used to make the authorization
402
+ # decision. For example, if there are two matching policies, where one
403
+ # is a forbid and the other is a permit, then the forbid policy will
404
+ # be the determining policy. In the case of multiple matching permit
405
+ # policies then there would be multiple determining policies. In the
406
+ # case that no policies match, and hence the response is DENY, there
407
+ # would be no determining policies.
408
+ # @return [Array<Types::DeterminingPolicyItem>]
409
+ #
410
+ # @!attribute [rw] errors
411
+ # Errors that occurred while making an authorization decision. For
412
+ # example, a policy might reference an entity or attribute that
413
+ # doesn't exist in the request.
414
+ # @return [Array<Types::EvaluationErrorItem>]
415
+ #
416
+ # @see http://docs.aws.amazon.com/goto/WebAPI/verifiedpermissions-2021-12-01/BatchIsAuthorizedWithTokenOutputItem AWS API Documentation
417
+ #
418
+ class BatchIsAuthorizedWithTokenOutputItem < Struct.new(
419
+ :request,
420
+ :decision,
421
+ :determining_policies,
422
+ :errors)
423
+ SENSITIVE = []
424
+ include Aws::Structure
425
+ end
426
+
427
+ # A list of user groups and entities from an Amazon Cognito user pool
428
+ # identity source.
283
429
  #
284
430
  # This data type is part of a [CognitoUserPoolConfiguration][1]
285
431
  # structure and is a request parameter in [CreateIdentitySource][2].
@@ -302,8 +448,8 @@ module Aws::VerifiedPermissions
302
448
  include Aws::Structure
303
449
  end
304
450
 
305
- # The type of entity that a policy store maps to groups from an Amazon
306
- # Cognito user pool identity source.
451
+ # A list of user groups and entities from an Amazon Cognito user pool
452
+ # identity source.
307
453
  #
308
454
  # This data type is part of an [CognitoUserPoolConfigurationDetail][1]
309
455
  # structure and is a response parameter to [GetIdentitySource][2].
@@ -326,8 +472,8 @@ module Aws::VerifiedPermissions
326
472
  include Aws::Structure
327
473
  end
328
474
 
329
- # The type of entity that a policy store maps to groups from an Amazon
330
- # Cognito user pool identity source.
475
+ # A list of user groups and entities from an Amazon Cognito user pool
476
+ # identity source.
331
477
  #
332
478
  # This data type is part of an [CognitoUserPoolConfigurationItem][1]
333
479
  # structure and is a response parameter to [ListIdentitySources][2].
@@ -359,8 +505,7 @@ module Aws::VerifiedPermissions
359
505
  # [CreateIdentitySource][2].
360
506
  #
361
507
  # Example:`"CognitoUserPoolConfiguration":\{"UserPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","ClientIds":
362
- # ["a1b2c3d4e5f6g7h8i9j0kalbmc"],"groupConfiguration":
363
- # \{"groupEntityType": "MyCorp::Group"\}\}`
508
+ # ["a1b2c3d4e5f6g7h8i9j0kalbmc"]\}`
364
509
  #
365
510
  #
366
511
  #
@@ -387,8 +532,8 @@ module Aws::VerifiedPermissions
387
532
  # @return [Array<String>]
388
533
  #
389
534
  # @!attribute [rw] group_configuration
390
- # The type of entity that a policy store maps to groups from an Amazon
391
- # Cognito user pool identity source.
535
+ # The configuration of the user groups from an Amazon Cognito user
536
+ # pool identity source.
392
537
  # @return [Types::CognitoGroupConfiguration]
393
538
  #
394
539
  # @see http://docs.aws.amazon.com/goto/WebAPI/verifiedpermissions-2021-12-01/CognitoUserPoolConfiguration AWS API Documentation
@@ -410,8 +555,7 @@ module Aws::VerifiedPermissions
410
555
  # [GetIdentitySource][2].
411
556
  #
412
557
  # Example:`"CognitoUserPoolConfiguration":\{"UserPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","ClientIds":
413
- # ["a1b2c3d4e5f6g7h8i9j0kalbmc"],"groupConfiguration":
414
- # \{"groupEntityType": "MyCorp::Group"\}\}`
558
+ # ["a1b2c3d4e5f6g7h8i9j0kalbmc"]\}`
415
559
  #
416
560
  #
417
561
  #
@@ -446,8 +590,8 @@ module Aws::VerifiedPermissions
446
590
  # @return [String]
447
591
  #
448
592
  # @!attribute [rw] group_configuration
449
- # The type of entity that a policy store maps to groups from an Amazon
450
- # Cognito user pool identity source.
593
+ # The configuration of the user groups from an Amazon Cognito user
594
+ # pool identity source.
451
595
  # @return [Types::CognitoGroupConfigurationDetail]
452
596
  #
453
597
  # @see http://docs.aws.amazon.com/goto/WebAPI/verifiedpermissions-2021-12-01/CognitoUserPoolConfigurationDetail AWS API Documentation
@@ -470,8 +614,7 @@ module Aws::VerifiedPermissions
470
614
  # [ListIdentitySources][2].
471
615
  #
472
616
  # Example:`"CognitoUserPoolConfiguration":\{"UserPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","ClientIds":
473
- # ["a1b2c3d4e5f6g7h8i9j0kalbmc"],"groupConfiguration":
474
- # \{"groupEntityType": "MyCorp::Group"\}\}`
617
+ # ["a1b2c3d4e5f6g7h8i9j0kalbmc"]\}`
475
618
  #
476
619
  #
477
620
  #
@@ -506,8 +649,8 @@ module Aws::VerifiedPermissions
506
649
  # @return [String]
507
650
  #
508
651
  # @!attribute [rw] group_configuration
509
- # The type of entity that a policy store maps to groups from an Amazon
510
- # Cognito user pool identity source.
652
+ # The configuration of the user groups from an Amazon Cognito user
653
+ # pool identity source.
511
654
  # @return [Types::CognitoGroupConfigurationItem]
512
655
  #
513
656
  # @see http://docs.aws.amazon.com/goto/WebAPI/verifiedpermissions-2021-12-01/CognitoUserPoolConfigurationItem AWS API Documentation
@@ -527,7 +670,7 @@ module Aws::VerifiedPermissions
527
670
  # <note markdown="1"> At this time, the only valid member of this structure is a Amazon
528
671
  # Cognito user pool configuration.
529
672
  #
530
- # Specifies a `userPoolArn`, a `groupConfiguration`, and a `ClientId`.
673
+ # You must specify a `userPoolArn`, and optionally, a `ClientId`.
531
674
  #
532
675
  # </note>
533
676
  #
@@ -584,8 +727,7 @@ module Aws::VerifiedPermissions
584
727
  # Contains configuration details of a Amazon Cognito user pool that
585
728
  # Verified Permissions can use as a source of authenticated identities
586
729
  # as entities. It specifies the [Amazon Resource Name (ARN)][1] of a
587
- # Amazon Cognito user pool, the policy store entity that you want to
588
- # assign to user groups, and one or more application client IDs.
730
+ # Amazon Cognito user pool and one or more application client IDs.
589
731
  #
590
732
  # Example:
591
733
  # `"configuration":\{"cognitoUserPoolConfiguration":\{"userPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","clientIds":
@@ -625,8 +767,7 @@ module Aws::VerifiedPermissions
625
767
  # Contains configuration details of a Amazon Cognito user pool that
626
768
  # Verified Permissions can use as a source of authenticated identities
627
769
  # as entities. It specifies the [Amazon Resource Name (ARN)][1] of a
628
- # Amazon Cognito user pool, the policy store entity that you want to
629
- # assign to user groups, and one or more application client IDs.
770
+ # Amazon Cognito user pool and one or more application client IDs.
630
771
  #
631
772
  # Example:
632
773
  # `"configuration":\{"cognitoUserPoolConfiguration":\{"userPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","clientIds":
@@ -1950,8 +2091,10 @@ module Aws::VerifiedPermissions
1950
2091
  # Specifies the list of resources and their associated attributes that
1951
2092
  # Verified Permissions can examine when evaluating the policies.
1952
2093
  #
1953
- # <note markdown="1"> You can include only resource and action entities in this parameter;
1954
- # you can't include principals.
2094
+ # You can't include principals in this parameter, only resource and
2095
+ # action entities. This parameter can't include any entities of a
2096
+ # type that matches the user or group entity types that you defined in
2097
+ # your identity source.
1955
2098
  #
1956
2099
  # * The `IsAuthorizedWithToken` operation takes principal attributes
1957
2100
  # from <b> <i>only</i> </b> the `identityToken` or `accessToken`
@@ -1959,8 +2102,6 @@ module Aws::VerifiedPermissions
1959
2102
  #
1960
2103
  # * For action entities, you can include only their `Identifier` and
1961
2104
  # `EntityType`.
1962
- #
1963
- # </note>
1964
2105
  # @return [Types::EntitiesDefinition]
1965
2106
  #
1966
2107
  # @see http://docs.aws.amazon.com/goto/WebAPI/verifiedpermissions-2021-12-01/IsAuthorizedWithTokenInput AWS API Documentation
@@ -2926,8 +3067,8 @@ module Aws::VerifiedPermissions
2926
3067
  include Aws::Structure
2927
3068
  end
2928
3069
 
2929
- # The user group entities from an Amazon Cognito user pool identity
2930
- # source.
3070
+ # A list of user groups and entities from an Amazon Cognito user pool
3071
+ # identity source.
2931
3072
  #
2932
3073
  # @!attribute [rw] group_entity_type
2933
3074
  # The name of the schema entity type that's mapped to the user pool
@@ -53,6 +53,6 @@ require_relative 'aws-sdk-verifiedpermissions/customizations'
53
53
  # @!group service
54
54
  module Aws::VerifiedPermissions
55
55
 
56
- GEM_VERSION = '1.18.0'
56
+ GEM_VERSION = '1.20.0'
57
57
 
58
58
  end
data/sig/client.rbs CHANGED
@@ -119,6 +119,51 @@ module Aws
119
119
  ) -> _BatchIsAuthorizedResponseSuccess
120
120
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _BatchIsAuthorizedResponseSuccess
121
121
 
122
+ interface _BatchIsAuthorizedWithTokenResponseSuccess
123
+ include ::Seahorse::Client::_ResponseSuccess[Types::BatchIsAuthorizedWithTokenOutput]
124
+ def principal: () -> Types::EntityIdentifier
125
+ def results: () -> ::Array[Types::BatchIsAuthorizedWithTokenOutputItem]
126
+ end
127
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/VerifiedPermissions/Client.html#batch_is_authorized_with_token-instance_method
128
+ def batch_is_authorized_with_token: (
129
+ policy_store_id: ::String,
130
+ ?identity_token: ::String,
131
+ ?access_token: ::String,
132
+ ?entities: {
133
+ entity_list: Array[
134
+ {
135
+ identifier: {
136
+ entity_type: ::String,
137
+ entity_id: ::String
138
+ },
139
+ attributes: Hash[::String, untyped]?,
140
+ parents: Array[
141
+ {
142
+ entity_type: ::String,
143
+ entity_id: ::String
144
+ },
145
+ ]?
146
+ },
147
+ ]?
148
+ },
149
+ requests: Array[
150
+ {
151
+ action: {
152
+ action_type: ::String,
153
+ action_id: ::String
154
+ }?,
155
+ resource: {
156
+ entity_type: ::String,
157
+ entity_id: ::String
158
+ }?,
159
+ context: {
160
+ context_map: Hash[::String, untyped]?
161
+ }?
162
+ },
163
+ ]
164
+ ) -> _BatchIsAuthorizedWithTokenResponseSuccess
165
+ | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _BatchIsAuthorizedWithTokenResponseSuccess
166
+
122
167
  interface _CreateIdentitySourceResponseSuccess
123
168
  include ::Seahorse::Client::_ResponseSuccess[Types::CreateIdentitySourceOutput]
124
169
  def created_date: () -> ::Time
data/sig/types.rbs CHANGED
@@ -73,6 +73,36 @@ module Aws::VerifiedPermissions
73
73
  SENSITIVE: []
74
74
  end
75
75
 
76
+ class BatchIsAuthorizedWithTokenInput
77
+ attr_accessor policy_store_id: ::String
78
+ attr_accessor identity_token: ::String
79
+ attr_accessor access_token: ::String
80
+ attr_accessor entities: Types::EntitiesDefinition
81
+ attr_accessor requests: ::Array[Types::BatchIsAuthorizedWithTokenInputItem]
82
+ SENSITIVE: [:identity_token, :access_token]
83
+ end
84
+
85
+ class BatchIsAuthorizedWithTokenInputItem
86
+ attr_accessor action: Types::ActionIdentifier
87
+ attr_accessor resource: Types::EntityIdentifier
88
+ attr_accessor context: Types::ContextDefinition
89
+ SENSITIVE: []
90
+ end
91
+
92
+ class BatchIsAuthorizedWithTokenOutput
93
+ attr_accessor principal: Types::EntityIdentifier
94
+ attr_accessor results: ::Array[Types::BatchIsAuthorizedWithTokenOutputItem]
95
+ SENSITIVE: []
96
+ end
97
+
98
+ class BatchIsAuthorizedWithTokenOutputItem
99
+ attr_accessor request: Types::BatchIsAuthorizedWithTokenInputItem
100
+ attr_accessor decision: ("ALLOW" | "DENY")
101
+ attr_accessor determining_policies: ::Array[Types::DeterminingPolicyItem]
102
+ attr_accessor errors: ::Array[Types::EvaluationErrorItem]
103
+ SENSITIVE: []
104
+ end
105
+
76
106
  class CognitoGroupConfiguration
77
107
  attr_accessor group_entity_type: ::String
78
108
  SENSITIVE: [:group_entity_type]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-verifiedpermissions
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.0
4
+ version: 1.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-04 00:00:00.000000000 Z
11
+ date: 2024-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 3.191.0
22
+ version: 3.193.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '3'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 3.191.0
32
+ version: 3.193.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement