Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.securitytoken.model;
 
 
Container for the parameters to the DecodeAuthorizationMessage operation.

Decodes additional information about the authorization status of a request from an encoded message returned in response to an AWS request.

For example, if a user is not authorized to perform an action that he or she has requested, the request returns a Client.UnauthorizedOperation response (an HTTP 403 response). Some AWS actions additionally return an encoded message that can provide details about this authorization failure.

NOTE: Only certain AWS actions return an encoded authorization message. The documentation for an individual action indicates whether that action returns an encoded message in addition to returning an HTTP code.

The message is encoded because the details of the authorization status can constitute privileged information that the user who requested the action should not see. To decode an authorization status message, a user must be granted permissions via an IAM policy to request the DecodeAuthorizationMessage ( sts:DecodeAuthorizationMessage ) action.

The decoded message includes the following type of information:

  • Whether the request was denied due to an explicit deny or due to the absence of an explicit allow. For more information, see Determining Whether a Request is Allowed or Denied in Using IAM .
  • The principal who made the request.
  • The requested action.
  • The requested resource.
  • The values of condition keys in the context of the user's request.

 
 public class DecodeAuthorizationMessageRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The encoded message that was returned with the response.

Constraints:
Length: 1 - 10240

 
     private String encodedMessage;

    
The encoded message that was returned with the response.

Constraints:
Length: 1 - 10240

Returns:
The encoded message that was returned with the response.
 
     public String getEncodedMessage() {
         return ;
     }
    
    
The encoded message that was returned with the response.

Constraints:
Length: 1 - 10240

Parameters:
encodedMessage The encoded message that was returned with the response.
 
     public void setEncodedMessage(String encodedMessage) {
        this. = encodedMessage;
    }
    
    
The encoded message that was returned with the response.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 10240

Parameters:
encodedMessage The encoded message that was returned with the response.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = encodedMessage;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getEncodedMessage() != nullsb.append("EncodedMessage: " + getEncodedMessage() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getEncodedMessage() == null) ? 0 : getEncodedMessage().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DecodeAuthorizationMessageRequest == falsereturn false;
        
        if (other.getEncodedMessage() == null ^ this.getEncodedMessage() == nullreturn false;
        if (other.getEncodedMessage() != null && other.getEncodedMessage().equals(this.getEncodedMessage()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (DecodeAuthorizationMessageRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X