29.08.2018 Views

sqs-dg-2009-02-01

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Amazon Simple Queue Service Developer Guide<br />

Responses<br />

Responses<br />

Topics<br />

• Structure of a Successful Response (p. 27)<br />

• Structure of an Error Response (p. 27)<br />

• Related Topics (p. 28)<br />

In response to an action request, SQS returns an XML data structure that contains the results of the<br />

request. This data conforms to the SQS schema. For more information, see WSDL Location and API<br />

Version in the Amazon SQS API Reference.<br />

Structure of a Successful Response<br />

If the request succeeded, the main response element is named after the action, but with "Response"<br />

appended. For example, CreateQueueResponse is the response element returned for a successful<br />

CreateQueue request. This element contains the following child elements:<br />

• ResponseMetadata, which contains the RequestId child element<br />

• An optional element containing action-specific results; for example, the CreateQueueResponse<br />

element includes an element called CreateQueueResult<br />

The XML schema describes the XML response message for each SQS action.<br />

The following is an example of a successful response.<br />

<br />

<br />

<br />

http://<strong>sqs</strong>.us-east-1.amazonaws.com/770098461991/queue2<br />

<br />

<br />

<br />

cb919c0a-9bce-4afe-9b48-9bdf2412bb67<br />

<br />

<br />

Structure of an Error Response<br />

If a request is unsuccessful, the main response element is called ErrorResponse regardless of the<br />

action that was called.This element contains an Error element and a RequestId element. Each Error<br />

includes:<br />

• A Type element that identifies whether the error was a receiver or sender error<br />

• A Code element that identifies the type of error that occurred<br />

• A Message element that describes the error condition in a human-readable form<br />

• A Detail element that might give additional details about the error or might be empty<br />

The following is an example of an error response.<br />

API Version <strong>2009</strong>-<strong>02</strong>-<strong>01</strong><br />

27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!