aws-sdk-core 3.260.0 → 3.271.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +85 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-core/json/error_handler.rb +1 -1
- data/lib/aws-sdk-core/log/formatter.rb +3 -2
- data/lib/aws-sdk-core/log/param_filter.rb +73 -9
- data/lib/aws-sdk-core/login_credentials.rb +21 -6
- data/lib/aws-sdk-core/pageable_response.rb +8 -1
- data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +53 -20
- data/lib/aws-sdk-core/plugins/retries/clock_skew.rb +8 -9
- data/lib/aws-sdk-core/plugins/retries/retry_quota.rb +3 -9
- data/lib/aws-sdk-core/plugins/retry_errors.rb +36 -49
- data/lib/aws-sdk-core/plugins/stub_responses.rb +1 -1
- data/lib/aws-sdk-core/plugins/user_agent.rb +2 -1
- data/lib/aws-sdk-core/response.rb +23 -0
- data/lib/aws-sdk-core/rest/response/headers.rb +4 -3
- data/lib/aws-sdk-core/rpc_v2/error_handler.rb +1 -1
- data/lib/aws-sdk-core/xml/error_handler.rb +1 -1
- data/lib/aws-sdk-core.rb +1 -0
- data/lib/aws-sdk-signin/client.rb +503 -75
- data/lib/aws-sdk-signin/client_api.rb +218 -3
- data/lib/aws-sdk-signin/endpoints.rb +55 -0
- data/lib/aws-sdk-signin/errors.rb +67 -0
- data/lib/aws-sdk-signin/types.rb +611 -132
- data/lib/aws-sdk-signin.rb +2 -2
- data/lib/aws-sdk-sso/client.rb +7 -6
- data/lib/aws-sdk-sso.rb +1 -1
- data/lib/aws-sdk-ssooidc/client.rb +7 -6
- data/lib/aws-sdk-ssooidc.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +240 -122
- data/lib/aws-sdk-sts/client_api.rb +84 -0
- data/lib/aws-sdk-sts/errors.rb +57 -0
- data/lib/aws-sdk-sts/types.rb +461 -141
- data/lib/aws-sdk-sts.rb +1 -1
- data/lib/seahorse/client/configuration.rb +68 -1
- data/lib/seahorse/client/h2/connection.rb +9 -1
- data/lib/seahorse/client/http/request.rb +19 -0
- data/lib/seahorse/client/net_http/handler.rb +1 -1
- data/lib/seahorse/model/shapes.rb +6 -6
- metadata +2 -1
|
@@ -264,7 +264,8 @@ module Aws::Signin
|
|
|
264
264
|
# An integer representing the maximum number attempts that will be made for
|
|
265
265
|
# a single request, including the initial attempt. For example,
|
|
266
266
|
# setting this value to 5 will result in a request being retried up to
|
|
267
|
-
# 4 times. Used in `standard` and `adaptive` retry modes.
|
|
267
|
+
# 4 times. Used in `standard` and `adaptive` retry modes. Defaults to 3,
|
|
268
|
+
# except for DynamoDB and DynamoDB Streams, which default to 4.
|
|
268
269
|
#
|
|
269
270
|
# @option options [String] :profile ("default")
|
|
270
271
|
# Used when loading credentials from the shared credentials file at `HOME/.aws/credentials`.
|
|
@@ -327,15 +328,15 @@ module Aws::Signin
|
|
|
327
328
|
# used by the default backoff function. This option is only used in the
|
|
328
329
|
# `legacy` retry mode.
|
|
329
330
|
#
|
|
330
|
-
# @option options [String] :retry_mode ("
|
|
331
|
+
# @option options [String] :retry_mode ("standard")
|
|
331
332
|
# Specifies which retry algorithm to use. Values are:
|
|
332
333
|
#
|
|
333
|
-
# * `legacy` - The pre-existing retry behavior.
|
|
334
|
-
# value if no retry mode is provided.
|
|
334
|
+
# * `legacy` - The pre-existing retry behavior.
|
|
335
335
|
#
|
|
336
336
|
# * `standard` - A standardized set of retry rules across the AWS SDKs.
|
|
337
337
|
# This includes support for retry quotas, which limit the number of
|
|
338
|
-
# unsuccessful retries a client can make.
|
|
338
|
+
# unsuccessful retries a client can make. This is the default value
|
|
339
|
+
# if no retry mode is provided.
|
|
339
340
|
#
|
|
340
341
|
# * `adaptive` - A retry mode that includes all the functionality of
|
|
341
342
|
# `standard` mode along with automatic client side throttling.
|
|
@@ -481,54 +482,177 @@ module Aws::Signin
|
|
|
481
482
|
|
|
482
483
|
# @!group API Operations
|
|
483
484
|
|
|
484
|
-
#
|
|
485
|
+
# Revokes up to five sign-in sessions. A revoked session can no longer
|
|
486
|
+
# be refreshed. Revoking a session that is already revoked succeeds.
|
|
487
|
+
# Each session must belong to the identity specified by principalArn, or
|
|
488
|
+
# to the caller if principalArn is omitted. Failures for individual
|
|
489
|
+
# sessions are returned in the errors list and do not fail the whole
|
|
490
|
+
# request.
|
|
485
491
|
#
|
|
486
|
-
#
|
|
487
|
-
#
|
|
492
|
+
# @option params [String] :principal_arn
|
|
493
|
+
# The identity that owns the sessions. Omit to use the caller. Specify
|
|
494
|
+
# arn:aws:iam::\{account-id}:* to revoke any session in the account.
|
|
488
495
|
#
|
|
489
|
-
#
|
|
490
|
-
#
|
|
496
|
+
# @option params [required, Array<String>] :session_arns
|
|
497
|
+
# The ARNs of the sessions to revoke
|
|
491
498
|
#
|
|
492
|
-
#
|
|
493
|
-
#
|
|
494
|
-
# 2. Token refresh (grant\_type=refresh\_token) - Idempotent within
|
|
495
|
-
# token validity window
|
|
499
|
+
# @option params [String] :reason
|
|
500
|
+
# The reason for revoking the sessions
|
|
496
501
|
#
|
|
497
|
-
#
|
|
498
|
-
# the request body:
|
|
502
|
+
# @return [Types::BatchRevokeSessionsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
499
503
|
#
|
|
500
|
-
#
|
|
504
|
+
# * {Types::BatchRevokeSessionsOutput#revoked_sessions #revoked_sessions} => Array<Types::RevokedSession>
|
|
505
|
+
# * {Types::BatchRevokeSessionsOutput#errors #errors} => Array<Types::BatchRevokeSessionError>
|
|
501
506
|
#
|
|
502
|
-
# * JSON or form-encoded body with client\_id,
|
|
503
|
-
# grant\_type=authorization\_code, code, redirect\_uri, code\_verifier
|
|
504
|
-
# * Returns access\_token, token\_type, expires\_in, refresh\_token, and
|
|
505
|
-
# id\_token
|
|
506
|
-
# * Each authorization code can only be used ONCE for security (prevents
|
|
507
|
-
# replay attacks)
|
|
508
507
|
#
|
|
509
|
-
#
|
|
508
|
+
# @example Example: Revoke one of your own sessions
|
|
510
509
|
#
|
|
511
|
-
#
|
|
512
|
-
# grant\_type=refresh\_token, refresh\_token
|
|
513
|
-
# * Returns access\_token, token\_type, expires\_in, and refresh\_token
|
|
514
|
-
# (no id\_token)
|
|
515
|
-
# * Multiple calls with same refresh\_token return consistent results
|
|
516
|
-
# within validity window
|
|
510
|
+
# # Revokes a session owned by the caller and records the reason.
|
|
517
511
|
#
|
|
518
|
-
#
|
|
512
|
+
# resp = client.batch_revoke_sessions({
|
|
513
|
+
# reason: "Signed out of a lost device",
|
|
514
|
+
# session_arns: [
|
|
515
|
+
# "arn:aws:signin:us-east-1:123456789012:session/3b0a6152-ba23-447d-83cf-b3b3cc7b95f7",
|
|
516
|
+
# ],
|
|
517
|
+
# })
|
|
518
|
+
#
|
|
519
|
+
# resp.to_h outputs the following:
|
|
520
|
+
# {
|
|
521
|
+
# errors: [
|
|
522
|
+
# ],
|
|
523
|
+
# revoked_sessions: [
|
|
524
|
+
# {
|
|
525
|
+
# session_arn: "arn:aws:signin:us-east-1:123456789012:session/3b0a6152-ba23-447d-83cf-b3b3cc7b95f7",
|
|
526
|
+
# },
|
|
527
|
+
# ],
|
|
528
|
+
# }
|
|
529
|
+
#
|
|
530
|
+
# @example Example: Revoke another identity's session as an account administrator
|
|
531
|
+
#
|
|
532
|
+
# # Uses the account wildcard principal ARN to revoke another IAM identity's session.
|
|
533
|
+
#
|
|
534
|
+
# resp = client.batch_revoke_sessions({
|
|
535
|
+
# principal_arn: "arn:aws:iam::123456789012:*",
|
|
536
|
+
# reason: "Revoked by account administrator",
|
|
537
|
+
# session_arns: [
|
|
538
|
+
# "arn:aws:signin:us-east-1:123456789012:session/5dbdd43b-4135-4c59-ad06-5ddbcc2c1d77",
|
|
539
|
+
# ],
|
|
540
|
+
# })
|
|
541
|
+
#
|
|
542
|
+
# resp.to_h outputs the following:
|
|
543
|
+
# {
|
|
544
|
+
# errors: [
|
|
545
|
+
# ],
|
|
546
|
+
# revoked_sessions: [
|
|
547
|
+
# {
|
|
548
|
+
# session_arn: "arn:aws:signin:us-east-1:123456789012:session/5dbdd43b-4135-4c59-ad06-5ddbcc2c1d77",
|
|
549
|
+
# },
|
|
550
|
+
# ],
|
|
551
|
+
# }
|
|
552
|
+
#
|
|
553
|
+
# @example Example: Revoke a batch of sessions with a partial failure
|
|
554
|
+
#
|
|
555
|
+
# # Revokes the caller's session and reports a session that was not found in the errors list.
|
|
556
|
+
#
|
|
557
|
+
# resp = client.batch_revoke_sessions({
|
|
558
|
+
# session_arns: [
|
|
559
|
+
# "arn:aws:signin:us-east-1:123456789012:session/ac148df8-7f37-48eb-b0cf-8987fc4a55a4",
|
|
560
|
+
# "arn:aws:signin:us-east-1:123456789012:session/36b6ae9d-4fa9-40d9-8eff-eeeb4d15f79d",
|
|
561
|
+
# ],
|
|
562
|
+
# })
|
|
519
563
|
#
|
|
520
|
-
#
|
|
521
|
-
#
|
|
522
|
-
#
|
|
523
|
-
#
|
|
564
|
+
# resp.to_h outputs the following:
|
|
565
|
+
# {
|
|
566
|
+
# errors: [
|
|
567
|
+
# {
|
|
568
|
+
# code: "ResourceNotFoundException",
|
|
569
|
+
# message: "No session found for the given sessionArn",
|
|
570
|
+
# session_arn: "arn:aws:signin:us-east-1:123456789012:session/36b6ae9d-4fa9-40d9-8eff-eeeb4d15f79d",
|
|
571
|
+
# },
|
|
572
|
+
# ],
|
|
573
|
+
# revoked_sessions: [
|
|
574
|
+
# {
|
|
575
|
+
# session_arn: "arn:aws:signin:us-east-1:123456789012:session/ac148df8-7f37-48eb-b0cf-8987fc4a55a4",
|
|
576
|
+
# },
|
|
577
|
+
# ],
|
|
578
|
+
# }
|
|
579
|
+
#
|
|
580
|
+
# @example Request syntax with placeholder values
|
|
581
|
+
#
|
|
582
|
+
# resp = client.batch_revoke_sessions({
|
|
583
|
+
# principal_arn: "PrincipalArnFilter",
|
|
584
|
+
# session_arns: ["SessionArn"], # required
|
|
585
|
+
# reason: "RevocationReason",
|
|
586
|
+
# })
|
|
524
587
|
#
|
|
525
|
-
#
|
|
526
|
-
#
|
|
527
|
-
#
|
|
588
|
+
# @example Response structure
|
|
589
|
+
#
|
|
590
|
+
# resp.revoked_sessions #=> Array
|
|
591
|
+
# resp.revoked_sessions[0].session_arn #=> String
|
|
592
|
+
# resp.errors #=> Array
|
|
593
|
+
# resp.errors[0].session_arn #=> String
|
|
594
|
+
# resp.errors[0].code #=> String
|
|
595
|
+
# resp.errors[0].message #=> String
|
|
596
|
+
#
|
|
597
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/signin-2023-01-01/BatchRevokeSessions AWS API Documentation
|
|
598
|
+
#
|
|
599
|
+
# @overload batch_revoke_sessions(params = {})
|
|
600
|
+
# @param [Hash] params ({})
|
|
601
|
+
def batch_revoke_sessions(params = {}, options = {})
|
|
602
|
+
req = build_request(:batch_revoke_sessions, params)
|
|
603
|
+
req.send_request(options)
|
|
604
|
+
end
|
|
605
|
+
|
|
606
|
+
# Creates a bearer token that represents your IAM credentials and can be
|
|
607
|
+
# used to access a supported AWS service. By default, the token is valid
|
|
608
|
+
# for 12 hours.
|
|
609
|
+
#
|
|
610
|
+
# @option params [required, String] :grant_type
|
|
611
|
+
# The grant type. Must be "client\_credentials".
|
|
612
|
+
#
|
|
613
|
+
# @option params [required, String] :resource
|
|
614
|
+
# The AWS service the bearer token is for. Example: "ecr.amazonaws.com".
|
|
615
|
+
#
|
|
616
|
+
# @option params [Integer] :duration_seconds
|
|
617
|
+
# The requested token lifetime in seconds, from 300 (5 minutes) up to
|
|
618
|
+
# the maximum allowed for the service, currently 43200 (12 hours). If
|
|
619
|
+
# omitted, the token is valid for 12 hours.
|
|
620
|
+
#
|
|
621
|
+
# @return [Types::CreateBearerTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
622
|
+
#
|
|
623
|
+
# * {Types::CreateBearerTokenResponse#access_token #access_token} => String
|
|
624
|
+
# * {Types::CreateBearerTokenResponse#token_type #token_type} => String
|
|
625
|
+
# * {Types::CreateBearerTokenResponse#expires_in #expires_in} => Integer
|
|
626
|
+
#
|
|
627
|
+
# @example Request syntax with placeholder values
|
|
628
|
+
#
|
|
629
|
+
# resp = client.create_bearer_token({
|
|
630
|
+
# grant_type: "ClientCredentialsGrantType", # required
|
|
631
|
+
# resource: "Resource", # required
|
|
632
|
+
# duration_seconds: 1,
|
|
633
|
+
# })
|
|
634
|
+
#
|
|
635
|
+
# @example Response structure
|
|
636
|
+
#
|
|
637
|
+
# resp.access_token #=> String
|
|
638
|
+
# resp.token_type #=> String
|
|
639
|
+
# resp.expires_in #=> Integer
|
|
640
|
+
#
|
|
641
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/signin-2023-01-01/CreateBearerToken AWS API Documentation
|
|
642
|
+
#
|
|
643
|
+
# @overload create_bearer_token(params = {})
|
|
644
|
+
# @param [Hash] params ({})
|
|
645
|
+
def create_bearer_token(params = {}, options = {})
|
|
646
|
+
req = build_request(:create_bearer_token, params)
|
|
647
|
+
req.send_request(options)
|
|
648
|
+
end
|
|
649
|
+
|
|
650
|
+
# Exchanges an authorization code or refresh token for an OAuth 2.0
|
|
651
|
+
# access token and refresh token.
|
|
528
652
|
#
|
|
529
653
|
# @option params [required, Types::CreateOAuth2TokenRequestBody] :token_input
|
|
530
|
-
# Flattened token operation inputs The
|
|
531
|
-
#
|
|
654
|
+
# Flattened token operation inputs. The "grant\_type" in the request
|
|
655
|
+
# body determines the specific operation.
|
|
532
656
|
#
|
|
533
657
|
# @return [Types::CreateOAuth2TokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
534
658
|
#
|
|
@@ -566,12 +690,11 @@ module Aws::Signin
|
|
|
566
690
|
req.send_request(options)
|
|
567
691
|
end
|
|
568
692
|
|
|
569
|
-
#
|
|
570
|
-
#
|
|
571
|
-
# services from applications
|
|
693
|
+
# Exchanges client credentials for an OAuth 2.0 access token scoped to a
|
|
694
|
+
# resource, which you can use to access AWS services from applications.
|
|
572
695
|
#
|
|
573
696
|
# @option params [required, String] :grant_type
|
|
574
|
-
# OAuth 2.0 grant type. Must be "client\_credentials".
|
|
697
|
+
# The OAuth 2.0 grant type. Must be "client\_credentials".
|
|
575
698
|
#
|
|
576
699
|
# @option params [required, String] :resource
|
|
577
700
|
# The OAuth resource for which the access token is requested. Example:
|
|
@@ -587,7 +710,7 @@ module Aws::Signin
|
|
|
587
710
|
#
|
|
588
711
|
# resp = client.create_o_auth_2_token_with_iam({
|
|
589
712
|
# grant_type: "ClientCredentialsGrantType", # required
|
|
590
|
-
# resource: "
|
|
713
|
+
# resource: "Resource", # required
|
|
591
714
|
# })
|
|
592
715
|
#
|
|
593
716
|
# @example Response structure
|
|
@@ -605,6 +728,92 @@ module Aws::Signin
|
|
|
605
728
|
req.send_request(options)
|
|
606
729
|
end
|
|
607
730
|
|
|
731
|
+
# Exchanges a supported token for an OAuth 2.0 access token scoped to a
|
|
732
|
+
# resource, which you can use to access AWS services from applications.
|
|
733
|
+
#
|
|
734
|
+
# @option params [required, String] :grant_type
|
|
735
|
+
# The OAuth 2.0 grant type. Currently supports
|
|
736
|
+
# "urn:ietf:params:oauth:grant-type:token-exchange" and
|
|
737
|
+
# "urn:ietf:params:oauth:grant-type:jwt-bearer".
|
|
738
|
+
#
|
|
739
|
+
# @option params [String] :subject_token
|
|
740
|
+
# The subject token that represents the identity of the party on whose
|
|
741
|
+
# behalf the request is made. Required when
|
|
742
|
+
# "grant\_type=urn:ietf:params:oauth:grant-type:token-exchange".
|
|
743
|
+
#
|
|
744
|
+
# @option params [String] :subject_token_type
|
|
745
|
+
# The token type of the subject token. Currently only supports
|
|
746
|
+
# "urn:ietf:params:oauth:token-type:jwt". Required when
|
|
747
|
+
# "grant\_type=urn:ietf:params:oauth:grant-type:token-exchange".
|
|
748
|
+
#
|
|
749
|
+
# @option params [String] :assertion
|
|
750
|
+
# The JWT authorization grant, as defined in RFC 7523. Required when
|
|
751
|
+
# "grant\_type=urn:ietf:params:oauth:grant-type:jwt-bearer".
|
|
752
|
+
#
|
|
753
|
+
# @option params [String] :client_id
|
|
754
|
+
# The OAuth 2.0 client identifier. If provided with
|
|
755
|
+
# "grant\_type=urn:ietf:params:oauth:grant-type:jwt-bearer", must match
|
|
756
|
+
# the assertion's "client\_id" claim.
|
|
757
|
+
#
|
|
758
|
+
# @option params [String] :resource
|
|
759
|
+
# The OAuth resource for which the access token is requested:
|
|
760
|
+
#
|
|
761
|
+
# * "grant\_type=urn:ietf:params:oauth:grant-type:token-exchange":
|
|
762
|
+
# Required. Must be a service principal. Example:
|
|
763
|
+
# "glue.amazonaws.com".
|
|
764
|
+
# * "grant\_type=urn:ietf:params:oauth:grant-type:jwt-bearer": Required
|
|
765
|
+
# when the assertion has no "resource" claim, otherwise must match it.
|
|
766
|
+
# Must be a URI. Example: "https://aws-mcp.us-east-1.api.aws/mcp".
|
|
767
|
+
#
|
|
768
|
+
# @option params [String] :scope
|
|
769
|
+
# The IAM managed policy Amazon Resource Names (ARNs) to apply as
|
|
770
|
+
# session policies that further scope down the permissions of the issued
|
|
771
|
+
# access token, provided as a space-delimited list. Example:
|
|
772
|
+
# "arn:aws:iam::444455556666:policy/MyPolicy".
|
|
773
|
+
#
|
|
774
|
+
# If provided with
|
|
775
|
+
# "grant\_type=urn:ietf:params:oauth:grant-type:jwt-bearer", must match
|
|
776
|
+
# the assertion's "scope" claim.
|
|
777
|
+
#
|
|
778
|
+
# @return [Types::CreateOAuth2TokenWithTokenExchangeResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
779
|
+
#
|
|
780
|
+
# * {Types::CreateOAuth2TokenWithTokenExchangeResponse#access_token #access_token} => String
|
|
781
|
+
# * {Types::CreateOAuth2TokenWithTokenExchangeResponse#issued_token_type #issued_token_type} => String
|
|
782
|
+
# * {Types::CreateOAuth2TokenWithTokenExchangeResponse#token_type #token_type} => String
|
|
783
|
+
# * {Types::CreateOAuth2TokenWithTokenExchangeResponse#expires_in #expires_in} => Integer
|
|
784
|
+
# * {Types::CreateOAuth2TokenWithTokenExchangeResponse#resource #resource} => String
|
|
785
|
+
# * {Types::CreateOAuth2TokenWithTokenExchangeResponse#scope #scope} => String
|
|
786
|
+
#
|
|
787
|
+
# @example Request syntax with placeholder values
|
|
788
|
+
#
|
|
789
|
+
# resp = client.create_o_auth_2_token_with_token_exchange({
|
|
790
|
+
# grant_type: "TokenExchangeGrantType", # required
|
|
791
|
+
# subject_token: "SubjectToken",
|
|
792
|
+
# subject_token_type: "SubjectTokenType",
|
|
793
|
+
# assertion: "Assertion",
|
|
794
|
+
# client_id: "JwtBearerClientId",
|
|
795
|
+
# resource: "Resource",
|
|
796
|
+
# scope: "Scope",
|
|
797
|
+
# })
|
|
798
|
+
#
|
|
799
|
+
# @example Response structure
|
|
800
|
+
#
|
|
801
|
+
# resp.access_token #=> String
|
|
802
|
+
# resp.issued_token_type #=> String
|
|
803
|
+
# resp.token_type #=> String
|
|
804
|
+
# resp.expires_in #=> Integer
|
|
805
|
+
# resp.resource #=> String
|
|
806
|
+
# resp.scope #=> String
|
|
807
|
+
#
|
|
808
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/signin-2023-01-01/CreateOAuth2TokenWithTokenExchange AWS API Documentation
|
|
809
|
+
#
|
|
810
|
+
# @overload create_o_auth_2_token_with_token_exchange(params = {})
|
|
811
|
+
# @param [Hash] params ({})
|
|
812
|
+
def create_o_auth_2_token_with_token_exchange(params = {}, options = {})
|
|
813
|
+
req = build_request(:create_o_auth_2_token_with_token_exchange, params)
|
|
814
|
+
req.send_request(options)
|
|
815
|
+
end
|
|
816
|
+
|
|
608
817
|
# Delete console authorization configuration with automatic scope
|
|
609
818
|
# detection
|
|
610
819
|
#
|
|
@@ -730,28 +939,125 @@ module Aws::Signin
|
|
|
730
939
|
req.send_request(options)
|
|
731
940
|
end
|
|
732
941
|
|
|
733
|
-
#
|
|
734
|
-
#
|
|
942
|
+
# Returns the details of a single sign-in session. The session must
|
|
943
|
+
# belong to the identity specified by principalArn, or to the caller if
|
|
944
|
+
# principalArn is omitted. A session that belongs to a different
|
|
945
|
+
# identity or account is reported as not found.
|
|
735
946
|
#
|
|
736
|
-
#
|
|
737
|
-
#
|
|
738
|
-
#
|
|
739
|
-
#
|
|
947
|
+
# @option params [required, String] :session_arn
|
|
948
|
+
# The ARN of the session to retrieve
|
|
949
|
+
#
|
|
950
|
+
# @option params [String] :principal_arn
|
|
951
|
+
# The identity that owns the session. Omit to use the caller. Specify
|
|
952
|
+
# arn:aws:iam::\{account-id}:* to retrieve any session in the account.
|
|
953
|
+
#
|
|
954
|
+
# @return [Types::GetSessionOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
955
|
+
#
|
|
956
|
+
# * {Types::GetSessionOutput#session_arn #session_arn} => String
|
|
957
|
+
# * {Types::GetSessionOutput#principal_arn #principal_arn} => String
|
|
958
|
+
# * {Types::GetSessionOutput#role #role} => String
|
|
959
|
+
# * {Types::GetSessionOutput#status #status} => String
|
|
960
|
+
# * {Types::GetSessionOutput#client_id #client_id} => String
|
|
961
|
+
# * {Types::GetSessionOutput#client_type #client_type} => String
|
|
962
|
+
# * {Types::GetSessionOutput#resource #resource} => String
|
|
963
|
+
# * {Types::GetSessionOutput#issued_at #issued_at} => Integer
|
|
964
|
+
# * {Types::GetSessionOutput#expires_at #expires_at} => Integer
|
|
965
|
+
# * {Types::GetSessionOutput#last_used_at #last_used_at} => Integer
|
|
966
|
+
# * {Types::GetSessionOutput#issued_in_region #issued_in_region} => String
|
|
967
|
+
# * {Types::GetSessionOutput#origin_session_arn #origin_session_arn} => String
|
|
968
|
+
# * {Types::GetSessionOutput#user_agent #user_agent} => String
|
|
740
969
|
#
|
|
741
|
-
#
|
|
742
|
-
#
|
|
743
|
-
#
|
|
744
|
-
#
|
|
970
|
+
#
|
|
971
|
+
# @example Example: Get one of your own sessions
|
|
972
|
+
#
|
|
973
|
+
# # Returns a session owned by the caller when principalArn is omitted.
|
|
974
|
+
#
|
|
975
|
+
# resp = client.get_session({
|
|
976
|
+
# session_arn: "arn:aws:signin:us-east-1:123456789012:session/3b0a6152-ba23-447d-83cf-b3b3cc7b95f7",
|
|
977
|
+
# })
|
|
978
|
+
#
|
|
979
|
+
# resp.to_h outputs the following:
|
|
980
|
+
# {
|
|
981
|
+
# client_id: "arn:aws:signin:::devtools/same-device",
|
|
982
|
+
# client_type: "CLI",
|
|
983
|
+
# expires_at: 1794431207,
|
|
984
|
+
# issued_at: 1793825807,
|
|
985
|
+
# issued_in_region: "us-east-1",
|
|
986
|
+
# principal_arn: "arn:aws:iam::123456789012:role/Developer",
|
|
987
|
+
# role: "arn:aws:iam::123456789012:role/Developer",
|
|
988
|
+
# session_arn: "arn:aws:signin:us-east-1:123456789012:session/3b0a6152-ba23-447d-83cf-b3b3cc7b95f7",
|
|
989
|
+
# status: "ACTIVE",
|
|
990
|
+
# }
|
|
991
|
+
#
|
|
992
|
+
# @example Example: Get another identity's session as an account administrator
|
|
993
|
+
#
|
|
994
|
+
# # Uses the account wildcard principal ARN to get a session owned by another IAM identity.
|
|
995
|
+
#
|
|
996
|
+
# resp = client.get_session({
|
|
997
|
+
# principal_arn: "arn:aws:iam::123456789012:*",
|
|
998
|
+
# session_arn: "arn:aws:signin:us-east-1:123456789012:session/5dbdd43b-4135-4c59-ad06-5ddbcc2c1d77",
|
|
999
|
+
# })
|
|
1000
|
+
#
|
|
1001
|
+
# resp.to_h outputs the following:
|
|
1002
|
+
# {
|
|
1003
|
+
# client_id: "arn:aws:signin:::devtools/same-device",
|
|
1004
|
+
# client_type: "CLI",
|
|
1005
|
+
# expires_at: 1794431214,
|
|
1006
|
+
# issued_at: 1793826107,
|
|
1007
|
+
# issued_in_region: "us-east-1",
|
|
1008
|
+
# principal_arn: "arn:aws:iam::123456789012:role/ReadOnly",
|
|
1009
|
+
# role: "arn:aws:iam::123456789012:role/ReadOnly",
|
|
1010
|
+
# session_arn: "arn:aws:signin:us-east-1:123456789012:session/5dbdd43b-4135-4c59-ad06-5ddbcc2c1d77",
|
|
1011
|
+
# status: "ACTIVE",
|
|
1012
|
+
# }
|
|
1013
|
+
#
|
|
1014
|
+
# @example Request syntax with placeholder values
|
|
1015
|
+
#
|
|
1016
|
+
# resp = client.get_session({
|
|
1017
|
+
# session_arn: "SessionArn", # required
|
|
1018
|
+
# principal_arn: "PrincipalArnFilter",
|
|
1019
|
+
# })
|
|
1020
|
+
#
|
|
1021
|
+
# @example Response structure
|
|
1022
|
+
#
|
|
1023
|
+
# resp.session_arn #=> String
|
|
1024
|
+
# resp.principal_arn #=> String
|
|
1025
|
+
# resp.role #=> String
|
|
1026
|
+
# resp.status #=> String, one of "ACTIVE", "REVOKED"
|
|
1027
|
+
# resp.client_id #=> String
|
|
1028
|
+
# resp.client_type #=> String, one of "CLI", "MCP"
|
|
1029
|
+
# resp.resource #=> String
|
|
1030
|
+
# resp.issued_at #=> Integer
|
|
1031
|
+
# resp.expires_at #=> Integer
|
|
1032
|
+
# resp.last_used_at #=> Integer
|
|
1033
|
+
# resp.issued_in_region #=> String
|
|
1034
|
+
# resp.origin_session_arn #=> String
|
|
1035
|
+
# resp.user_agent #=> String
|
|
1036
|
+
#
|
|
1037
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/signin-2023-01-01/GetSession AWS API Documentation
|
|
1038
|
+
#
|
|
1039
|
+
# @overload get_session(params = {})
|
|
1040
|
+
# @param [Hash] params ({})
|
|
1041
|
+
def get_session(params = {}, options = {})
|
|
1042
|
+
req = build_request(:get_session, params)
|
|
1043
|
+
req.send_request(options)
|
|
1044
|
+
end
|
|
1045
|
+
|
|
1046
|
+
# Inspects the metadata and active state of an OAuth 2.0 access token or
|
|
1047
|
+
# refresh token.
|
|
1048
|
+
#
|
|
1049
|
+
# Implements RFC 7662 OAuth 2.0 Token Introspection over a
|
|
1050
|
+
# SigV4-authenticated endpoint. Returns the claims associated with a
|
|
1051
|
+
# token issued by AWS Sign-In.
|
|
745
1052
|
#
|
|
746
1053
|
# @option params [required, String] :token
|
|
747
|
-
# The
|
|
748
|
-
# access\_token or a refresh\_token issued by AWS Sign-In.
|
|
1054
|
+
# The access token or refresh token issued by AWS Sign-In.
|
|
749
1055
|
#
|
|
750
1056
|
# @option params [String] :token_type_hint
|
|
751
|
-
#
|
|
752
|
-
#
|
|
753
|
-
#
|
|
754
|
-
# refresh\_token.
|
|
1057
|
+
# An optional hint about the type of the token submitted for
|
|
1058
|
+
# introspection, as defined in RFC 7662 §2.1. The server checks both
|
|
1059
|
+
# token types regardless of the hint. Allowed values: "access\_token",
|
|
1060
|
+
# "refresh\_token".
|
|
755
1061
|
#
|
|
756
1062
|
# @return [Types::IntrospectOAuth2TokenWithIAMResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
757
1063
|
#
|
|
@@ -845,6 +1151,138 @@ module Aws::Signin
|
|
|
845
1151
|
req.send_request(options)
|
|
846
1152
|
end
|
|
847
1153
|
|
|
1154
|
+
# Lists sign-in sessions for an IAM identity in your account. If you
|
|
1155
|
+
# omit principalArn, the operation lists the caller's own sessions.
|
|
1156
|
+
# Specify a user or role ARN to list that identity's sessions, or
|
|
1157
|
+
# specify arn:aws:iam::\{account-id}:* to list all sessions in the
|
|
1158
|
+
# account. Filters are combined with a logical AND.
|
|
1159
|
+
#
|
|
1160
|
+
# @option params [String] :principal_arn
|
|
1161
|
+
# The identity whose sessions to list. Omit to list the caller's own
|
|
1162
|
+
# sessions. Specify arn:aws:iam::\{account-id}:* to list all sessions
|
|
1163
|
+
# in the account.
|
|
1164
|
+
#
|
|
1165
|
+
# @option params [Integer] :max_results
|
|
1166
|
+
# Maximum number of results to return
|
|
1167
|
+
#
|
|
1168
|
+
# @option params [String] :next_token
|
|
1169
|
+
# Token for pagination
|
|
1170
|
+
#
|
|
1171
|
+
# @option params [String] :status
|
|
1172
|
+
# Returns only sessions with this status
|
|
1173
|
+
#
|
|
1174
|
+
# @option params [String] :client_id
|
|
1175
|
+
# Returns only sessions created by this OAuth client
|
|
1176
|
+
#
|
|
1177
|
+
# @option params [Integer] :issued_after
|
|
1178
|
+
# Returns only sessions created at or after this time, in Unix epoch
|
|
1179
|
+
# seconds
|
|
1180
|
+
#
|
|
1181
|
+
# @option params [Integer] :issued_before
|
|
1182
|
+
# Returns only sessions created before this time, in Unix epoch seconds
|
|
1183
|
+
#
|
|
1184
|
+
# @return [Types::ListSessionsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
1185
|
+
#
|
|
1186
|
+
# * {Types::ListSessionsOutput#items #items} => Array<Types::Session>
|
|
1187
|
+
# * {Types::ListSessionsOutput#next_token #next_token} => String
|
|
1188
|
+
#
|
|
1189
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
|
1190
|
+
#
|
|
1191
|
+
#
|
|
1192
|
+
# @example Example: List your own sessions
|
|
1193
|
+
#
|
|
1194
|
+
# # Lists the caller's sessions when principalArn is omitted.
|
|
1195
|
+
#
|
|
1196
|
+
# resp = client.list_sessions({
|
|
1197
|
+
# })
|
|
1198
|
+
#
|
|
1199
|
+
# resp.to_h outputs the following:
|
|
1200
|
+
# {
|
|
1201
|
+
# items: [
|
|
1202
|
+
# {
|
|
1203
|
+
# client_id: "arn:aws:signin:::devtools/same-device",
|
|
1204
|
+
# client_type: "CLI",
|
|
1205
|
+
# expires_at: 1794431207,
|
|
1206
|
+
# issued_at: 1793825807,
|
|
1207
|
+
# principal_arn: "arn:aws:iam::123456789012:role/Developer",
|
|
1208
|
+
# role: "arn:aws:iam::123456789012:role/Developer",
|
|
1209
|
+
# session_arn: "arn:aws:signin:us-east-1:123456789012:session/3b0a6152-ba23-447d-83cf-b3b3cc7b95f7",
|
|
1210
|
+
# status: "ACTIVE",
|
|
1211
|
+
# },
|
|
1212
|
+
# {
|
|
1213
|
+
# client_id: "arn:aws:signin:::devtools/same-device",
|
|
1214
|
+
# client_type: "CLI",
|
|
1215
|
+
# expires_at: 1794431212,
|
|
1216
|
+
# issued_at: 1793824607,
|
|
1217
|
+
# principal_arn: "arn:aws:iam::123456789012:role/Developer",
|
|
1218
|
+
# role: "arn:aws:iam::123456789012:role/Developer",
|
|
1219
|
+
# session_arn: "arn:aws:signin:us-east-1:123456789012:session/4c63f231-2128-42cf-aa83-83589f9a0df2",
|
|
1220
|
+
# status: "ACTIVE",
|
|
1221
|
+
# },
|
|
1222
|
+
# ],
|
|
1223
|
+
# }
|
|
1224
|
+
#
|
|
1225
|
+
# @example Example: List active sessions one page at a time
|
|
1226
|
+
#
|
|
1227
|
+
# # Returns one active session and a token to request the next page.
|
|
1228
|
+
#
|
|
1229
|
+
# resp = client.list_sessions({
|
|
1230
|
+
# max_results: 1,
|
|
1231
|
+
# status: "ACTIVE",
|
|
1232
|
+
# })
|
|
1233
|
+
#
|
|
1234
|
+
# resp.to_h outputs the following:
|
|
1235
|
+
# {
|
|
1236
|
+
# items: [
|
|
1237
|
+
# {
|
|
1238
|
+
# client_id: "arn:aws:signin:::devtools/same-device",
|
|
1239
|
+
# client_type: "CLI",
|
|
1240
|
+
# expires_at: 1794431207,
|
|
1241
|
+
# issued_at: 1793825807,
|
|
1242
|
+
# principal_arn: "arn:aws:iam::123456789012:role/Developer",
|
|
1243
|
+
# role: "arn:aws:iam::123456789012:role/Developer",
|
|
1244
|
+
# session_arn: "arn:aws:signin:us-east-1:123456789012:session/3b0a6152-ba23-447d-83cf-b3b3cc7b95f7",
|
|
1245
|
+
# status: "ACTIVE",
|
|
1246
|
+
# },
|
|
1247
|
+
# ],
|
|
1248
|
+
# next_token: "AAMA-EXAMPLE-NEXT-TOKEN",
|
|
1249
|
+
# }
|
|
1250
|
+
#
|
|
1251
|
+
# @example Request syntax with placeholder values
|
|
1252
|
+
#
|
|
1253
|
+
# resp = client.list_sessions({
|
|
1254
|
+
# principal_arn: "PrincipalArnFilter",
|
|
1255
|
+
# max_results: 1,
|
|
1256
|
+
# next_token: "NextToken",
|
|
1257
|
+
# status: "ACTIVE", # accepts ACTIVE, REVOKED
|
|
1258
|
+
# client_id: "String",
|
|
1259
|
+
# issued_after: 1,
|
|
1260
|
+
# issued_before: 1,
|
|
1261
|
+
# })
|
|
1262
|
+
#
|
|
1263
|
+
# @example Response structure
|
|
1264
|
+
#
|
|
1265
|
+
# resp.items #=> Array
|
|
1266
|
+
# resp.items[0].session_arn #=> String
|
|
1267
|
+
# resp.items[0].principal_arn #=> String
|
|
1268
|
+
# resp.items[0].role #=> String
|
|
1269
|
+
# resp.items[0].status #=> String, one of "ACTIVE", "REVOKED"
|
|
1270
|
+
# resp.items[0].issued_at #=> Integer
|
|
1271
|
+
# resp.items[0].expires_at #=> Integer
|
|
1272
|
+
# resp.items[0].client_id #=> String
|
|
1273
|
+
# resp.items[0].client_type #=> String, one of "CLI", "MCP"
|
|
1274
|
+
# resp.items[0].resource #=> String
|
|
1275
|
+
# resp.next_token #=> String
|
|
1276
|
+
#
|
|
1277
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/signin-2023-01-01/ListSessions AWS API Documentation
|
|
1278
|
+
#
|
|
1279
|
+
# @overload list_sessions(params = {})
|
|
1280
|
+
# @param [Hash] params ({})
|
|
1281
|
+
def list_sessions(params = {}, options = {})
|
|
1282
|
+
req = build_request(:list_sessions, params)
|
|
1283
|
+
req.send_request(options)
|
|
1284
|
+
end
|
|
1285
|
+
|
|
848
1286
|
# Enable console authorization configuration with automatic scope
|
|
849
1287
|
# detection
|
|
850
1288
|
#
|
|
@@ -939,21 +1377,11 @@ module Aws::Signin
|
|
|
939
1377
|
req.send_request(options)
|
|
940
1378
|
end
|
|
941
1379
|
|
|
942
|
-
#
|
|
943
|
-
# associated refresh tokens
|
|
944
|
-
#
|
|
945
|
-
# Revokes a refresh\_token issued by AWS Sign-In, invalidating the
|
|
946
|
-
# entire token chain so that the refresh\_token can no longer be used to
|
|
947
|
-
# mint new access\_tokens.
|
|
948
|
-
#
|
|
949
|
-
# Idempotency: revoking an already-revoked, expired, or otherwise
|
|
950
|
-
# invalid token still returns 200 OK with an empty body. Only the
|
|
951
|
-
# refresh\_token type is accepted.
|
|
1380
|
+
# Revokes an OAuth 2.0 refresh token and its associated token chain.
|
|
952
1381
|
#
|
|
953
1382
|
# @option params [required, String] :token
|
|
954
|
-
# The refresh
|
|
955
|
-
# Sign-In
|
|
956
|
-
# revocation.
|
|
1383
|
+
# The refresh token to revoke. Must be a refresh token issued by AWS
|
|
1384
|
+
# Sign-In. Access tokens are not accepted for revocation.
|
|
957
1385
|
#
|
|
958
1386
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
|
959
1387
|
#
|
|
@@ -990,7 +1418,7 @@ module Aws::Signin
|
|
|
990
1418
|
tracer: tracer
|
|
991
1419
|
)
|
|
992
1420
|
context[:gem_name] = 'aws-sdk-core'
|
|
993
|
-
context[:gem_version] = '3.
|
|
1421
|
+
context[:gem_version] = '3.271.0'
|
|
994
1422
|
Seahorse::Client::Request.new(handlers, context)
|
|
995
1423
|
end
|
|
996
1424
|
|