com.amazonaws
Class AmazonServiceException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.amazonaws.AmazonClientException
com.amazonaws.AmazonServiceException
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- AccessDeniedException, AccessDeniedException, AlreadyExistsException, AlreadyExistsException, AmazonS3Exception, AttributeDoesNotExistException, AuthorizationAlreadyExistsException, AuthorizationAlreadyExistsException, AuthorizationErrorException, AuthorizationNotFoundException, AuthorizationNotFoundException, AuthorizationQuotaExceededException, BaseException, BatchEntryIdsNotDistinctException, BatchRequestTooLongException, BatchTooLargeException, BatchTooLargeException, BucketPermissionException, CacheClusterAlreadyExistsException, CacheClusterNotFoundException, CacheParameterGroupAlreadyExistsException, CacheParameterGroupNotFoundException, CacheParameterGroupQuotaExceededException, CacheSecurityGroupAlreadyExistsException, CacheSecurityGroupNotFoundException, CacheSecurityGroupQuotaExceededException, CanceledJobIdException, CertificateNotFoundException, CloudFrontOriginAccessIdentityAlreadyExistsException, CloudFrontOriginAccessIdentityAlreadyExistsException, CloudFrontOriginAccessIdentityInUseException, CloudFrontOriginAccessIdentityInUseException, ClusterQuotaForCustomerExceededException, CNAMEAlreadyExistsException, CNAMEAlreadyExistsException, ConditionalCheckFailedException, DBInstanceAlreadyExistsException, DBInstanceNotFoundException, DBParameterGroupAlreadyExistsException, DBParameterGroupNotFoundException, DBParameterGroupQuotaExceededException, DBSecurityGroupAlreadyExistsException, DBSecurityGroupNotFoundException, DBSecurityGroupQuotaExceededException, DBSnapshotAlreadyExistsException, DBSnapshotNotFoundException, DBSubnetGroupAlreadyExistsException, DBSubnetGroupListDoesNotCoverAllAzException, DBSubnetGroupNotFoundException, DBSubnetGroupQuotaExceededException, DBSubnetQuotaExceededException, DefaultUndefinedException, DelegationSetNotAvailableException, DeleteConflictException, DistributionAlreadyExistsException, DistributionAlreadyExistsException, DistributionNotDisabledException, DistributionNotDisabledException, DomainAlreadyExistsException, DomainDeprecatedException, DuplicateCertificateException, DuplicateItemNameException, DuplicateListenerException, DuplicateLoadBalancerNameException, DuplicatePolicyNameException, EmptyBatchRequestException, EntityAlreadyExistsException, EntityTemporarilyUnmodifiableException, ExpiredJobIdException, HostedZoneAlreadyExistsException, HostedZoneNotEmptyException, IllegalUpdateException, IllegalUpdateException, InconsistentQuantitiesException, InstanceQuotaExceededException, InsufficientCacheClusterCapacityException, InsufficientCapabilitiesException, InsufficientDBInstanceCapacityException, InternalErrorException, InternalException, InternalServerErrorException, InternalServerErrorException, InternalServerErrorException, InternalServiceException, InvalidAccessKeyIdException, InvalidAddressException, InvalidArgumentException, InvalidArgumentException, InvalidAttributeNameException, InvalidAuthenticationCodeException, InvalidBatchEntryIdException, InvalidCacheClusterStateException, InvalidCacheParameterGroupStateException, InvalidCacheSecurityGroupStateException, InvalidCertificateException, InvalidChangeBatchException, InvalidConfigurationRequestException, InvalidCustomsException, InvalidDBInstanceStateException, InvalidDBParameterGroupStateException, InvalidDBSecurityGroupStateException, InvalidDBSnapshotStateException, InvalidDBSubnetGroupStateException, InvalidDBSubnetStateException, InvalidDefaultRootObjectException, InvalidDefaultRootObjectException, InvalidDomainNameException, InvalidFileSystemException, InvalidFormatException, InvalidGatewayRequestException, InvalidIdFormatException, InvalidIfMatchVersionException, InvalidIfMatchVersionException, InvalidInputException, InvalidInstanceException, InvalidJobIdException, InvalidManifestFieldException, InvalidMessageContentsException, InvalidNextTokenException, InvalidNextTokenException, InvalidNextTokenException, InvalidNumberPredicatesException, InvalidNumberValueTestsException, InvalidOptionGroupStateException, InvalidOriginAccessIdentityException, InvalidOriginAccessIdentityException, InvalidOriginException, InvalidOriginException, InvalidParameterCombinationException, InvalidParameterCombinationException, InvalidParameterException, InvalidParameterException, InvalidParameterValueException, InvalidParameterValueException, InvalidParameterValueException, InvalidParameterValueException, InvalidQueryExpressionException, InvalidRequiredProtocolException, InvalidRequiredProtocolException, InvalidRestoreException, InvalidSchemeException, InvalidSecurityGroupException, InvalidSubnetException, InvalidSubnetException, InvalidTypeException, InvalidUserTypeException, InvalidVPCNetworkStateException, KeyPairMismatchException, LimitExceededException, LimitExceededException, LimitExceededException, LimitExceededException, LimitExceededException, LimitExceededException, LimitExceededException, LimitExceededException, ListenerNotFoundException, LoadBalancerNotFoundException, MalformedCertificateException, MalformedManifestException, MalformedPolicyDocumentException, MalformedPolicyDocumentException, MessageNotInflightException, MessageRejectedException, MissingBodyException, MissingBodyException, MissingCustomsException, MissingManifestFieldException, MissingParameterException, MissingParameterException, MissingParameterValueException, MissingRequiredParameterException, MultipleRegionsException, NodeQuotaForClusterExceededException, NodeQuotaForCustomerExceededException, NoSuchBucketException, NoSuchChangeException, NoSuchCloudFrontOriginAccessIdentityException, NoSuchCloudFrontOriginAccessIdentityException, NoSuchDistributionException, NoSuchDistributionException, NoSuchDomainException, NoSuchEntityException, NoSuchHostedZoneException, NoSuchInvalidationException, NoSuchInvalidationException, NoSuchOriginException, NoSuchStreamingDistributionException, NoSuchStreamingDistributionException, NotFoundException, NumberDomainAttributesExceededException, NumberDomainBytesExceededException, NumberDomainsExceededException, NumberItemAttributesExceededException, NumberSubmittedAttributesExceededException, NumberSubmittedItemsExceededException, OperationNotPermittedException, OptionGroupAlreadyExistsException, OptionGroupNotFoundException, OptionGroupQuotaExceededException, OverLimitException, PackedPolicyTooLargeException, PasswordPolicyViolationException, PointInTimeRestoreNotEnabledException, PolicyNotFoundException, PolicyTypeNotFoundException, PreconditionFailedException, PreconditionFailedException, ProvisionedThroughputExceededException, QueueDeletedRecentlyException, QueueDoesNotExistException, QueueNameExistsException, ReceiptHandleIsInvalidException, RequestTimeoutException, RequestTimeoutException, ReservedCacheNodeAlreadyExistsException, ReservedCacheNodeNotFoundException, ReservedCacheNodeQuotaExceededException, ReservedCacheNodesOfferingNotFoundException, ReservedDBInstanceAlreadyExistsException, ReservedDBInstanceNotFoundException, ReservedDBInstanceQuotaExceededException, ReservedDBInstancesOfferingNotFoundException, ResourceInUseException, ResourceInUseException, ResourceNotFoundException, ResourceNotFoundException, ResourceNotFoundException, ResourceNotFoundException, S3SubscriptionRequiredException, ScalingActivityInProgressException, ServiceUnavailableException, SnapshotQuotaExceededException, SourceBundleDeletionException, StorageQuotaExceededException, StreamingDistributionAlreadyExistsException, StreamingDistributionAlreadyExistsException, StreamingDistributionNotDisabledException, StreamingDistributionNotDisabledException, SubnetAlreadyInUseException, SubnetNotFoundException, SubscriptionLimitExceededException, TooManyApplicationsException, TooManyApplicationVersionsException, TooManyBucketsException, TooManyCacheBehaviorsException, TooManyCloudFrontOriginAccessIdentitiesException, TooManyCloudFrontOriginAccessIdentitiesException, TooManyConfigurationTemplatesException, TooManyDistributionCNAMEsException, TooManyDistributionCNAMEsException, TooManyDistributionsException, TooManyDistributionsException, TooManyEntriesInBatchRequestException, TooManyEnvironmentsException, TooManyHostedZonesException, TooManyInvalidationsInProgressException, TooManyInvalidationsInProgressException, TooManyLoadBalancersException, TooManyOriginsException, TooManyPoliciesException, TooManyRequestedAttributesException, TooManyStreamingDistributionCNAMEsException, TooManyStreamingDistributionCNAMEsException, TooManyStreamingDistributionsException, TooManyStreamingDistributionsException, TooManyTrustedSignersException, TooManyTrustedSignersException, TopicLimitExceededException, TrustedSignerDoesNotExistException, TrustedSignerDoesNotExistException, TypeAlreadyExistsException, TypeDeprecatedException, UnableToCancelJobIdException, UnknownResourceException, WorkflowExecutionAlreadyStartedException
public class AmazonServiceException
- extends AmazonClientException
Extension of AmazonClientException that represents an error response returned
by an Amazon web service. Receiving an exception of this type indicates that
the caller's request was correctly transmitted to the service, but for some
reason, the service was not able to process it, and returned an error
response instead.
AmazonServiceException provides callers several pieces of
information that can be used to obtain more information about the error and
why it occurred. In particular, the errorType field can be used to determine
if the caller's request was invalid, or the service encountered an error on
the server side while processing it.
- See Also:
- Serialized Form
Method Summary |
String |
getErrorCode()
Returns the AWS error code represented by this exception. |
AmazonServiceException.ErrorType |
getErrorType()
Indicates who is responsible for this exception (caller, service,
or unknown). |
String |
getRequestId()
Returns the AWS request ID that uniquely identifies the service request
the caller made. |
String |
getServiceName()
Returns the name of the service that sent this error response. |
int |
getStatusCode()
Returns the HTTP status code that was returned with this service
exception. |
void |
setErrorCode(String errorCode)
Sets the AWS error code represented by this exception. |
void |
setErrorType(AmazonServiceException.ErrorType errorType)
Sets the type of error represented by this exception (sender, receiver,
or unknown), indicating if this exception was the caller's fault, or the
service's fault. |
void |
setRequestId(String requestId)
Sets the AWS requestId for this exception. |
void |
setServiceName(String serviceName)
Sets the name of the service that sent this error response. |
void |
setStatusCode(int statusCode)
Sets the HTTP status code that was returned with this service exception. |
String |
toString()
Returns a string summary of the details of this exception including the
HTTP status code, AWS request ID, AWS error code and error message. |
AmazonServiceException
public AmazonServiceException(String message)
- Constructs a new AmazonServiceException with the specified message.
- Parameters:
message
- An error message describing what went wrong.
AmazonServiceException
public AmazonServiceException(String message,
Exception cause)
- Constructs a new AmazonServiceException with the specified message and
exception indicating the root cause.
- Parameters:
message
- An error message describing what went wrong.cause
- The root exception that caused this exception to be thrown.
setRequestId
public void setRequestId(String requestId)
- Sets the AWS requestId for this exception.
- Parameters:
requestId
- The unique identifier for the service request the caller made.
getRequestId
public String getRequestId()
- Returns the AWS request ID that uniquely identifies the service request
the caller made.
- Returns:
- The AWS request ID that uniquely identifies the service request
the caller made.
setServiceName
public void setServiceName(String serviceName)
- Sets the name of the service that sent this error response.
- Parameters:
serviceName
- The name of the service that sent this error response.
getServiceName
public String getServiceName()
- Returns the name of the service that sent this error response.
- Returns:
- The name of the service that sent this error response.
setErrorCode
public void setErrorCode(String errorCode)
- Sets the AWS error code represented by this exception.
- Parameters:
errorCode
- The AWS error code represented by this exception.
getErrorCode
public String getErrorCode()
- Returns the AWS error code represented by this exception.
- Returns:
- The AWS error code represented by this exception.
setErrorType
public void setErrorType(AmazonServiceException.ErrorType errorType)
- Sets the type of error represented by this exception (sender, receiver,
or unknown), indicating if this exception was the caller's fault, or the
service's fault.
- Parameters:
errorType
- The type of error represented by this exception (sender or
receiver), indicating if this exception was the caller's fault
or the service's fault.
getErrorType
public AmazonServiceException.ErrorType getErrorType()
- Indicates who is responsible for this exception (caller, service,
or unknown).
- Returns:
- A value indicating who is responsible for this exception (caller, service, or unknown).
setStatusCode
public void setStatusCode(int statusCode)
- Sets the HTTP status code that was returned with this service exception.
- Parameters:
statusCode
- The HTTP status code that was returned with this service
exception.
getStatusCode
public int getStatusCode()
- Returns the HTTP status code that was returned with this service
exception.
- Returns:
- The HTTP status code that was returned with this service
exception.
toString
public String toString()
- Returns a string summary of the details of this exception including the
HTTP status code, AWS request ID, AWS error code and error message.
- Overrides:
toString
in class Throwable
- See Also:
Throwable.toString()
Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.