azure-storage 0.10.0.preview
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/azure/storage.rb +58 -0
- data/lib/azure/storage/autoload.rb +71 -0
- data/lib/azure/storage/blob/append.rb +154 -0
- data/lib/azure/storage/blob/blob.rb +821 -0
- data/lib/azure/storage/blob/blob_service.rb +510 -0
- data/lib/azure/storage/blob/block.rb +264 -0
- data/lib/azure/storage/blob/container.rb +552 -0
- data/lib/azure/storage/blob/page.rb +380 -0
- data/lib/azure/storage/blob/serialization.rb +297 -0
- data/lib/azure/storage/client.rb +185 -0
- data/lib/azure/storage/configurable.rb +137 -0
- data/lib/azure/storage/core.rb +33 -0
- data/lib/azure/storage/core/auth/shared_access_signature.rb +27 -0
- data/lib/azure/storage/core/auth/shared_access_signature_generator.rb +194 -0
- data/lib/azure/storage/core/auth/shared_access_signature_signer.rb +49 -0
- data/lib/azure/storage/core/auth/shared_key.rb +125 -0
- data/lib/azure/storage/core/auth/shared_key_lite.rb +55 -0
- data/lib/azure/storage/core/auth/signer.rb +60 -0
- data/lib/azure/storage/core/autoload.rb +35 -0
- data/lib/azure/storage/core/client_options.rb +334 -0
- data/lib/azure/storage/core/client_options_error.rb +39 -0
- data/lib/azure/storage/core/constants.rb +1077 -0
- data/lib/azure/storage/core/error.rb +47 -0
- data/lib/azure/storage/core/filtered_service.rb +54 -0
- data/lib/azure/storage/core/http/debug_filter.rb +45 -0
- data/lib/azure/storage/core/http/http_error.rb +95 -0
- data/lib/azure/storage/core/http/http_filter.rb +62 -0
- data/lib/azure/storage/core/http/http_request.rb +182 -0
- data/lib/azure/storage/core/http/http_response.rb +105 -0
- data/lib/azure/storage/core/http/retry_policy.rb +83 -0
- data/lib/azure/storage/core/http/signer_filter.rb +42 -0
- data/lib/azure/storage/core/http_client.rb +63 -0
- data/lib/azure/storage/core/service.rb +55 -0
- data/lib/azure/storage/core/signed_service.rb +54 -0
- data/lib/azure/storage/core/sr.rb +83 -0
- data/lib/azure/storage/core/utility.rb +254 -0
- data/lib/azure/storage/queue/message.rb +39 -0
- data/lib/azure/storage/queue/queue.rb +37 -0
- data/lib/azure/storage/queue/queue_service.rb +580 -0
- data/lib/azure/storage/queue/serialization.rb +113 -0
- data/lib/azure/storage/service/access_policy.rb +35 -0
- data/lib/azure/storage/service/cors.rb +36 -0
- data/lib/azure/storage/service/cors_rule.rb +46 -0
- data/lib/azure/storage/service/enumeration_results.rb +30 -0
- data/lib/azure/storage/service/logging.rb +45 -0
- data/lib/azure/storage/service/metrics.rb +43 -0
- data/lib/azure/storage/service/retention_policy.rb +35 -0
- data/lib/azure/storage/service/serialization.rb +308 -0
- data/lib/azure/storage/service/signed_identifier.rb +39 -0
- data/lib/azure/storage/service/storage_service.rb +131 -0
- data/lib/azure/storage/service/storage_service_properties.rb +46 -0
- data/lib/azure/storage/table/auth/shared_key.rb +68 -0
- data/lib/azure/storage/table/auth/shared_key_lite.rb +53 -0
- data/lib/azure/storage/table/batch.rb +339 -0
- data/lib/azure/storage/table/batch_response.rb +127 -0
- data/lib/azure/storage/table/edmtype.rb +136 -0
- data/lib/azure/storage/table/entity.rb +40 -0
- data/lib/azure/storage/table/guid.rb +33 -0
- data/lib/azure/storage/table/query.rb +121 -0
- data/lib/azure/storage/table/serialization.rb +117 -0
- data/lib/azure/storage/table/table_service.rb +571 -0
- data/lib/azure/storage/version.rb +46 -0
- metadata +329 -0
@@ -0,0 +1,39 @@
|
|
1
|
+
#-------------------------------------------------------------------------
|
2
|
+
# # Copyright (c) Microsoft and contributors. All rights reserved.
|
3
|
+
#
|
4
|
+
# The MIT License(MIT)
|
5
|
+
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
# of this software and associated documentation files(the "Software"), to deal
|
8
|
+
# in the Software without restriction, including without limitation the rights
|
9
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
|
10
|
+
# copies of the Software, and to permit persons to whom the Software is
|
11
|
+
# furnished to do so, subject to the following conditions :
|
12
|
+
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
14
|
+
# all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
+
# THE SOFTWARE.
|
23
|
+
#--------------------------------------------------------------------------
|
24
|
+
|
25
|
+
module Azure::Storage
|
26
|
+
|
27
|
+
class InvalidConnectionStringError < StorageError
|
28
|
+
def initialize(message = SR::INVALID_CONNECTION_STRING)
|
29
|
+
super(message)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
class InvalidOptionsError < StorageError
|
34
|
+
def initialize(message = SR::INVALID_CLIENT_OPTIONS)
|
35
|
+
super(message)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
@@ -0,0 +1,1077 @@
|
|
1
|
+
#-------------------------------------------------------------------------
|
2
|
+
# # Copyright (c) Microsoft and contributors. All rights reserved.
|
3
|
+
#
|
4
|
+
# The MIT License(MIT)
|
5
|
+
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
# of this software and associated documentation files(the "Software"), to deal
|
8
|
+
# in the Software without restriction, including without limitation the rights
|
9
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
|
10
|
+
# copies of the Software, and to permit persons to whom the Software is
|
11
|
+
# furnished to do so, subject to the following conditions :
|
12
|
+
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
14
|
+
# all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
+
# THE SOFTWARE.
|
23
|
+
#--------------------------------------------------------------------------
|
24
|
+
|
25
|
+
require 'rbconfig'
|
26
|
+
require 'azure/storage/version'
|
27
|
+
|
28
|
+
module Azure::Storage
|
29
|
+
module Default
|
30
|
+
# Default REST service (STG) version number
|
31
|
+
STG_VERSION = '2015-02-21'
|
32
|
+
|
33
|
+
# The number of default concurrent requests for parallel operation.
|
34
|
+
DEFAULT_PARALLEL_OPERATION_THREAD_COUNT = 1
|
35
|
+
|
36
|
+
# Constant representing a kilobyte (Non-SI version).
|
37
|
+
KB = 1024
|
38
|
+
# Constant representing a megabyte (Non-SI version).
|
39
|
+
MB = 1024 * 1024
|
40
|
+
# Constant representing a gigabyte (Non-SI version).
|
41
|
+
GB = 1024 * 1024 * 1024
|
42
|
+
|
43
|
+
# Specifies HTTP.
|
44
|
+
HTTP = 'http'
|
45
|
+
# Specifies HTTPS.
|
46
|
+
HTTPS = 'https'
|
47
|
+
# Default HTTP port.
|
48
|
+
DEFAULT_HTTP_PORT = 80
|
49
|
+
# Default HTTPS port.
|
50
|
+
DEFAULT_HTTPS_PORT= 443
|
51
|
+
|
52
|
+
# Marker for atom metadata.
|
53
|
+
XML_METADATA_MARKER = '$'
|
54
|
+
# Marker for atom value.
|
55
|
+
XML_VALUE_MARKER = '_'
|
56
|
+
|
57
|
+
def os
|
58
|
+
host_os = RbConfig::CONFIG['host_os']
|
59
|
+
case host_os
|
60
|
+
when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
|
61
|
+
"Windows #{host_os}"
|
62
|
+
when /darwin|mac os/
|
63
|
+
"MacOS #{host_os}"
|
64
|
+
when /linux/
|
65
|
+
"Linux #{host_os}"
|
66
|
+
when /solaris|bsd/
|
67
|
+
"Unix #{host_os}"
|
68
|
+
else
|
69
|
+
"Unknown #{host_os}"
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
module_function :os
|
74
|
+
|
75
|
+
# Default User Agent header string
|
76
|
+
USER_AGENT = "Azure-Storage/#{Azure::Storage::Version.to_uas} (Ruby #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}; #{os})".freeze
|
77
|
+
|
78
|
+
class << self
|
79
|
+
def options
|
80
|
+
Hash[Azure::Storage::Configurable.keys.map{|key| [key, send(key)]}]
|
81
|
+
end
|
82
|
+
|
83
|
+
# Default storage access key
|
84
|
+
# @return [String]
|
85
|
+
def storage_access_key
|
86
|
+
ENV['AZURE_STORAGE_ACCESS_KEY']
|
87
|
+
end
|
88
|
+
|
89
|
+
# Default storage account name
|
90
|
+
# @return [String]
|
91
|
+
def storage_account_name
|
92
|
+
ENV['AZURE_STORAGE_ACCOUNT']
|
93
|
+
end
|
94
|
+
|
95
|
+
# Default storage connection string
|
96
|
+
# @return [String]
|
97
|
+
def storage_connection_string
|
98
|
+
ENV['AZURE_STORAGE_CONNECTION_STRING']
|
99
|
+
end
|
100
|
+
|
101
|
+
# Default storage table host
|
102
|
+
# @return [String]
|
103
|
+
def storage_table_host
|
104
|
+
ENV['AZURE_STORAGE_TABLE_HOST']
|
105
|
+
end
|
106
|
+
|
107
|
+
# Default storage blob host
|
108
|
+
# @return [String]
|
109
|
+
def storage_blob_host
|
110
|
+
ENV['AZURE_STORAGE_BLOB_HOST']
|
111
|
+
end
|
112
|
+
|
113
|
+
# Default storage queue host
|
114
|
+
# @return [String]
|
115
|
+
def storage_queue_host
|
116
|
+
ENV['AZURE_STORAGE_QUEUE_HOST']
|
117
|
+
end
|
118
|
+
|
119
|
+
# Default storage file host
|
120
|
+
# @return [String]
|
121
|
+
def storage_file_host
|
122
|
+
ENV['AZURE_STORAGE_FILE_HOST']
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
# ServiceType prefix to suffix
|
128
|
+
module ServiceType
|
129
|
+
BLOB = 'blob'
|
130
|
+
QUEUE = 'queue'
|
131
|
+
TABLE = 'table'
|
132
|
+
FILE = 'file'
|
133
|
+
end
|
134
|
+
|
135
|
+
# Specifies the location used to indicate which location the operation can be performed against.
|
136
|
+
module RequestLocationMode
|
137
|
+
PRIMARY_ONLY = 0
|
138
|
+
SECONDARY_ONLY = 1
|
139
|
+
PRIMARY_OR_SECONDARY = 2
|
140
|
+
end
|
141
|
+
|
142
|
+
# Represents a storage service location.
|
143
|
+
module StorageLocation
|
144
|
+
PRIMARY = 0
|
145
|
+
SECONDARY = 1
|
146
|
+
end
|
147
|
+
|
148
|
+
# Defines constants for use with shared access policies.
|
149
|
+
module AclConstants
|
150
|
+
# XML element for an access policy.
|
151
|
+
ACCESS_POLICY = 'AccessPolicy'
|
152
|
+
|
153
|
+
# XML element for the end time of an access policy.
|
154
|
+
EXPIRY = 'Expiry'
|
155
|
+
|
156
|
+
# XML attribute for IDs.
|
157
|
+
ID = 'Id'
|
158
|
+
|
159
|
+
# XML element for the permission of an access policy.
|
160
|
+
PERMISSION = 'Permission'
|
161
|
+
|
162
|
+
# XML element for a signed identifier.
|
163
|
+
SIGNED_IDENTIFIER_ELEMENT = 'SignedIdentifier'
|
164
|
+
|
165
|
+
# XML element for signed identifiers.
|
166
|
+
SIGNED_IDENTIFIERS_ELEMENT = 'SignedIdentifiers'
|
167
|
+
|
168
|
+
# XML element for the start time of an access policy.
|
169
|
+
START = 'Start'
|
170
|
+
end
|
171
|
+
|
172
|
+
# Defines constants for use with service properties.
|
173
|
+
module ServicePropertiesConstants
|
174
|
+
# XML element for storage service properties.
|
175
|
+
STORAGE_SERVICE_PROPERTIES_ELEMENT = 'StorageServiceProperties'
|
176
|
+
|
177
|
+
# Default analytics version to send for logging, hour metrics and minute metrics.
|
178
|
+
DEFAULT_ANALYTICS_VERSION = '1.0'
|
179
|
+
|
180
|
+
# XML element for logging.
|
181
|
+
LOGGING_ELEMENT = 'Logging'
|
182
|
+
|
183
|
+
# XML element for version.
|
184
|
+
VERSION_ELEMENT = 'Version'
|
185
|
+
|
186
|
+
# XML element for delete.
|
187
|
+
DELETE_ELEMENT = 'Delete'
|
188
|
+
|
189
|
+
# XML element for read.
|
190
|
+
READ_ELEMENT = 'Read'
|
191
|
+
|
192
|
+
# XML element for write.
|
193
|
+
WRITE_ELEMENT = 'Write'
|
194
|
+
|
195
|
+
# XML element for retention policy.
|
196
|
+
RETENTION_POLICY_ELEMENT = 'RetentionPolicy'
|
197
|
+
|
198
|
+
# XML element for enabled.
|
199
|
+
ENABLED_ELEMENT = 'Enabled'
|
200
|
+
|
201
|
+
# XML element for days.
|
202
|
+
DAYS_ELEMENT = 'Days'
|
203
|
+
|
204
|
+
# XML element for HourMetrics.
|
205
|
+
HOUR_METRICS_ELEMENT = 'HourMetrics'
|
206
|
+
|
207
|
+
# XML element for MinuteMetrics.
|
208
|
+
MINUTE_METRICS_ELEMENT = 'MinuteMetrics'
|
209
|
+
|
210
|
+
# XML element for Cors.
|
211
|
+
CORS_ELEMENT = 'Cors'
|
212
|
+
|
213
|
+
# XML element for CorsRule.
|
214
|
+
CORS_RULE_ELEMENT = 'CorsRule'
|
215
|
+
|
216
|
+
# XML element for AllowedOrigins.
|
217
|
+
ALLOWED_ORIGINS_ELEMENT = 'AllowedOrigins'
|
218
|
+
|
219
|
+
# XML element for AllowedMethods.
|
220
|
+
ALLOWED_METHODS_ELEMENT = 'AllowedMethods'
|
221
|
+
|
222
|
+
# XML element for MaxAgeInSeconds.
|
223
|
+
MAX_AGE_IN_SECONDS_ELEMENT = 'MaxAgeInSeconds'
|
224
|
+
|
225
|
+
# XML element for ExposedHeaders.
|
226
|
+
EXPOSED_HEADERS_ELEMENT = 'ExposedHeaders'
|
227
|
+
|
228
|
+
# XML element for AllowedHeaders.
|
229
|
+
ALLOWED_HEADERS_ELEMENT = 'AllowedHeaders'
|
230
|
+
|
231
|
+
# XML element for IncludeAPIs.
|
232
|
+
INCLUDE_APIS_ELEMENT = 'IncludeAPIs'
|
233
|
+
|
234
|
+
# XML element for DefaultServiceVersion.
|
235
|
+
DEFAULT_SERVICE_VERSION_ELEMENT = 'DefaultServiceVersion'
|
236
|
+
end
|
237
|
+
|
238
|
+
# Defines constants for use with blob operations.
|
239
|
+
module BlobConstants
|
240
|
+
# XML element for the latest.
|
241
|
+
LATEST_ELEMENT = 'Latest'
|
242
|
+
|
243
|
+
# XML element for uncommitted blocks.
|
244
|
+
UNCOMMITTED_ELEMENT = 'Uncommitted'
|
245
|
+
|
246
|
+
# XML element for a block list.
|
247
|
+
BLOCK_LIST_ELEMENT = 'BlockList'
|
248
|
+
|
249
|
+
# XML element for committed blocks.
|
250
|
+
COMMITTED_ELEMENT = 'Committed'
|
251
|
+
|
252
|
+
# The default write page size, in bytes, used by blob streams.
|
253
|
+
DEFAULT_WRITE_PAGE_SIZE_IN_BYTES = 4 * 1024 * 1024
|
254
|
+
|
255
|
+
# The minimum write page size, in bytes, used by blob streams.
|
256
|
+
MIN_WRITE_PAGE_SIZE_IN_BYTES = 2 * 1024 * 1024
|
257
|
+
|
258
|
+
# The default maximum size, in bytes, of a blob before it must be separated into blocks.
|
259
|
+
DEFAULT_SINGLE_BLOB_PUT_THRESHOLD_IN_BYTES = 32 * 1024 * 1024
|
260
|
+
|
261
|
+
# The default write block size, in bytes, used by blob streams.
|
262
|
+
DEFAULT_WRITE_BLOCK_SIZE_IN_BYTES = 4 * 1024 * 1024
|
263
|
+
|
264
|
+
# The maximum size of a single block.
|
265
|
+
MAX_BLOCK_SIZE = 4 * 1024 * 1024
|
266
|
+
|
267
|
+
# The maximum size, in bytes, of a blob before it must be separated into blocks.
|
268
|
+
MAX_SINGLE_UPLOAD_BLOB_SIZE_IN_BYTES = 64 * 1024 * 1024
|
269
|
+
|
270
|
+
# The maximum range get size when requesting for a contentMD5
|
271
|
+
MAX_RANGE_GET_SIZE_WITH_MD5 = 4 * 1024 * 1024
|
272
|
+
|
273
|
+
# The maximum page range size for a page update operation.
|
274
|
+
MAX_UPDATE_PAGE_SIZE = 4 * 1024 * 1024
|
275
|
+
|
276
|
+
# The maximum buffer size for writing a stream buffer.
|
277
|
+
MAX_QUEUED_WRITE_DISK_BUFFER_SIZE = 64 * 1024 * 1024
|
278
|
+
|
279
|
+
|
280
|
+
# Max size for single get page range. The max value should be 150MB
|
281
|
+
# http://blogs.msdn.com/b/windowsazurestorage/archive/2012/03/26/getting-the-page-ranges-of-a-large-page-blob-in-segments.aspx
|
282
|
+
MAX_SINGLE_GET_PAGE_RANGE_SIZE = 37 * 4 * 1024 * 1024
|
283
|
+
|
284
|
+
# The size of a page, in bytes, in a page blob.
|
285
|
+
PAGE_SIZE = 512
|
286
|
+
|
287
|
+
# Resource types.
|
288
|
+
module ResourceTypes
|
289
|
+
CONTAINER = 'c'
|
290
|
+
BLOB = 'b'
|
291
|
+
end
|
292
|
+
|
293
|
+
# List blob types.
|
294
|
+
module ListBlobTypes
|
295
|
+
Blob = 'b'
|
296
|
+
Directory = 'd'
|
297
|
+
end
|
298
|
+
|
299
|
+
# Put page write options
|
300
|
+
module PageWriteOptions
|
301
|
+
UPDATE = 'update'
|
302
|
+
CLEAR = 'clear'
|
303
|
+
end
|
304
|
+
|
305
|
+
# Blob types
|
306
|
+
module BlobTypes
|
307
|
+
BLOCK = 'BlockBlob'
|
308
|
+
PAGE = 'PageBlob'
|
309
|
+
APPEND = 'AppendBlob'
|
310
|
+
end
|
311
|
+
|
312
|
+
# Blob lease constants
|
313
|
+
module LeaseOperation
|
314
|
+
ACQUIRE = 'acquire'
|
315
|
+
RENEW = 'renew'
|
316
|
+
CHANGE = 'change'
|
317
|
+
RELEASE = 'release'
|
318
|
+
BREAK = 'break'
|
319
|
+
end
|
320
|
+
end
|
321
|
+
|
322
|
+
# Defines constants for use with file operations.
|
323
|
+
module FileConstants
|
324
|
+
# The default write size, in bytes, used by file streams.
|
325
|
+
DEFAULT_WRITE_SIZE_IN_BYTES = 4 * 1024 * 1024
|
326
|
+
|
327
|
+
# The maximum range size when requesting for a contentMD5.
|
328
|
+
MAX_RANGE_GET_SIZE_WITH_MD5 = 4 * 1024 * 1024
|
329
|
+
|
330
|
+
# The maximum range size for a file update operation.
|
331
|
+
MAX_UPDATE_FILE_SIZE = 4 * 1024 * 1024
|
332
|
+
|
333
|
+
# The default minimum size, in bytes, of a file when it must be separated into ranges.
|
334
|
+
DEFAULT_SINGLE_FILE_GET_THRESHOLD_IN_BYTES = 32 * 1024 * 1024
|
335
|
+
|
336
|
+
# The minimum write file size, in bytes, used by file streams.
|
337
|
+
MIN_WRITE_FILE_SIZE_IN_BYTES = 2 * 1024 * 1024
|
338
|
+
|
339
|
+
# Put range write options
|
340
|
+
module RangeWriteOptions
|
341
|
+
UPDATE = 'update'
|
342
|
+
CLEAR = 'clear'
|
343
|
+
end
|
344
|
+
|
345
|
+
# Resource types.
|
346
|
+
module ResourceTypes
|
347
|
+
SHARE = 's'
|
348
|
+
FILE = 'f'
|
349
|
+
end
|
350
|
+
end
|
351
|
+
|
352
|
+
# Defines constants for use with queue storage.
|
353
|
+
module QueueConstants
|
354
|
+
# XML element for QueueMessage.
|
355
|
+
QUEUE_MESSAGE_ELEMENT = 'QueueMessage'
|
356
|
+
|
357
|
+
# XML element for MessageText.
|
358
|
+
MESSAGE_TEXT_ELEMENT = 'MessageText'
|
359
|
+
end
|
360
|
+
|
361
|
+
# Defines constants for use with table storage.
|
362
|
+
module TableConstants
|
363
|
+
# The changeset response delimiter.
|
364
|
+
CHANGESET_DELIMITER = '--changesetresponse_'
|
365
|
+
|
366
|
+
# The batch response delimiter.
|
367
|
+
BATCH_DELIMITER = '--batchresponse_'
|
368
|
+
|
369
|
+
# The next continuation row key token.
|
370
|
+
CONTINUATION_NEXT_ROW_KEY = 'x-ms-continuation-nextrowkey'
|
371
|
+
|
372
|
+
# The next continuation partition key token.
|
373
|
+
CONTINUATION_NEXT_PARTITION_KEY = 'x-ms-continuation-nextpartitionkey'
|
374
|
+
|
375
|
+
# The next continuation table name token.
|
376
|
+
CONTINUATION_NEXT_TABLE_NAME = 'x-ms-continuation-nexttablename'
|
377
|
+
|
378
|
+
# The next row key query string argument.
|
379
|
+
NEXT_ROW_KEY = 'NextRowKey'
|
380
|
+
|
381
|
+
# The next partition key query string argument.
|
382
|
+
NEXT_PARTITION_KEY = 'NextPartitionKey'
|
383
|
+
|
384
|
+
# The next table name query string argument.
|
385
|
+
NEXT_TABLE_NAME = 'NextTableName'
|
386
|
+
|
387
|
+
# Prefix of the odata properties returned in a JSON query
|
388
|
+
ODATA_PREFIX = 'odata.'
|
389
|
+
|
390
|
+
# Constant representing the string following a type annotation in a JSON table query
|
391
|
+
ODATA_TYPE_SUFFIX = '@odata.type'
|
392
|
+
|
393
|
+
# Constant representing the property where the odata metadata elements are stored.
|
394
|
+
ODATA_METADATA_MARKER = '.metadata'
|
395
|
+
|
396
|
+
# Constant representing the value for an entity property.
|
397
|
+
ODATA_VALUE_MARKER = '_'
|
398
|
+
|
399
|
+
# Constant representing the type for an entity property.
|
400
|
+
ODATA_TYPE_MARKER = '$'
|
401
|
+
|
402
|
+
# The value to set the maximum data service version header.
|
403
|
+
DEFAULT_DATA_SERVICE_VERSION = '3.0;NetFx'
|
404
|
+
|
405
|
+
# The name of the property that stores the table name.
|
406
|
+
TABLE_NAME = 'TableName'
|
407
|
+
|
408
|
+
# The name of the special table used to store tables.
|
409
|
+
TABLE_SERVICE_TABLE_NAME = 'Tables'
|
410
|
+
|
411
|
+
# Operations
|
412
|
+
module Operations
|
413
|
+
RETRIEVE = 'RETRIEVE'
|
414
|
+
INSERT = 'INSERT'
|
415
|
+
UPDATE = 'UPDATE'
|
416
|
+
MERGE = 'MERGE'
|
417
|
+
DELETE = 'DELETE'
|
418
|
+
INSERT_OR_REPLACE = 'INSERT_OR_REPLACE'
|
419
|
+
INSERT_OR_MERGE = 'INSERT_OR_MERGE'
|
420
|
+
end
|
421
|
+
end
|
422
|
+
|
423
|
+
# Defines constants for use with HTTP headers.
|
424
|
+
module HeaderConstants
|
425
|
+
# The accept ranges header.
|
426
|
+
ACCEPT_RANGES = 'accept_ranges'
|
427
|
+
|
428
|
+
# The content transfer encoding header.
|
429
|
+
CONTENT_TRANSFER_ENCODING = 'content-transfer-encoding'
|
430
|
+
|
431
|
+
# The transfer encoding header.
|
432
|
+
TRANSFER_ENCODING = 'transfer-encoding'
|
433
|
+
|
434
|
+
# The server header.
|
435
|
+
SERVER = 'server'
|
436
|
+
|
437
|
+
# The location header.
|
438
|
+
LOCATION = 'location'
|
439
|
+
|
440
|
+
# The Last-Modified header
|
441
|
+
LAST_MODIFIED = 'Last-Modified'
|
442
|
+
|
443
|
+
# The data service version.
|
444
|
+
DATA_SERVICE_VERSION = 'dataserviceversion'
|
445
|
+
|
446
|
+
# The maximum data service version.
|
447
|
+
MAX_DATA_SERVICE_VERSION = 'maxdataserviceversion'
|
448
|
+
|
449
|
+
# The master Windows Azure Storage header prefix.
|
450
|
+
PREFIX_FOR_STORAGE = 'x-ms-'
|
451
|
+
|
452
|
+
# The client request Id header.
|
453
|
+
CLIENT_REQUEST_ID = 'x-ms-client-request-id'
|
454
|
+
|
455
|
+
# The header that specifies the approximate message count of a queue.
|
456
|
+
APPROXIMATE_MESSAGES_COUNT = 'x-ms-approximate-messages-count'
|
457
|
+
|
458
|
+
# The Authorization header.
|
459
|
+
AUTHORIZATION = 'authorization'
|
460
|
+
|
461
|
+
# The header that specifies public access to blobs.
|
462
|
+
BLOB_PUBLIC_ACCESS = 'x-ms-blob-public-access'
|
463
|
+
|
464
|
+
# The header for the blob type.
|
465
|
+
BLOB_TYPE = 'x-ms-blob-type'
|
466
|
+
|
467
|
+
# The header for the type.
|
468
|
+
TYPE = 'x-ms-type'
|
469
|
+
|
470
|
+
# Specifies the block blob type.
|
471
|
+
BLOCK_BLOB = 'blockblob'
|
472
|
+
|
473
|
+
# The CacheControl header.
|
474
|
+
CACHE_CONTROL = 'cache-control'
|
475
|
+
|
476
|
+
# The header that specifies blob caching control.
|
477
|
+
BLOB_CACHE_CONTROL = 'x-ms-blob-cache-control'
|
478
|
+
|
479
|
+
# The header that specifies caching control.
|
480
|
+
FILE_CACHE_CONTROL = 'x-ms-cache-control'
|
481
|
+
|
482
|
+
# The copy status.
|
483
|
+
COPY_STATUS = 'x-ms-copy-status'
|
484
|
+
|
485
|
+
# The copy completion time
|
486
|
+
COPY_COMPLETION_TIME = 'x-ms-copy-completion-time'
|
487
|
+
|
488
|
+
# The copy status message
|
489
|
+
COPY_STATUS_DESCRIPTION = 'x-ms-copy-status-description'
|
490
|
+
|
491
|
+
# The copy identifier.
|
492
|
+
COPY_ID = 'x-ms-copy-id'
|
493
|
+
|
494
|
+
# Progress of any copy operation
|
495
|
+
COPY_PROGRESS = 'x-ms-copy-progress'
|
496
|
+
|
497
|
+
# The copy action.
|
498
|
+
COPY_ACTION = 'x-ms-copy-action'
|
499
|
+
|
500
|
+
# The ContentID header.
|
501
|
+
CONTENT_ID = 'content-id'
|
502
|
+
|
503
|
+
# The ContentEncoding header.
|
504
|
+
CONTENT_ENCODING = 'content-encoding'
|
505
|
+
|
506
|
+
# The header that specifies blob content encoding.
|
507
|
+
BLOB_CONTENT_ENCODING = 'x-ms-blob-content-encoding'
|
508
|
+
|
509
|
+
# The header that specifies content encoding.
|
510
|
+
FILE_CONTENT_ENCODING = 'x-ms-content-encoding'
|
511
|
+
|
512
|
+
# The ContentLangauge header.
|
513
|
+
CONTENT_LANGUAGE = 'content-language'
|
514
|
+
|
515
|
+
# The header that specifies blob content language.
|
516
|
+
BLOB_CONTENT_LANGUAGE = 'x-ms-blob-content-language'
|
517
|
+
|
518
|
+
# The header that specifies content language.
|
519
|
+
FILE_CONTENT_LANGUAGE = 'x-ms-content-language'
|
520
|
+
|
521
|
+
# The ContentLength header.
|
522
|
+
CONTENT_LENGTH = 'content-length'
|
523
|
+
|
524
|
+
# The header that specifies blob content length.
|
525
|
+
BLOB_CONTENT_LENGTH = 'x-ms-blob-content-length'
|
526
|
+
|
527
|
+
# The header that specifies content length.
|
528
|
+
FILE_CONTENT_LENGTH = 'x-ms-content-length'
|
529
|
+
|
530
|
+
# The ContentDisposition header.
|
531
|
+
CONTENT_DISPOSITION = 'content-disposition'
|
532
|
+
|
533
|
+
# The header that specifies blob content disposition.
|
534
|
+
BLOB_CONTENT_DISPOSITION = 'x-ms-blob-content-disposition'
|
535
|
+
|
536
|
+
# The header that specifies content disposition.
|
537
|
+
FILE_CONTENT_DISPOSITION = 'x-ms-content-disposition'
|
538
|
+
|
539
|
+
# The ContentMD5 header.
|
540
|
+
CONTENT_MD5 = 'content-md5'
|
541
|
+
|
542
|
+
# The header that specifies blob content MD5.
|
543
|
+
BLOB_CONTENT_MD5 = 'x-ms-blob-content-md5'
|
544
|
+
|
545
|
+
# The header that specifies content MD5.
|
546
|
+
FILE_CONTENT_MD5 = 'x-ms-content-md5'
|
547
|
+
|
548
|
+
# The ContentRange header.
|
549
|
+
CONTENT_RANGE = 'cache-range'
|
550
|
+
|
551
|
+
# The ContentType header.
|
552
|
+
CONTENT_TYPE = 'content-type'
|
553
|
+
|
554
|
+
# The header that specifies blob content type.
|
555
|
+
BLOB_CONTENT_TYPE = 'x-ms-blob-content-type'
|
556
|
+
|
557
|
+
# The header that specifies content type.
|
558
|
+
FILE_CONTENT_TYPE = 'x-ms-content-type'
|
559
|
+
|
560
|
+
# The header for copy source.
|
561
|
+
COPY_SOURCE = 'x-ms-copy-source'
|
562
|
+
|
563
|
+
# The header that specifies the date.
|
564
|
+
DATE = 'date'
|
565
|
+
|
566
|
+
# The header that specifies the date.
|
567
|
+
MS_DATE = 'x-ms-date'
|
568
|
+
|
569
|
+
# The header to delete snapshots.
|
570
|
+
DELETE_SNAPSHOT = 'x-ms-delete-snapshots'
|
571
|
+
|
572
|
+
# The ETag header.
|
573
|
+
ETAG = 'etag'
|
574
|
+
|
575
|
+
# The IfMatch header.
|
576
|
+
IF_MATCH = 'if-match'
|
577
|
+
|
578
|
+
# The IfModifiedSince header.
|
579
|
+
IF_MODIFIED_SINCE = 'if-modified-since'
|
580
|
+
|
581
|
+
# The IfNoneMatch header.
|
582
|
+
IF_NONE_MATCH = 'if-none-match'
|
583
|
+
|
584
|
+
# The IfUnmodifiedSince header.
|
585
|
+
IF_UNMODIFIED_SINCE = 'if-unmodified-since'
|
586
|
+
|
587
|
+
# Specifies snapshots are to be included.
|
588
|
+
INCLUDE_SNAPSHOTS_VALUE = 'include'
|
589
|
+
|
590
|
+
# Specifies that the content-type is JSON.
|
591
|
+
JSON_CONTENT_TYPE_VALUE = 'application/json;'
|
592
|
+
|
593
|
+
|
594
|
+
# The header that specifies lease ID.
|
595
|
+
LEASE_ID = 'x-ms-lease-id'
|
596
|
+
|
597
|
+
# The header that specifies the lease break period.
|
598
|
+
LEASE_BREAK_PERIOD = 'x-ms-lease-break-period'
|
599
|
+
|
600
|
+
# The header that specifies the proposed lease identifier.
|
601
|
+
PROPOSED_LEASE_ID = 'x-ms-proposed-lease-id'
|
602
|
+
|
603
|
+
# The header that specifies the lease duration.
|
604
|
+
LEASE_DURATION = 'x-ms-lease-duration'
|
605
|
+
|
606
|
+
# The header that specifies the source lease ID.
|
607
|
+
SOURCE_LEASE_ID = 'x-ms-source-lease-id'
|
608
|
+
|
609
|
+
# The header that specifies lease time.
|
610
|
+
LEASE_TIME = 'x-ms-lease-time'
|
611
|
+
|
612
|
+
# The header that specifies lease status.
|
613
|
+
LEASE_STATUS = 'x-ms-lease-status'
|
614
|
+
|
615
|
+
# The header that specifies lease state.
|
616
|
+
LEASE_STATE = 'x-ms-lease-state'
|
617
|
+
|
618
|
+
# Specifies the page blob type.
|
619
|
+
PAGE_BLOB = 'PageBlob'
|
620
|
+
|
621
|
+
# The header that specifies page write mode.
|
622
|
+
PAGE_WRITE = 'x-ms-page-write'
|
623
|
+
|
624
|
+
# The header that specifies file range write mode.
|
625
|
+
FILE_WRITE = 'x-ms-write'
|
626
|
+
|
627
|
+
# The header that specifies whether the response should include the inserted entity.
|
628
|
+
PREFER = 'Prefer'
|
629
|
+
|
630
|
+
# The header value which specifies that the response should include the inserted entity.
|
631
|
+
PREFER_CONTENT = 'return-content'
|
632
|
+
|
633
|
+
# The header value which specifies that the response should not include the inserted entity.
|
634
|
+
PREFER_NO_CONTENT = 'return-no-content'
|
635
|
+
|
636
|
+
# The header prefix for metadata.
|
637
|
+
PREFIX_FOR_STORAGE_METADATA = 'x-ms-meta-'
|
638
|
+
|
639
|
+
# The header prefix for properties.
|
640
|
+
PREFIX_FOR_STORAGE_PROPERTIES = 'x-ms-prop-'
|
641
|
+
|
642
|
+
# The Range header.
|
643
|
+
RANGE = 'Range'
|
644
|
+
|
645
|
+
# The header that specifies if the request will populate the ContentMD5 header for range gets.
|
646
|
+
RANGE_GET_CONTENT_MD5 = 'x-ms-range-get-content-md5'
|
647
|
+
|
648
|
+
# The format string for specifying ranges.
|
649
|
+
RANGE_HEADER_FORMAT = 'bytes:%d-%d'
|
650
|
+
|
651
|
+
# The header that indicates the request ID.
|
652
|
+
REQUEST_ID = 'x-ms-request-id'
|
653
|
+
|
654
|
+
# The header for specifying the sequence number.
|
655
|
+
SEQUENCE_NUMBER = 'x-ms-blob-sequence-number'
|
656
|
+
|
657
|
+
# The header for specifying the If-Sequence-Number-EQ condition.
|
658
|
+
SEQUENCE_NUMBER_EQUAL = 'x-ms-if-sequence-number-eq'
|
659
|
+
|
660
|
+
# The header for specifying the If-Sequence-Number-LT condition.
|
661
|
+
SEQUENCE_NUMBER_LESS_THAN = 'x-ms-if-sequence-number-lt'
|
662
|
+
|
663
|
+
# The header for specifying the If-Sequence-Number-LE condition.
|
664
|
+
SEQUENCE_NUMBER_LESS_THAN_OR_EQUAL = 'x-ms-if-sequence-number-le'
|
665
|
+
|
666
|
+
# The header that specifies sequence number action.
|
667
|
+
SEQUENCE_NUMBER_ACTION = 'x-ms-sequence-number-action'
|
668
|
+
|
669
|
+
# The header for the blob content length.
|
670
|
+
SIZE = 'x-ms-blob-content-length'
|
671
|
+
|
672
|
+
# The header for snapshots.
|
673
|
+
SNAPSHOT = 'x-ms-snapshot'
|
674
|
+
|
675
|
+
# Specifies only snapshots are to be included.
|
676
|
+
SNAPSHOTS_ONLY_VALUE = 'only'
|
677
|
+
|
678
|
+
# The header for the If-Match condition.
|
679
|
+
SOURCE_IF_MATCH = 'x-ms-source-if-match'
|
680
|
+
|
681
|
+
# The header for the If-Modified-Since condition.
|
682
|
+
SOURCE_IF_MODIFIED_SINCE = 'x-ms-source-if-modified-since'
|
683
|
+
|
684
|
+
# The header for the If-None-Match condition.
|
685
|
+
SOURCE_IF_NONE_MATCH = 'x-ms-source-if-none-match'
|
686
|
+
|
687
|
+
# The header for the If-Unmodified-Since condition.
|
688
|
+
SOURCE_IF_UNMODIFIED_SINCE = 'x-ms-source-if-unmodified-since'
|
689
|
+
|
690
|
+
# The header for data ranges.
|
691
|
+
STORAGE_RANGE = 'x-ms-range'
|
692
|
+
|
693
|
+
# The header for storage version.
|
694
|
+
STORAGE_VERSION = 'x-ms-version'
|
695
|
+
|
696
|
+
# The UserAgent header.
|
697
|
+
USER_AGENT = 'user-agent'
|
698
|
+
|
699
|
+
# The pop receipt header.
|
700
|
+
POP_RECEIPT = 'x-ms-popreceipt'
|
701
|
+
|
702
|
+
# The time next visibile header.
|
703
|
+
TIME_NEXT_VISIBLE = 'x-ms-time-next-visible'
|
704
|
+
|
705
|
+
# The approximate message counter header.
|
706
|
+
APPROXIMATE_MESSAGE_COUNT = 'x-ms-approximate-message-count'
|
707
|
+
|
708
|
+
# The lease action header.
|
709
|
+
LEASE_ACTION = 'x-ms-lease-action'
|
710
|
+
|
711
|
+
# The accept header.
|
712
|
+
ACCEPT = 'accept'
|
713
|
+
|
714
|
+
# The accept charset header.
|
715
|
+
ACCEPT_CHARSET = 'Accept-Charset'
|
716
|
+
|
717
|
+
# The host header.
|
718
|
+
HOST = 'host'
|
719
|
+
|
720
|
+
# The correlation identifier header.
|
721
|
+
CORRELATION_ID = 'x-ms-correlation-id'
|
722
|
+
|
723
|
+
# The group identifier header.
|
724
|
+
GROUP_ID = 'x-ms-group-id'
|
725
|
+
|
726
|
+
# The share quota header.
|
727
|
+
SHARE_QUOTA = 'x-ms-share-quota'
|
728
|
+
|
729
|
+
# The max blob size header.
|
730
|
+
BLOB_CONDITION_MAX_SIZE = 'x-ms-blob-condition-maxsize'
|
731
|
+
|
732
|
+
# The append blob position header.
|
733
|
+
BLOB_CONDITION_APPEND_POSITION = 'x-ms-blob-condition-appendpos'
|
734
|
+
|
735
|
+
# The append blob append offset header.
|
736
|
+
BLOB_APPEND_OFFSET = 'x-ms-blob-append-offset'
|
737
|
+
|
738
|
+
# The append blob committed block header.
|
739
|
+
BLOB_COMMITTED_BLOCK_COUNT = 'x-ms-blob-committed-block-count'
|
740
|
+
end
|
741
|
+
|
742
|
+
module QueryStringConstants
|
743
|
+
|
744
|
+
# Query component for SAS API version.
|
745
|
+
API_VERSION = 'api-version'
|
746
|
+
|
747
|
+
# The Comp value.
|
748
|
+
COMP = 'comp'
|
749
|
+
|
750
|
+
# The Res Type.
|
751
|
+
RESTYPE = 'restype'
|
752
|
+
|
753
|
+
# The copy Id.
|
754
|
+
COPY_ID = 'copyid'
|
755
|
+
|
756
|
+
# The Snapshot value.
|
757
|
+
SNAPSHOT = 'snapshot'
|
758
|
+
|
759
|
+
# The timeout value.
|
760
|
+
TIMEOUT = 'timeout'
|
761
|
+
|
762
|
+
# The signed start time query string argument for shared access signature.
|
763
|
+
SIGNED_START = 'st'
|
764
|
+
|
765
|
+
# The signed expiry time query string argument for shared access signature.
|
766
|
+
SIGNED_EXPIRY = 'se'
|
767
|
+
|
768
|
+
# The signed resource query string argument for shared access signature.
|
769
|
+
SIGNED_RESOURCE = 'sr'
|
770
|
+
|
771
|
+
# The signed permissions query string argument for shared access signature.
|
772
|
+
SIGNED_PERMISSIONS = 'sp'
|
773
|
+
|
774
|
+
# The signed identifier query string argument for shared access signature.
|
775
|
+
SIGNED_IDENTIFIER = 'si'
|
776
|
+
|
777
|
+
# The signature query string argument for shared access signature.
|
778
|
+
SIGNATURE = 'sig'
|
779
|
+
|
780
|
+
# The signed version argument for shared access signature.
|
781
|
+
SIGNED_VERSION = 'sv'
|
782
|
+
|
783
|
+
# The cache control argument for shared access signature.
|
784
|
+
CACHE_CONTROL = 'rscc'
|
785
|
+
|
786
|
+
# The content type argument for shared access signature.
|
787
|
+
CONTENT_TYPE = 'rsct'
|
788
|
+
|
789
|
+
# The content encoding argument for shared access signature.
|
790
|
+
CONTENT_ENCODING = 'rsce'
|
791
|
+
|
792
|
+
# The content language argument for shared access signature.
|
793
|
+
CONTENT_LANGUAGE = 'rscl'
|
794
|
+
|
795
|
+
# The content disposition argument for shared access signature.
|
796
|
+
CONTENT_DISPOSITION = 'rscd'
|
797
|
+
|
798
|
+
# The block identifier query string argument for blob service.
|
799
|
+
BLOCK_ID = 'blockid'
|
800
|
+
|
801
|
+
# The block list type query string argument for blob service.
|
802
|
+
BLOCK_LIST_TYPE = 'blocklisttype'
|
803
|
+
|
804
|
+
# The prefix query string argument for listing operations.
|
805
|
+
PREFIX = 'prefix'
|
806
|
+
|
807
|
+
# The marker query string argument for listing operations.
|
808
|
+
MARKER = 'marker'
|
809
|
+
|
810
|
+
# The maxresults query string argument for listing operations.
|
811
|
+
MAX_RESULTS = 'maxresults'
|
812
|
+
|
813
|
+
# The delimiter query string argument for listing operations.
|
814
|
+
DELIMITER = 'delimiter'
|
815
|
+
|
816
|
+
# The include query string argument for listing operations.
|
817
|
+
INCLUDE = 'include'
|
818
|
+
|
819
|
+
# The peekonly query string argument for queue service.
|
820
|
+
PEEK_ONLY = 'peekonly'
|
821
|
+
|
822
|
+
# The numofmessages query string argument for queue service.
|
823
|
+
NUM_OF_MESSAGES = 'numofmessages'
|
824
|
+
|
825
|
+
# The popreceipt query string argument for queue service.
|
826
|
+
POP_RECEIPT = 'popreceipt'
|
827
|
+
|
828
|
+
# The visibilitytimeout query string argument for queue service.
|
829
|
+
VISIBILITY_TIMEOUT = 'visibilitytimeout'
|
830
|
+
|
831
|
+
# The messagettl query string argument for queue service.
|
832
|
+
MESSAGE_TTL = 'messagettl'
|
833
|
+
|
834
|
+
# The select query string argument.
|
835
|
+
SELECT = '$select'
|
836
|
+
|
837
|
+
# The filter query string argument.
|
838
|
+
FILTER = '$filter'
|
839
|
+
|
840
|
+
# The top query string argument.
|
841
|
+
TOP = '$top'
|
842
|
+
|
843
|
+
# The skip query string argument.
|
844
|
+
SKIP = '$skip'
|
845
|
+
|
846
|
+
# The next partition key query string argument for table service.
|
847
|
+
NEXT_PARTITION_KEY = 'NextPartitionKey'
|
848
|
+
|
849
|
+
# The next row key query string argument for table service.
|
850
|
+
NEXT_ROW_KEY = 'NextRowKey'
|
851
|
+
|
852
|
+
# The lock identifier for service bus messages.
|
853
|
+
LOCK_ID = 'lockid'
|
854
|
+
|
855
|
+
# The table name for table SAS URI's.
|
856
|
+
TABLENAME = 'tn'
|
857
|
+
|
858
|
+
# The starting Partition Key for tableSAS URI's.
|
859
|
+
STARTPK = 'spk'
|
860
|
+
|
861
|
+
# The starting Partition Key for tableSAS URI's.
|
862
|
+
STARTRK = 'srk'
|
863
|
+
|
864
|
+
# The ending Partition Key for tableSAS URI's.
|
865
|
+
ENDPK = 'epk'
|
866
|
+
|
867
|
+
# The ending Partition Key for tableSAS URI's.
|
868
|
+
ENDRK = 'erk'
|
869
|
+
end
|
870
|
+
|
871
|
+
module StorageServiceClientConstants
|
872
|
+
# The default protocol.
|
873
|
+
DEFAULT_PROTOCOL = 'https'
|
874
|
+
|
875
|
+
# Default credentials.
|
876
|
+
DEVSTORE_STORAGE_ACCOUNT = 'devstoreaccount1'
|
877
|
+
DEVSTORE_STORAGE_ACCESS_KEY = 'Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=='
|
878
|
+
|
879
|
+
# The development store URI.
|
880
|
+
DEV_STORE_URI = 'http://127.0.0.1'
|
881
|
+
|
882
|
+
# Development ServiceClient URLs.
|
883
|
+
DEVSTORE_BLOB_HOST_PORT = '10000'
|
884
|
+
DEVSTORE_QUEUE_HOST_PORT = '10001'
|
885
|
+
DEVSTORE_TABLE_HOST_PORT = '10002'
|
886
|
+
DEVSTORE_FILE_HOST_PORT = '10003'
|
887
|
+
|
888
|
+
DEFAULT_ENDPOINT_SUFFIX = 'core.windows.net'
|
889
|
+
end
|
890
|
+
|
891
|
+
module HttpConstants
|
892
|
+
# Http Verbs
|
893
|
+
module HttpVerbs
|
894
|
+
PUT = 'PUT'
|
895
|
+
GET = 'GET'
|
896
|
+
DELETE = 'DELETE'
|
897
|
+
POST = 'POST'
|
898
|
+
MERGE = 'MERGE'
|
899
|
+
HEAD = 'HEAD'
|
900
|
+
end
|
901
|
+
|
902
|
+
# Response codes.
|
903
|
+
module HttpResponseCodes
|
904
|
+
Ok = 200
|
905
|
+
Created = 201
|
906
|
+
Accepted = 202
|
907
|
+
NoContent = 204
|
908
|
+
PartialContent = 206
|
909
|
+
BadRequest = 400
|
910
|
+
Unauthorized = 401
|
911
|
+
Forbidden = 403
|
912
|
+
NotFound = 404
|
913
|
+
Conflict = 409
|
914
|
+
LengthRequired = 411
|
915
|
+
PreconditionFailed = 412
|
916
|
+
end
|
917
|
+
end
|
918
|
+
|
919
|
+
module BlobErrorCodeStrings
|
920
|
+
INVALID_BLOCK_ID = 'InvalidBlockId'
|
921
|
+
BLOB_NOT_FOUND = 'BlobNotFound'
|
922
|
+
BLOB_ALREADY_EXISTS = 'BlobAlreadyExists'
|
923
|
+
CONTAINER_ALREADY_EXISTS = 'ContainerAlreadyExists'
|
924
|
+
CONTAINER_NOT_FOUND = 'ContainerNotFound'
|
925
|
+
INVALID_BLOB_OR_BLOCK = 'InvalidBlobOrBlock'
|
926
|
+
INVALID_BLOCK_LIST = 'InvalidBlockList'
|
927
|
+
end
|
928
|
+
|
929
|
+
module FileErrorCodeStrings
|
930
|
+
SHARE_ALREADY_EXISTS = 'ShareAlreadyExists'
|
931
|
+
SHARE_NOT_FOUND = 'ShareNotFound'
|
932
|
+
FILE_NOT_FOUND = 'FileNotFound'
|
933
|
+
end
|
934
|
+
|
935
|
+
module QueueErrorCodeStrings
|
936
|
+
QUEUE_NOT_FOUND = 'QueueNotFound'
|
937
|
+
QUEUE_DISABLED = 'QueueDisabled'
|
938
|
+
QUEUE_ALREADY_EXISTS = 'QueueAlreadyExists'
|
939
|
+
QUEUE_NOT_EMPTY = 'QueueNotEmpty'
|
940
|
+
QUEUE_BEING_DELETED = 'QueueBeingDeleted'
|
941
|
+
POP_RECEIPT_MISMATCH = 'PopReceiptMismatch'
|
942
|
+
INVALID_PARAMETER = 'InvalidParameter'
|
943
|
+
MESSAGE_NOT_FOUND = 'MessageNotFound'
|
944
|
+
MESSAGE_TOO_LARGE = 'MessageTooLarge'
|
945
|
+
INVALID_MARKER = 'InvalidMarker'
|
946
|
+
end
|
947
|
+
|
948
|
+
# Constants for storage error strings
|
949
|
+
# More details are at = http://msdn.microsoft.com/en-us/library/azure/dd179357.aspx
|
950
|
+
module StorageErrorCodeStrings
|
951
|
+
# Not Modified (304) = The condition specified in the conditional header(s) was not met for a read operation.
|
952
|
+
# Precondition Failed (412) = The condition specified in the conditional header(s) was not met for a write operation.
|
953
|
+
CONDITION_NOT_MET = 'ConditionNotMet'
|
954
|
+
# Bad Request (400) = A required HTTP header was not specified.
|
955
|
+
MISSING_REQUIRED_HEADER = 'MissingRequiredHeader'
|
956
|
+
# Bad Request (400) = A required XML node was not specified in the request body.
|
957
|
+
MISSING_REQUIRED_XML_NODE = 'MissingRequiredXmlNode'
|
958
|
+
# Bad Request (400) = One of the HTTP headers specified in the request is not supported.
|
959
|
+
UNSUPPORTED_HEADER = 'UnsupportedHeader'
|
960
|
+
# Bad Request (400) = One of the XML nodes specified in the request body is not supported.
|
961
|
+
UNSUPPORTED_XML_NODE = 'UnsupportedXmlNode'
|
962
|
+
# Bad Request (400) = The value provided for one of the HTTP headers was not in the correct format.
|
963
|
+
INVALID_HEADER_VALUE = 'InvalidHeaderValue'
|
964
|
+
# Bad Request (400) = The value provided for one of the XML nodes in the request body was not in the correct format.
|
965
|
+
INVALID_XML_NODE_VALUE = 'InvalidXmlNodeValue'
|
966
|
+
# Bad Request (400) = A required query parameter was not specified for this request.
|
967
|
+
MISSING_REQUIRED_QUERY_PARAMETER = 'MissingRequiredQueryParameter'
|
968
|
+
# Bad Request (400) = One of the query parameters specified in the request URI is not supported.
|
969
|
+
UNSUPPORTED_QUERY_PARAMETER = 'UnsupportedQueryParameter'
|
970
|
+
# Bad Request (400) = An invalid value was specified for one of the query parameters in the request URI.
|
971
|
+
INVALID_QUERY_PARAMETER_VALUE = 'InvalidQueryParameterValue'
|
972
|
+
# Bad Request (400) = A query parameter specified in the request URI is outside the permissible range.
|
973
|
+
OUT_OF_RANGE_QUERY_PARAMETER_VALUE = 'OutOfRangeQueryParameterValue'
|
974
|
+
# Bad Request (400) = The url in the request could not be parsed.
|
975
|
+
REQUEST_URL_FAILED_TO_PARSE = 'RequestUrlFailedToParse'
|
976
|
+
# Bad Request (400) = The requested URI does not represent any resource on the server.
|
977
|
+
INVALID_URI = 'InvalidUri'
|
978
|
+
# Bad Request (400) = The HTTP verb specified was not recognized by the server.
|
979
|
+
INVALID_HTTP_VERB = 'InvalidHttpVerb'
|
980
|
+
# Bad Request (400) = The key for one of the metadata key-value pairs is empty.
|
981
|
+
EMPTY_METADATA_KEY = 'EmptyMetadataKey'
|
982
|
+
# Bad Request (400) = The specified XML is not syntactically valid.
|
983
|
+
INVALID_XML_DOCUMENT = 'InvalidXmlDocument'
|
984
|
+
# Bad Request (400) = The MD5 value specified in the request did not match the MD5 value calculated by the server.
|
985
|
+
MD5_MISMATCH = 'Md5Mismatch'
|
986
|
+
# Bad Request (400) = The MD5 value specified in the request is invalid. The MD5 value must be 128 bits and Base64-encoded.
|
987
|
+
INVALID_MD5 = 'InvalidMd5'
|
988
|
+
# Bad Request (400) = One of the request inputs is out of range.
|
989
|
+
OUT_OF_RANGE_INPUT = 'OutOfRangeInput'
|
990
|
+
# Bad Request (400) = The authentication information was not provided in the correct format. Verify the value of Authorization header.
|
991
|
+
INVALID_AUTHENTICATION_INFO = 'InvalidAuthenticationInfo'
|
992
|
+
# Bad Request (400) = One of the request inputs is not valid.
|
993
|
+
INVALID_INPUT = 'InvalidInput'
|
994
|
+
# Bad Request (400) = The specified metadata is invalid. It includes characters that are not permitted.
|
995
|
+
INVALID_METADATA = 'InvalidMetadata'
|
996
|
+
# Bad Request (400) = The specifed resource name contains invalid characters.
|
997
|
+
INVALID_RESOURCE_NAME = 'InvalidResourceName'
|
998
|
+
# Bad Request (400) = The size of the specified metadata exceeds the maximum size permitted.
|
999
|
+
METADATA_TOO_LARGE = 'MetadataTooLarge'
|
1000
|
+
# Bad Request (400) = Condition headers are not supported.
|
1001
|
+
CONDITION_HEADER_NOT_SUPPORTED = 'ConditionHeadersNotSupported'
|
1002
|
+
# Bad Request (400) = Multiple condition headers are not supported.
|
1003
|
+
MULTIPLE_CONDITION_HEADER_NOT_SUPPORTED = 'MultipleConditionHeadersNotSupported'
|
1004
|
+
# Forbidden (403) = Server failed to authenticate the request. Make sure the value of the Authorization header is formed correctly including the signature.
|
1005
|
+
AUTHENTICATION_FAILED = 'AuthenticationFailed'
|
1006
|
+
# Forbidden (403) = Read-access geo-redundant replication is not enabled for the account.
|
1007
|
+
# Forbidden (403) = Write operations to the secondary location are not allowed.
|
1008
|
+
# Forbidden (403) = The account being accessed does not have sufficient permissions to execute this operation.
|
1009
|
+
INSUFFICIENT_ACCOUNT_PERMISSIONS = 'InsufficientAccountPermissions'
|
1010
|
+
# Not Found (404) = The specified resource does not exist.
|
1011
|
+
RESOURCE_NOT_FOUND = 'ResourceNotFound'
|
1012
|
+
# Forbidden (403) = The specified account is disabled.
|
1013
|
+
ACCOUNT_IS_DISABLED = 'AccountIsDisabled'
|
1014
|
+
# Method Not Allowed (405) = The resource doesn't support the specified HTTP verb.
|
1015
|
+
UNSUPPORTED_HTTP_VERB = 'UnsupportedHttpVerb'
|
1016
|
+
# Conflict (409) = The specified account already exists.
|
1017
|
+
ACCOUNT_ALREADY_EXISTS = 'AccountAlreadyExists'
|
1018
|
+
# Conflict (409) = The specified account is in the process of being created.
|
1019
|
+
ACCOUNT_BEING_CREATED = 'AccountBeingCreated'
|
1020
|
+
# Conflict (409) = The specified resource already exists.
|
1021
|
+
RESOURCE_ALREADY_EXISTS = 'ResourceAlreadyExists'
|
1022
|
+
# Conflict (409) = The specified resource type does not match the type of the existing resource.
|
1023
|
+
RESOURCE_TYPE_MISMATCH = 'ResourceTypeMismatch'
|
1024
|
+
# Length Required (411) = The Content-Length header was not specified.
|
1025
|
+
MISSING_CONTENT_LENGTH_HEADER = 'MissingContentLengthHeader'
|
1026
|
+
# Request Entity Too Large (413) = The size of the request body exceeds the maximum size permitted.
|
1027
|
+
REQUEST_BODY_TOO_LARGE = 'RequestBodyTooLarge'
|
1028
|
+
# Requested Range Not Satisfiable (416) = The range specified is invalid for the current size of the resource.
|
1029
|
+
INVALID_RANGE = 'InvalidRange'
|
1030
|
+
# Internal Server Error (500) = The server encountered an internal error. Please retry the request.
|
1031
|
+
INTERNAL_ERROR = 'InternalError'
|
1032
|
+
# Internal Server Error (500) = The operation could not be completed within the permitted time.
|
1033
|
+
OPERATION_TIMED_OUT = 'OperationTimedOut'
|
1034
|
+
# Service Unavailable (503) = The server is currently unable to receive requests. Please retry your request.
|
1035
|
+
SERVER_BUSY = 'ServerBusy'
|
1036
|
+
|
1037
|
+
# Legacy error code strings
|
1038
|
+
UPDATE_CONDITION_NOT_SATISFIED = 'UpdateConditionNotSatisfied'
|
1039
|
+
CONTAINER_NOT_FOUND = 'ContainerNotFound'
|
1040
|
+
CONTAINER_ALREADY_EXISTS = 'ContainerAlreadyExists'
|
1041
|
+
CONTAINER_DISABLED = 'ContainerDisabled'
|
1042
|
+
CONTAINER_BEING_DELETED = 'ContainerBeingDeleted'
|
1043
|
+
end
|
1044
|
+
|
1045
|
+
module TableErrorCodeStrings
|
1046
|
+
XMETHOD_NOT_USING_POST = 'XMethodNotUsingPost'
|
1047
|
+
XMETHOD_INCORRECT_VALUE = 'XMethodIncorrectValue'
|
1048
|
+
XMETHOD_INCORRECT_COUNT = 'XMethodIncorrectCount'
|
1049
|
+
TABLE_HAS_NO_PROPERTIES = 'TableHasNoProperties'
|
1050
|
+
DUPLICATE_PROPERTIES_SPECIFIED = 'DuplicatePropertiesSpecified'
|
1051
|
+
TABLE_HAS_NO_SUCH_PROPERTY = 'TableHasNoSuchProperty'
|
1052
|
+
DUPLICATE_KEY_PROPERTY_SPECIFIED = 'DuplicateKeyPropertySpecified'
|
1053
|
+
TABLE_ALREADY_EXISTS = 'TableAlreadyExists'
|
1054
|
+
TABLE_NOT_FOUND = 'TableNotFound'
|
1055
|
+
ENTITY_NOT_FOUND = 'EntityNotFound'
|
1056
|
+
ENTITY_ALREADY_EXISTS = 'EntityAlreadyExists'
|
1057
|
+
PARTITION_KEY_NOT_SPECIFIED = 'PartitionKeyNotSpecified'
|
1058
|
+
OPERATOR_INVALID = 'OperatorInvalid'
|
1059
|
+
UPDATE_CONDITION_NOT_SATISFIED = 'UpdateConditionNotSatisfied'
|
1060
|
+
PROPERTIES_NEED_VALUE = 'PropertiesNeedValue'
|
1061
|
+
PARTITION_KEY_PROPERTY_CANNOT_BE_UPDATED = 'PartitionKeyPropertyCannotBeUpdated'
|
1062
|
+
TOO_MANY_PROPERTIES = 'TooManyProperties'
|
1063
|
+
ENTITY_TOO_LARGE = 'EntityTooLarge'
|
1064
|
+
PROPERTY_VALUE_TOO_LARGE = 'PropertyValueTooLarge'
|
1065
|
+
INVALID_VALUE_TYPE = 'InvalidValueType'
|
1066
|
+
TABLE_BEING_DELETED = 'TableBeingDeleted'
|
1067
|
+
TABLE_SERVER_OUT_OF_MEMORY = 'TableServerOutOfMemory'
|
1068
|
+
PRIMARY_KEY_PROPERTY_IS_INVALID_TYPE = 'PrimaryKeyPropertyIsInvalidType'
|
1069
|
+
PROPERTY_NAME_TOO_LONG = 'PropertyNameTooLong'
|
1070
|
+
PROPERTY_NAME_INVALID = 'PropertyNameInvalid'
|
1071
|
+
BATCH_OPERATION_NOT_SUPPORTED = 'BatchOperationNotSupported'
|
1072
|
+
JSON_FORMAT_NOT_SUPPORTED = 'JsonFormatNotSupported'
|
1073
|
+
METHOD_NOT_ALLOWED = 'MethodNotAllowed'
|
1074
|
+
NOT_IMPLEMENTED = 'NotImplemented'
|
1075
|
+
end
|
1076
|
+
|
1077
|
+
end
|