Class Ec2MetadataClientException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
software.amazon.awssdk.core.exception.SdkException
software.amazon.awssdk.core.exception.SdkClientException
software.amazon.awssdk.imds.Ec2MetadataClientException
- All Implemented Interfaces:
 Serializable
Extends 
SdkClientException for EC2 Instance Metadata Service (IMDS) non-successful
 responses (4XX codes). Provides detailed error information through:
 
 - HTTP status code via statusCode() for specific error handling
 - Raw response content via rawResponse() containing the error response body
 - HTTP headers via sdkHttpResponse() providing additional error context from the response
- See Also:
 
- 
Nested Class Summary
Nested Classes - 
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns the response payload as bytes.Returns a map of HTTP headers associated with the error response.intMethods inherited from class software.amazon.awssdk.core.exception.SdkClientException
create, create, getMessage, toBuilderMethods inherited from class software.amazon.awssdk.core.exception.SdkException
numAttempts, rawMessage, retryableMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString 
- 
Method Details
- 
statusCode
public int statusCode()- Returns:
 - The HTTP status code returned by the IMDS service.
 
 - 
rawResponse
Returns the response payload as bytes. - 
sdkHttpResponse
Returns a map of HTTP headers associated with the error response. - 
builder
 
 -