|« PreviousNext »|
|Did this page help you? Yes | No | Tell us about it...|
In response to an action request, SQS returns an XML data structure that contains the results of the request. This data conforms to the SQS schema. For more information, see WSDL Location and API Version in the Amazon SQS API Reference.
If the request succeeded, the main response element is named after the action, but with "Response" appended. For example,
CreateQueueResponse is the response element returned for a successful
CreateQueue request. This element contains the following child elements:
ResponseMetadata, which contains the
RequestId child element
An optional element containing action-specific results; for example, the
CreateQueueResponse element includes an element called
The XML schema describes the XML response message for each SQS action.
The following is an example of a successful response.
<CreateQueueResponse xmlns=http://sqs.us-east-1.amazonaws.com/doc/2012-11-05/ xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:type=CreateQueueResponse> <CreateQueueResult> <QueueUrl> http://sqs.us-east-1.amazonaws.com/770098461991/queue2 </QueueUrl> </CreateQueueResult> <ResponseMetadata> <RequestId>cb919c0a-9bce-4afe-9b48-9bdf2412bb67</RequestId> </ResponseMetadata> </CreateQueueResponse>
If a request is unsuccessful, the main response element is called
ErrorResponse regardless of the action that was called. This element contains an
Error element and a
RequestId element. Each
Type element that identifies whether the error was a receiver or sender error
Code element that identifies the type of error that occurred
Message element that describes the error condition in a human-readable form
Detail element that might give additional details about the error or might be empty
The following is an example of an error response.
<ErrorResponse> <Error> <Type> Sender </Type> <Code> InvalidParameterValue </Code> <Message> Value (quename_nonalpha) for parameter QueueName is invalid. Must be an alphanumeric String of 1 to 80 in length </Message> </Error> <RequestId> 42d59b56-7407-4c4a-be0f-4c88daeea257 </RequestId> </ErrorResponse>