1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315
|
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../xslt/schema.xsl"?>
<!-- (C) 2011 OpenStack LLC., All Rights Reserved -->
<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified"
targetNamespace="http://docs.openstack.org/common/api/v1.0"
xmlns:limits="http://docs.openstack.org/common/api/v1.0"
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo
xml:lang="EN"
xmlns="http://www.w3.org/1999/xhtml">
<xsdxt:title>Limits</xsdxt:title>
<xsdxt:link rel="index" href="api-common.xsd" />
</xs:appinfo>
<xs:documentation
xml:lang="EN"
xmlns="http://www.w3.org/1999/xhtml">
<p>
This schema file defines types related to
preconfigured limits. Limits are used to manage the
capacity of the API and to prevent abuse. The API
defines two kinds of limits <a href="#type_RateLimit"
title="See definition of a RateLimit">RateLimits</a>
and <a href="#type_AbsoluteLimit" title="See
definition of an
AbsoluteLimit">AbsoluteLimits</a>. RateLimits are
thresholds that are reset after a certain amount of
time passes. Absolute limits are fixed.
</p>
</xs:documentation>
</xs:annotation>
<!-- Live limit definitions -->
<xs:element name="limits" type="limits:Limits">
<xs:annotation>
<xs:documentation
xml:lang="EN"
xmlns="http://www.w3.org/1999/xhtml">
<p>
The limits element contains information on both rate and
absolute limits.
</p>
</xs:documentation>
<xs:appinfo>
<xsdxt:samples>
<xsdxt:sample>
<xsdxt:code type="application/xml" href="../samples/limits.xml" />
</xsdxt:sample>
<xsdxt:sample>
<xsdxt:code type="application/json" href="../samples/limits.json" />
</xsdxt:sample>
</xsdxt:samples>
</xs:appinfo>
</xs:annotation>
</xs:element>
<!-- Enumeration and SimpleType definitions -->
<xs:simpleType name="HttpMethod">
<xs:annotation>
<xs:documentation>
<html:p>
The HttpMethod simple type defines a string
enumeration of HTTP method verbs as outlined in <a
href="http://www.ietf.org/rfc/rfc2616.txt">RFC2616</a>
section 9.
</html:p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="GET" />
<xs:enumeration value="DELETE" />
<xs:enumeration value="POST" />
<xs:enumeration value="PUT" />
<xs:enumeration value="HEAD" />
<xs:enumeration value="OPTIONS" />
<xs:enumeration value="CONNECT" />
<xs:enumeration value="TRACE" />
<xs:enumeration value="ALL" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="TimeUnit">
<xs:annotation>
<xs:documentation>
<html:p>
The TimeUnit simple type defines a string
enumeration of coarse time units that are be used
to define the duration of time that a limited
request will be unavailable for.
</html:p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="SECOND" />
<xs:enumeration value="MINUTE" />
<xs:enumeration value="HOUR" />
<xs:enumeration value="DAY" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Limits">
<xs:annotation>
<xs:documentation>
<html:p>
A Limits type defines a collection of limits
</html:p>
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="rates" type="limits:RateLimitList" minOccurs="0" maxOccurs="1" />
<xs:element name="absolute" type="limits:AbsoluteLimitList" minOccurs="0" maxOccurs="1" />
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<xs:complexType name="AbsoluteLimitList">
<xs:annotation>
<xs:documentation>
<html:p>
An AbsoluteLimitList type defines a list of absolute limits
</html:p>
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="limit" type="limits:AbsoluteLimit" minOccurs="1" maxOccurs="unbounded" />
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<xs:complexType name="RateLimitList">
<xs:annotation>
<xs:documentation>
<html:p>
A RateLimitList type defines a list of resource
scoped limit collections.
</html:p>
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="rate" type="limits:ResourceRateLimits" minOccurs="1" maxOccurs="unbounded" />
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<xs:complexType name="ResourceRateLimits">
<xs:annotation>
<xs:documentation>
<html:p>
A ResourceLimitCollection type represents a
collection of limits that are scoped to a single
resource variant.
</html:p>
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="limit" type="limits:RateLimit" minOccurs="1" maxOccurs="unbounded" />
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="uri" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
<html:p>
The uri of a limit collection is a human
readable string version of the regular
expression matcher that is used to define the
limit collection resource scope.
</html:p>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="regex" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
<html:p>
A collection of limits are scoped to a
resource by a regular expression.
</html:p>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<xs:complexType name="AbsoluteLimit">
<xs:annotation>
<xs:documentation>
<html:p>
Absolute limits are predefined fixed limits. We
define each of these limits as a key/value
pair. Please consult the API Specification for a
list of absolute limits used by the system.
</html:p>
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
<html:p>
The name (or key) of the absolute limit.
</html:p>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="value" type="xs:int" use="required">
<xs:annotation>
<xs:documentation>
<html:p>
A value specifying the absolute limit.The name
of the absolute limit determines the unit
type. For example, the key maxIPGroups implies
that the value is in terms of IPGroups.
</html:p>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<xs:complexType name="RateLimit">
<xs:annotation>
<xs:documentation>
<html:p>
A Rate Limit type defines the maximum number of
requests that can be performed, the time interval
that each limited request will be unavailable for,
and, for convience, the remaining number of
requests remaining. This is done for every
HttpMethod that is rate limited.
</html:p>
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="verb" type="limits:HttpMethod" use="required">
<xs:annotation>
<xs:documentation>
<html:p>
The verb of a Limit represents the HttpMethod
that the Limit is scoped to.
</html:p>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="value" type="xs:int" use="required">
<xs:annotation>
<xs:documentation>
<html:p>
The value of a Limit represents maximum Number
of requests that the rate limit will allow.
</html:p>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="remaining" type="xs:int" use="required">
<xs:annotation>
<xs:documentation>
<html:p>
The remaining number of requests that a user
can make against the limited resource before
being denied access.
</html:p>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="unit" type="limits:TimeUnit" use="required">
<xs:annotation>
<xs:documentation>
<html:p>
The unit of a Limit defines the duration of a
limited request's unavailability.
</html:p>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="next-available" type="xs:dateTime" use="required">
<xs:annotation>
<xs:documentation>
<html:p>
The next-available attribute of a Limit tells
the user when a limited request will become
available for consumption.
</html:p>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
</xs:schema>
|