azure_mgmt_service_bus 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generated/azure_mgmt_service_bus.rb +35 -20
- data/lib/generated/azure_mgmt_service_bus/models/{resource_list_keys.rb → access_keys.rb} +11 -5
- data/lib/generated/azure_mgmt_service_bus/models/access_rights.rb +1 -1
- data/lib/generated/azure_mgmt_service_bus/models/action.rb +69 -0
- data/lib/generated/azure_mgmt_service_bus/models/authorization_rule_properties.rb +53 -0
- data/lib/generated/azure_mgmt_service_bus/models/check_name_availability.rb +48 -0
- data/lib/generated/azure_mgmt_service_bus/models/check_name_availability_result.rb +72 -0
- data/lib/generated/azure_mgmt_service_bus/models/correlation_filter.rb +127 -0
- data/lib/generated/azure_mgmt_service_bus/models/entity_status.rb +5 -5
- data/lib/generated/azure_mgmt_service_bus/models/error_response.rb +56 -0
- data/lib/generated/azure_mgmt_service_bus/models/filter_type.rb +16 -0
- data/lib/generated/azure_mgmt_service_bus/models/{policykey.rb → key_type.rb} +3 -3
- data/lib/generated/azure_mgmt_service_bus/models/message_count_details.rb +9 -8
- data/lib/generated/azure_mgmt_service_bus/models/operation.rb +57 -0
- data/lib/generated/azure_mgmt_service_bus/models/operation_display.rb +69 -0
- data/lib/generated/azure_mgmt_service_bus/models/operation_list_result.rb +99 -0
- data/lib/generated/azure_mgmt_service_bus/models/regenerate_access_key_parameters.rb +59 -0
- data/lib/generated/azure_mgmt_service_bus/models/resource_namespace_patch.rb +86 -0
- data/lib/generated/azure_mgmt_service_bus/models/rule.rb +107 -0
- data/lib/generated/azure_mgmt_service_bus/models/rule_list_result.rb +95 -0
- data/lib/generated/azure_mgmt_service_bus/models/{shared_access_authorization_rule_resource.rb → sbauthorization_rule.rb} +7 -27
- data/lib/generated/azure_mgmt_service_bus/models/{shared_access_authorization_rule_list_result.rb → sbauthorization_rule_list_result.rb} +12 -13
- data/lib/generated/azure_mgmt_service_bus/models/{namespace_resource.rb → sbnamespace.rb} +19 -7
- data/lib/generated/azure_mgmt_service_bus/models/{namespace_list_result.rb → sbnamespace_list_result.rb} +11 -11
- data/lib/generated/azure_mgmt_service_bus/models/{namespace_create_or_update_parameters.rb → sbnamespace_update_parameters.rb} +50 -20
- data/lib/generated/azure_mgmt_service_bus/models/{queue_create_or_update_parameters.rb → sbqueue.rb} +119 -133
- data/lib/generated/azure_mgmt_service_bus/models/{queue_list_result.rb → sbqueue_list_result.rb} +11 -10
- data/lib/generated/azure_mgmt_service_bus/models/{sku.rb → sbsku.rb} +14 -10
- data/lib/generated/azure_mgmt_service_bus/models/{subscription_resource.rb → sbsubscription.rb} +74 -92
- data/lib/generated/azure_mgmt_service_bus/models/{subscription_list_result.rb → sbsubscription_list_result.rb} +11 -10
- data/lib/generated/azure_mgmt_service_bus/models/{topic_create_or_update_parameters.rb → sbtopic.rb} +102 -97
- data/lib/generated/azure_mgmt_service_bus/models/{topic_list_result.rb → sbtopic_list_result.rb} +11 -10
- data/lib/generated/azure_mgmt_service_bus/models/sku_name.rb +1 -1
- data/lib/generated/azure_mgmt_service_bus/models/sku_tier.rb +1 -1
- data/lib/generated/azure_mgmt_service_bus/models/sql_filter.rb +72 -0
- data/lib/generated/azure_mgmt_service_bus/models/sql_rule_action.rb +58 -0
- data/lib/generated/azure_mgmt_service_bus/models/tracked_resource.rb +86 -0
- data/lib/generated/azure_mgmt_service_bus/models/unavailable_reason.rb +20 -0
- data/lib/generated/azure_mgmt_service_bus/module_definition.rb +1 -1
- data/lib/generated/azure_mgmt_service_bus/namespaces.rb +442 -188
- data/lib/generated/azure_mgmt_service_bus/operations.rb +213 -0
- data/lib/generated/azure_mgmt_service_bus/queues.rb +198 -169
- data/lib/generated/azure_mgmt_service_bus/rules.rb +558 -0
- data/lib/generated/azure_mgmt_service_bus/service_bus_management_client.rb +10 -2
- data/lib/generated/azure_mgmt_service_bus/subscriptions.rb +90 -78
- data/lib/generated/azure_mgmt_service_bus/topics.rb +199 -173
- data/lib/generated/azure_mgmt_service_bus/version.rb +2 -2
- metadata +38 -23
- data/lib/generated/azure_mgmt_service_bus/models/queue_resource.rb +0 -308
- data/lib/generated/azure_mgmt_service_bus/models/regenerate_keys_parameters.rb +0 -46
- data/lib/generated/azure_mgmt_service_bus/models/shared_access_authorization_rule_create_or_update_parameters.rb +0 -74
- data/lib/generated/azure_mgmt_service_bus/models/subscription_create_or_update_parameters.rb +0 -213
- data/lib/generated/azure_mgmt_service_bus/models/topic_resource.rb +0 -263
@@ -0,0 +1,58 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::ServiceBus
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Represents set of actions written in SQL language-based syntax that is
|
10
|
+
# performed against a ServiceBus.Messaging.BrokeredMessage
|
11
|
+
#
|
12
|
+
class SqlRuleAction < Action
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
include MsRest::JSONable
|
17
|
+
|
18
|
+
#
|
19
|
+
# Mapper for SqlRuleAction class as Ruby Hash.
|
20
|
+
# This will be used for serialization/deserialization.
|
21
|
+
#
|
22
|
+
def self.mapper()
|
23
|
+
{
|
24
|
+
required: false,
|
25
|
+
serialized_name: 'SqlRuleAction',
|
26
|
+
type: {
|
27
|
+
name: 'Composite',
|
28
|
+
class_name: 'SqlRuleAction',
|
29
|
+
model_properties: {
|
30
|
+
sql_expression: {
|
31
|
+
required: false,
|
32
|
+
serialized_name: 'sqlExpression',
|
33
|
+
type: {
|
34
|
+
name: 'String'
|
35
|
+
}
|
36
|
+
},
|
37
|
+
compatibility_level: {
|
38
|
+
required: false,
|
39
|
+
serialized_name: 'compatibilityLevel',
|
40
|
+
type: {
|
41
|
+
name: 'Number'
|
42
|
+
}
|
43
|
+
},
|
44
|
+
requires_preprocessing: {
|
45
|
+
required: false,
|
46
|
+
serialized_name: 'requiresPreprocessing',
|
47
|
+
default_value: true,
|
48
|
+
type: {
|
49
|
+
name: 'Boolean'
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::ServiceBus
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The Resource definition.
|
10
|
+
#
|
11
|
+
class TrackedResource < MsRestAzure::Resource
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
include MsRest::JSONable
|
16
|
+
# @return [String] The Geo-location where the resource live
|
17
|
+
attr_accessor :location
|
18
|
+
|
19
|
+
# @return [Hash{String => String}] Resource tags
|
20
|
+
attr_accessor :tags
|
21
|
+
|
22
|
+
|
23
|
+
#
|
24
|
+
# Mapper for TrackedResource class as Ruby Hash.
|
25
|
+
# This will be used for serialization/deserialization.
|
26
|
+
#
|
27
|
+
def self.mapper()
|
28
|
+
{
|
29
|
+
required: false,
|
30
|
+
serialized_name: 'TrackedResource',
|
31
|
+
type: {
|
32
|
+
name: 'Composite',
|
33
|
+
class_name: 'TrackedResource',
|
34
|
+
model_properties: {
|
35
|
+
id: {
|
36
|
+
required: false,
|
37
|
+
read_only: true,
|
38
|
+
serialized_name: 'id',
|
39
|
+
type: {
|
40
|
+
name: 'String'
|
41
|
+
}
|
42
|
+
},
|
43
|
+
name: {
|
44
|
+
required: false,
|
45
|
+
read_only: true,
|
46
|
+
serialized_name: 'name',
|
47
|
+
type: {
|
48
|
+
name: 'String'
|
49
|
+
}
|
50
|
+
},
|
51
|
+
type: {
|
52
|
+
required: false,
|
53
|
+
read_only: true,
|
54
|
+
serialized_name: 'type',
|
55
|
+
type: {
|
56
|
+
name: 'String'
|
57
|
+
}
|
58
|
+
},
|
59
|
+
location: {
|
60
|
+
required: true,
|
61
|
+
serialized_name: 'location',
|
62
|
+
type: {
|
63
|
+
name: 'String'
|
64
|
+
}
|
65
|
+
},
|
66
|
+
tags: {
|
67
|
+
required: false,
|
68
|
+
serialized_name: 'tags',
|
69
|
+
type: {
|
70
|
+
name: 'Dictionary',
|
71
|
+
value: {
|
72
|
+
required: false,
|
73
|
+
serialized_name: 'StringElementType',
|
74
|
+
type: {
|
75
|
+
name: 'String'
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::ServiceBus
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for UnavailableReason
|
10
|
+
#
|
11
|
+
module UnavailableReason
|
12
|
+
None = "None"
|
13
|
+
InvalidName = "InvalidName"
|
14
|
+
SubscriptionIsDisabled = "SubscriptionIsDisabled"
|
15
|
+
NameInUse = "NameInUse"
|
16
|
+
NameInLockdown = "NameInLockdown"
|
17
|
+
TooManyNamespaceInCurrentSubscription = "TooManyNamespaceInCurrentSubscription"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 1.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -8,7 +8,6 @@ module Azure::ARM::ServiceBus
|
|
8
8
|
# Azure Service Bus client
|
9
9
|
#
|
10
10
|
class Namespaces
|
11
|
-
include Azure::ARM::ServiceBus::Models
|
12
11
|
include MsRestAzure
|
13
12
|
|
14
13
|
#
|
@@ -22,6 +21,105 @@ module Azure::ARM::ServiceBus
|
|
22
21
|
# @return [ServiceBusManagementClient] reference to the ServiceBusManagementClient
|
23
22
|
attr_reader :client
|
24
23
|
|
24
|
+
#
|
25
|
+
# Check the give namespace name availability.
|
26
|
+
#
|
27
|
+
# @param parameters [CheckNameAvailability] Parameters to check availability of
|
28
|
+
# the given namespace name
|
29
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
30
|
+
# will be added to the HTTP request.
|
31
|
+
#
|
32
|
+
# @return [CheckNameAvailabilityResult] operation results.
|
33
|
+
#
|
34
|
+
def check_name_availability_method(parameters, custom_headers = nil)
|
35
|
+
response = check_name_availability_method_async(parameters, custom_headers).value!
|
36
|
+
response.body unless response.nil?
|
37
|
+
end
|
38
|
+
|
39
|
+
#
|
40
|
+
# Check the give namespace name availability.
|
41
|
+
#
|
42
|
+
# @param parameters [CheckNameAvailability] Parameters to check availability of
|
43
|
+
# the given namespace name
|
44
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
45
|
+
# will be added to the HTTP request.
|
46
|
+
#
|
47
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
48
|
+
#
|
49
|
+
def check_name_availability_method_with_http_info(parameters, custom_headers = nil)
|
50
|
+
check_name_availability_method_async(parameters, custom_headers).value!
|
51
|
+
end
|
52
|
+
|
53
|
+
#
|
54
|
+
# Check the give namespace name availability.
|
55
|
+
#
|
56
|
+
# @param parameters [CheckNameAvailability] Parameters to check availability of
|
57
|
+
# the given namespace name
|
58
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
59
|
+
# to the HTTP request.
|
60
|
+
#
|
61
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
62
|
+
#
|
63
|
+
def check_name_availability_method_async(parameters, custom_headers = nil)
|
64
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
65
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
66
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
67
|
+
|
68
|
+
|
69
|
+
request_headers = {}
|
70
|
+
|
71
|
+
# Set Headers
|
72
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
73
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
74
|
+
|
75
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
76
|
+
|
77
|
+
# Serialize Request
|
78
|
+
request_mapper = Azure::ARM::ServiceBus::Models::CheckNameAvailability.mapper()
|
79
|
+
request_content = @client.serialize(request_mapper, parameters)
|
80
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
81
|
+
|
82
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/CheckNameAvailability'
|
83
|
+
|
84
|
+
request_url = @base_url || @client.base_url
|
85
|
+
|
86
|
+
options = {
|
87
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
88
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
89
|
+
query_params: {'api-version' => @client.api_version},
|
90
|
+
body: request_content,
|
91
|
+
headers: request_headers.merge(custom_headers || {}),
|
92
|
+
base_url: request_url
|
93
|
+
}
|
94
|
+
promise = @client.make_request_async(:post, path_template, options)
|
95
|
+
|
96
|
+
promise = promise.then do |result|
|
97
|
+
http_response = result.response
|
98
|
+
status_code = http_response.status
|
99
|
+
response_content = http_response.body
|
100
|
+
unless status_code == 200
|
101
|
+
error_model = JSON.load(response_content)
|
102
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
103
|
+
end
|
104
|
+
|
105
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
106
|
+
# Deserialize Response
|
107
|
+
if status_code == 200
|
108
|
+
begin
|
109
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
110
|
+
result_mapper = Azure::ARM::ServiceBus::Models::CheckNameAvailabilityResult.mapper()
|
111
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
112
|
+
rescue Exception => e
|
113
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
result
|
118
|
+
end
|
119
|
+
|
120
|
+
promise.execute
|
121
|
+
end
|
122
|
+
|
25
123
|
#
|
26
124
|
# Gets all the available namespaces within the subscription, irrespective of
|
27
125
|
# the resource groups.
|
@@ -29,10 +127,10 @@ module Azure::ARM::ServiceBus
|
|
29
127
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
30
128
|
# will be added to the HTTP request.
|
31
129
|
#
|
32
|
-
# @return [Array<
|
130
|
+
# @return [Array<SBNamespace>] operation results.
|
33
131
|
#
|
34
|
-
def
|
35
|
-
first_page =
|
132
|
+
def list(custom_headers = nil)
|
133
|
+
first_page = list_as_lazy(custom_headers)
|
36
134
|
first_page.get_all_items
|
37
135
|
end
|
38
136
|
|
@@ -45,8 +143,8 @@ module Azure::ARM::ServiceBus
|
|
45
143
|
#
|
46
144
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
47
145
|
#
|
48
|
-
def
|
49
|
-
|
146
|
+
def list_with_http_info(custom_headers = nil)
|
147
|
+
list_async(custom_headers).value!
|
50
148
|
end
|
51
149
|
|
52
150
|
#
|
@@ -58,7 +156,7 @@ module Azure::ARM::ServiceBus
|
|
58
156
|
#
|
59
157
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
60
158
|
#
|
61
|
-
def
|
159
|
+
def list_async(custom_headers = nil)
|
62
160
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
63
161
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
64
162
|
|
@@ -68,7 +166,7 @@ module Azure::ARM::ServiceBus
|
|
68
166
|
# Set Headers
|
69
167
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
70
168
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
71
|
-
path_template = '
|
169
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/namespaces'
|
72
170
|
|
73
171
|
request_url = @base_url || @client.base_url
|
74
172
|
|
@@ -87,7 +185,7 @@ module Azure::ARM::ServiceBus
|
|
87
185
|
response_content = http_response.body
|
88
186
|
unless status_code == 200
|
89
187
|
error_model = JSON.load(response_content)
|
90
|
-
fail
|
188
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
91
189
|
end
|
92
190
|
|
93
191
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -95,8 +193,8 @@ module Azure::ARM::ServiceBus
|
|
95
193
|
if status_code == 200
|
96
194
|
begin
|
97
195
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
98
|
-
result_mapper =
|
99
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
196
|
+
result_mapper = Azure::ARM::ServiceBus::Models::SBNamespaceListResult.mapper()
|
197
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
100
198
|
rescue Exception => e
|
101
199
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
102
200
|
end
|
@@ -111,11 +209,12 @@ module Azure::ARM::ServiceBus
|
|
111
209
|
#
|
112
210
|
# Gets the available namespaces within a resource group.
|
113
211
|
#
|
114
|
-
# @param resource_group_name [String]
|
212
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
213
|
+
# Azure subscription.
|
115
214
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
116
215
|
# will be added to the HTTP request.
|
117
216
|
#
|
118
|
-
# @return [Array<
|
217
|
+
# @return [Array<SBNamespace>] operation results.
|
119
218
|
#
|
120
219
|
def list_by_resource_group(resource_group_name, custom_headers = nil)
|
121
220
|
first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers)
|
@@ -125,7 +224,8 @@ module Azure::ARM::ServiceBus
|
|
125
224
|
#
|
126
225
|
# Gets the available namespaces within a resource group.
|
127
226
|
#
|
128
|
-
# @param resource_group_name [String]
|
227
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
228
|
+
# Azure subscription.
|
129
229
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
130
230
|
# will be added to the HTTP request.
|
131
231
|
#
|
@@ -138,7 +238,8 @@ module Azure::ARM::ServiceBus
|
|
138
238
|
#
|
139
239
|
# Gets the available namespaces within a resource group.
|
140
240
|
#
|
141
|
-
# @param resource_group_name [String]
|
241
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
242
|
+
# Azure subscription.
|
142
243
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
143
244
|
# to the HTTP request.
|
144
245
|
#
|
@@ -155,7 +256,7 @@ module Azure::ARM::ServiceBus
|
|
155
256
|
# Set Headers
|
156
257
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
157
258
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
158
|
-
path_template = '
|
259
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces'
|
159
260
|
|
160
261
|
request_url = @base_url || @client.base_url
|
161
262
|
|
@@ -174,7 +275,7 @@ module Azure::ARM::ServiceBus
|
|
174
275
|
response_content = http_response.body
|
175
276
|
unless status_code == 200
|
176
277
|
error_model = JSON.load(response_content)
|
177
|
-
fail
|
278
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
178
279
|
end
|
179
280
|
|
180
281
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -182,8 +283,8 @@ module Azure::ARM::ServiceBus
|
|
182
283
|
if status_code == 200
|
183
284
|
begin
|
184
285
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
185
|
-
result_mapper =
|
186
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
286
|
+
result_mapper = Azure::ARM::ServiceBus::Models::SBNamespaceListResult.mapper()
|
287
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
187
288
|
rescue Exception => e
|
188
289
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
189
290
|
end
|
@@ -199,14 +300,15 @@ module Azure::ARM::ServiceBus
|
|
199
300
|
# Creates or updates a service namespace. Once created, this namespace's
|
200
301
|
# resource manifest is immutable. This operation is idempotent.
|
201
302
|
#
|
202
|
-
# @param resource_group_name [String]
|
303
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
304
|
+
# Azure subscription.
|
203
305
|
# @param namespace_name [String] The namespace name.
|
204
|
-
# @param parameters [
|
205
|
-
#
|
306
|
+
# @param parameters [SBNamespace] Parameters supplied to create a namespace
|
307
|
+
# resource.
|
206
308
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
207
309
|
# will be added to the HTTP request.
|
208
310
|
#
|
209
|
-
# @return [
|
311
|
+
# @return [SBNamespace] operation results.
|
210
312
|
#
|
211
313
|
def create_or_update(resource_group_name, namespace_name, parameters, custom_headers = nil)
|
212
314
|
response = create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers).value!
|
@@ -214,10 +316,11 @@ module Azure::ARM::ServiceBus
|
|
214
316
|
end
|
215
317
|
|
216
318
|
#
|
217
|
-
# @param resource_group_name [String]
|
319
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
320
|
+
# Azure subscription.
|
218
321
|
# @param namespace_name [String] The namespace name.
|
219
|
-
# @param parameters [
|
220
|
-
#
|
322
|
+
# @param parameters [SBNamespace] Parameters supplied to create a namespace
|
323
|
+
# resource.
|
221
324
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
222
325
|
# will be added to the HTTP request.
|
223
326
|
#
|
@@ -231,8 +334,8 @@ module Azure::ARM::ServiceBus
|
|
231
334
|
promise = promise.then do |response|
|
232
335
|
# Defining deserialization method.
|
233
336
|
deserialize_method = lambda do |parsed_response|
|
234
|
-
result_mapper =
|
235
|
-
parsed_response = @client.deserialize(result_mapper, parsed_response
|
337
|
+
result_mapper = Azure::ARM::ServiceBus::Models::SBNamespace.mapper()
|
338
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
236
339
|
end
|
237
340
|
|
238
341
|
# Waiting for response.
|
@@ -246,8 +349,9 @@ module Azure::ARM::ServiceBus
|
|
246
349
|
# Deletes an existing namespace. This operation also removes all associated
|
247
350
|
# resources under the namespace.
|
248
351
|
#
|
249
|
-
# @param resource_group_name [String]
|
250
|
-
#
|
352
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
353
|
+
# Azure subscription.
|
354
|
+
# @param namespace_name [String] The namespace name
|
251
355
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
252
356
|
# will be added to the HTTP request.
|
253
357
|
#
|
@@ -257,8 +361,9 @@ module Azure::ARM::ServiceBus
|
|
257
361
|
end
|
258
362
|
|
259
363
|
#
|
260
|
-
# @param resource_group_name [String]
|
261
|
-
#
|
364
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
365
|
+
# Azure subscription.
|
366
|
+
# @param namespace_name [String] The namespace name
|
262
367
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
263
368
|
# will be added to the HTTP request.
|
264
369
|
#
|
@@ -284,12 +389,13 @@ module Azure::ARM::ServiceBus
|
|
284
389
|
#
|
285
390
|
# Gets a description for the specified namespace.
|
286
391
|
#
|
287
|
-
# @param resource_group_name [String]
|
288
|
-
#
|
392
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
393
|
+
# Azure subscription.
|
394
|
+
# @param namespace_name [String] The namespace name
|
289
395
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
290
396
|
# will be added to the HTTP request.
|
291
397
|
#
|
292
|
-
# @return [
|
398
|
+
# @return [SBNamespace] operation results.
|
293
399
|
#
|
294
400
|
def get(resource_group_name, namespace_name, custom_headers = nil)
|
295
401
|
response = get_async(resource_group_name, namespace_name, custom_headers).value!
|
@@ -299,8 +405,9 @@ module Azure::ARM::ServiceBus
|
|
299
405
|
#
|
300
406
|
# Gets a description for the specified namespace.
|
301
407
|
#
|
302
|
-
# @param resource_group_name [String]
|
303
|
-
#
|
408
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
409
|
+
# Azure subscription.
|
410
|
+
# @param namespace_name [String] The namespace name
|
304
411
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
305
412
|
# will be added to the HTTP request.
|
306
413
|
#
|
@@ -313,8 +420,9 @@ module Azure::ARM::ServiceBus
|
|
313
420
|
#
|
314
421
|
# Gets a description for the specified namespace.
|
315
422
|
#
|
316
|
-
# @param resource_group_name [String]
|
317
|
-
#
|
423
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
424
|
+
# Azure subscription.
|
425
|
+
# @param namespace_name [String] The namespace name
|
318
426
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
319
427
|
# to the HTTP request.
|
320
428
|
#
|
@@ -332,7 +440,7 @@ module Azure::ARM::ServiceBus
|
|
332
440
|
# Set Headers
|
333
441
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
334
442
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
335
|
-
path_template = '
|
443
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}'
|
336
444
|
|
337
445
|
request_url = @base_url || @client.base_url
|
338
446
|
|
@@ -351,16 +459,139 @@ module Azure::ARM::ServiceBus
|
|
351
459
|
response_content = http_response.body
|
352
460
|
unless status_code == 200
|
353
461
|
error_model = JSON.load(response_content)
|
354
|
-
fail
|
462
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
463
|
+
end
|
464
|
+
|
465
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
466
|
+
# Deserialize Response
|
467
|
+
if status_code == 200
|
468
|
+
begin
|
469
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
470
|
+
result_mapper = Azure::ARM::ServiceBus::Models::SBNamespace.mapper()
|
471
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
472
|
+
rescue Exception => e
|
473
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
474
|
+
end
|
475
|
+
end
|
476
|
+
|
477
|
+
result
|
478
|
+
end
|
479
|
+
|
480
|
+
promise.execute
|
481
|
+
end
|
482
|
+
|
483
|
+
#
|
484
|
+
# Updates a service namespace. Once created, this namespace's resource manifest
|
485
|
+
# is immutable. This operation is idempotent.
|
486
|
+
#
|
487
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
488
|
+
# Azure subscription.
|
489
|
+
# @param namespace_name [String] The namespace name
|
490
|
+
# @param parameters [SBNamespaceUpdateParameters] Parameters supplied to update
|
491
|
+
# a namespace resource.
|
492
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
493
|
+
# will be added to the HTTP request.
|
494
|
+
#
|
495
|
+
# @return [SBNamespace] operation results.
|
496
|
+
#
|
497
|
+
def update(resource_group_name, namespace_name, parameters, custom_headers = nil)
|
498
|
+
response = update_async(resource_group_name, namespace_name, parameters, custom_headers).value!
|
499
|
+
response.body unless response.nil?
|
500
|
+
end
|
501
|
+
|
502
|
+
#
|
503
|
+
# Updates a service namespace. Once created, this namespace's resource manifest
|
504
|
+
# is immutable. This operation is idempotent.
|
505
|
+
#
|
506
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
507
|
+
# Azure subscription.
|
508
|
+
# @param namespace_name [String] The namespace name
|
509
|
+
# @param parameters [SBNamespaceUpdateParameters] Parameters supplied to update
|
510
|
+
# a namespace resource.
|
511
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
512
|
+
# will be added to the HTTP request.
|
513
|
+
#
|
514
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
515
|
+
#
|
516
|
+
def update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers = nil)
|
517
|
+
update_async(resource_group_name, namespace_name, parameters, custom_headers).value!
|
518
|
+
end
|
519
|
+
|
520
|
+
#
|
521
|
+
# Updates a service namespace. Once created, this namespace's resource manifest
|
522
|
+
# is immutable. This operation is idempotent.
|
523
|
+
#
|
524
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
525
|
+
# Azure subscription.
|
526
|
+
# @param namespace_name [String] The namespace name
|
527
|
+
# @param parameters [SBNamespaceUpdateParameters] Parameters supplied to update
|
528
|
+
# a namespace resource.
|
529
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
530
|
+
# to the HTTP request.
|
531
|
+
#
|
532
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
533
|
+
#
|
534
|
+
def update_async(resource_group_name, namespace_name, parameters, custom_headers = nil)
|
535
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
536
|
+
fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
|
537
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
538
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
539
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
540
|
+
|
541
|
+
|
542
|
+
request_headers = {}
|
543
|
+
|
544
|
+
# Set Headers
|
545
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
546
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
547
|
+
|
548
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
549
|
+
|
550
|
+
# Serialize Request
|
551
|
+
request_mapper = Azure::ARM::ServiceBus::Models::SBNamespaceUpdateParameters.mapper()
|
552
|
+
request_content = @client.serialize(request_mapper, parameters)
|
553
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
554
|
+
|
555
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}'
|
556
|
+
|
557
|
+
request_url = @base_url || @client.base_url
|
558
|
+
|
559
|
+
options = {
|
560
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
561
|
+
path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
|
562
|
+
query_params: {'api-version' => @client.api_version},
|
563
|
+
body: request_content,
|
564
|
+
headers: request_headers.merge(custom_headers || {}),
|
565
|
+
base_url: request_url
|
566
|
+
}
|
567
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
568
|
+
|
569
|
+
promise = promise.then do |result|
|
570
|
+
http_response = result.response
|
571
|
+
status_code = http_response.status
|
572
|
+
response_content = http_response.body
|
573
|
+
unless status_code == 201 || status_code == 200 || status_code == 202
|
574
|
+
error_model = JSON.load(response_content)
|
575
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
355
576
|
end
|
356
577
|
|
357
578
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
358
579
|
# Deserialize Response
|
580
|
+
if status_code == 201
|
581
|
+
begin
|
582
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
583
|
+
result_mapper = Azure::ARM::ServiceBus::Models::SBNamespace.mapper()
|
584
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
585
|
+
rescue Exception => e
|
586
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
587
|
+
end
|
588
|
+
end
|
589
|
+
# Deserialize Response
|
359
590
|
if status_code == 200
|
360
591
|
begin
|
361
592
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
362
|
-
result_mapper =
|
363
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
593
|
+
result_mapper = Azure::ARM::ServiceBus::Models::SBNamespace.mapper()
|
594
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
364
595
|
rescue Exception => e
|
365
596
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
366
597
|
end
|
@@ -375,12 +606,13 @@ module Azure::ARM::ServiceBus
|
|
375
606
|
#
|
376
607
|
# Gets the authorization rules for a namespace.
|
377
608
|
#
|
378
|
-
# @param resource_group_name [String]
|
379
|
-
#
|
609
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
610
|
+
# Azure subscription.
|
611
|
+
# @param namespace_name [String] The namespace name
|
380
612
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
381
613
|
# will be added to the HTTP request.
|
382
614
|
#
|
383
|
-
# @return [Array<
|
615
|
+
# @return [Array<SBAuthorizationRule>] operation results.
|
384
616
|
#
|
385
617
|
def list_authorization_rules(resource_group_name, namespace_name, custom_headers = nil)
|
386
618
|
first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers)
|
@@ -390,8 +622,9 @@ module Azure::ARM::ServiceBus
|
|
390
622
|
#
|
391
623
|
# Gets the authorization rules for a namespace.
|
392
624
|
#
|
393
|
-
# @param resource_group_name [String]
|
394
|
-
#
|
625
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
626
|
+
# Azure subscription.
|
627
|
+
# @param namespace_name [String] The namespace name
|
395
628
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
396
629
|
# will be added to the HTTP request.
|
397
630
|
#
|
@@ -404,8 +637,9 @@ module Azure::ARM::ServiceBus
|
|
404
637
|
#
|
405
638
|
# Gets the authorization rules for a namespace.
|
406
639
|
#
|
407
|
-
# @param resource_group_name [String]
|
408
|
-
#
|
640
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
641
|
+
# Azure subscription.
|
642
|
+
# @param namespace_name [String] The namespace name
|
409
643
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
410
644
|
# to the HTTP request.
|
411
645
|
#
|
@@ -423,7 +657,7 @@ module Azure::ARM::ServiceBus
|
|
423
657
|
# Set Headers
|
424
658
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
425
659
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
426
|
-
path_template = '
|
660
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules'
|
427
661
|
|
428
662
|
request_url = @base_url || @client.base_url
|
429
663
|
|
@@ -442,7 +676,7 @@ module Azure::ARM::ServiceBus
|
|
442
676
|
response_content = http_response.body
|
443
677
|
unless status_code == 200
|
444
678
|
error_model = JSON.load(response_content)
|
445
|
-
fail
|
679
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
446
680
|
end
|
447
681
|
|
448
682
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -450,8 +684,8 @@ module Azure::ARM::ServiceBus
|
|
450
684
|
if status_code == 200
|
451
685
|
begin
|
452
686
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
453
|
-
result_mapper =
|
454
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
687
|
+
result_mapper = Azure::ARM::ServiceBus::Models::SBAuthorizationRuleListResult.mapper()
|
688
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
455
689
|
rescue Exception => e
|
456
690
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
457
691
|
end
|
@@ -466,15 +700,15 @@ module Azure::ARM::ServiceBus
|
|
466
700
|
#
|
467
701
|
# Creates or updates an authorization rule for a namespace.
|
468
702
|
#
|
469
|
-
# @param resource_group_name [String]
|
470
|
-
#
|
471
|
-
# @param
|
472
|
-
# @param
|
473
|
-
# shared access authorization rule.
|
703
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
704
|
+
# Azure subscription.
|
705
|
+
# @param namespace_name [String] The namespace name
|
706
|
+
# @param authorization_rule_name [String] The authorizationrule name.
|
707
|
+
# @param parameters [SBAuthorizationRule] The shared access authorization rule.
|
474
708
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
475
709
|
# will be added to the HTTP request.
|
476
710
|
#
|
477
|
-
# @return [
|
711
|
+
# @return [SBAuthorizationRule] operation results.
|
478
712
|
#
|
479
713
|
def create_or_update_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil)
|
480
714
|
response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value!
|
@@ -484,11 +718,11 @@ module Azure::ARM::ServiceBus
|
|
484
718
|
#
|
485
719
|
# Creates or updates an authorization rule for a namespace.
|
486
720
|
#
|
487
|
-
# @param resource_group_name [String]
|
488
|
-
#
|
489
|
-
# @param
|
490
|
-
# @param
|
491
|
-
# shared access authorization rule.
|
721
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
722
|
+
# Azure subscription.
|
723
|
+
# @param namespace_name [String] The namespace name
|
724
|
+
# @param authorization_rule_name [String] The authorizationrule name.
|
725
|
+
# @param parameters [SBAuthorizationRule] The shared access authorization rule.
|
492
726
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
493
727
|
# will be added to the HTTP request.
|
494
728
|
#
|
@@ -501,11 +735,11 @@ module Azure::ARM::ServiceBus
|
|
501
735
|
#
|
502
736
|
# Creates or updates an authorization rule for a namespace.
|
503
737
|
#
|
504
|
-
# @param resource_group_name [String]
|
505
|
-
#
|
506
|
-
# @param
|
507
|
-
# @param
|
508
|
-
# shared access authorization rule.
|
738
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
739
|
+
# Azure subscription.
|
740
|
+
# @param namespace_name [String] The namespace name
|
741
|
+
# @param authorization_rule_name [String] The authorizationrule name.
|
742
|
+
# @param parameters [SBAuthorizationRule] The shared access authorization rule.
|
509
743
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
510
744
|
# to the HTTP request.
|
511
745
|
#
|
@@ -529,11 +763,11 @@ module Azure::ARM::ServiceBus
|
|
529
763
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
530
764
|
|
531
765
|
# Serialize Request
|
532
|
-
request_mapper =
|
533
|
-
request_content = @client.serialize(request_mapper, parameters
|
766
|
+
request_mapper = Azure::ARM::ServiceBus::Models::SBAuthorizationRule.mapper()
|
767
|
+
request_content = @client.serialize(request_mapper, parameters)
|
534
768
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
535
769
|
|
536
|
-
path_template = '
|
770
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'
|
537
771
|
|
538
772
|
request_url = @base_url || @client.base_url
|
539
773
|
|
@@ -553,7 +787,7 @@ module Azure::ARM::ServiceBus
|
|
553
787
|
response_content = http_response.body
|
554
788
|
unless status_code == 200
|
555
789
|
error_model = JSON.load(response_content)
|
556
|
-
fail
|
790
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
557
791
|
end
|
558
792
|
|
559
793
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -561,8 +795,8 @@ module Azure::ARM::ServiceBus
|
|
561
795
|
if status_code == 200
|
562
796
|
begin
|
563
797
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
564
|
-
result_mapper =
|
565
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
798
|
+
result_mapper = Azure::ARM::ServiceBus::Models::SBAuthorizationRule.mapper()
|
799
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
566
800
|
rescue Exception => e
|
567
801
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
568
802
|
end
|
@@ -577,9 +811,10 @@ module Azure::ARM::ServiceBus
|
|
577
811
|
#
|
578
812
|
# Deletes a namespace authorization rule.
|
579
813
|
#
|
580
|
-
# @param resource_group_name [String]
|
581
|
-
#
|
582
|
-
# @param
|
814
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
815
|
+
# Azure subscription.
|
816
|
+
# @param namespace_name [String] The namespace name
|
817
|
+
# @param authorization_rule_name [String] The authorizationrule name.
|
583
818
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
584
819
|
# will be added to the HTTP request.
|
585
820
|
#
|
@@ -592,9 +827,10 @@ module Azure::ARM::ServiceBus
|
|
592
827
|
#
|
593
828
|
# Deletes a namespace authorization rule.
|
594
829
|
#
|
595
|
-
# @param resource_group_name [String]
|
596
|
-
#
|
597
|
-
# @param
|
830
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
831
|
+
# Azure subscription.
|
832
|
+
# @param namespace_name [String] The namespace name
|
833
|
+
# @param authorization_rule_name [String] The authorizationrule name.
|
598
834
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
599
835
|
# will be added to the HTTP request.
|
600
836
|
#
|
@@ -607,9 +843,10 @@ module Azure::ARM::ServiceBus
|
|
607
843
|
#
|
608
844
|
# Deletes a namespace authorization rule.
|
609
845
|
#
|
610
|
-
# @param resource_group_name [String]
|
611
|
-
#
|
612
|
-
# @param
|
846
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
847
|
+
# Azure subscription.
|
848
|
+
# @param namespace_name [String] The namespace name
|
849
|
+
# @param authorization_rule_name [String] The authorizationrule name.
|
613
850
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
614
851
|
# to the HTTP request.
|
615
852
|
#
|
@@ -628,7 +865,7 @@ module Azure::ARM::ServiceBus
|
|
628
865
|
# Set Headers
|
629
866
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
630
867
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
631
|
-
path_template = '
|
868
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'
|
632
869
|
|
633
870
|
request_url = @base_url || @client.base_url
|
634
871
|
|
@@ -647,7 +884,7 @@ module Azure::ARM::ServiceBus
|
|
647
884
|
response_content = http_response.body
|
648
885
|
unless status_code == 204 || status_code == 200
|
649
886
|
error_model = JSON.load(response_content)
|
650
|
-
fail
|
887
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
651
888
|
end
|
652
889
|
|
653
890
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -661,13 +898,14 @@ module Azure::ARM::ServiceBus
|
|
661
898
|
#
|
662
899
|
# Gets an authorization rule for a namespace by rule name.
|
663
900
|
#
|
664
|
-
# @param resource_group_name [String]
|
665
|
-
#
|
666
|
-
# @param
|
901
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
902
|
+
# Azure subscription.
|
903
|
+
# @param namespace_name [String] The namespace name
|
904
|
+
# @param authorization_rule_name [String] The authorizationrule name.
|
667
905
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
668
906
|
# will be added to the HTTP request.
|
669
907
|
#
|
670
|
-
# @return [
|
908
|
+
# @return [SBAuthorizationRule] operation results.
|
671
909
|
#
|
672
910
|
def get_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
|
673
911
|
response = get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value!
|
@@ -677,9 +915,10 @@ module Azure::ARM::ServiceBus
|
|
677
915
|
#
|
678
916
|
# Gets an authorization rule for a namespace by rule name.
|
679
917
|
#
|
680
|
-
# @param resource_group_name [String]
|
681
|
-
#
|
682
|
-
# @param
|
918
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
919
|
+
# Azure subscription.
|
920
|
+
# @param namespace_name [String] The namespace name
|
921
|
+
# @param authorization_rule_name [String] The authorizationrule name.
|
683
922
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
684
923
|
# will be added to the HTTP request.
|
685
924
|
#
|
@@ -692,9 +931,10 @@ module Azure::ARM::ServiceBus
|
|
692
931
|
#
|
693
932
|
# Gets an authorization rule for a namespace by rule name.
|
694
933
|
#
|
695
|
-
# @param resource_group_name [String]
|
696
|
-
#
|
697
|
-
# @param
|
934
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
935
|
+
# Azure subscription.
|
936
|
+
# @param namespace_name [String] The namespace name
|
937
|
+
# @param authorization_rule_name [String] The authorizationrule name.
|
698
938
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
699
939
|
# to the HTTP request.
|
700
940
|
#
|
@@ -713,7 +953,7 @@ module Azure::ARM::ServiceBus
|
|
713
953
|
# Set Headers
|
714
954
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
715
955
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
716
|
-
path_template = '
|
956
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'
|
717
957
|
|
718
958
|
request_url = @base_url || @client.base_url
|
719
959
|
|
@@ -732,7 +972,7 @@ module Azure::ARM::ServiceBus
|
|
732
972
|
response_content = http_response.body
|
733
973
|
unless status_code == 200
|
734
974
|
error_model = JSON.load(response_content)
|
735
|
-
fail
|
975
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
736
976
|
end
|
737
977
|
|
738
978
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -740,8 +980,8 @@ module Azure::ARM::ServiceBus
|
|
740
980
|
if status_code == 200
|
741
981
|
begin
|
742
982
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
743
|
-
result_mapper =
|
744
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
983
|
+
result_mapper = Azure::ARM::ServiceBus::Models::SBAuthorizationRule.mapper()
|
984
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
745
985
|
rescue Exception => e
|
746
986
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
747
987
|
end
|
@@ -756,13 +996,14 @@ module Azure::ARM::ServiceBus
|
|
756
996
|
#
|
757
997
|
# Gets the primary and secondary connection strings for the namespace.
|
758
998
|
#
|
759
|
-
# @param resource_group_name [String]
|
760
|
-
#
|
761
|
-
# @param
|
999
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
1000
|
+
# Azure subscription.
|
1001
|
+
# @param namespace_name [String] The namespace name
|
1002
|
+
# @param authorization_rule_name [String] The authorizationrule name.
|
762
1003
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
763
1004
|
# will be added to the HTTP request.
|
764
1005
|
#
|
765
|
-
# @return [
|
1006
|
+
# @return [AccessKeys] operation results.
|
766
1007
|
#
|
767
1008
|
def list_keys(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
|
768
1009
|
response = list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value!
|
@@ -772,9 +1013,10 @@ module Azure::ARM::ServiceBus
|
|
772
1013
|
#
|
773
1014
|
# Gets the primary and secondary connection strings for the namespace.
|
774
1015
|
#
|
775
|
-
# @param resource_group_name [String]
|
776
|
-
#
|
777
|
-
# @param
|
1016
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
1017
|
+
# Azure subscription.
|
1018
|
+
# @param namespace_name [String] The namespace name
|
1019
|
+
# @param authorization_rule_name [String] The authorizationrule name.
|
778
1020
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
779
1021
|
# will be added to the HTTP request.
|
780
1022
|
#
|
@@ -787,9 +1029,10 @@ module Azure::ARM::ServiceBus
|
|
787
1029
|
#
|
788
1030
|
# Gets the primary and secondary connection strings for the namespace.
|
789
1031
|
#
|
790
|
-
# @param resource_group_name [String]
|
791
|
-
#
|
792
|
-
# @param
|
1032
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
1033
|
+
# Azure subscription.
|
1034
|
+
# @param namespace_name [String] The namespace name
|
1035
|
+
# @param authorization_rule_name [String] The authorizationrule name.
|
793
1036
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
794
1037
|
# to the HTTP request.
|
795
1038
|
#
|
@@ -808,7 +1051,7 @@ module Azure::ARM::ServiceBus
|
|
808
1051
|
# Set Headers
|
809
1052
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
810
1053
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
811
|
-
path_template = '
|
1054
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys'
|
812
1055
|
|
813
1056
|
request_url = @base_url || @client.base_url
|
814
1057
|
|
@@ -827,7 +1070,7 @@ module Azure::ARM::ServiceBus
|
|
827
1070
|
response_content = http_response.body
|
828
1071
|
unless status_code == 200
|
829
1072
|
error_model = JSON.load(response_content)
|
830
|
-
fail
|
1073
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
831
1074
|
end
|
832
1075
|
|
833
1076
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -835,8 +1078,8 @@ module Azure::ARM::ServiceBus
|
|
835
1078
|
if status_code == 200
|
836
1079
|
begin
|
837
1080
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
838
|
-
result_mapper =
|
839
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
1081
|
+
result_mapper = Azure::ARM::ServiceBus::Models::AccessKeys.mapper()
|
1082
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
840
1083
|
rescue Exception => e
|
841
1084
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
842
1085
|
end
|
@@ -851,15 +1094,16 @@ module Azure::ARM::ServiceBus
|
|
851
1094
|
#
|
852
1095
|
# Regenerates the primary or secondary connection strings for the namespace.
|
853
1096
|
#
|
854
|
-
# @param resource_group_name [String]
|
855
|
-
#
|
856
|
-
# @param
|
857
|
-
# @param
|
1097
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
1098
|
+
# Azure subscription.
|
1099
|
+
# @param namespace_name [String] The namespace name
|
1100
|
+
# @param authorization_rule_name [String] The authorizationrule name.
|
1101
|
+
# @param parameters [RegenerateAccessKeyParameters] Parameters supplied to
|
858
1102
|
# regenerate the authorization rule.
|
859
1103
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
860
1104
|
# will be added to the HTTP request.
|
861
1105
|
#
|
862
|
-
# @return [
|
1106
|
+
# @return [AccessKeys] operation results.
|
863
1107
|
#
|
864
1108
|
def regenerate_keys(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil)
|
865
1109
|
response = regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value!
|
@@ -869,10 +1113,11 @@ module Azure::ARM::ServiceBus
|
|
869
1113
|
#
|
870
1114
|
# Regenerates the primary or secondary connection strings for the namespace.
|
871
1115
|
#
|
872
|
-
# @param resource_group_name [String]
|
873
|
-
#
|
874
|
-
# @param
|
875
|
-
# @param
|
1116
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
1117
|
+
# Azure subscription.
|
1118
|
+
# @param namespace_name [String] The namespace name
|
1119
|
+
# @param authorization_rule_name [String] The authorizationrule name.
|
1120
|
+
# @param parameters [RegenerateAccessKeyParameters] Parameters supplied to
|
876
1121
|
# regenerate the authorization rule.
|
877
1122
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
878
1123
|
# will be added to the HTTP request.
|
@@ -886,10 +1131,11 @@ module Azure::ARM::ServiceBus
|
|
886
1131
|
#
|
887
1132
|
# Regenerates the primary or secondary connection strings for the namespace.
|
888
1133
|
#
|
889
|
-
# @param resource_group_name [String]
|
890
|
-
#
|
891
|
-
# @param
|
892
|
-
# @param
|
1134
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
1135
|
+
# Azure subscription.
|
1136
|
+
# @param namespace_name [String] The namespace name
|
1137
|
+
# @param authorization_rule_name [String] The authorizationrule name.
|
1138
|
+
# @param parameters [RegenerateAccessKeyParameters] Parameters supplied to
|
893
1139
|
# regenerate the authorization rule.
|
894
1140
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
895
1141
|
# to the HTTP request.
|
@@ -914,11 +1160,11 @@ module Azure::ARM::ServiceBus
|
|
914
1160
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
915
1161
|
|
916
1162
|
# Serialize Request
|
917
|
-
request_mapper =
|
918
|
-
request_content = @client.serialize(request_mapper, parameters
|
1163
|
+
request_mapper = Azure::ARM::ServiceBus::Models::RegenerateAccessKeyParameters.mapper()
|
1164
|
+
request_content = @client.serialize(request_mapper, parameters)
|
919
1165
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
920
1166
|
|
921
|
-
path_template = '
|
1167
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys'
|
922
1168
|
|
923
1169
|
request_url = @base_url || @client.base_url
|
924
1170
|
|
@@ -938,7 +1184,7 @@ module Azure::ARM::ServiceBus
|
|
938
1184
|
response_content = http_response.body
|
939
1185
|
unless status_code == 200
|
940
1186
|
error_model = JSON.load(response_content)
|
941
|
-
fail
|
1187
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
942
1188
|
end
|
943
1189
|
|
944
1190
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -946,8 +1192,8 @@ module Azure::ARM::ServiceBus
|
|
946
1192
|
if status_code == 200
|
947
1193
|
begin
|
948
1194
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
949
|
-
result_mapper =
|
950
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
1195
|
+
result_mapper = Azure::ARM::ServiceBus::Models::AccessKeys.mapper()
|
1196
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
951
1197
|
rescue Exception => e
|
952
1198
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
953
1199
|
end
|
@@ -963,14 +1209,15 @@ module Azure::ARM::ServiceBus
|
|
963
1209
|
# Creates or updates a service namespace. Once created, this namespace's
|
964
1210
|
# resource manifest is immutable. This operation is idempotent.
|
965
1211
|
#
|
966
|
-
# @param resource_group_name [String]
|
1212
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
1213
|
+
# Azure subscription.
|
967
1214
|
# @param namespace_name [String] The namespace name.
|
968
|
-
# @param parameters [
|
969
|
-
#
|
1215
|
+
# @param parameters [SBNamespace] Parameters supplied to create a namespace
|
1216
|
+
# resource.
|
970
1217
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
971
1218
|
# will be added to the HTTP request.
|
972
1219
|
#
|
973
|
-
# @return [
|
1220
|
+
# @return [SBNamespace] operation results.
|
974
1221
|
#
|
975
1222
|
def begin_create_or_update(resource_group_name, namespace_name, parameters, custom_headers = nil)
|
976
1223
|
response = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers).value!
|
@@ -981,10 +1228,11 @@ module Azure::ARM::ServiceBus
|
|
981
1228
|
# Creates or updates a service namespace. Once created, this namespace's
|
982
1229
|
# resource manifest is immutable. This operation is idempotent.
|
983
1230
|
#
|
984
|
-
# @param resource_group_name [String]
|
1231
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
1232
|
+
# Azure subscription.
|
985
1233
|
# @param namespace_name [String] The namespace name.
|
986
|
-
# @param parameters [
|
987
|
-
#
|
1234
|
+
# @param parameters [SBNamespace] Parameters supplied to create a namespace
|
1235
|
+
# resource.
|
988
1236
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
989
1237
|
# will be added to the HTTP request.
|
990
1238
|
#
|
@@ -998,10 +1246,11 @@ module Azure::ARM::ServiceBus
|
|
998
1246
|
# Creates or updates a service namespace. Once created, this namespace's
|
999
1247
|
# resource manifest is immutable. This operation is idempotent.
|
1000
1248
|
#
|
1001
|
-
# @param resource_group_name [String]
|
1249
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
1250
|
+
# Azure subscription.
|
1002
1251
|
# @param namespace_name [String] The namespace name.
|
1003
|
-
# @param parameters [
|
1004
|
-
#
|
1252
|
+
# @param parameters [SBNamespace] Parameters supplied to create a namespace
|
1253
|
+
# resource.
|
1005
1254
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1006
1255
|
# to the HTTP request.
|
1007
1256
|
#
|
@@ -1024,11 +1273,11 @@ module Azure::ARM::ServiceBus
|
|
1024
1273
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1025
1274
|
|
1026
1275
|
# Serialize Request
|
1027
|
-
request_mapper =
|
1028
|
-
request_content = @client.serialize(request_mapper, parameters
|
1276
|
+
request_mapper = Azure::ARM::ServiceBus::Models::SBNamespace.mapper()
|
1277
|
+
request_content = @client.serialize(request_mapper, parameters)
|
1029
1278
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1030
1279
|
|
1031
|
-
path_template = '
|
1280
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}'
|
1032
1281
|
|
1033
1282
|
request_url = @base_url || @client.base_url
|
1034
1283
|
|
@@ -1048,7 +1297,7 @@ module Azure::ARM::ServiceBus
|
|
1048
1297
|
response_content = http_response.body
|
1049
1298
|
unless status_code == 201 || status_code == 200 || status_code == 202
|
1050
1299
|
error_model = JSON.load(response_content)
|
1051
|
-
fail
|
1300
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1052
1301
|
end
|
1053
1302
|
|
1054
1303
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -1056,8 +1305,8 @@ module Azure::ARM::ServiceBus
|
|
1056
1305
|
if status_code == 201
|
1057
1306
|
begin
|
1058
1307
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1059
|
-
result_mapper =
|
1060
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
1308
|
+
result_mapper = Azure::ARM::ServiceBus::Models::SBNamespace.mapper()
|
1309
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1061
1310
|
rescue Exception => e
|
1062
1311
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1063
1312
|
end
|
@@ -1066,8 +1315,8 @@ module Azure::ARM::ServiceBus
|
|
1066
1315
|
if status_code == 200
|
1067
1316
|
begin
|
1068
1317
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1069
|
-
result_mapper =
|
1070
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
1318
|
+
result_mapper = Azure::ARM::ServiceBus::Models::SBNamespace.mapper()
|
1319
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1071
1320
|
rescue Exception => e
|
1072
1321
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1073
1322
|
end
|
@@ -1083,8 +1332,9 @@ module Azure::ARM::ServiceBus
|
|
1083
1332
|
# Deletes an existing namespace. This operation also removes all associated
|
1084
1333
|
# resources under the namespace.
|
1085
1334
|
#
|
1086
|
-
# @param resource_group_name [String]
|
1087
|
-
#
|
1335
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
1336
|
+
# Azure subscription.
|
1337
|
+
# @param namespace_name [String] The namespace name
|
1088
1338
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1089
1339
|
# will be added to the HTTP request.
|
1090
1340
|
#
|
@@ -1098,8 +1348,9 @@ module Azure::ARM::ServiceBus
|
|
1098
1348
|
# Deletes an existing namespace. This operation also removes all associated
|
1099
1349
|
# resources under the namespace.
|
1100
1350
|
#
|
1101
|
-
# @param resource_group_name [String]
|
1102
|
-
#
|
1351
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
1352
|
+
# Azure subscription.
|
1353
|
+
# @param namespace_name [String] The namespace name
|
1103
1354
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1104
1355
|
# will be added to the HTTP request.
|
1105
1356
|
#
|
@@ -1113,8 +1364,9 @@ module Azure::ARM::ServiceBus
|
|
1113
1364
|
# Deletes an existing namespace. This operation also removes all associated
|
1114
1365
|
# resources under the namespace.
|
1115
1366
|
#
|
1116
|
-
# @param resource_group_name [String]
|
1117
|
-
#
|
1367
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
1368
|
+
# Azure subscription.
|
1369
|
+
# @param namespace_name [String] The namespace name
|
1118
1370
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1119
1371
|
# to the HTTP request.
|
1120
1372
|
#
|
@@ -1132,7 +1384,7 @@ module Azure::ARM::ServiceBus
|
|
1132
1384
|
# Set Headers
|
1133
1385
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1134
1386
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1135
|
-
path_template = '
|
1387
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}'
|
1136
1388
|
|
1137
1389
|
request_url = @base_url || @client.base_url
|
1138
1390
|
|
@@ -1151,7 +1403,7 @@ module Azure::ARM::ServiceBus
|
|
1151
1403
|
response_content = http_response.body
|
1152
1404
|
unless status_code == 204 || status_code == 200 || status_code == 202
|
1153
1405
|
error_model = JSON.load(response_content)
|
1154
|
-
fail
|
1406
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1155
1407
|
end
|
1156
1408
|
|
1157
1409
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -1171,10 +1423,10 @@ module Azure::ARM::ServiceBus
|
|
1171
1423
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1172
1424
|
# will be added to the HTTP request.
|
1173
1425
|
#
|
1174
|
-
# @return [
|
1426
|
+
# @return [SBNamespaceListResult] operation results.
|
1175
1427
|
#
|
1176
|
-
def
|
1177
|
-
response =
|
1428
|
+
def list_next(next_page_link, custom_headers = nil)
|
1429
|
+
response = list_next_async(next_page_link, custom_headers).value!
|
1178
1430
|
response.body unless response.nil?
|
1179
1431
|
end
|
1180
1432
|
|
@@ -1189,8 +1441,8 @@ module Azure::ARM::ServiceBus
|
|
1189
1441
|
#
|
1190
1442
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1191
1443
|
#
|
1192
|
-
def
|
1193
|
-
|
1444
|
+
def list_next_with_http_info(next_page_link, custom_headers = nil)
|
1445
|
+
list_next_async(next_page_link, custom_headers).value!
|
1194
1446
|
end
|
1195
1447
|
|
1196
1448
|
#
|
@@ -1204,7 +1456,7 @@ module Azure::ARM::ServiceBus
|
|
1204
1456
|
#
|
1205
1457
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1206
1458
|
#
|
1207
|
-
def
|
1459
|
+
def list_next_async(next_page_link, custom_headers = nil)
|
1208
1460
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1209
1461
|
|
1210
1462
|
|
@@ -1231,7 +1483,7 @@ module Azure::ARM::ServiceBus
|
|
1231
1483
|
response_content = http_response.body
|
1232
1484
|
unless status_code == 200
|
1233
1485
|
error_model = JSON.load(response_content)
|
1234
|
-
fail
|
1486
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1235
1487
|
end
|
1236
1488
|
|
1237
1489
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -1239,8 +1491,8 @@ module Azure::ARM::ServiceBus
|
|
1239
1491
|
if status_code == 200
|
1240
1492
|
begin
|
1241
1493
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1242
|
-
result_mapper =
|
1243
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
1494
|
+
result_mapper = Azure::ARM::ServiceBus::Models::SBNamespaceListResult.mapper()
|
1495
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1244
1496
|
rescue Exception => e
|
1245
1497
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1246
1498
|
end
|
@@ -1260,7 +1512,7 @@ module Azure::ARM::ServiceBus
|
|
1260
1512
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1261
1513
|
# will be added to the HTTP request.
|
1262
1514
|
#
|
1263
|
-
# @return [
|
1515
|
+
# @return [SBNamespaceListResult] operation results.
|
1264
1516
|
#
|
1265
1517
|
def list_by_resource_group_next(next_page_link, custom_headers = nil)
|
1266
1518
|
response = list_by_resource_group_next_async(next_page_link, custom_headers).value!
|
@@ -1318,7 +1570,7 @@ module Azure::ARM::ServiceBus
|
|
1318
1570
|
response_content = http_response.body
|
1319
1571
|
unless status_code == 200
|
1320
1572
|
error_model = JSON.load(response_content)
|
1321
|
-
fail
|
1573
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1322
1574
|
end
|
1323
1575
|
|
1324
1576
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -1326,8 +1578,8 @@ module Azure::ARM::ServiceBus
|
|
1326
1578
|
if status_code == 200
|
1327
1579
|
begin
|
1328
1580
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1329
|
-
result_mapper =
|
1330
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
1581
|
+
result_mapper = Azure::ARM::ServiceBus::Models::SBNamespaceListResult.mapper()
|
1582
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1331
1583
|
rescue Exception => e
|
1332
1584
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1333
1585
|
end
|
@@ -1347,7 +1599,7 @@ module Azure::ARM::ServiceBus
|
|
1347
1599
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1348
1600
|
# will be added to the HTTP request.
|
1349
1601
|
#
|
1350
|
-
# @return [
|
1602
|
+
# @return [SBAuthorizationRuleListResult] operation results.
|
1351
1603
|
#
|
1352
1604
|
def list_authorization_rules_next(next_page_link, custom_headers = nil)
|
1353
1605
|
response = list_authorization_rules_next_async(next_page_link, custom_headers).value!
|
@@ -1405,7 +1657,7 @@ module Azure::ARM::ServiceBus
|
|
1405
1657
|
response_content = http_response.body
|
1406
1658
|
unless status_code == 200
|
1407
1659
|
error_model = JSON.load(response_content)
|
1408
|
-
fail
|
1660
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1409
1661
|
end
|
1410
1662
|
|
1411
1663
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -1413,8 +1665,8 @@ module Azure::ARM::ServiceBus
|
|
1413
1665
|
if status_code == 200
|
1414
1666
|
begin
|
1415
1667
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1416
|
-
result_mapper =
|
1417
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
1668
|
+
result_mapper = Azure::ARM::ServiceBus::Models::SBAuthorizationRuleListResult.mapper()
|
1669
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1418
1670
|
rescue Exception => e
|
1419
1671
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1420
1672
|
end
|
@@ -1433,15 +1685,15 @@ module Azure::ARM::ServiceBus
|
|
1433
1685
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1434
1686
|
# will be added to the HTTP request.
|
1435
1687
|
#
|
1436
|
-
# @return [
|
1688
|
+
# @return [SBNamespaceListResult] which provide lazy access to pages of the
|
1437
1689
|
# response.
|
1438
1690
|
#
|
1439
|
-
def
|
1440
|
-
response =
|
1691
|
+
def list_as_lazy(custom_headers = nil)
|
1692
|
+
response = list_async(custom_headers).value!
|
1441
1693
|
unless response.nil?
|
1442
1694
|
page = response.body
|
1443
1695
|
page.next_method = Proc.new do |next_page_link|
|
1444
|
-
|
1696
|
+
list_next_async(next_page_link, custom_headers)
|
1445
1697
|
end
|
1446
1698
|
page
|
1447
1699
|
end
|
@@ -1450,11 +1702,12 @@ module Azure::ARM::ServiceBus
|
|
1450
1702
|
#
|
1451
1703
|
# Gets the available namespaces within a resource group.
|
1452
1704
|
#
|
1453
|
-
# @param resource_group_name [String]
|
1705
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
1706
|
+
# Azure subscription.
|
1454
1707
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1455
1708
|
# will be added to the HTTP request.
|
1456
1709
|
#
|
1457
|
-
# @return [
|
1710
|
+
# @return [SBNamespaceListResult] which provide lazy access to pages of the
|
1458
1711
|
# response.
|
1459
1712
|
#
|
1460
1713
|
def list_by_resource_group_as_lazy(resource_group_name, custom_headers = nil)
|
@@ -1471,13 +1724,14 @@ module Azure::ARM::ServiceBus
|
|
1471
1724
|
#
|
1472
1725
|
# Gets the authorization rules for a namespace.
|
1473
1726
|
#
|
1474
|
-
# @param resource_group_name [String]
|
1475
|
-
#
|
1727
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
1728
|
+
# Azure subscription.
|
1729
|
+
# @param namespace_name [String] The namespace name
|
1476
1730
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1477
1731
|
# will be added to the HTTP request.
|
1478
1732
|
#
|
1479
|
-
# @return [
|
1480
|
-
#
|
1733
|
+
# @return [SBAuthorizationRuleListResult] which provide lazy access to pages of
|
1734
|
+
# the response.
|
1481
1735
|
#
|
1482
1736
|
def list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers = nil)
|
1483
1737
|
response = list_authorization_rules_async(resource_group_name, namespace_name, custom_headers).value!
|