Smaws_Client_STS.DecodeAuthorizationMessageDecodes additional information about the authorization status of a request from an encoded message returned in response to an Amazon Web Services request.
For example, if a user is not authorized to perform an operation that he or she has requested, the request returns a Client.UnauthorizedOperation response (an HTTP 403 response). Some Amazon Web Services operations additionally return an encoded message that can provide details about this authorization failure.
Only certain Amazon Web Services operations return an encoded authorization message. The documentation for an individual operation indicates whether that operation returns an encoded message in addition to returning an HTTP code.
The message is encoded because the details of the authorization status can contain privileged information that the user who requested the operation should not see. To decode an authorization status message, a user must be granted permissions through an IAM policy to request the DecodeAuthorizationMessage (sts:DecodeAuthorizationMessage) action.
The decoded message includes the following type of information:
val error_to_string :
[ Smaws_Lib.Protocols.AwsQuery.error
| `InvalidAuthorizationMessageException of
Types.invalid_authorization_message_exception ] ->
stringval request :
'http_type Smaws_Lib.Context.t ->
Types.decode_authorization_message_request ->
(Types.decode_authorization_message_response,
[> Smaws_Lib.Protocols.AwsQuery.error
| `InvalidAuthorizationMessageException of
Types.invalid_authorization_message_exception ])
Stdlib.resultval request_with_metadata :
'http_type Smaws_Lib.Context.t ->
Types.decode_authorization_message_request ->
(Types.decode_authorization_message_response Smaws_Lib.Response.t,
[> Smaws_Lib.Protocols.AwsQuery.error
| `InvalidAuthorizationMessageException of
Types.invalid_authorization_message_exception ]
* Smaws_Lib.Response.metadata)
Stdlib.result