434 lines
15 KiB
XML
434 lines
15 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?>
|
|
<!-- (C) 2009 Rackspace Hosting, All Rights Reserved -->
|
|
<schema elementFormDefault="qualified"
|
|
attributeFormDefault="unqualified"
|
|
xmlns="http://www.w3.org/2001/XMLSchema"
|
|
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
xmlns:csapi="http://docs.rackspacecloud.com/servers/api/v1.0"
|
|
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
|
|
targetNamespace="http://docs.rackspacecloud.com/servers/api/v1.0">
|
|
<annotation>
|
|
<xsd:appinfo xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml">
|
|
<xsdxt:title>Faults</xsdxt:title>
|
|
<xsdxt:link rel="index" href="api.xsd"/>
|
|
</xsd:appinfo>
|
|
<xsd:documentation xml:lang="EN"
|
|
xmlns="http://www.w3.org/1999/xhtml">
|
|
<p> This schema file defines faults that may be raised by the
|
|
Cloud Servers API. These faults are derived from the <a
|
|
href="#type_CloudServersAPIFault"
|
|
title="See definition of
|
|
CloudServersAPIFault"
|
|
>CloudServersAPIFault</a>. Most faults extend this type
|
|
without adding any additional attributes or elements. The only
|
|
exception is the <a href="#type_OverLimitAPIFault"
|
|
title="See definition of
|
|
OverLimitAPIFault"
|
|
>OverLimitAPIFault</a> which adds a
|
|
<strong>retryAfter</strong> attribute. Because all faults
|
|
extend a standard base type, it should be possible to capture
|
|
all API faults with a single <code>catch</code> statement. </p>
|
|
<p> Faults are associated with a default HTTP status code that
|
|
corresponds to the particular fault type. For example an <a
|
|
href="#element_itemNotFound"
|
|
title="see definition of
|
|
itemNotFound"
|
|
><itemNotFound></a> element is associated with the
|
|
HTTP status code 404. Some elements, the <a
|
|
href="#element_cloudServersFault"
|
|
title="see definition of
|
|
cloudServersFault"
|
|
><cloudServersFault></a> element for example, may be
|
|
associated with multiple status codes. It is also possible for
|
|
multiple fault elements to be associated with the same default
|
|
code. The examples below showcase the default status codes for
|
|
each element type. Note that these default codes are not part
|
|
of the formal schema. In practice, however, an element type
|
|
will likely be associated with its corresponding default
|
|
status code. </p>
|
|
</xsd:documentation>
|
|
</annotation>
|
|
<!-- Faults -->
|
|
<element name="cloudServersFault" type="csapi:CloudServersAPIFault">
|
|
<annotation>
|
|
<xsd:documentation xml:lang="EN"
|
|
xmlns="http://www.w3.org/1999/xhtml">
|
|
<p> A generic Cloud Servers API fault. </p>
|
|
</xsd:documentation>
|
|
<xsd:appinfo>
|
|
<xsdxt:samples>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/xml"
|
|
href="../samples/fault.xml"/>
|
|
</xsdxt:sample>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/json"
|
|
href="../samples/fault.json"/>
|
|
</xsdxt:sample>
|
|
</xsdxt:samples>
|
|
</xsd:appinfo>
|
|
</annotation>
|
|
</element>
|
|
<element name="itemNotFound" type="csapi:ItemNotFoundAPIFault">
|
|
<annotation>
|
|
<xsd:documentation xml:lang="EN"
|
|
xmlns="http://www.w3.org/1999/xhtml">
|
|
<p> The item or resource could not be found. </p>
|
|
</xsd:documentation>
|
|
<xsd:appinfo>
|
|
<xsdxt:samples>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/xml"
|
|
href="../samples/notfound.xml"/>
|
|
</xsdxt:sample>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/json"
|
|
href="../samples/notfound.json"/>
|
|
</xsdxt:sample>
|
|
</xsdxt:samples>
|
|
</xsd:appinfo>
|
|
</annotation>
|
|
</element>
|
|
<element name="buildInProgress" type="csapi:BuildInProgressAPIFault">
|
|
<annotation>
|
|
<xsd:documentation xml:lang="EN"
|
|
xmlns="http://www.w3.org/1999/xhtml">
|
|
<p> The operation is not allowed because the corresponding
|
|
server is in a build state. </p>
|
|
</xsd:documentation>
|
|
<xsd:appinfo>
|
|
<xsdxt:samples>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/xml"
|
|
href="../samples/build.xml"/>
|
|
</xsdxt:sample>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/json"
|
|
href="../samples/build.json"/>
|
|
</xsdxt:sample>
|
|
</xsdxt:samples>
|
|
</xsd:appinfo>
|
|
</annotation>
|
|
</element>
|
|
<element name="serverCapacityUnavailable"
|
|
type="csapi:ServerCapacityUnavailableAPIFault">
|
|
<annotation>
|
|
<xsd:documentation xml:lang="EN"
|
|
xmlns="http://www.w3.org/1999/xhtml">
|
|
<p> There is not enough capacity to honor the request. </p>
|
|
</xsd:documentation>
|
|
<xsd:appinfo>
|
|
<xsdxt:samples>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/xml"
|
|
href="../samples/serverCap.xml"/>
|
|
</xsdxt:sample>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/json"
|
|
href="../samples/serverCap.json"/>
|
|
</xsdxt:sample>
|
|
</xsdxt:samples>
|
|
</xsd:appinfo>
|
|
</annotation>
|
|
</element>
|
|
<element name="backupOrResizeInProgress"
|
|
type="csapi:BackupOrResizeInProgressAPIFault">
|
|
<annotation>
|
|
<xsd:documentation xml:lang="EN"
|
|
xmlns="http://www.w3.org/1999/xhtml">
|
|
<p> The operation is not allowed because the corresponding
|
|
server is being re-sized or backed up. </p>
|
|
</xsd:documentation>
|
|
<xsd:appinfo>
|
|
<xsdxt:samples>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/xml"
|
|
href="../samples/backupInProgress.xml"/>
|
|
</xsdxt:sample>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/json"
|
|
href="../samples/backupInProgress.json"/>
|
|
</xsdxt:sample>
|
|
</xsdxt:samples>
|
|
</xsd:appinfo>
|
|
</annotation>
|
|
</element>
|
|
<element name="resizeNotAllowed"
|
|
type="csapi:ResizeNotAllowedAPIFault">
|
|
<annotation>
|
|
<xsd:documentation xml:lang="EN"
|
|
xmlns="http://www.w3.org/1999/xhtml">
|
|
<p> The re-size operation is not permitted. </p>
|
|
</xsd:documentation>
|
|
<xsd:appinfo>
|
|
<xsdxt:samples>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/xml"
|
|
href="../samples/resizeNotAllowed.xml"/>
|
|
</xsdxt:sample>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/json"
|
|
href="../samples/resizeNotAllowed.json"/>
|
|
</xsdxt:sample>
|
|
</xsdxt:samples>
|
|
</xsd:appinfo>
|
|
</annotation>
|
|
</element>
|
|
<element name="serviceUnavailable"
|
|
type="csapi:ServiceUnavailableAPIFault">
|
|
<annotation>
|
|
<xsd:documentation xml:lang="EN"
|
|
xmlns="http://www.w3.org/1999/xhtml">
|
|
<p> The API service is currently unavailable. </p>
|
|
</xsd:documentation>
|
|
<xsd:appinfo>
|
|
<xsdxt:samples>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/xml"
|
|
href="../samples/serviceNotAvailable.xml"/>
|
|
</xsdxt:sample>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/json"
|
|
href="../samples/serviceNotAvailable.json"/>
|
|
</xsdxt:sample>
|
|
</xsdxt:samples>
|
|
</xsd:appinfo>
|
|
</annotation>
|
|
</element>
|
|
<element name="unauthorized" type="csapi:UnauthorizedAPIFault">
|
|
<annotation>
|
|
<xsd:documentation xml:lang="EN"
|
|
xmlns="http://www.w3.org/1999/xhtml">
|
|
<p> Insufficient privileges to honor the request, perhaps an
|
|
authentication token needs to be obtained or renewed. </p>
|
|
</xsd:documentation>
|
|
<xsd:appinfo>
|
|
<xsdxt:samples>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/xml"
|
|
href="../samples/unauth.xml"/>
|
|
</xsdxt:sample>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/json"
|
|
href="../samples/unauth.json"/>
|
|
</xsdxt:sample>
|
|
</xsdxt:samples>
|
|
</xsd:appinfo>
|
|
</annotation>
|
|
</element>
|
|
<element name="overLimit" type="csapi:OverLimitAPIFault">
|
|
<annotation>
|
|
<xsd:documentation xml:lang="EN"
|
|
xmlns="http://www.w3.org/1999/xhtml">
|
|
<p> An <a href="limits.xsd#type_AbsoluteLimit"
|
|
title="See
|
|
definition of AbsoluteLimit"
|
|
>absolute</a> or <a href="limits.xsd#type_RateLimit"
|
|
title="See definition of
|
|
RateLimit">rate</a>
|
|
limit has been exceeded. </p>
|
|
</xsd:documentation>
|
|
<xsd:appinfo>
|
|
<xsdxt:samples>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/xml"
|
|
href="../samples/overlimit.xml"/>
|
|
</xsdxt:sample>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/json"
|
|
href="../samples/overlimit.json"/>
|
|
</xsdxt:sample>
|
|
</xsdxt:samples>
|
|
</xsd:appinfo>
|
|
</annotation>
|
|
</element>
|
|
<element name="badRequest" type="csapi:BadRequestAPIFault">
|
|
<annotation>
|
|
<xsd:documentation xml:lang="EN"
|
|
xmlns="http://www.w3.org/1999/xhtml">
|
|
<p> The request is malformed. </p>
|
|
</xsd:documentation>
|
|
<xsd:appinfo>
|
|
<xsdxt:samples>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/xml"
|
|
href="../samples/badrequest.xml"/>
|
|
</xsdxt:sample>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/json"
|
|
href="../samples/badrequest.json"/>
|
|
</xsdxt:sample>
|
|
</xsdxt:samples>
|
|
</xsd:appinfo>
|
|
</annotation>
|
|
</element>
|
|
<element name="badMediaType" type="csapi:BadMediaTypeAPIFault">
|
|
<annotation>
|
|
<xsd:documentation xml:lang="EN"
|
|
xmlns="http://www.w3.org/1999/xhtml">
|
|
<p> The Content Type of the request is not supported. </p>
|
|
</xsd:documentation>
|
|
<xsd:appinfo>
|
|
<xsdxt:samples>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/xml"
|
|
href="../samples/badmediatype.xml"/>
|
|
</xsdxt:sample>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/json"
|
|
href="../samples/badmediatype.json"/>
|
|
</xsdxt:sample>
|
|
</xsdxt:samples>
|
|
</xsd:appinfo>
|
|
</annotation>
|
|
</element>
|
|
<element name="badMethod" type="csapi:BadMethodAPIFault">
|
|
<annotation>
|
|
<xsd:documentation xml:lang="EN"
|
|
xmlns="http://www.w3.org/1999/xhtml">
|
|
<p> The HTTP method (or <a href="limits.xsd#type_HTTPVerb"
|
|
title="See definition of HTTPVerb">verb</a>) is not
|
|
supported by the corresponding resource. </p>
|
|
</xsd:documentation>
|
|
<xsd:appinfo>
|
|
<xsdxt:samples>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/xml"
|
|
href="../samples/badmethod.xml"/>
|
|
</xsdxt:sample>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/json"
|
|
href="../samples/badmethod.json"/>
|
|
</xsdxt:sample>
|
|
</xsdxt:samples>
|
|
</xsd:appinfo>
|
|
</annotation>
|
|
</element>
|
|
<element name="notImplemented" type="csapi:NotImplementedAPIFault">
|
|
<annotation>
|
|
<xsd:documentation xml:lang="EN"
|
|
xmlns="http://www.w3.org/1999/xhtml">
|
|
<p> The operation is currently not implemented. </p>
|
|
</xsd:documentation>
|
|
<xsd:appinfo>
|
|
<xsdxt:samples>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/xml"
|
|
href="../samples/notimplemented.xml"/>
|
|
</xsdxt:sample>
|
|
<xsdxt:sample>
|
|
<xsdxt:code type="application/json"
|
|
href="../samples/notimplemented.json"/>
|
|
</xsdxt:sample>
|
|
</xsdxt:samples>
|
|
</xsd:appinfo>
|
|
</annotation>
|
|
</element>
|
|
<!-- Complex Types -->
|
|
<complexType name="CloudServersAPIFault">
|
|
<sequence>
|
|
<element name="message" type="xsd:string">
|
|
<annotation>
|
|
<xsd:documentation xml:lang="EN"
|
|
xmlns="http://www.w3.org/1999/xhtml">
|
|
<p> A human readable message that is appropriate for
|
|
display to the end user. </p>
|
|
</xsd:documentation>
|
|
</annotation>
|
|
</element>
|
|
<element name="details" type="xsd:string" minOccurs="0">
|
|
<annotation>
|
|
<xsd:documentation xml:lang="EN"
|
|
xmlns="http://www.w3.org/1999/xhtml">
|
|
<p> The optional <details> element may contain
|
|
useful information for tracking down errors (e.g a stack
|
|
trace). This information may or may not be appropriate
|
|
for display to an end user. </p>
|
|
</xsd:documentation>
|
|
</annotation>
|
|
</element>
|
|
</sequence>
|
|
<attribute name="code" type="xsd:int" use="required">
|
|
<annotation>
|
|
<xsd:documentation xml:lang="EN"
|
|
xmlns="http://www.w3.org/1999/xhtml">
|
|
<p> The HTTP status code associated with the current fault.
|
|
</p>
|
|
</xsd:documentation>
|
|
</annotation>
|
|
</attribute>
|
|
</complexType>
|
|
<complexType name="ItemNotFoundAPIFault">
|
|
<complexContent>
|
|
<extension base="csapi:CloudServersAPIFault"> </extension>
|
|
</complexContent>
|
|
</complexType>
|
|
<complexType name="BuildInProgressAPIFault">
|
|
<complexContent>
|
|
<extension base="csapi:CloudServersAPIFault"> </extension>
|
|
</complexContent>
|
|
</complexType>
|
|
<complexType name="ServerCapacityUnavailableAPIFault">
|
|
<complexContent>
|
|
<extension base="csapi:CloudServersAPIFault"> </extension>
|
|
</complexContent>
|
|
</complexType>
|
|
<complexType name="BackupOrResizeInProgressAPIFault">
|
|
<complexContent>
|
|
<extension base="csapi:CloudServersAPIFault"> </extension>
|
|
</complexContent>
|
|
</complexType>
|
|
<complexType name="ResizeNotAllowedAPIFault">
|
|
<complexContent>
|
|
<extension base="csapi:CloudServersAPIFault"> </extension>
|
|
</complexContent>
|
|
</complexType>
|
|
<complexType name="ServiceUnavailableAPIFault">
|
|
<complexContent>
|
|
<extension base="csapi:CloudServersAPIFault"> </extension>
|
|
</complexContent>
|
|
</complexType>
|
|
<complexType name="UnauthorizedAPIFault">
|
|
<complexContent>
|
|
<extension base="csapi:CloudServersAPIFault"> </extension>
|
|
</complexContent>
|
|
</complexType>
|
|
<complexType name="OverLimitAPIFault">
|
|
<complexContent>
|
|
<extension base="csapi:CloudServersAPIFault">
|
|
<attribute name="retryAfter" type="xsd:dateTime"
|
|
use="optional">
|
|
<annotation>
|
|
<xsd:documentation xml:lang="EN"
|
|
xmlns="http://www.w3.org/1999/xhtml">
|
|
<p> An optional dateTime denoting when an operation
|
|
should be retried. </p>
|
|
</xsd:documentation>
|
|
</annotation>
|
|
</attribute>
|
|
</extension>
|
|
</complexContent>
|
|
</complexType>
|
|
<complexType name="BadRequestAPIFault">
|
|
<complexContent>
|
|
<extension base="csapi:CloudServersAPIFault"> </extension>
|
|
</complexContent>
|
|
</complexType>
|
|
<complexType name="BadMediaTypeAPIFault">
|
|
<complexContent>
|
|
<extension base="csapi:CloudServersAPIFault"> </extension>
|
|
</complexContent>
|
|
</complexType>
|
|
<complexType name="BadMethodAPIFault">
|
|
<complexContent>
|
|
<extension base="csapi:CloudServersAPIFault"> </extension>
|
|
</complexContent>
|
|
</complexType>
|
|
<complexType name="NotImplementedAPIFault">
|
|
<complexContent>
|
|
<extension base="csapi:CloudServersAPIFault"> </extension>
|
|
</complexContent>
|
|
</complexType>
|
|
</schema>
|