azure 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/azure.gemspec +1 -1
- data/lib/azure.rb +1 -0
- data/lib/azure/blob/blob.rb +1 -1
- data/lib/azure/blob/blob_service.rb +14 -9
- data/lib/azure/blob/block.rb +2 -2
- data/lib/azure/blob/serialization.rb +6 -6
- data/lib/azure/configurable.rb +8 -0
- data/lib/azure/core/filtered_service.rb +1 -1
- data/lib/azure/core/http/debug_filter.rb +2 -2
- data/lib/azure/core/http/http_error.rb +1 -1
- data/lib/azure/core/http/http_filter.rb +15 -15
- data/lib/azure/core/http/http_request.rb +6 -6
- data/lib/azure/core/http/http_response.rb +1 -1
- data/lib/azure/core/http/retry_policy.rb +12 -12
- data/lib/azure/core/http/signer_filter.rb +1 -1
- data/lib/azure/core/service.rb +1 -1
- data/lib/azure/queue/queue_service.rb +91 -91
- data/lib/azure/queue/serialization.rb +1 -1
- data/lib/azure/service/cors.rb +1 -1
- data/lib/azure/service/logging.rb +1 -1
- data/lib/azure/service/metrics.rb +1 -1
- data/lib/azure/service/serialization.rb +10 -10
- data/lib/azure/service/signed_identifier.rb +1 -1
- data/lib/azure/service/storage_service.rb +2 -2
- data/lib/azure/service_bus/auth/wrap_service.rb +2 -2
- data/lib/azure/service_bus/brokered_message.rb +6 -6
- data/lib/azure/service_bus/interval.rb +2 -2
- data/lib/azure/service_bus/queue.rb +11 -11
- data/lib/azure/service_bus/relay.rb +4 -4
- data/lib/azure/service_bus/resource.rb +1 -1
- data/lib/azure/service_bus/rule.rb +1 -1
- data/lib/azure/service_bus/serialization.rb +2 -2
- data/lib/azure/service_bus/service_bus_service.rb +92 -92
- data/lib/azure/service_bus/sql_filter.rb +1 -1
- data/lib/azure/service_bus/sql_rule_action.rb +3 -3
- data/lib/azure/service_bus/subscription.rb +1 -1
- data/lib/azure/service_bus/topic.rb +11 -11
- data/lib/azure/storage_management/storage_management_service.rb +2 -2
- data/lib/azure/table/batch.rb +28 -28
- data/lib/azure/table/batch_response.rb +5 -5
- data/lib/azure/table/edmtype.rb +1 -1
- data/lib/azure/table/entity.rb +2 -2
- data/lib/azure/table/query.rb +6 -6
- data/lib/azure/table/serialization.rb +4 -4
- data/lib/azure/table/table_service.rb +30 -30
- data/lib/azure/version.rb +1 -1
- data/lib/azure/virtual_machine_management/virtual_machine_management_service.rb +5 -4
- data/lib/azure/virtual_network_management/serialization.rb +2 -2
- data/test/fixtures/list_os_images.xml +1 -1
- data/test/fixtures/list_virtual_networks.xml +0 -1
- data/test/fixtures/management_certificate.pem +55 -0
- data/test/fixtures/management_certificate.publishsettings +12 -0
- data/test/fixtures/updated_storage_accounts.xml +8 -8
- data/test/integration/blob/blob_metadata_test.rb +5 -5
- data/test/integration/blob/blob_pages_test.rb +5 -5
- data/test/integration/blob/blob_properties_test.rb +3 -3
- data/test/integration/blob/block_blob_test.rb +64 -15
- data/test/integration/blob/container/container_acl_test.rb +2 -2
- data/test/integration/blob/container/container_metadata_test.rb +2 -2
- data/test/integration/blob/container/create_container_test.rb +3 -3
- data/test/integration/blob/container/delete_container_test.rb +1 -1
- data/test/integration/blob/container/get_container_properties_test.rb +2 -2
- data/test/integration/blob/container/list_containers_test.rb +3 -3
- data/test/integration/blob/copy_blob_test.rb +4 -4
- data/test/integration/blob/create_blob_snapshot_test.rb +2 -2
- data/test/integration/blob/create_page_blob_test.rb +2 -2
- data/test/integration/blob/delete_blob_test.rb +4 -4
- data/test/integration/blob/get_blob_test.rb +7 -7
- data/test/integration/blob/informative_errors_test.rb +2 -2
- data/test/integration/blob/lease/acquire_lease_test.rb +1 -1
- data/test/integration/blob/lease/break_lease_test.rb +2 -2
- data/test/integration/blob/lease/release_lease_test.rb +2 -2
- data/test/integration/blob/lease/renew_lease_test.rb +2 -2
- data/test/integration/blob/list_blobs_test.rb +1 -1
- data/test/integration/database/delete_sql_server_firewall_test.rb +0 -1
- data/test/integration/database/delete_sql_server_test.rb +0 -1
- data/test/integration/location/Location_List_test.rb +0 -1
- data/test/integration/location/RoleSize_List_test.rb +0 -1
- data/test/integration/queue/clear_messages_test.rb +3 -3
- data/test/integration/queue/create_message_test.rb +5 -5
- data/test/integration/queue/create_queue_test.rb +1 -1
- data/test/integration/queue/delete_message_test.rb +4 -4
- data/test/integration/queue/delete_queue_test.rb +1 -1
- data/test/integration/queue/informative_errors_test.rb +2 -2
- data/test/integration/queue/list_messages_encoded_test.rb +2 -2
- data/test/integration/queue/list_messages_test.rb +3 -3
- data/test/integration/queue/list_queues_test.rb +1 -1
- data/test/integration/queue/peek_messages_test.rb +3 -3
- data/test/integration/queue/queue_metadata_test.rb +4 -4
- data/test/integration/queue/update_message_test.rb +4 -4
- data/test/integration/service_bus/informative_errors_test.rb +1 -1
- data/test/integration/service_bus/queues_test.rb +6 -6
- data/test/integration/service_bus/relay_test.rb +3 -3
- data/test/integration/service_bus/rules_test.rb +2 -2
- data/test/integration/service_bus/subscriptions_test.rb +4 -4
- data/test/integration/service_bus/topics_test.rb +2 -2
- data/test/integration/table/delete_entity_batch_test.rb +3 -3
- data/test/integration/table/delete_entity_test.rb +3 -3
- data/test/integration/table/delete_table_test.rb +1 -1
- data/test/integration/table/get_table_test.rb +4 -4
- data/test/integration/table/informative_errors_test.rb +2 -2
- data/test/integration/table/insert_entity_batch_test.rb +3 -3
- data/test/integration/table/insert_entity_test.rb +3 -3
- data/test/integration/table/insert_or_merge_entity_batch_test.rb +7 -7
- data/test/integration/table/insert_or_merge_entity_test.rb +8 -8
- data/test/integration/table/insert_or_replace_entity_batch_test.rb +7 -7
- data/test/integration/table/insert_or_replace_entity_test.rb +7 -7
- data/test/integration/table/merge_entity_batch_test.rb +1 -1
- data/test/integration/table/merge_entity_test.rb +1 -1
- data/test/integration/table/query_entities_test.rb +21 -21
- data/test/integration/table/query_tables_test.rb +2 -2
- data/test/integration/table/query_test.rb +21 -21
- data/test/integration/table/table_acl_test.rb +4 -4
- data/test/integration/table/update_entity_batch_test.rb +6 -6
- data/test/integration/table/update_entity_test.rb +8 -8
- data/test/unit/config/azure_test.rb +19 -0
- data/test/unit/core/auth/shared_key_lite_test.rb +3 -3
- data/test/unit/core/auth/shared_key_test.rb +2 -2
- data/test/unit/service/serialization_test.rb +44 -44
- metadata +4 -6
- data/.gitignore +0 -30
- data/.travis.yml +0 -13
- data/ChangeLog.txt +0 -56
- data/README.md +0 -702
data/lib/azure/service/cors.rb
CHANGED
|
@@ -40,7 +40,7 @@ module Azure
|
|
|
40
40
|
if xml.SignedIdentifier.count == 0
|
|
41
41
|
identifiers.push(signed_identifier_from_xml(xml.SignedIdentifier))
|
|
42
42
|
else
|
|
43
|
-
xml.SignedIdentifier.each { |identifier_node|
|
|
43
|
+
xml.SignedIdentifier.each { |identifier_node|
|
|
44
44
|
identifiers.push(signed_identifier_from_xml(identifier_node))
|
|
45
45
|
}
|
|
46
46
|
end
|
|
@@ -91,7 +91,7 @@ module Azure
|
|
|
91
91
|
xml = slopify(xml)
|
|
92
92
|
expect_node("EnumerationResults", xml)
|
|
93
93
|
|
|
94
|
-
results = results || EnumerationResults.new;
|
|
94
|
+
results = results || EnumerationResults.new;
|
|
95
95
|
|
|
96
96
|
results.continuation_token = xml.NextMarker.text if (xml > "NextMarker").any?
|
|
97
97
|
results
|
|
@@ -106,7 +106,7 @@ module Azure
|
|
|
106
106
|
xml.children.each { |meta_node|
|
|
107
107
|
|
|
108
108
|
key = meta_node.name.downcase
|
|
109
|
-
if metadata.has_key? key
|
|
109
|
+
if metadata.has_key? key
|
|
110
110
|
metadata[key] = [metadata[key]] unless metadata[key].respond_to? :push
|
|
111
111
|
metadata[key].push(meta_node.text)
|
|
112
112
|
else
|
|
@@ -119,9 +119,9 @@ module Azure
|
|
|
119
119
|
def metadata_from_headers(headers)
|
|
120
120
|
metadata = {}
|
|
121
121
|
|
|
122
|
-
headers.each { |k, v|
|
|
122
|
+
headers.each { |k, v|
|
|
123
123
|
if key = k[/^x-ms-meta-(.*)/, 1]
|
|
124
|
-
if metadata.has_key? key
|
|
124
|
+
if metadata.has_key? key
|
|
125
125
|
metadata[key] = [metadata[key]] unless metadata[key].respond_to? :push
|
|
126
126
|
metadata[key].push(v)
|
|
127
127
|
else
|
|
@@ -158,13 +158,13 @@ module Azure
|
|
|
158
158
|
end
|
|
159
159
|
|
|
160
160
|
def hour_metrics_to_xml(metrics, xml)
|
|
161
|
-
xml.HourMetrics {
|
|
161
|
+
xml.HourMetrics {
|
|
162
162
|
metrics_to_xml_children(metrics, xml)
|
|
163
163
|
}
|
|
164
164
|
end
|
|
165
165
|
|
|
166
166
|
def minute_metrics_to_xml(metrics, xml)
|
|
167
|
-
xml.MinuteMetrics {
|
|
167
|
+
xml.MinuteMetrics {
|
|
168
168
|
metrics_to_xml_children(metrics, xml)
|
|
169
169
|
}
|
|
170
170
|
end
|
|
@@ -181,7 +181,7 @@ module Azure
|
|
|
181
181
|
end
|
|
182
182
|
|
|
183
183
|
def logging_to_xml(logging, xml)
|
|
184
|
-
xml.Logging {
|
|
184
|
+
xml.Logging {
|
|
185
185
|
xml.Version logging.version if logging.version
|
|
186
186
|
xml.Delete logging.delete unless logging.delete == nil
|
|
187
187
|
xml.Read logging.read unless logging.read == nil
|
|
@@ -246,7 +246,7 @@ module Azure
|
|
|
246
246
|
def ary_from_node(node)
|
|
247
247
|
node.text.split(",").map {|s| s.strip}
|
|
248
248
|
end
|
|
249
|
-
|
|
249
|
+
|
|
250
250
|
def service_properties_to_xml(properties)
|
|
251
251
|
builder = Nokogiri::XML::Builder.new(:encoding => 'utf-8') do |xml|
|
|
252
252
|
xml.StorageServiceProperties {
|
|
@@ -290,7 +290,7 @@ module Azure
|
|
|
290
290
|
end
|
|
291
291
|
|
|
292
292
|
extend ClassMethods
|
|
293
|
-
|
|
293
|
+
|
|
294
294
|
def self.included( other )
|
|
295
295
|
other.extend( ClassMethods )
|
|
296
296
|
end
|
|
@@ -68,9 +68,9 @@ module Azure
|
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
# Adds metadata properties to header hash with required prefix
|
|
71
|
-
#
|
|
71
|
+
#
|
|
72
72
|
# metadata - A Hash of metadata name/value pairs
|
|
73
|
-
# headers - A Hash of HTTP headers
|
|
73
|
+
# headers - A Hash of HTTP headers
|
|
74
74
|
def add_metadata_to_headers(metadata, headers)
|
|
75
75
|
metadata.each do |key, value|
|
|
76
76
|
headers["x-ms-meta-#{key}"] = value
|
|
@@ -28,7 +28,7 @@ module Azure
|
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
# Gets a WRAP access token with specified parameters.
|
|
31
|
-
#
|
|
31
|
+
#
|
|
32
32
|
# Returns access token (String)
|
|
33
33
|
def get_access_token(resource_uri)
|
|
34
34
|
uri = wrap_uri
|
|
@@ -63,7 +63,7 @@ module Azure
|
|
|
63
63
|
# Generate the URI for the ACS Wrap service
|
|
64
64
|
#
|
|
65
65
|
# path - String. Path for the uri (optional, Default="WRAPv0.9")
|
|
66
|
-
# query - Hash. Query parameters for the uri (optional)
|
|
66
|
+
# query - Hash. Query parameters for the uri (optional)
|
|
67
67
|
#
|
|
68
68
|
# Returns a URI.
|
|
69
69
|
def wrap_uri(path="WRAPv0.9", query={})
|
|
@@ -44,7 +44,7 @@ module Azure
|
|
|
44
44
|
# Returns a DateTime
|
|
45
45
|
attr_accessor :locked_until_utc
|
|
46
46
|
|
|
47
|
-
# Public: Get/Set the LockToken of the message
|
|
47
|
+
# Public: Get/Set the LockToken of the message
|
|
48
48
|
#
|
|
49
49
|
# Returns a String (GUID)
|
|
50
50
|
attr_accessor :lock_token
|
|
@@ -60,7 +60,7 @@ module Azure
|
|
|
60
60
|
# Returns a String
|
|
61
61
|
attr_accessor :label
|
|
62
62
|
|
|
63
|
-
# Public: Get/Set the ReplyTo for the message
|
|
63
|
+
# Public: Get/Set the ReplyTo for the message
|
|
64
64
|
#
|
|
65
65
|
# Returns a String
|
|
66
66
|
attr_accessor :reply_to
|
|
@@ -70,12 +70,12 @@ module Azure
|
|
|
70
70
|
# Returns a DateTime
|
|
71
71
|
attr_accessor :enqueued_time_utc
|
|
72
72
|
|
|
73
|
-
# Public: Get/Set the SequenceNumber for the message
|
|
73
|
+
# Public: Get/Set the SequenceNumber for the message
|
|
74
74
|
#
|
|
75
75
|
# Returns an Integer
|
|
76
76
|
attr_accessor :sequence_number
|
|
77
77
|
|
|
78
|
-
# Public: Get/Set the TimeToLive for the message
|
|
78
|
+
# Public: Get/Set the TimeToLive for the message
|
|
79
79
|
#
|
|
80
80
|
# Returns an Integer
|
|
81
81
|
attr_accessor :time_to_live
|
|
@@ -85,12 +85,12 @@ module Azure
|
|
|
85
85
|
# Returns a String
|
|
86
86
|
attr_accessor :to
|
|
87
87
|
|
|
88
|
-
# Public: Get/Set the ScheduledEnqueueTimeUtc for the message
|
|
88
|
+
# Public: Get/Set the ScheduledEnqueueTimeUtc for the message
|
|
89
89
|
#
|
|
90
90
|
# Returns a DateTime
|
|
91
91
|
attr_accessor :scheduled_enqueue_time_utc
|
|
92
92
|
|
|
93
|
-
# Public: Get/Set the ReplyToSessionId for the message
|
|
93
|
+
# Public: Get/Set the ReplyToSessionId for the message
|
|
94
94
|
#
|
|
95
95
|
# Returns a String
|
|
96
96
|
attr_accessor :reply_to_session_id
|
|
@@ -61,11 +61,11 @@ module Azure
|
|
|
61
61
|
return nil if match.nil?
|
|
62
62
|
|
|
63
63
|
#years = match[1].to_f
|
|
64
|
-
#months = match[2].to_f
|
|
64
|
+
#months = match[2].to_f
|
|
65
65
|
days = match[3].to_f
|
|
66
66
|
hours = match[4].to_f
|
|
67
67
|
minutes = match[5].to_f
|
|
68
|
-
seconds = match[6].to_f
|
|
68
|
+
seconds = match[6].to_f
|
|
69
69
|
|
|
70
70
|
new(seconds + minutes * 60 + hours * 3600 + days * 86400)
|
|
71
71
|
end
|
|
@@ -66,14 +66,14 @@ module Azure
|
|
|
66
66
|
def message_count=(val)
|
|
67
67
|
_set 'MessageCount', val
|
|
68
68
|
end
|
|
69
|
-
|
|
69
|
+
|
|
70
70
|
# LockDuration: XML datetime
|
|
71
71
|
#
|
|
72
|
-
# Determines the amount of time in seconds in which a message should be locked for processing by a receiver.
|
|
73
|
-
# After this period, the message is unlocked and available for consumption by the next receiver. Settable
|
|
72
|
+
# Determines the amount of time in seconds in which a message should be locked for processing by a receiver.
|
|
73
|
+
# After this period, the message is unlocked and available for consumption by the next receiver. Settable
|
|
74
74
|
# only at queue creation time:
|
|
75
75
|
#
|
|
76
|
-
# Range: 0 - 5 minutes. 0 means that the message is not locked
|
|
76
|
+
# Range: 0 - 5 minutes. 0 means that the message is not locked
|
|
77
77
|
# Default: 30 seconds
|
|
78
78
|
def lock_duration
|
|
79
79
|
to_interval description['LockDuration']
|
|
@@ -125,10 +125,10 @@ module Azure
|
|
|
125
125
|
|
|
126
126
|
# MaxSizeInMegaBytes: Number
|
|
127
127
|
#
|
|
128
|
-
# Specifies the maximum queue size in megabytes. Any attempt to enqueue a message that will cause the queue to
|
|
128
|
+
# Specifies the maximum queue size in megabytes. Any attempt to enqueue a message that will cause the queue to
|
|
129
129
|
# exceed this value will fail. You can only set this parameter at queue creation time using the following values:
|
|
130
130
|
#
|
|
131
|
-
# Range: 1 - 1024 (valid values are 1024, 2048, 3072, 4096, 5120)
|
|
131
|
+
# Range: 1 - 1024 (valid values are 1024, 2048, 3072, 4096, 5120)
|
|
132
132
|
# Default: 1*1024 (valid values are 1024, 2048, 3072, 4096, 5120)
|
|
133
133
|
def max_size_in_megabytes
|
|
134
134
|
to_i description['MaxSizeInMegabytes']
|
|
@@ -154,12 +154,12 @@ module Azure
|
|
|
154
154
|
|
|
155
155
|
# DefaultMessageTimeToLive: XML datetime
|
|
156
156
|
#
|
|
157
|
-
# Depending on whether DeadLettering is enabled, a message is automatically moved to the DeadLetterQueue or
|
|
158
|
-
# deleted if it has been stored in the queue for longer than the specified time. This value is overwritten
|
|
157
|
+
# Depending on whether DeadLettering is enabled, a message is automatically moved to the DeadLetterQueue or
|
|
158
|
+
# deleted if it has been stored in the queue for longer than the specified time. This value is overwritten
|
|
159
159
|
# by a TTL specified on the message if and only if the message TTL is smaller than the TTL set on the queue.
|
|
160
160
|
# This value is immutable after the Queue has been created:
|
|
161
161
|
#
|
|
162
|
-
# Range: 1 second - TimeSpan.MaxValue
|
|
162
|
+
# Range: 1 second - TimeSpan.MaxValue
|
|
163
163
|
# Default: TimeSpan.MaxValue
|
|
164
164
|
def default_message_time_to_live
|
|
165
165
|
to_interval description['DefaultMessageTimeToLive']
|
|
@@ -198,8 +198,8 @@ module Azure
|
|
|
198
198
|
|
|
199
199
|
# EnableBatchedOperations
|
|
200
200
|
#
|
|
201
|
-
# Enables or disables service side batching behavior when performing operations for the specific queue. When
|
|
202
|
-
# enabled, service bus will collect/batch multiple operations to the backend to be more connection efficient.
|
|
201
|
+
# Enables or disables service side batching behavior when performing operations for the specific queue. When
|
|
202
|
+
# enabled, service bus will collect/batch multiple operations to the backend to be more connection efficient.
|
|
203
203
|
#
|
|
204
204
|
# If user wants lower operation latency then they can disable this feature.
|
|
205
205
|
def enable_batched_operations
|
|
@@ -29,7 +29,7 @@ module Azure
|
|
|
29
29
|
# Accepted key/value pairs in options parameter are:
|
|
30
30
|
# * +:relay_type+ - String. Determines the type of the relay endpoint. This is required.
|
|
31
31
|
# * +:requires_client_authorization+ - Boolean. Determines whether or not clients need to authenticate when making calls.
|
|
32
|
-
# * +:requires_transport_security+ - Boolean. Determines whether or not the endpoint uses transport security.
|
|
32
|
+
# * +:requires_transport_security+ - Boolean. Determines whether or not the endpoint uses transport security.
|
|
33
33
|
#
|
|
34
34
|
def initialize(name, options = {})
|
|
35
35
|
normalized_options = {}
|
|
@@ -49,10 +49,10 @@ module Azure
|
|
|
49
49
|
def relay_type=(val)
|
|
50
50
|
_set 'RelayType', val
|
|
51
51
|
end
|
|
52
|
-
|
|
52
|
+
|
|
53
53
|
# RequiresClientAuthorization: Boolean
|
|
54
54
|
#
|
|
55
|
-
# Determines whether or not clients need to authenticate when making calls.
|
|
55
|
+
# Determines whether or not clients need to authenticate when making calls.
|
|
56
56
|
#
|
|
57
57
|
# Default: true
|
|
58
58
|
def requires_client_authorization
|
|
@@ -65,7 +65,7 @@ module Azure
|
|
|
65
65
|
|
|
66
66
|
# RequiresTransportSecurity: Boolean
|
|
67
67
|
#
|
|
68
|
-
# Determines whether or not the endpoint uses transport security.
|
|
68
|
+
# Determines whether or not the endpoint uses transport security.
|
|
69
69
|
#
|
|
70
70
|
# Default: true
|
|
71
71
|
def requires_transport_security
|
|
@@ -60,7 +60,7 @@ module Azure
|
|
|
60
60
|
# syntax, see SqlFilter.SqlExpression Property.
|
|
61
61
|
#
|
|
62
62
|
# TrueFilter/FalseFiilter - A handy shortcut for always returning true or false. They are a type of SqlFilter.
|
|
63
|
-
#
|
|
63
|
+
#
|
|
64
64
|
# CorrelationFilter: A type of Filter that matches CorrelationId property of BrokeredMessage.
|
|
65
65
|
def filter
|
|
66
66
|
RuleAspect.from_hash(description['Filter'])
|
|
@@ -88,7 +88,7 @@ module Azure
|
|
|
88
88
|
end
|
|
89
89
|
end
|
|
90
90
|
end
|
|
91
|
-
|
|
91
|
+
|
|
92
92
|
def handle_rule_description_element(element, description)
|
|
93
93
|
if element.name == "Filter" or element.name == "Action"
|
|
94
94
|
value = {}
|
|
@@ -152,7 +152,7 @@ module Azure
|
|
|
152
152
|
end
|
|
153
153
|
|
|
154
154
|
extend ClassMethods
|
|
155
|
-
|
|
155
|
+
|
|
156
156
|
def self.included( other )
|
|
157
157
|
other.extend( ClassMethods )
|
|
158
158
|
end
|
|
@@ -42,27 +42,27 @@ module Azure
|
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
-
# Creates a new relay endpoint. Once created, this relay endpoint resource manifest is immutable.
|
|
46
|
-
#
|
|
45
|
+
# Creates a new relay endpoint. Once created, this relay endpoint resource manifest is immutable.
|
|
46
|
+
#
|
|
47
47
|
# ==== Attributes
|
|
48
48
|
#
|
|
49
49
|
# * +relay+ - Azure::ServiceBus::Relay instance to create on server, or a string of the relay endpoint name
|
|
50
|
-
# * +options+ - Hash. The relay endpoint properties.
|
|
50
|
+
# * +options+ - Hash. The relay endpoint properties.
|
|
51
51
|
#
|
|
52
52
|
# ==== Options
|
|
53
53
|
#
|
|
54
54
|
# Accepted key/value pairs in options parameter are:
|
|
55
55
|
# * +:relay_type+ - String. Determines the type of the relay endpoint.
|
|
56
56
|
# * +:requires_client_authorization+ - Boolean. Determines whether or not clients need to authenticate when making calls.
|
|
57
|
-
# * +:requires_transport_security+ - Boolean. Determines whether or not the endpoint uses transport security.
|
|
57
|
+
# * +:requires_transport_security+ - Boolean. Determines whether or not the endpoint uses transport security.
|
|
58
58
|
#
|
|
59
59
|
def create_relay(relay, options={})
|
|
60
60
|
relay = _new_or_existing(Azure::ServiceBus::Relay, relay, options ? options : {})
|
|
61
61
|
create_resource_entry(:relay, relay, relay.name)
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
-
# Deletes an existing relay endpoint.
|
|
65
|
-
#
|
|
64
|
+
# Deletes an existing relay endpoint.
|
|
65
|
+
#
|
|
66
66
|
# ==== Attributes
|
|
67
67
|
#
|
|
68
68
|
# * +relay+ - Azure::ServiceBus::Relay instance to delete or a string of the relay endpoint name
|
|
@@ -71,7 +71,7 @@ module Azure
|
|
|
71
71
|
end
|
|
72
72
|
|
|
73
73
|
# Retrieves the description for the specified relay endpoint.
|
|
74
|
-
#
|
|
74
|
+
#
|
|
75
75
|
# ==== Attributes
|
|
76
76
|
#
|
|
77
77
|
# * +relay+ - Azure::ServiceBus::Relay instance to retrieve or a string of the relay endpoint name
|
|
@@ -98,12 +98,12 @@ module Azure
|
|
|
98
98
|
resource_list(:relay, query)
|
|
99
99
|
end
|
|
100
100
|
|
|
101
|
-
# Creates a new queue. Once created, this queue's resource manifest is immutable.
|
|
102
|
-
#
|
|
101
|
+
# Creates a new queue. Once created, this queue's resource manifest is immutable.
|
|
102
|
+
#
|
|
103
103
|
# ==== Attributes
|
|
104
104
|
#
|
|
105
105
|
# * +queue+ - Azure::ServiceBus::Queue instance to create on server, or a string of the queue name
|
|
106
|
-
# * +options+ - Hash. The queue properties.
|
|
106
|
+
# * +options+ - Hash. The queue properties.
|
|
107
107
|
#
|
|
108
108
|
# ==== Options
|
|
109
109
|
#
|
|
@@ -125,7 +125,7 @@ module Azure
|
|
|
125
125
|
create_resource_entry(:queue, queue, queue.name)
|
|
126
126
|
end
|
|
127
127
|
|
|
128
|
-
# Deletes an existing queue. This operation will also remove all associated state
|
|
128
|
+
# Deletes an existing queue. This operation will also remove all associated state
|
|
129
129
|
# including messages in the queue.
|
|
130
130
|
#
|
|
131
131
|
# ==== Attributes
|
|
@@ -136,7 +136,7 @@ module Azure
|
|
|
136
136
|
end
|
|
137
137
|
|
|
138
138
|
# Retrieves an existing queue.
|
|
139
|
-
#
|
|
139
|
+
#
|
|
140
140
|
# ==== Attributes
|
|
141
141
|
#
|
|
142
142
|
# * +queue+ - Azure::ServiceBus::Queue instance to retrieve or a string of the queue name
|
|
@@ -163,12 +163,12 @@ module Azure
|
|
|
163
163
|
resource_list(:queue, query)
|
|
164
164
|
end
|
|
165
165
|
|
|
166
|
-
# Creates a new topic. Once created, this topic resource manifest is immutable.
|
|
167
|
-
#
|
|
166
|
+
# Creates a new topic. Once created, this topic resource manifest is immutable.
|
|
167
|
+
#
|
|
168
168
|
# ==== Attributes
|
|
169
169
|
#
|
|
170
170
|
# * +topic+ - Azure::ServiceBus::Topic instance to create on server, or a string of the topic name
|
|
171
|
-
# * +options+ - Hash. The topic properties.
|
|
171
|
+
# * +options+ - Hash. The topic properties.
|
|
172
172
|
#
|
|
173
173
|
# ==== Options
|
|
174
174
|
#
|
|
@@ -186,9 +186,9 @@ module Azure
|
|
|
186
186
|
create_resource_entry(:topic, topic, topic.name)
|
|
187
187
|
end
|
|
188
188
|
|
|
189
|
-
# Deletes an existing topic. This operation will also remove all associated state
|
|
189
|
+
# Deletes an existing topic. This operation will also remove all associated state
|
|
190
190
|
# including associated subscriptions.
|
|
191
|
-
#
|
|
191
|
+
#
|
|
192
192
|
# ==== Attributes
|
|
193
193
|
#
|
|
194
194
|
# * +topic+ - Azure::ServiceBus::Topic instance to delete or a string of the topic name
|
|
@@ -197,7 +197,7 @@ module Azure
|
|
|
197
197
|
end
|
|
198
198
|
|
|
199
199
|
# Retrieves the description for the specified topic.
|
|
200
|
-
#
|
|
200
|
+
#
|
|
201
201
|
# ==== Attributes
|
|
202
202
|
#
|
|
203
203
|
# * +topic+ - Azure::ServiceBus::Topic instance to retrieve or a string of the topic name
|
|
@@ -209,7 +209,7 @@ module Azure
|
|
|
209
209
|
#
|
|
210
210
|
# ==== Attributes
|
|
211
211
|
#
|
|
212
|
-
# * +options+ - Hash. Optional parameters.
|
|
212
|
+
# * +options+ - Hash. Optional parameters.
|
|
213
213
|
#
|
|
214
214
|
# ==== Options
|
|
215
215
|
#
|
|
@@ -246,10 +246,10 @@ module Azure
|
|
|
246
246
|
end
|
|
247
247
|
|
|
248
248
|
# Deletes an existing rule.
|
|
249
|
-
#
|
|
249
|
+
#
|
|
250
250
|
# ==== Attributes
|
|
251
251
|
#
|
|
252
|
-
# Pass either (topic_name, subscription_name, rule_name) as strings, or (rule) a object with .name, .topic, and
|
|
252
|
+
# Pass either (topic_name, subscription_name, rule_name) as strings, or (rule) a object with .name, .topic, and
|
|
253
253
|
# .subscription methods such as Azure::ServiceBus::Rule instance.
|
|
254
254
|
#
|
|
255
255
|
# Note: The default rule name is '$Default'. Use this name to delete the default rule for the subscription.
|
|
@@ -259,11 +259,11 @@ module Azure
|
|
|
259
259
|
delete_resource_entry(:rule, topic_name, subscription_name, rule_name)
|
|
260
260
|
end
|
|
261
261
|
|
|
262
|
-
# Retrieves the description for the specified rule.
|
|
263
|
-
#
|
|
262
|
+
# Retrieves the description for the specified rule.
|
|
263
|
+
#
|
|
264
264
|
# ==== Attributes
|
|
265
265
|
#
|
|
266
|
-
# Pass either (topic_name, subscription_name, rule_name) as strings, or (rule) a object with .name, .topic, and
|
|
266
|
+
# Pass either (topic_name, subscription_name, rule_name) as strings, or (rule) a object with .name, .topic, and
|
|
267
267
|
# .subscription methods such as Azure::ServiceBus::Rule instance.
|
|
268
268
|
#
|
|
269
269
|
# Note: The default rule name is '$Default'. Use this name to retrieve the default rule for the subscription.
|
|
@@ -276,14 +276,14 @@ module Azure
|
|
|
276
276
|
result
|
|
277
277
|
end
|
|
278
278
|
|
|
279
|
-
# Retrieves the rules that exist under the specified subscription.
|
|
280
|
-
#
|
|
279
|
+
# Retrieves the rules that exist under the specified subscription.
|
|
280
|
+
#
|
|
281
281
|
# ==== Attributes
|
|
282
282
|
#
|
|
283
283
|
# Pass either (topic_name, subscription_name) as strings, or (subscription) a object with .name and .topic methods
|
|
284
284
|
# such as Azure::ServiceBus::Subscription instance.
|
|
285
285
|
#
|
|
286
|
-
# * +options+ - Hash. Optional parameters.
|
|
286
|
+
# * +options+ - Hash. Optional parameters.
|
|
287
287
|
#
|
|
288
288
|
# ==== Options
|
|
289
289
|
#
|
|
@@ -303,9 +303,9 @@ module Azure
|
|
|
303
303
|
return results
|
|
304
304
|
end
|
|
305
305
|
|
|
306
|
-
# Creates a new subscription. Once created, this subscription resource manifest is
|
|
307
|
-
# immutable.
|
|
308
|
-
#
|
|
306
|
+
# Creates a new subscription. Once created, this subscription resource manifest is
|
|
307
|
+
# immutable.
|
|
308
|
+
#
|
|
309
309
|
# ==== Attributes
|
|
310
310
|
#
|
|
311
311
|
# Pass either (topic_name, subscription_name) as strings, or (subscription) a object.
|
|
@@ -333,7 +333,7 @@ module Azure
|
|
|
333
333
|
|
|
334
334
|
#
|
|
335
335
|
# Deletes an existing subscription.
|
|
336
|
-
#
|
|
336
|
+
#
|
|
337
337
|
# ==== Attributes
|
|
338
338
|
#
|
|
339
339
|
# Pass either (topic_name, subscription_name) as strings, or (subscription) a object with .name and .topic methods
|
|
@@ -358,12 +358,12 @@ module Azure
|
|
|
358
358
|
result
|
|
359
359
|
end
|
|
360
360
|
|
|
361
|
-
# Retrieves the subscriptions in the specified topic.
|
|
362
|
-
#
|
|
361
|
+
# Retrieves the subscriptions in the specified topic.
|
|
362
|
+
#
|
|
363
363
|
# ==== Attributes
|
|
364
364
|
#
|
|
365
365
|
# * +topic+ - Either a Azure::ServiceBus::Topic instance or a string of the topic name
|
|
366
|
-
# * +options+ - Hash. Optional parameters.
|
|
366
|
+
# * +options+ - Hash. Optional parameters.
|
|
367
367
|
#
|
|
368
368
|
# ==== Options
|
|
369
369
|
#
|
|
@@ -382,36 +382,36 @@ module Azure
|
|
|
382
382
|
return results
|
|
383
383
|
end
|
|
384
384
|
|
|
385
|
-
# Enqueues a message into the specified topic. The limit to the number of messages
|
|
386
|
-
# which may be present in the topic is governed by the message size in MaxTopicSizeInBytes.
|
|
387
|
-
# If this message causes the topic to exceed its quota, a quota exceeded error is
|
|
385
|
+
# Enqueues a message into the specified topic. The limit to the number of messages
|
|
386
|
+
# which may be present in the topic is governed by the message size in MaxTopicSizeInBytes.
|
|
387
|
+
# If this message causes the topic to exceed its quota, a quota exceeded error is
|
|
388
388
|
# returned and the message will be rejected.
|
|
389
|
-
#
|
|
389
|
+
#
|
|
390
390
|
# ==== Attributes
|
|
391
391
|
#
|
|
392
392
|
# * +topic+ - Either a Azure::ServiceBus::Topic instance or a string of the topic name
|
|
393
|
-
# * +message+ - An Azure::ServiceBus::BrokeredMessage object containing message body and properties,
|
|
393
|
+
# * +message+ - An Azure::ServiceBus::BrokeredMessage object containing message body and properties,
|
|
394
394
|
# or a string of the message body (a default BrokeredMessage will be created from the string).
|
|
395
395
|
def send_topic_message(topic, message)
|
|
396
396
|
_send_message(_name_for(topic), message)
|
|
397
397
|
end
|
|
398
398
|
|
|
399
|
-
# This operation is used to atomically retrieve and lock a message for processing.
|
|
400
|
-
# The message is guaranteed not to be delivered to other receivers during the lock
|
|
401
|
-
# duration period specified in buffer description. Once the lock expires, the
|
|
402
|
-
# message will be available to other receivers (on the same subscription only)
|
|
399
|
+
# This operation is used to atomically retrieve and lock a message for processing.
|
|
400
|
+
# The message is guaranteed not to be delivered to other receivers during the lock
|
|
401
|
+
# duration period specified in buffer description. Once the lock expires, the
|
|
402
|
+
# message will be available to other receivers (on the same subscription only)
|
|
403
403
|
# during the lock duration period specified in the topic description. Once the lock
|
|
404
|
-
# expires, the message will be available to other receivers. In order to complete
|
|
405
|
-
# processing of the message, the receiver should issue a delete command with the
|
|
406
|
-
# lock ID received from this operation. To abandon processing of the message and
|
|
407
|
-
# unlock it for other receivers, an Unlock Message command should be issued, or
|
|
408
|
-
# the lock duration period can expire.
|
|
404
|
+
# expires, the message will be available to other receivers. In order to complete
|
|
405
|
+
# processing of the message, the receiver should issue a delete command with the
|
|
406
|
+
# lock ID received from this operation. To abandon processing of the message and
|
|
407
|
+
# unlock it for other receivers, an Unlock Message command should be issued, or
|
|
408
|
+
# the lock duration period can expire.
|
|
409
409
|
#
|
|
410
410
|
# ==== Attributes
|
|
411
411
|
#
|
|
412
412
|
# * +topic+ - String. The name of the topic or a Topic instance
|
|
413
413
|
# * +subscription+ - String. The name of the subscription or a Subscription instance
|
|
414
|
-
# * +options+ - Hash. Optional parameters.
|
|
414
|
+
# * +options+ - Hash. Optional parameters.
|
|
415
415
|
#
|
|
416
416
|
# ==== Options
|
|
417
417
|
#
|
|
@@ -425,11 +425,11 @@ module Azure
|
|
|
425
425
|
end
|
|
426
426
|
|
|
427
427
|
#
|
|
428
|
-
# Unlock a message for processing by other receivers on a given subscription.
|
|
429
|
-
# This operation deletes the lock object, causing the message to be unlocked.
|
|
430
|
-
# A message must have first been locked by a receiver before this operation
|
|
428
|
+
# Unlock a message for processing by other receivers on a given subscription.
|
|
429
|
+
# This operation deletes the lock object, causing the message to be unlocked.
|
|
430
|
+
# A message must have first been locked by a receiver before this operation
|
|
431
431
|
# is called.
|
|
432
|
-
#
|
|
432
|
+
#
|
|
433
433
|
# ==== Attributes
|
|
434
434
|
#
|
|
435
435
|
# * +message+ - String. Either the message location URL or a message object.
|
|
@@ -438,16 +438,16 @@ module Azure
|
|
|
438
438
|
_unlock_message(message)
|
|
439
439
|
end
|
|
440
440
|
|
|
441
|
-
# Read and delete a message from a subscription as an atomic operation. This
|
|
442
|
-
# operation should be used when a best-effort guarantee is sufficient for an
|
|
443
|
-
# application; that is, using this operation it is possible for messages to
|
|
441
|
+
# Read and delete a message from a subscription as an atomic operation. This
|
|
442
|
+
# operation should be used when a best-effort guarantee is sufficient for an
|
|
443
|
+
# application; that is, using this operation it is possible for messages to
|
|
444
444
|
# be lost if processing fails.
|
|
445
|
-
#
|
|
445
|
+
#
|
|
446
446
|
# ==== Attributes
|
|
447
447
|
#
|
|
448
448
|
# * +topic+ - The name of the topic or a Topic instance
|
|
449
449
|
# * +subscription+ - The name of the subscription or a Subscription instance
|
|
450
|
-
# * +options+ - Hash. Optional parameters.
|
|
450
|
+
# * +options+ - Hash. Optional parameters.
|
|
451
451
|
#
|
|
452
452
|
# ==== Options
|
|
453
453
|
#
|
|
@@ -461,10 +461,10 @@ module Azure
|
|
|
461
461
|
_read_delete_message(subscriptions_path(topic, subscription), options[:timeout] ? options[:timeout] : DEFAULT_TIMEOUT)
|
|
462
462
|
end
|
|
463
463
|
|
|
464
|
-
# Completes processing on a locked message and delete it from the subscription.
|
|
465
|
-
# This operation should only be called after processing a previously locked
|
|
464
|
+
# Completes processing on a locked message and delete it from the subscription.
|
|
465
|
+
# This operation should only be called after processing a previously locked
|
|
466
466
|
# message is successful to maintain At-Least-Once delivery assurances.
|
|
467
|
-
#
|
|
467
|
+
#
|
|
468
468
|
# ==== Attributes
|
|
469
469
|
#
|
|
470
470
|
# * +message+ - String. Either the message location URL or a message object.
|
|
@@ -473,35 +473,35 @@ module Azure
|
|
|
473
473
|
_delete_message(message)
|
|
474
474
|
end
|
|
475
475
|
|
|
476
|
-
# Sends a message into the specified queue. The limit to the number of messages
|
|
477
|
-
# which may be present in the topic is governed by the message size the
|
|
478
|
-
# MaxTopicSizeInMegaBytes. If this message will cause the queue to exceed its
|
|
476
|
+
# Sends a message into the specified queue. The limit to the number of messages
|
|
477
|
+
# which may be present in the topic is governed by the message size the
|
|
478
|
+
# MaxTopicSizeInMegaBytes. If this message will cause the queue to exceed its
|
|
479
479
|
# quota, a quota exceeded error is returned and the message will be rejected.
|
|
480
|
-
#
|
|
480
|
+
#
|
|
481
481
|
# ==== Attributes
|
|
482
482
|
#
|
|
483
483
|
# * +queue+ - Either a Azure::ServiceBus::Queue instance or a string of the queue name
|
|
484
|
-
# * +message+ - An Azure::ServiceBus::BrokeredMessage object containing message body and properties,
|
|
484
|
+
# * +message+ - An Azure::ServiceBus::BrokeredMessage object containing message body and properties,
|
|
485
485
|
# or a string of the message body (a default BrokeredMessage will be created from the string).
|
|
486
486
|
def send_queue_message(queue, message)
|
|
487
487
|
_send_message(_name_for(queue), message)
|
|
488
488
|
end
|
|
489
489
|
|
|
490
490
|
#
|
|
491
|
-
# Automatically retrieves and locks a message from a queue for processing. The
|
|
492
|
-
# message is guaranteed not to be delivered to other receivers (on the same
|
|
493
|
-
# subscription only) during the lock duration period specified in the queue
|
|
494
|
-
# description. Once the lock expires, the message will be available to other
|
|
495
|
-
# receivers. In order to complete processing of the message, the receiver
|
|
496
|
-
# should issue a delete command with the lock ID received from this operation.
|
|
497
|
-
# To abandon processing of the message and unlock it for other receivers,
|
|
498
|
-
# an Unlock Message command should be issued, or the lock duration period
|
|
491
|
+
# Automatically retrieves and locks a message from a queue for processing. The
|
|
492
|
+
# message is guaranteed not to be delivered to other receivers (on the same
|
|
493
|
+
# subscription only) during the lock duration period specified in the queue
|
|
494
|
+
# description. Once the lock expires, the message will be available to other
|
|
495
|
+
# receivers. In order to complete processing of the message, the receiver
|
|
496
|
+
# should issue a delete command with the lock ID received from this operation.
|
|
497
|
+
# To abandon processing of the message and unlock it for other receivers,
|
|
498
|
+
# an Unlock Message command should be issued, or the lock duration period
|
|
499
499
|
# can expire.
|
|
500
|
-
#
|
|
500
|
+
#
|
|
501
501
|
# ==== Attributes
|
|
502
502
|
#
|
|
503
503
|
# * +queue+ - String. Either a Azure::ServiceBus::Queue instance or a string of the queue name
|
|
504
|
-
# * +options+ - Hash. Optional parameters.
|
|
504
|
+
# * +options+ - Hash. Optional parameters.
|
|
505
505
|
#
|
|
506
506
|
# ==== Options
|
|
507
507
|
#
|
|
@@ -512,11 +512,11 @@ module Azure
|
|
|
512
512
|
_peek_lock_message(_name_for(queue), options[:timeout] ? options[:timeout] : DEFAULT_TIMEOUT)
|
|
513
513
|
end
|
|
514
514
|
|
|
515
|
-
# Unlocks a message for processing by other receivers on a given subscription.
|
|
516
|
-
# This operation deletes the lock object, causing the message to be unlocked.
|
|
517
|
-
# A message must have first been locked by a receiver before this operation is
|
|
515
|
+
# Unlocks a message for processing by other receivers on a given subscription.
|
|
516
|
+
# This operation deletes the lock object, causing the message to be unlocked.
|
|
517
|
+
# A message must have first been locked by a receiver before this operation is
|
|
518
518
|
# called.
|
|
519
|
-
#
|
|
519
|
+
#
|
|
520
520
|
# ==== Attributes
|
|
521
521
|
#
|
|
522
522
|
# * +message+ - String. Either the message location URL or a message object.
|
|
@@ -525,16 +525,16 @@ module Azure
|
|
|
525
525
|
_unlock_message(message)
|
|
526
526
|
end
|
|
527
527
|
|
|
528
|
-
# Reads and deletes a message from a queue as an atomic operation. This operation
|
|
529
|
-
# should be used when a best-effort guarantee is sufficient for an application;
|
|
530
|
-
# that is, using this operation it is possible for messages to be lost if
|
|
528
|
+
# Reads and deletes a message from a queue as an atomic operation. This operation
|
|
529
|
+
# should be used when a best-effort guarantee is sufficient for an application;
|
|
530
|
+
# that is, using this operation it is possible for messages to be lost if
|
|
531
531
|
# processing fails.
|
|
532
|
-
#
|
|
532
|
+
#
|
|
533
533
|
# ==== Attributes
|
|
534
534
|
#
|
|
535
535
|
# * +queue+ - Either a Azure::ServiceBus::Queue instance or a string of the queue name
|
|
536
|
-
# * +options+ - Hash. Optional parameters.
|
|
537
|
-
#
|
|
536
|
+
# * +options+ - Hash. Optional parameters.
|
|
537
|
+
#
|
|
538
538
|
# ==== Options
|
|
539
539
|
#
|
|
540
540
|
# Accepted key/value pairs in options parameter are:
|
|
@@ -544,10 +544,10 @@ module Azure
|
|
|
544
544
|
_read_delete_message(_name_for(queue), options[:timeout] ? options[:timeout] : DEFAULT_TIMEOUT)
|
|
545
545
|
end
|
|
546
546
|
|
|
547
|
-
# Completes processing on a locked message and delete it from the queue. This
|
|
548
|
-
# operation should only be called after processing a previously locked message
|
|
547
|
+
# Completes processing on a locked message and delete it from the queue. This
|
|
548
|
+
# operation should only be called after processing a previously locked message
|
|
549
549
|
# is successful to maintain At-Least-Once delivery assurances.
|
|
550
|
-
#
|
|
550
|
+
#
|
|
551
551
|
# ==== Attributes
|
|
552
552
|
#
|
|
553
553
|
# * +message+ - String. Either the message location URL or a message object.
|
|
@@ -561,7 +561,7 @@ module Azure
|
|
|
561
561
|
# ==== Attributes
|
|
562
562
|
#
|
|
563
563
|
# * +queue+ - String. The queue name.
|
|
564
|
-
# * +options+ - Hash. Optional parameters.
|
|
564
|
+
# * +options+ - Hash. Optional parameters.
|
|
565
565
|
#
|
|
566
566
|
# ==== Options
|
|
567
567
|
#
|
|
@@ -585,7 +585,7 @@ module Azure
|
|
|
585
585
|
# ==== Attributes
|
|
586
586
|
#
|
|
587
587
|
# * +topic+ - String. The topic name.
|
|
588
|
-
# * +options+ - Hash. Optional parameters.
|
|
588
|
+
# * +options+ - Hash. Optional parameters.
|
|
589
589
|
#
|
|
590
590
|
# ==== Options
|
|
591
591
|
#
|
|
@@ -725,7 +725,7 @@ module Azure
|
|
|
725
725
|
options = {}
|
|
726
726
|
|
|
727
727
|
if p.length == 3
|
|
728
|
-
# topic/sub/options
|
|
728
|
+
# topic/sub/options
|
|
729
729
|
topic_name = _name_for(p[0])
|
|
730
730
|
subscription_name = _name_for(p[1])
|
|
731
731
|
options =p[2]
|