azure.cosmos.http_constants module¶
HTTP Constants in the Azure Cosmos database service.
-
class
azure.cosmos.http_constants.
CookieHeaders
[source]¶ Bases:
object
Constants of cookie headers.
-
SessionToken
= 'x-ms-session-token'¶
-
-
class
azure.cosmos.http_constants.
Delimiters
[source]¶ Bases:
object
Constants of delimiters.
-
ClientContinuationDelimiter
= '!!'¶
-
ClientContinuationFormat
= '{0}!!{1}'¶
-
-
class
azure.cosmos.http_constants.
HttpContextProperties
[source]¶ Bases:
object
Constants of http context properties.
-
SubscriptionId
= 'SubscriptionId'¶
-
-
class
azure.cosmos.http_constants.
HttpHeaderPreferenceTokens
[source]¶ Bases:
object
Constants of http header preference tokens.
-
PreferUnfilteredQueryResponse
= 'PreferUnfilteredQueryResponse'¶
-
-
class
azure.cosmos.http_constants.
HttpHeaders
[source]¶ Bases:
object
Constants of http headers.
-
AIM
= 'A-IM'¶
-
Accept
= 'Accept'¶
-
AcceptCharset
= 'Accept-Charset'¶
-
AcceptEncoding
= 'Accept-Encoding'¶
-
AcceptLanguage
= 'Accept-Language'¶
-
AcceptRanges
= 'Accept-Ranges'¶
-
AccessControlAllowHeaders
= 'Access-Control-Allow-Headers'¶
-
AccessControlAllowOrigin
= 'Access-Control-Allow-Origin'¶
-
ActivityId
= 'x-ms-activity-id'¶
-
AllowTentativeWrites
= 'x-ms-cosmos-allow-tentative-writes'¶
-
AlternateContentPath
= 'x-ms-alt-content-path'¶
-
Authorization
= 'authorization'¶
-
CacheControl
= 'Cache-Control'¶
-
CharacterSet
= 'CharacterSet'¶
-
CollectionCurrentUsageInMb
= 'x-ms-collection-usage-mb'¶
-
CollectionPartitionInfo
= 'x-ms-collection-partition-info'¶
-
CollectionQuotaInMb
= 'x-ms-collection-quota-mb'¶
-
CollectionServiceInfo
= 'x-ms-collection-service-info'¶
-
ConsistencyLevel
= 'x-ms-consistency-level'¶
-
ContentEncoding
= 'Content-Encoding'¶
-
ContentLanguage
= 'Content-Language'¶
-
ContentLength
= 'Content-Length'¶
-
ContentLocation
= 'Content-Location'¶
-
ContentMd5
= 'Content-Md5'¶
-
ContentRange
= 'Content-Range'¶
-
ContentType
= 'Content-Type'¶
-
Continuation
= 'x-ms-continuation'¶
-
CurrentEntityCount
= 'x-ms-root-entity-current-count'¶
-
CurrentMediaStorageUsageInMB
= 'x-ms-media-storage-usage-mb'¶
-
DisableRUPerMinuteUsage
= 'x-ms-documentdb-disable-ru-per-minute-usage'¶
-
ETag
= 'etag'¶
-
EmitVerboseTracesInQuery
= 'x-ms-documentdb-query-emit-traces'¶
-
EnableCrossPartitionQuery
= 'x-ms-documentdb-query-enablecrosspartition'¶
-
EnableScanInQuery
= 'x-ms-documentdb-query-enable-scan'¶
-
EnableScriptLogging
= 'x-ms-documentdb-script-enable-logging'¶
-
ForceRefresh
= 'x-ms-force-refresh'¶
-
FullUpgrade
= 'x-ms-force-full-upgrade'¶
-
Host
= 'Host'¶
-
HttpDate
= 'date'¶
-
IfMatch
= 'If-Match'¶
-
IfModified_since
= 'If-Modified-Since'¶
-
IfNoneMatch
= 'If-None-Match'¶
-
IfRange
= 'If-Range'¶
-
IfUnmodifiedSince
= 'If-Unmodified-Since'¶
-
IgnoreInProgressUpgrade
= 'x-ms-ignore-inprogress-upgrade'¶
-
IncrementalFeedHeaderValue
= 'Incremental feed'¶
-
IndexTransformationProgress
= 'x-ms-documentdb-collection-index-transformation-progress'¶
-
IndexingDirective
= 'x-ms-indexing-directive'¶
-
IsCanary
= 'x-ms-iscanary'¶
-
IsContinuationExpected
= 'x-ms-documentdb-query-iscontinuationexpected'¶
-
IsFeedUnfiltered
= 'x-ms-is-feed-unfiltered'¶
-
IsQuery
= 'x-ms-documentdb-isquery'¶
-
IsRUPerMinuteUsed
= 'x-ms-documentdb-is-ru-per-minute-used'¶
-
IsUpsert
= 'x-ms-documentdb-is-upsert'¶
-
ItemCount
= 'x-ms-item-count'¶
-
KeepAlive
= 'Keep-Alive'¶
-
KeyValueEncodingFormat
= 'application/x-www-form-urlencoded'¶
-
LastModified
= 'Last-Modified'¶
-
LastStateChangeUtc
= 'x-ms-last-state-change-utc'¶
-
LazyIndexingProgress
= 'x-ms-documentdb-collection-lazy-indexing-progress'¶
-
Location
= 'Location'¶
-
MaxEntityCount
= 'x-ms-root-entity-max-count'¶
-
MaxForwards
= 'Max-Forwards'¶
-
MaxMediaStorageUsageInMB
= 'x-ms-max-media-storage-usage-mb'¶
-
MethodOverride
= 'X-HTTP-Method'¶
-
NewResourceId
= 'x-ms-new-resource-id'¶
-
OcpResourceProviderRegisteredUri
= 'ocp-resourceprovider-registered-uri'¶
-
OfferIsRUPerMinuteThroughputEnabled
= 'x-ms-offer-is-ru-per-minute-throughput-enabled'¶
-
OfferThroughput
= 'x-ms-offer-throughput'¶
-
OfferType
= 'x-ms-offer-type'¶
-
OnlyUpgradeNonSystemApplications
= 'x-ms-only-upgrade-non-system-applications'¶
-
OnlyUpgradeSystemApplications
= 'x-ms-only-upgrade-system-applications'¶
-
Origin
= 'Origin'¶
-
PageSize
= 'x-ms-max-item-count'¶
-
PartitionKey
= 'x-ms-documentdb-partitionkey'¶
-
PartitionKeyRangeID
= 'x-ms-documentdb-partitionkeyrangeid'¶
-
PopulatePartitionKeyRangeStatistics
= 'x-ms-documentdb-populatepartitionstatistics'¶
-
PopulateQueryMetrics
= 'x-ms-documentdb-populatequerymetrics'¶
-
PopulateQuotaInfo
= 'x-ms-documentdb-populatequotainfo'¶
-
PostTriggerExclude
= 'x-ms-documentdb-post-trigger-exclude'¶
-
PostTriggerInclude
= 'x-ms-documentdb-post-trigger-include'¶
-
PreTriggerExclude
= 'x-ms-documentdb-pre-trigger-exclude'¶
-
PreTriggerInclude
= 'x-ms-documentdb-pre-trigger-include'¶
-
Prefer
= 'Prefer'¶
-
ProxyAuthenticate
= 'Proxy-Authenticate'¶
-
ProxyAuthorization
= 'Proxy-Authorization'¶
-
Query
= 'x-ms-documentdb-query'¶
-
Referer
= 'referer'¶
-
RequestCharge
= 'x-ms-request-charge'¶
-
RequestId
= 'x-ms-request-id'¶
-
ResourceTokenExpiry
= 'x-ms-documentdb-expiry-seconds'¶
-
RetryAfter
= 'Retry-After'¶
-
RetryAfterInMilliseconds
= 'x-ms-retry-after-ms'¶
-
ScriptLogResults
= 'x-ms-documentdb-script-log-results'¶
-
SessionToken
= 'x-ms-session-token'¶
-
SetCookie
= 'Set-Cookie'¶
-
SimpleToken
= 'SWT'¶
-
Slug
= 'Slug'¶
-
SubStatus
= 'x-ms-substatus'¶
-
ThrottleRetryCount
= 'x-ms-throttle-retry-count'¶
-
ThrottleRetryWaitTimeInMs
= 'x-ms-throttle-retry-wait-time-ms'¶
-
TransferEncoding
= 'Transfer-Encoding'¶
-
UpgradeFabricRingCodeAndConfig
= 'x-ms-upgrade-fabric-code-config'¶
-
UpgradeVerificationKind
= 'x-ms-upgrade-verification-kind'¶
-
UseMasterCollectionResolver
= 'x-ms-use-master-collection-resolver'¶
-
UserAgent
= 'User-Agent'¶
-
Version
= 'x-ms-version'¶
-
WrapAssertion
= 'wrap_assertion'¶
-
WrapAssertionFormat
= 'wrap_assertion_format'¶
-
WrapScope
= 'wrap_scope'¶
-
WwwAuthenticate
= 'Www-Authenticate'¶
-
XDate
= 'x-ms-date'¶
-
-
class
azure.cosmos.http_constants.
HttpListenerErrorCodes
[source]¶ Bases:
object
Constants of http listener error codes.
-
ERROR_CONNECTION_INVALID
= 1229¶
-
ERROR_OPERATION_ABORTED
= 995¶
-
-
class
azure.cosmos.http_constants.
HttpMethods
[source]¶ Bases:
object
Constants of http methods.
-
Delete
= 'DELETE'¶
-
Get
= 'GET'¶
-
Head
= 'HEAD'¶
-
Options
= 'OPTIONS'¶
-
Post
= 'POST'¶
-
Put
= 'PUT'¶
-
-
class
azure.cosmos.http_constants.
HttpStatusDescriptions
[source]¶ Bases:
object
Constants of http status descriptions.
-
Accepted
= 'Accepted'¶
-
BadGateway
= 'Bad Gateway'¶
-
BadRequest
= 'Bad Request'¶
-
Conflict
= 'Conflict'¶
-
Created
= 'Created'¶
-
Forbidden
= 'Forbidden'¶
-
GatewayTimeout
= 'Gateway timed out'¶
-
Gone
= 'Gone'¶
-
InternalServerError
= 'Internal Server Error'¶
-
LengthRequired
= 'Length Required'¶
-
MethodNotAllowed
= 'MethodNotAllowed'¶
-
NoContent
= 'No Content'¶
-
NotAcceptable
= 'Not Acceptable'¶
-
NotFound
= 'Not Found'¶
-
NotModified
= 'Not Modified'¶
-
OK
= 'Ok'¶
-
PreconditionFailed
= 'Precondition Failed'¶
-
RequestEntityTooLarge
= 'Request Entity Too Large'¶
-
RequestTimeout
= 'Request timed out'¶
-
RetryWith
= 'Retry the request'¶
-
TooManyRequests
= 'Too Many Requests'¶
-
UnsupportedMediaType
= 'Unsupported Media Type'¶
-
-
class
azure.cosmos.http_constants.
QueryStrings
[source]¶ Bases:
object
Constants of query strings.
-
ContentView
= 'contentview'¶
-
Filter
= '$filter'¶
-
GenerateId
= '$generateFor'¶
-
GenerateIdBatchSize
= '$batchSize'¶
-
Generic
= 'generic'¶
-
GetChildResourcePartitions
= '$getChildResourcePartitions'¶
-
Query
= 'query'¶
-
RootIndex
= '$rootIndex'¶
-
SQLQueryType
= 'sql'¶
-
Url
= '$resolveFor'¶
-
-
class
azure.cosmos.http_constants.
ResourceType
[source]¶ Bases:
object
Types of resources in Azure Cosmos
-
Attachment
= 'attachments'¶
-
Collection
= 'colls'¶
-
Conflict
= 'conflicts'¶
-
Database
= 'dbs'¶
-
DatabaseAccount
= 'databaseaccount'¶
-
Document
= 'docs'¶
-
Media
= 'media'¶
-
Offer
= 'offers'¶
-
PartitionKeyRange
= 'pkranges'¶
-
Permission
= 'permissions'¶
-
Schema
= 'schemas'¶
-
StoredProcedure
= 'sprocs'¶
-
Topology
= 'topology'¶
-
Trigger
= 'triggers'¶
-
User
= 'users'¶
-
UserDefinedFunction
= 'udfs'¶
-
-
class
azure.cosmos.http_constants.
StatusCodes
[source]¶ Bases:
object
HTTP status codes returned by the REST operations
-
ACCEPTED
= 202¶
-
BAD_REQUEST
= 400¶
-
CONFLICT
= 409¶
-
CREATED
= 201¶
-
FORBIDDEN
= 403¶
-
GONE
= 410¶
-
INTERNAL_SERVER_ERROR
= 500¶
-
METHOD_NOT_ALLOWED
= 405¶
-
NOT_FOUND
= 404¶
-
NOT_MODIFIED
= 304¶
-
NO_CONTENT
= 204¶
-
OK
= 200¶
-
OPERATION_CANCELLED
= 1201¶
-
OPERATION_PAUSED
= 1200¶
-
PRECONDITION_FAILED
= 412¶
-
REQUEST_ENTITY_TOO_LARGE
= 413¶
-
REQUEST_TIMEOUT
= 408¶
-
RETRY_WITH
= 449¶
-
SERVICE_UNAVAILABLE
= 503¶
-
TOO_MANY_REQUESTS
= 429¶
-
UNAUTHORIZED
= 401¶
-
-
class
azure.cosmos.http_constants.
SubStatusCodes
[source]¶ Bases:
object
Sub status codes returned by the REST operations specifying the details of the operation
-
COMPLETING_PARTITION_MIGRATION
= 1008¶
-
COMPLETING_SPLIT
= 1007¶
-
CONFLICT_WITH_CONTROL_PLANE
= 1006¶
-
CROSS_PARTITION_QUERY_NOT_SERVABLE
= 1004¶
-
DATABASE_ACCOUNT_NOT_FOUND
= 1008¶
-
INSUFFICIENT_BINDABLE_PARTITIONS
= 1007¶
-
NAME_CACHE_IS_STALE
= 1000¶
-
OWNER_RESOURCE_NOT_FOUND
= 1003¶
-
PARTITION_KEY_MISMATCH
= 1001¶
-
PARTITION_KEY_RANGE_GONE
= 1002¶
-
PROVISION_LIMIT_REACHED
= 1005¶
-
READ_SESSION_NOTAVAILABLE
= 1002¶
-
REDUNDANT_COLLECTION_PUT
= 1009¶
-
SHARED_THROUGHPUT_DATABASE_QUOTA_EXCEEDED
= 1010¶
-
SHARED_THROUGHPUT_OFFER_GROW_NOT_NEEDED
= 1011¶
-
UNKNOWN
= 0¶
-
WRITE_FORBIDDEN
= 3¶
-