aws-sdk-core 3.152.0 → 3.234.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 +942 -1
- data/VERSION +1 -1
- data/lib/aws-defaults/default_configuration.rb +5 -6
- data/lib/aws-defaults.rb +4 -1
- data/lib/aws-sdk-core/arn.rb +14 -3
- data/lib/aws-sdk-core/assume_role_credentials.rb +21 -13
- data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +16 -9
- data/lib/aws-sdk-core/binary/decode_handler.rb +3 -9
- data/lib/aws-sdk-core/binary/encode_handler.rb +13 -2
- data/lib/aws-sdk-core/binary/event_builder.rb +34 -37
- data/lib/aws-sdk-core/binary/event_stream_decoder.rb +1 -0
- data/lib/aws-sdk-core/binary/event_stream_encoder.rb +4 -3
- data/lib/aws-sdk-core/cbor/decoder.rb +308 -0
- data/lib/aws-sdk-core/cbor/encoder.rb +243 -0
- data/lib/aws-sdk-core/cbor.rb +53 -0
- data/lib/aws-sdk-core/client_side_monitoring.rb +9 -0
- data/lib/aws-sdk-core/client_stubs.rb +33 -55
- data/lib/aws-sdk-core/credential_provider.rb +8 -1
- data/lib/aws-sdk-core/credential_provider_chain.rb +81 -29
- data/lib/aws-sdk-core/credentials.rb +19 -6
- data/lib/aws-sdk-core/ec2_metadata.rb +1 -1
- data/lib/aws-sdk-core/ecs_credentials.rb +186 -60
- data/lib/aws-sdk-core/endpoints/condition.rb +41 -0
- data/lib/aws-sdk-core/endpoints/endpoint.rb +19 -0
- data/lib/aws-sdk-core/endpoints/endpoint_rule.rb +75 -0
- data/lib/aws-sdk-core/endpoints/error_rule.rb +42 -0
- data/lib/aws-sdk-core/endpoints/function.rb +80 -0
- data/lib/aws-sdk-core/endpoints/matchers.rb +129 -0
- data/lib/aws-sdk-core/endpoints/reference.rb +31 -0
- data/lib/aws-sdk-core/endpoints/rule.rb +25 -0
- data/lib/aws-sdk-core/endpoints/rule_set.rb +52 -0
- data/lib/aws-sdk-core/endpoints/rules_provider.rb +37 -0
- data/lib/aws-sdk-core/endpoints/templater.rb +58 -0
- data/lib/aws-sdk-core/endpoints/tree_rule.rb +45 -0
- data/lib/aws-sdk-core/endpoints/url.rb +60 -0
- data/lib/aws-sdk-core/endpoints.rb +158 -0
- data/lib/aws-sdk-core/error_handler.rb +46 -0
- data/lib/aws-sdk-core/errors.rb +14 -5
- data/lib/aws-sdk-core/event_emitter.rb +1 -17
- data/lib/aws-sdk-core/ini_parser.rb +7 -0
- data/lib/aws-sdk-core/instance_profile_credentials.rb +168 -155
- data/lib/aws-sdk-core/json/builder.rb +8 -1
- data/lib/aws-sdk-core/json/error_handler.rb +46 -11
- data/lib/aws-sdk-core/json/handler.rb +13 -6
- data/lib/aws-sdk-core/json/json_engine.rb +3 -1
- data/lib/aws-sdk-core/json/oj_engine.rb +7 -1
- data/lib/aws-sdk-core/json/parser.rb +33 -3
- data/lib/aws-sdk-core/json.rb +43 -14
- data/lib/aws-sdk-core/log/formatter.rb +6 -0
- data/lib/aws-sdk-core/log/param_filter.rb +2 -2
- data/lib/aws-sdk-core/log/param_formatter.rb +7 -3
- data/lib/aws-sdk-core/log.rb +10 -0
- data/lib/aws-sdk-core/lru_cache.rb +75 -0
- data/lib/aws-sdk-core/pageable_response.rb +3 -1
- data/lib/aws-sdk-core/param_validator.rb +9 -4
- data/lib/aws-sdk-core/plugins/bearer_authorization.rb +2 -0
- data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +348 -169
- data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +1 -1
- data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +14 -2
- data/lib/aws-sdk-core/plugins/credentials_configuration.rb +84 -38
- data/lib/aws-sdk-core/plugins/endpoint_discovery.rb +6 -2
- data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +40 -32
- data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
- data/lib/aws-sdk-core/plugins/http_checksum.rb +3 -8
- data/lib/aws-sdk-core/plugins/invocation_id.rb +1 -11
- data/lib/aws-sdk-core/plugins/logging.rb +2 -0
- data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +3 -1
- data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -24
- data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +6 -8
- data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
- data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +3 -15
- data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +3 -0
- data/lib/aws-sdk-core/plugins/protocols/rpc_v2.rb +17 -0
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +164 -34
- data/lib/aws-sdk-core/plugins/request_compression.rb +226 -0
- data/lib/aws-sdk-core/plugins/retries/error_inspector.rb +2 -1
- data/lib/aws-sdk-core/plugins/retry_errors.rb +12 -3
- data/lib/aws-sdk-core/plugins/sign.rb +222 -0
- data/lib/aws-sdk-core/plugins/signature_v2.rb +2 -0
- data/lib/aws-sdk-core/plugins/signature_v4.rb +2 -0
- data/lib/aws-sdk-core/plugins/stub_responses.rb +59 -9
- data/lib/aws-sdk-core/plugins/telemetry.rb +75 -0
- data/lib/aws-sdk-core/plugins/transfer_encoding.rb +16 -9
- data/lib/aws-sdk-core/plugins/user_agent.rb +192 -14
- data/lib/aws-sdk-core/plugins.rb +39 -0
- data/lib/aws-sdk-core/process_credentials.rb +48 -29
- data/lib/aws-sdk-core/query/ec2_handler.rb +27 -0
- data/lib/aws-sdk-core/query/ec2_param_builder.rb +5 -7
- data/lib/aws-sdk-core/query/handler.rb +4 -4
- data/lib/aws-sdk-core/query/param_builder.rb +2 -2
- data/lib/aws-sdk-core/query.rb +2 -1
- data/lib/aws-sdk-core/refreshing_credentials.rb +20 -23
- data/lib/aws-sdk-core/resources.rb +8 -0
- data/lib/aws-sdk-core/rest/content_type_handler.rb +60 -0
- data/lib/aws-sdk-core/rest/handler.rb +3 -4
- data/lib/aws-sdk-core/rest/request/body.rb +32 -5
- data/lib/aws-sdk-core/rest/request/endpoint.rb +24 -4
- data/lib/aws-sdk-core/rest/request/headers.rb +14 -10
- data/lib/aws-sdk-core/rest/request/querystring_builder.rb +62 -36
- data/lib/aws-sdk-core/rest/response/body.rb +15 -1
- data/lib/aws-sdk-core/rest/response/header_list_parser.rb +79 -0
- data/lib/aws-sdk-core/rest/response/headers.rb +8 -3
- data/lib/aws-sdk-core/rest.rb +1 -0
- data/lib/aws-sdk-core/rpc_v2/builder.rb +62 -0
- data/lib/aws-sdk-core/rpc_v2/cbor_engine.rb +18 -0
- data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +47 -0
- data/lib/aws-sdk-core/rpc_v2/error_handler.rb +95 -0
- data/lib/aws-sdk-core/rpc_v2/handler.rb +79 -0
- data/lib/aws-sdk-core/rpc_v2/parser.rb +98 -0
- data/lib/aws-sdk-core/rpc_v2.rb +69 -0
- data/lib/aws-sdk-core/shared_config.rb +160 -36
- data/lib/aws-sdk-core/shared_credentials.rb +1 -7
- data/lib/aws-sdk-core/sso_credentials.rb +84 -46
- data/lib/aws-sdk-core/sso_token_provider.rb +3 -2
- data/lib/aws-sdk-core/static_token_provider.rb +1 -2
- data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +12 -11
- data/lib/aws-sdk-core/stubbing/protocols/json.rb +11 -10
- data/lib/aws-sdk-core/stubbing/protocols/query.rb +7 -6
- data/lib/aws-sdk-core/stubbing/protocols/rest.rb +2 -1
- data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +9 -8
- data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +6 -5
- data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +39 -0
- data/lib/aws-sdk-core/stubbing/stub_data.rb +11 -0
- data/lib/aws-sdk-core/stubbing.rb +22 -0
- data/lib/aws-sdk-core/telemetry/base.rb +177 -0
- data/lib/aws-sdk-core/telemetry/no_op.rb +70 -0
- data/lib/aws-sdk-core/telemetry/otel.rb +235 -0
- data/lib/aws-sdk-core/telemetry/span_kind.rb +22 -0
- data/lib/aws-sdk-core/telemetry/span_status.rb +59 -0
- data/lib/aws-sdk-core/telemetry.rb +78 -0
- data/lib/aws-sdk-core/token.rb +3 -3
- data/lib/aws-sdk-core/token_provider.rb +4 -0
- data/lib/aws-sdk-core/token_provider_chain.rb +2 -6
- data/lib/aws-sdk-core/util.rb +41 -1
- data/lib/aws-sdk-core/waiters/poller.rb +12 -5
- data/lib/aws-sdk-core/xml/builder.rb +17 -9
- data/lib/aws-sdk-core/xml/error_handler.rb +35 -43
- data/lib/aws-sdk-core/xml/parser/frame.rb +4 -20
- data/lib/aws-sdk-core/xml/parser/{engines/oga.rb → oga_engine.rb} +2 -0
- data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
- data/lib/aws-sdk-core/xml/parser.rb +2 -6
- data/lib/aws-sdk-core.rb +82 -103
- data/lib/aws-sdk-sso/client.rb +219 -89
- data/lib/aws-sdk-sso/client_api.rb +7 -0
- data/lib/aws-sdk-sso/endpoint_parameters.rb +69 -0
- data/lib/aws-sdk-sso/endpoint_provider.rb +53 -0
- data/lib/aws-sdk-sso/endpoints.rb +20 -0
- data/lib/aws-sdk-sso/plugins/endpoints.rb +77 -0
- data/lib/aws-sdk-sso/types.rb +1 -35
- data/lib/aws-sdk-sso.rb +15 -7
- data/lib/aws-sdk-ssooidc/client.rb +650 -118
- data/lib/aws-sdk-ssooidc/client_api.rb +94 -1
- data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +69 -0
- data/lib/aws-sdk-ssooidc/endpoint_provider.rb +53 -0
- data/lib/aws-sdk-ssooidc/endpoints.rb +20 -0
- data/lib/aws-sdk-ssooidc/errors.rb +62 -0
- data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +77 -0
- data/lib/aws-sdk-ssooidc/types.rb +437 -67
- data/lib/aws-sdk-ssooidc.rb +15 -7
- data/lib/aws-sdk-sts/client.rb +670 -368
- data/lib/aws-sdk-sts/client_api.rb +48 -9
- data/lib/aws-sdk-sts/customizations.rb +5 -2
- data/lib/aws-sdk-sts/endpoint_parameters.rb +79 -0
- data/lib/aws-sdk-sts/endpoint_provider.rb +107 -0
- data/lib/aws-sdk-sts/endpoints.rb +20 -0
- data/lib/aws-sdk-sts/errors.rb +15 -0
- data/lib/aws-sdk-sts/plugins/endpoints.rb +77 -0
- data/lib/aws-sdk-sts/presigner.rb +12 -18
- data/lib/aws-sdk-sts/types.rb +296 -222
- data/lib/aws-sdk-sts.rb +15 -7
- data/lib/seahorse/client/async_base.rb +4 -6
- data/lib/seahorse/client/async_response.rb +19 -0
- data/lib/seahorse/client/base.rb +18 -21
- data/lib/seahorse/client/configuration.rb +1 -5
- data/lib/seahorse/client/h2/connection.rb +27 -36
- data/lib/seahorse/client/h2/handler.rb +14 -3
- data/lib/seahorse/client/handler.rb +1 -1
- data/lib/seahorse/client/http/response.rb +1 -1
- data/lib/seahorse/client/net_http/connection_pool.rb +15 -12
- data/lib/seahorse/client/net_http/handler.rb +21 -9
- data/lib/seahorse/client/net_http/patches.rb +1 -4
- data/lib/seahorse/client/networking_error.rb +1 -1
- data/lib/seahorse/client/plugin.rb +9 -0
- data/lib/seahorse/client/plugins/endpoint.rb +0 -1
- data/lib/seahorse/client/plugins/h2.rb +4 -4
- data/lib/seahorse/client/plugins/net_http.rb +57 -16
- data/lib/seahorse/client/plugins/request_callback.rb +40 -9
- data/lib/seahorse/client/request_context.rb +9 -2
- data/lib/seahorse/client/response.rb +8 -0
- data/lib/seahorse/model/operation.rb +3 -0
- data/lib/seahorse/model/shapes.rb +2 -2
- data/lib/seahorse/util.rb +6 -1
- data/sig/aws-sdk-core/async_client_stubs.rbs +21 -0
- data/sig/aws-sdk-core/client_stubs.rbs +10 -0
- data/sig/aws-sdk-core/errors.rbs +22 -0
- data/sig/aws-sdk-core/resources/collection.rbs +21 -0
- data/sig/aws-sdk-core/structure.rbs +4 -0
- data/sig/aws-sdk-core/telemetry/base.rbs +46 -0
- data/sig/aws-sdk-core/telemetry/otel.rbs +22 -0
- data/sig/aws-sdk-core/telemetry/span_kind.rbs +15 -0
- data/sig/aws-sdk-core/telemetry/span_status.rbs +24 -0
- data/sig/aws-sdk-core/waiters/errors.rbs +20 -0
- data/sig/aws-sdk-core.rbs +7 -0
- data/sig/seahorse/client/async_base.rbs +18 -0
- data/sig/seahorse/client/base.rbs +25 -0
- data/sig/seahorse/client/handler_builder.rbs +16 -0
- data/sig/seahorse/client/response.rbs +61 -0
- metadata +133 -23
- /data/lib/aws-sdk-core/xml/parser/{engines/libxml.rb → libxml_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/nokogiri.rb → nokogiri_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/ox.rb → ox_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/rexml.rb → rexml_engine.rb} +0 -0
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
#
|
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
|
9
9
|
|
|
10
|
+
|
|
10
11
|
module Aws::STS
|
|
11
12
|
# @api private
|
|
12
13
|
module ClientApi
|
|
@@ -19,12 +20,14 @@ module Aws::STS
|
|
|
19
20
|
AssumeRoleWithSAMLResponse = Shapes::StructureShape.new(name: 'AssumeRoleWithSAMLResponse')
|
|
20
21
|
AssumeRoleWithWebIdentityRequest = Shapes::StructureShape.new(name: 'AssumeRoleWithWebIdentityRequest')
|
|
21
22
|
AssumeRoleWithWebIdentityResponse = Shapes::StructureShape.new(name: 'AssumeRoleWithWebIdentityResponse')
|
|
23
|
+
AssumeRootRequest = Shapes::StructureShape.new(name: 'AssumeRootRequest')
|
|
24
|
+
AssumeRootResponse = Shapes::StructureShape.new(name: 'AssumeRootResponse')
|
|
22
25
|
AssumedRoleUser = Shapes::StructureShape.new(name: 'AssumedRoleUser')
|
|
23
26
|
Audience = Shapes::StringShape.new(name: 'Audience')
|
|
24
27
|
Credentials = Shapes::StructureShape.new(name: 'Credentials')
|
|
25
28
|
DecodeAuthorizationMessageRequest = Shapes::StructureShape.new(name: 'DecodeAuthorizationMessageRequest')
|
|
26
29
|
DecodeAuthorizationMessageResponse = Shapes::StructureShape.new(name: 'DecodeAuthorizationMessageResponse')
|
|
27
|
-
ExpiredTokenException = Shapes::StructureShape.new(name: 'ExpiredTokenException')
|
|
30
|
+
ExpiredTokenException = Shapes::StructureShape.new(name: 'ExpiredTokenException', error: {"code" => "ExpiredTokenException", "httpStatusCode" => 400, "senderFault" => true})
|
|
28
31
|
FederatedUser = Shapes::StructureShape.new(name: 'FederatedUser')
|
|
29
32
|
GetAccessKeyInfoRequest = Shapes::StructureShape.new(name: 'GetAccessKeyInfoRequest')
|
|
30
33
|
GetAccessKeyInfoResponse = Shapes::StructureShape.new(name: 'GetAccessKeyInfoResponse')
|
|
@@ -34,26 +37,31 @@ module Aws::STS
|
|
|
34
37
|
GetFederationTokenResponse = Shapes::StructureShape.new(name: 'GetFederationTokenResponse')
|
|
35
38
|
GetSessionTokenRequest = Shapes::StructureShape.new(name: 'GetSessionTokenRequest')
|
|
36
39
|
GetSessionTokenResponse = Shapes::StructureShape.new(name: 'GetSessionTokenResponse')
|
|
37
|
-
IDPCommunicationErrorException = Shapes::StructureShape.new(name: 'IDPCommunicationErrorException')
|
|
38
|
-
IDPRejectedClaimException = Shapes::StructureShape.new(name: 'IDPRejectedClaimException')
|
|
39
|
-
InvalidAuthorizationMessageException = Shapes::StructureShape.new(name: 'InvalidAuthorizationMessageException')
|
|
40
|
-
InvalidIdentityTokenException = Shapes::StructureShape.new(name: 'InvalidIdentityTokenException')
|
|
40
|
+
IDPCommunicationErrorException = Shapes::StructureShape.new(name: 'IDPCommunicationErrorException', error: {"code" => "IDPCommunicationError", "httpStatusCode" => 400, "senderFault" => true})
|
|
41
|
+
IDPRejectedClaimException = Shapes::StructureShape.new(name: 'IDPRejectedClaimException', error: {"code" => "IDPRejectedClaim", "httpStatusCode" => 403, "senderFault" => true})
|
|
42
|
+
InvalidAuthorizationMessageException = Shapes::StructureShape.new(name: 'InvalidAuthorizationMessageException', error: {"code" => "InvalidAuthorizationMessageException", "httpStatusCode" => 400, "senderFault" => true})
|
|
43
|
+
InvalidIdentityTokenException = Shapes::StructureShape.new(name: 'InvalidIdentityTokenException', error: {"code" => "InvalidIdentityToken", "httpStatusCode" => 400, "senderFault" => true})
|
|
41
44
|
Issuer = Shapes::StringShape.new(name: 'Issuer')
|
|
42
|
-
MalformedPolicyDocumentException = Shapes::StructureShape.new(name: 'MalformedPolicyDocumentException')
|
|
45
|
+
MalformedPolicyDocumentException = Shapes::StructureShape.new(name: 'MalformedPolicyDocumentException', error: {"code" => "MalformedPolicyDocument", "httpStatusCode" => 400, "senderFault" => true})
|
|
43
46
|
NameQualifier = Shapes::StringShape.new(name: 'NameQualifier')
|
|
44
|
-
PackedPolicyTooLargeException = Shapes::StructureShape.new(name: 'PackedPolicyTooLargeException')
|
|
47
|
+
PackedPolicyTooLargeException = Shapes::StructureShape.new(name: 'PackedPolicyTooLargeException', error: {"code" => "PackedPolicyTooLarge", "httpStatusCode" => 400, "senderFault" => true})
|
|
45
48
|
PolicyDescriptorType = Shapes::StructureShape.new(name: 'PolicyDescriptorType')
|
|
46
|
-
|
|
49
|
+
ProvidedContext = Shapes::StructureShape.new(name: 'ProvidedContext')
|
|
50
|
+
ProvidedContextsListType = Shapes::ListShape.new(name: 'ProvidedContextsListType')
|
|
51
|
+
RegionDisabledException = Shapes::StructureShape.new(name: 'RegionDisabledException', error: {"code" => "RegionDisabledException", "httpStatusCode" => 403, "senderFault" => true})
|
|
52
|
+
RootDurationSecondsType = Shapes::IntegerShape.new(name: 'RootDurationSecondsType')
|
|
47
53
|
SAMLAssertionType = Shapes::StringShape.new(name: 'SAMLAssertionType')
|
|
48
54
|
Subject = Shapes::StringShape.new(name: 'Subject')
|
|
49
55
|
SubjectType = Shapes::StringShape.new(name: 'SubjectType')
|
|
50
56
|
Tag = Shapes::StructureShape.new(name: 'Tag')
|
|
57
|
+
TargetPrincipalType = Shapes::StringShape.new(name: 'TargetPrincipalType')
|
|
51
58
|
accessKeyIdType = Shapes::StringShape.new(name: 'accessKeyIdType')
|
|
52
59
|
accessKeySecretType = Shapes::StringShape.new(name: 'accessKeySecretType')
|
|
53
60
|
accountType = Shapes::StringShape.new(name: 'accountType')
|
|
54
61
|
arnType = Shapes::StringShape.new(name: 'arnType')
|
|
55
62
|
assumedRoleIdType = Shapes::StringShape.new(name: 'assumedRoleIdType')
|
|
56
63
|
clientTokenType = Shapes::StringShape.new(name: 'clientTokenType')
|
|
64
|
+
contextAssertionType = Shapes::StringShape.new(name: 'contextAssertionType')
|
|
57
65
|
dateType = Shapes::TimestampShape.new(name: 'dateType')
|
|
58
66
|
decodedMessageType = Shapes::StringShape.new(name: 'decodedMessageType')
|
|
59
67
|
durationSecondsType = Shapes::IntegerShape.new(name: 'durationSecondsType')
|
|
@@ -81,6 +89,7 @@ module Aws::STS
|
|
|
81
89
|
tagValueType = Shapes::StringShape.new(name: 'tagValueType')
|
|
82
90
|
tokenCodeType = Shapes::StringShape.new(name: 'tokenCodeType')
|
|
83
91
|
tokenType = Shapes::StringShape.new(name: 'tokenType')
|
|
92
|
+
unrestrictedSessionPolicyDocumentType = Shapes::StringShape.new(name: 'unrestrictedSessionPolicyDocumentType')
|
|
84
93
|
urlType = Shapes::StringShape.new(name: 'urlType')
|
|
85
94
|
userIdType = Shapes::StringShape.new(name: 'userIdType')
|
|
86
95
|
userNameType = Shapes::StringShape.new(name: 'userNameType')
|
|
@@ -89,7 +98,7 @@ module Aws::STS
|
|
|
89
98
|
AssumeRoleRequest.add_member(:role_arn, Shapes::ShapeRef.new(shape: arnType, required: true, location_name: "RoleArn"))
|
|
90
99
|
AssumeRoleRequest.add_member(:role_session_name, Shapes::ShapeRef.new(shape: roleSessionNameType, required: true, location_name: "RoleSessionName"))
|
|
91
100
|
AssumeRoleRequest.add_member(:policy_arns, Shapes::ShapeRef.new(shape: policyDescriptorListType, location_name: "PolicyArns"))
|
|
92
|
-
AssumeRoleRequest.add_member(:policy, Shapes::ShapeRef.new(shape:
|
|
101
|
+
AssumeRoleRequest.add_member(:policy, Shapes::ShapeRef.new(shape: unrestrictedSessionPolicyDocumentType, location_name: "Policy"))
|
|
93
102
|
AssumeRoleRequest.add_member(:duration_seconds, Shapes::ShapeRef.new(shape: roleDurationSecondsType, location_name: "DurationSeconds"))
|
|
94
103
|
AssumeRoleRequest.add_member(:tags, Shapes::ShapeRef.new(shape: tagListType, location_name: "Tags"))
|
|
95
104
|
AssumeRoleRequest.add_member(:transitive_tag_keys, Shapes::ShapeRef.new(shape: tagKeyListType, location_name: "TransitiveTagKeys"))
|
|
@@ -97,6 +106,7 @@ module Aws::STS
|
|
|
97
106
|
AssumeRoleRequest.add_member(:serial_number, Shapes::ShapeRef.new(shape: serialNumberType, location_name: "SerialNumber"))
|
|
98
107
|
AssumeRoleRequest.add_member(:token_code, Shapes::ShapeRef.new(shape: tokenCodeType, location_name: "TokenCode"))
|
|
99
108
|
AssumeRoleRequest.add_member(:source_identity, Shapes::ShapeRef.new(shape: sourceIdentityType, location_name: "SourceIdentity"))
|
|
109
|
+
AssumeRoleRequest.add_member(:provided_contexts, Shapes::ShapeRef.new(shape: ProvidedContextsListType, location_name: "ProvidedContexts"))
|
|
100
110
|
AssumeRoleRequest.struct_class = Types::AssumeRoleRequest
|
|
101
111
|
|
|
102
112
|
AssumeRoleResponse.add_member(:credentials, Shapes::ShapeRef.new(shape: Credentials, location_name: "Credentials"))
|
|
@@ -142,6 +152,15 @@ module Aws::STS
|
|
|
142
152
|
AssumeRoleWithWebIdentityResponse.add_member(:source_identity, Shapes::ShapeRef.new(shape: sourceIdentityType, location_name: "SourceIdentity"))
|
|
143
153
|
AssumeRoleWithWebIdentityResponse.struct_class = Types::AssumeRoleWithWebIdentityResponse
|
|
144
154
|
|
|
155
|
+
AssumeRootRequest.add_member(:target_principal, Shapes::ShapeRef.new(shape: TargetPrincipalType, required: true, location_name: "TargetPrincipal"))
|
|
156
|
+
AssumeRootRequest.add_member(:task_policy_arn, Shapes::ShapeRef.new(shape: PolicyDescriptorType, required: true, location_name: "TaskPolicyArn"))
|
|
157
|
+
AssumeRootRequest.add_member(:duration_seconds, Shapes::ShapeRef.new(shape: RootDurationSecondsType, location_name: "DurationSeconds"))
|
|
158
|
+
AssumeRootRequest.struct_class = Types::AssumeRootRequest
|
|
159
|
+
|
|
160
|
+
AssumeRootResponse.add_member(:credentials, Shapes::ShapeRef.new(shape: Credentials, location_name: "Credentials"))
|
|
161
|
+
AssumeRootResponse.add_member(:source_identity, Shapes::ShapeRef.new(shape: sourceIdentityType, location_name: "SourceIdentity"))
|
|
162
|
+
AssumeRootResponse.struct_class = Types::AssumeRootResponse
|
|
163
|
+
|
|
145
164
|
AssumedRoleUser.add_member(:assumed_role_id, Shapes::ShapeRef.new(shape: assumedRoleIdType, required: true, location_name: "AssumedRoleId"))
|
|
146
165
|
AssumedRoleUser.add_member(:arn, Shapes::ShapeRef.new(shape: arnType, required: true, location_name: "Arn"))
|
|
147
166
|
AssumedRoleUser.struct_class = Types::AssumedRoleUser
|
|
@@ -219,6 +238,12 @@ module Aws::STS
|
|
|
219
238
|
PolicyDescriptorType.add_member(:arn, Shapes::ShapeRef.new(shape: arnType, location_name: "arn"))
|
|
220
239
|
PolicyDescriptorType.struct_class = Types::PolicyDescriptorType
|
|
221
240
|
|
|
241
|
+
ProvidedContext.add_member(:provider_arn, Shapes::ShapeRef.new(shape: arnType, location_name: "ProviderArn"))
|
|
242
|
+
ProvidedContext.add_member(:context_assertion, Shapes::ShapeRef.new(shape: contextAssertionType, location_name: "ContextAssertion"))
|
|
243
|
+
ProvidedContext.struct_class = Types::ProvidedContext
|
|
244
|
+
|
|
245
|
+
ProvidedContextsListType.member = Shapes::ShapeRef.new(shape: ProvidedContext)
|
|
246
|
+
|
|
222
247
|
RegionDisabledException.add_member(:message, Shapes::ShapeRef.new(shape: regionDisabledMessage, location_name: "message"))
|
|
223
248
|
RegionDisabledException.struct_class = Types::RegionDisabledException
|
|
224
249
|
|
|
@@ -240,9 +265,11 @@ module Aws::STS
|
|
|
240
265
|
|
|
241
266
|
api.metadata = {
|
|
242
267
|
"apiVersion" => "2011-06-15",
|
|
268
|
+
"auth" => ["aws.auth#sigv4"],
|
|
243
269
|
"endpointPrefix" => "sts",
|
|
244
270
|
"globalEndpoint" => "sts.amazonaws.com",
|
|
245
271
|
"protocol" => "query",
|
|
272
|
+
"protocols" => ["query"],
|
|
246
273
|
"serviceAbbreviation" => "AWS STS",
|
|
247
274
|
"serviceFullName" => "AWS Security Token Service",
|
|
248
275
|
"serviceId" => "STS",
|
|
@@ -268,6 +295,7 @@ module Aws::STS
|
|
|
268
295
|
o.http_method = "POST"
|
|
269
296
|
o.http_request_uri = "/"
|
|
270
297
|
o['authtype'] = "none"
|
|
298
|
+
o['auth'] = ["smithy.api#noAuth"]
|
|
271
299
|
o.input = Shapes::ShapeRef.new(shape: AssumeRoleWithSAMLRequest)
|
|
272
300
|
o.output = Shapes::ShapeRef.new(shape: AssumeRoleWithSAMLResponse)
|
|
273
301
|
o.errors << Shapes::ShapeRef.new(shape: MalformedPolicyDocumentException)
|
|
@@ -283,6 +311,7 @@ module Aws::STS
|
|
|
283
311
|
o.http_method = "POST"
|
|
284
312
|
o.http_request_uri = "/"
|
|
285
313
|
o['authtype'] = "none"
|
|
314
|
+
o['auth'] = ["smithy.api#noAuth"]
|
|
286
315
|
o.input = Shapes::ShapeRef.new(shape: AssumeRoleWithWebIdentityRequest)
|
|
287
316
|
o.output = Shapes::ShapeRef.new(shape: AssumeRoleWithWebIdentityResponse)
|
|
288
317
|
o.errors << Shapes::ShapeRef.new(shape: MalformedPolicyDocumentException)
|
|
@@ -294,6 +323,16 @@ module Aws::STS
|
|
|
294
323
|
o.errors << Shapes::ShapeRef.new(shape: RegionDisabledException)
|
|
295
324
|
end)
|
|
296
325
|
|
|
326
|
+
api.add_operation(:assume_root, Seahorse::Model::Operation.new.tap do |o|
|
|
327
|
+
o.name = "AssumeRoot"
|
|
328
|
+
o.http_method = "POST"
|
|
329
|
+
o.http_request_uri = "/"
|
|
330
|
+
o.input = Shapes::ShapeRef.new(shape: AssumeRootRequest)
|
|
331
|
+
o.output = Shapes::ShapeRef.new(shape: AssumeRootResponse)
|
|
332
|
+
o.errors << Shapes::ShapeRef.new(shape: RegionDisabledException)
|
|
333
|
+
o.errors << Shapes::ShapeRef.new(shape: ExpiredTokenException)
|
|
334
|
+
end)
|
|
335
|
+
|
|
297
336
|
api.add_operation(:decode_authorization_message, Seahorse::Model::Operation.new.tap do |o|
|
|
298
337
|
o.name = "DecodeAuthorizationMessage"
|
|
299
338
|
o.http_method = "POST"
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
|
4
|
+
#
|
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
|
7
|
+
#
|
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
|
9
|
+
|
|
10
|
+
module Aws::STS
|
|
11
|
+
# Endpoint parameters used to influence endpoints per request.
|
|
12
|
+
#
|
|
13
|
+
# @!attribute region
|
|
14
|
+
# The AWS region used to dispatch the request.
|
|
15
|
+
#
|
|
16
|
+
# @return [String]
|
|
17
|
+
#
|
|
18
|
+
# @!attribute use_dual_stack
|
|
19
|
+
# When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
|
|
20
|
+
#
|
|
21
|
+
# @return [Boolean]
|
|
22
|
+
#
|
|
23
|
+
# @!attribute use_fips
|
|
24
|
+
# When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
|
|
25
|
+
#
|
|
26
|
+
# @return [Boolean]
|
|
27
|
+
#
|
|
28
|
+
# @!attribute endpoint
|
|
29
|
+
# Override the endpoint used to send this request
|
|
30
|
+
#
|
|
31
|
+
# @return [String]
|
|
32
|
+
#
|
|
33
|
+
# @!attribute use_global_endpoint
|
|
34
|
+
# Whether the global endpoint should be used, rather then the regional endpoint for us-east-1.
|
|
35
|
+
#
|
|
36
|
+
# @return [Boolean]
|
|
37
|
+
#
|
|
38
|
+
EndpointParameters = Struct.new(
|
|
39
|
+
:region,
|
|
40
|
+
:use_dual_stack,
|
|
41
|
+
:use_fips,
|
|
42
|
+
:endpoint,
|
|
43
|
+
:use_global_endpoint,
|
|
44
|
+
) do
|
|
45
|
+
include Aws::Structure
|
|
46
|
+
|
|
47
|
+
# @api private
|
|
48
|
+
class << self
|
|
49
|
+
PARAM_MAP = {
|
|
50
|
+
'Region' => :region,
|
|
51
|
+
'UseDualStack' => :use_dual_stack,
|
|
52
|
+
'UseFIPS' => :use_fips,
|
|
53
|
+
'Endpoint' => :endpoint,
|
|
54
|
+
'UseGlobalEndpoint' => :use_global_endpoint,
|
|
55
|
+
}.freeze
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def initialize(options = {})
|
|
59
|
+
self[:region] = options[:region]
|
|
60
|
+
self[:use_dual_stack] = options[:use_dual_stack]
|
|
61
|
+
self[:use_dual_stack] = false if self[:use_dual_stack].nil?
|
|
62
|
+
self[:use_fips] = options[:use_fips]
|
|
63
|
+
self[:use_fips] = false if self[:use_fips].nil?
|
|
64
|
+
self[:endpoint] = options[:endpoint]
|
|
65
|
+
self[:use_global_endpoint] = options[:use_global_endpoint]
|
|
66
|
+
self[:use_global_endpoint] = false if self[:use_global_endpoint].nil?
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def self.create(config, options={})
|
|
70
|
+
new({
|
|
71
|
+
region: config.region,
|
|
72
|
+
use_dual_stack: config.use_dualstack_endpoint,
|
|
73
|
+
use_fips: config.use_fips_endpoint,
|
|
74
|
+
endpoint: (config.endpoint.to_s unless config.regional_endpoint),
|
|
75
|
+
use_global_endpoint: config.sts_regional_endpoints == 'legacy',
|
|
76
|
+
}.merge(options))
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
|
4
|
+
#
|
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
|
7
|
+
#
|
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
|
9
|
+
|
|
10
|
+
module Aws::STS
|
|
11
|
+
class EndpointProvider
|
|
12
|
+
def resolve_endpoint(parameters)
|
|
13
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_global_endpoint, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(parameters.endpoint)) && Aws::Endpoints::Matchers.set?(parameters.region) && (partition_result = Aws::Endpoints::Matchers.aws_partition(parameters.region)) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, false)
|
|
14
|
+
if Aws::Endpoints::Matchers.string_equals?(parameters.region, "ap-northeast-1")
|
|
15
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
|
|
16
|
+
end
|
|
17
|
+
if Aws::Endpoints::Matchers.string_equals?(parameters.region, "ap-south-1")
|
|
18
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
|
|
19
|
+
end
|
|
20
|
+
if Aws::Endpoints::Matchers.string_equals?(parameters.region, "ap-southeast-1")
|
|
21
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
|
|
22
|
+
end
|
|
23
|
+
if Aws::Endpoints::Matchers.string_equals?(parameters.region, "ap-southeast-2")
|
|
24
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
|
|
25
|
+
end
|
|
26
|
+
if Aws::Endpoints::Matchers.string_equals?(parameters.region, "aws-global")
|
|
27
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
|
|
28
|
+
end
|
|
29
|
+
if Aws::Endpoints::Matchers.string_equals?(parameters.region, "ca-central-1")
|
|
30
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
|
|
31
|
+
end
|
|
32
|
+
if Aws::Endpoints::Matchers.string_equals?(parameters.region, "eu-central-1")
|
|
33
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
|
|
34
|
+
end
|
|
35
|
+
if Aws::Endpoints::Matchers.string_equals?(parameters.region, "eu-north-1")
|
|
36
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
|
|
37
|
+
end
|
|
38
|
+
if Aws::Endpoints::Matchers.string_equals?(parameters.region, "eu-west-1")
|
|
39
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
|
|
40
|
+
end
|
|
41
|
+
if Aws::Endpoints::Matchers.string_equals?(parameters.region, "eu-west-2")
|
|
42
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
|
|
43
|
+
end
|
|
44
|
+
if Aws::Endpoints::Matchers.string_equals?(parameters.region, "eu-west-3")
|
|
45
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
|
|
46
|
+
end
|
|
47
|
+
if Aws::Endpoints::Matchers.string_equals?(parameters.region, "sa-east-1")
|
|
48
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
|
|
49
|
+
end
|
|
50
|
+
if Aws::Endpoints::Matchers.string_equals?(parameters.region, "us-east-1")
|
|
51
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
|
|
52
|
+
end
|
|
53
|
+
if Aws::Endpoints::Matchers.string_equals?(parameters.region, "us-east-2")
|
|
54
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
|
|
55
|
+
end
|
|
56
|
+
if Aws::Endpoints::Matchers.string_equals?(parameters.region, "us-west-1")
|
|
57
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
|
|
58
|
+
end
|
|
59
|
+
if Aws::Endpoints::Matchers.string_equals?(parameters.region, "us-west-2")
|
|
60
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
|
|
61
|
+
end
|
|
62
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "#{parameters.region}"}]})
|
|
63
|
+
end
|
|
64
|
+
if Aws::Endpoints::Matchers.set?(parameters.endpoint)
|
|
65
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
|
|
66
|
+
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
|
67
|
+
end
|
|
68
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
69
|
+
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
|
70
|
+
end
|
|
71
|
+
return Aws::Endpoints::Endpoint.new(url: parameters.endpoint, headers: {}, properties: {})
|
|
72
|
+
end
|
|
73
|
+
if Aws::Endpoints::Matchers.set?(parameters.region)
|
|
74
|
+
if (partition_result = Aws::Endpoints::Matchers.aws_partition(parameters.region))
|
|
75
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
76
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
|
77
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts-fips.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
|
78
|
+
end
|
|
79
|
+
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
|
80
|
+
end
|
|
81
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
|
|
82
|
+
if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
|
|
83
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-us-gov")
|
|
84
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.#{parameters.region}.amazonaws.com", headers: {}, properties: {})
|
|
85
|
+
end
|
|
86
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts-fips.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
|
87
|
+
end
|
|
88
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
|
89
|
+
end
|
|
90
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
91
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
|
92
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
|
93
|
+
end
|
|
94
|
+
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
|
95
|
+
end
|
|
96
|
+
if Aws::Endpoints::Matchers.string_equals?(parameters.region, "aws-global")
|
|
97
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
|
|
98
|
+
end
|
|
99
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
raise ArgumentError, "Invalid Configuration: Missing Region"
|
|
103
|
+
raise ArgumentError, 'No endpoint could be resolved'
|
|
104
|
+
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
|
4
|
+
#
|
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
|
7
|
+
#
|
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
module Aws::STS
|
|
12
|
+
# @api private
|
|
13
|
+
module Endpoints
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def self.parameters_for_operation(context)
|
|
17
|
+
Aws::STS::EndpointParameters.create(context.config)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
data/lib/aws-sdk-sts/errors.rb
CHANGED
|
@@ -29,11 +29,16 @@ module Aws::STS
|
|
|
29
29
|
# ## Error Classes
|
|
30
30
|
# * {ExpiredTokenException}
|
|
31
31
|
# * {IDPCommunicationErrorException}
|
|
32
|
+
# * This error class is not used. `IDPCommunicationError` is used during parsing instead.
|
|
32
33
|
# * {IDPRejectedClaimException}
|
|
34
|
+
# * This error class is not used. `IDPRejectedClaim` is used during parsing instead.
|
|
33
35
|
# * {InvalidAuthorizationMessageException}
|
|
34
36
|
# * {InvalidIdentityTokenException}
|
|
37
|
+
# * This error class is not used. `InvalidIdentityToken` is used during parsing instead.
|
|
35
38
|
# * {MalformedPolicyDocumentException}
|
|
39
|
+
# * This error class is not used. `MalformedPolicyDocument` is used during parsing instead.
|
|
36
40
|
# * {PackedPolicyTooLargeException}
|
|
41
|
+
# * This error class is not used. `PackedPolicyTooLarge` is used during parsing instead.
|
|
37
42
|
# * {RegionDisabledException}
|
|
38
43
|
#
|
|
39
44
|
# Additionally, error classes are dynamically generated for service errors based on the error code
|
|
@@ -57,6 +62,8 @@ module Aws::STS
|
|
|
57
62
|
end
|
|
58
63
|
end
|
|
59
64
|
|
|
65
|
+
# @deprecated This error class is not used during parsing.
|
|
66
|
+
# Please use `IDPCommunicationError` instead.
|
|
60
67
|
class IDPCommunicationErrorException < ServiceError
|
|
61
68
|
|
|
62
69
|
# @param [Seahorse::Client::RequestContext] context
|
|
@@ -72,6 +79,8 @@ module Aws::STS
|
|
|
72
79
|
end
|
|
73
80
|
end
|
|
74
81
|
|
|
82
|
+
# @deprecated This error class is not used during parsing.
|
|
83
|
+
# Please use `IDPRejectedClaim` instead.
|
|
75
84
|
class IDPRejectedClaimException < ServiceError
|
|
76
85
|
|
|
77
86
|
# @param [Seahorse::Client::RequestContext] context
|
|
@@ -102,6 +111,8 @@ module Aws::STS
|
|
|
102
111
|
end
|
|
103
112
|
end
|
|
104
113
|
|
|
114
|
+
# @deprecated This error class is not used during parsing.
|
|
115
|
+
# Please use `InvalidIdentityToken` instead.
|
|
105
116
|
class InvalidIdentityTokenException < ServiceError
|
|
106
117
|
|
|
107
118
|
# @param [Seahorse::Client::RequestContext] context
|
|
@@ -117,6 +128,8 @@ module Aws::STS
|
|
|
117
128
|
end
|
|
118
129
|
end
|
|
119
130
|
|
|
131
|
+
# @deprecated This error class is not used during parsing.
|
|
132
|
+
# Please use `MalformedPolicyDocument` instead.
|
|
120
133
|
class MalformedPolicyDocumentException < ServiceError
|
|
121
134
|
|
|
122
135
|
# @param [Seahorse::Client::RequestContext] context
|
|
@@ -132,6 +145,8 @@ module Aws::STS
|
|
|
132
145
|
end
|
|
133
146
|
end
|
|
134
147
|
|
|
148
|
+
# @deprecated This error class is not used during parsing.
|
|
149
|
+
# Please use `PackedPolicyTooLarge` instead.
|
|
135
150
|
class PackedPolicyTooLargeException < ServiceError
|
|
136
151
|
|
|
137
152
|
# @param [Seahorse::Client::RequestContext] context
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
|
4
|
+
#
|
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
|
7
|
+
#
|
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
module Aws::STS
|
|
12
|
+
module Plugins
|
|
13
|
+
class Endpoints < Seahorse::Client::Plugin
|
|
14
|
+
option(
|
|
15
|
+
:endpoint_provider,
|
|
16
|
+
doc_type: 'Aws::STS::EndpointProvider',
|
|
17
|
+
rbs_type: 'untyped',
|
|
18
|
+
docstring: <<~DOCS) do |_cfg|
|
|
19
|
+
The endpoint provider used to resolve endpoints. Any object that responds to
|
|
20
|
+
`#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
|
|
21
|
+
`Aws::STS::EndpointParameters`.
|
|
22
|
+
DOCS
|
|
23
|
+
Aws::STS::EndpointProvider.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# @api private
|
|
27
|
+
class Handler < Seahorse::Client::Handler
|
|
28
|
+
def call(context)
|
|
29
|
+
unless context[:discovered_endpoint]
|
|
30
|
+
params = Aws::STS::Endpoints.parameters_for_operation(context)
|
|
31
|
+
endpoint = context.config.endpoint_provider.resolve_endpoint(params)
|
|
32
|
+
|
|
33
|
+
context.http_request.endpoint = endpoint.url
|
|
34
|
+
apply_endpoint_headers(context, endpoint.headers)
|
|
35
|
+
|
|
36
|
+
context[:endpoint_params] = params
|
|
37
|
+
context[:endpoint_properties] = endpoint.properties
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
context[:auth_scheme] =
|
|
41
|
+
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
|
42
|
+
|
|
43
|
+
with_metrics(context) { @handler.call(context) }
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
private
|
|
47
|
+
|
|
48
|
+
def with_metrics(context, &block)
|
|
49
|
+
metrics = []
|
|
50
|
+
metrics << 'ENDPOINT_OVERRIDE' unless context.config.regional_endpoint
|
|
51
|
+
if context[:auth_scheme] && context[:auth_scheme]['name'] == 'sigv4a'
|
|
52
|
+
metrics << 'SIGV4A_SIGNING'
|
|
53
|
+
end
|
|
54
|
+
if context.config.credentials&.credentials&.account_id
|
|
55
|
+
metrics << 'RESOLVED_ACCOUNT_ID'
|
|
56
|
+
end
|
|
57
|
+
Aws::Plugins::UserAgent.metric(*metrics, &block)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def apply_endpoint_headers(context, headers)
|
|
61
|
+
headers.each do |key, values|
|
|
62
|
+
value = values
|
|
63
|
+
.compact
|
|
64
|
+
.map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
|
|
65
|
+
.join(',')
|
|
66
|
+
|
|
67
|
+
context.http_request.headers[key] = value
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def add_handlers(handlers, _config)
|
|
73
|
+
handlers.add(Handler, step: :build, priority: 75)
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -35,10 +35,11 @@ module Aws
|
|
|
35
35
|
# )
|
|
36
36
|
#
|
|
37
37
|
# This can be easily converted to a token used by the EKS service:
|
|
38
|
-
# {https://ruby-
|
|
38
|
+
# {https://docs.ruby-lang.org/en/3.2/Base64.html#method-i-encode64}
|
|
39
39
|
# "k8s-aws-v1." + Base64.urlsafe_encode64(url).chomp("==")
|
|
40
40
|
def get_caller_identity_presigned_url(options = {})
|
|
41
|
-
req = @client.build_request(:
|
|
41
|
+
req = @client.build_request(:get_caller_identity, {})
|
|
42
|
+
context = req.context
|
|
42
43
|
|
|
43
44
|
param_list = Aws::Query::ParamList.new
|
|
44
45
|
param_list.set('Action', 'GetCallerIdentity')
|
|
@@ -46,26 +47,19 @@ module Aws
|
|
|
46
47
|
Aws::Query::EC2ParamBuilder.new(param_list)
|
|
47
48
|
.apply(req.context.operation.input, {})
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
endpoint_params = Aws::STS::EndpointParameters.new(
|
|
51
|
+
region: context.config.region,
|
|
52
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
|
53
|
+
use_fips: context.config.use_fips_endpoint,
|
|
54
|
+
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy'
|
|
53
55
|
)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
'sts',
|
|
58
|
-
req.context.config.sts_regional_endpoints,
|
|
59
|
-
{
|
|
60
|
-
dualstack: req.context.config.use_dualstack_endpoint,
|
|
61
|
-
fips: req.context.config.use_fips_endpoint
|
|
62
|
-
}
|
|
63
|
-
)
|
|
64
|
-
url += "/?#{param_list}"
|
|
56
|
+
endpoint = context.config.endpoint_provider.resolve_endpoint(endpoint_params)
|
|
57
|
+
auth_scheme = Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
|
58
|
+
signer = Aws::Plugins::Sign.signer_for(auth_scheme, context.config)
|
|
65
59
|
|
|
66
60
|
signer.presign_url(
|
|
67
61
|
http_method: 'GET',
|
|
68
|
-
url: url,
|
|
62
|
+
url: "#{endpoint.url}/?#{param_list}",
|
|
69
63
|
body: '',
|
|
70
64
|
headers: options[:headers]
|
|
71
65
|
).to_s
|