Class: Azure::ServiceBus::Mgmt::V2015_08_01::Namespaces
- Inherits:
-
Object
- Object
- Azure::ServiceBus::Mgmt::V2015_08_01::Namespaces
- Includes:
- MsRestAzure
- Defined in:
- lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb
Overview
Azure Service Bus client
Instance Attribute Summary collapse
-
#client ⇒ ServiceBusManagementClient
readonly
Reference to the ServiceBusManagementClient.
Instance Method Summary collapse
-
#begin_create_or_update(resource_group_name, namespace_name, parameters, custom_headers: nil) ⇒ NamespaceResource
Creates or updates a service namespace.
-
#begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Creates or updates a service namespace.
-
#begin_create_or_update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates or updates a service namespace.
-
#begin_delete(resource_group_name, namespace_name, custom_headers: nil) ⇒ Object
Deletes an existing namespace.
-
#begin_delete_async(resource_group_name, namespace_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes an existing namespace.
-
#begin_delete_with_http_info(resource_group_name, namespace_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes an existing namespace.
-
#check_name_availability_method(parameters, custom_headers: nil) ⇒ CheckNameAvailabilityResult
Check the give namespace name availability.
-
#check_name_availability_method_async(parameters, custom_headers: nil) ⇒ Concurrent::Promise
Check the give namespace name availability.
-
#check_name_availability_method_with_http_info(parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Check the give namespace name availability.
-
#create_or_update(resource_group_name, namespace_name, parameters, custom_headers: nil) ⇒ NamespaceResource
Creates or updates a service namespace.
-
#create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Azure subscription.
-
#create_or_update_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers: nil) ⇒ SharedAccessAuthorizationRuleResource
Creates or updates an authorization rule for a namespace.
-
#create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Creates or updates an authorization rule for a namespace.
-
#create_or_update_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates or updates an authorization rule for a namespace.
-
#delete(resource_group_name, namespace_name, custom_headers: nil) ⇒ Object
Deletes an existing namespace.
-
#delete_async(resource_group_name, namespace_name, custom_headers: nil) ⇒ Concurrent::Promise
Azure subscription.
-
#delete_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers: nil) ⇒ Object
Deletes a namespace authorization rule.
-
#delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a namespace authorization rule.
-
#delete_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a namespace authorization rule.
-
#get(resource_group_name, namespace_name, custom_headers: nil) ⇒ NamespaceResource
Gets a description for the specified namespace.
-
#get_async(resource_group_name, namespace_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a description for the specified namespace.
-
#get_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers: nil) ⇒ SharedAccessAuthorizationRuleResource
Gets an authorization rule for a namespace by rule name.
-
#get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets an authorization rule for a namespace by rule name.
-
#get_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets an authorization rule for a namespace by rule name.
-
#get_with_http_info(resource_group_name, namespace_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a description for the specified namespace.
-
#initialize(client) ⇒ Namespaces
constructor
Creates and initializes a new instance of the Namespaces class.
-
#list_authorization_rules(resource_group_name, namespace_name, custom_headers: nil) ⇒ Array<SharedAccessAuthorizationRuleResource>
Gets the authorization rules for a namespace.
-
#list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers: nil) ⇒ SharedAccessAuthorizationRuleListResult
Gets the authorization rules for a namespace.
-
#list_authorization_rules_async(resource_group_name, namespace_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the authorization rules for a namespace.
-
#list_authorization_rules_next(next_page_link, custom_headers: nil) ⇒ SharedAccessAuthorizationRuleListResult
Gets the authorization rules for a namespace.
-
#list_authorization_rules_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets the authorization rules for a namespace.
-
#list_authorization_rules_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the authorization rules for a namespace.
-
#list_authorization_rules_with_http_info(resource_group_name, namespace_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the authorization rules for a namespace.
-
#list_by_resource_group(resource_group_name, custom_headers: nil) ⇒ Array<NamespaceResource>
Gets the available namespaces within a resource group.
-
#list_by_resource_group_as_lazy(resource_group_name, custom_headers: nil) ⇒ NamespaceListResult
Gets the available namespaces within a resource group.
-
#list_by_resource_group_async(resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the available namespaces within a resource group.
-
#list_by_resource_group_next(next_page_link, custom_headers: nil) ⇒ NamespaceListResult
Gets the available namespaces within a resource group.
-
#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets the available namespaces within a resource group.
-
#list_by_resource_group_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the available namespaces within a resource group.
-
#list_by_resource_group_with_http_info(resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the available namespaces within a resource group.
-
#list_by_subscription(custom_headers: nil) ⇒ Array<NamespaceResource>
Gets all the available namespaces within the subscription, irrespective of the resource groups.
-
#list_by_subscription_as_lazy(custom_headers: nil) ⇒ NamespaceListResult
Gets all the available namespaces within the subscription, irrespective of the resource groups.
-
#list_by_subscription_async(custom_headers: nil) ⇒ Concurrent::Promise
Gets all the available namespaces within the subscription, irrespective of the resource groups.
-
#list_by_subscription_next(next_page_link, custom_headers: nil) ⇒ NamespaceListResult
Gets all the available namespaces within the subscription, irrespective of the resource groups.
-
#list_by_subscription_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the available namespaces within the subscription, irrespective of the resource groups.
-
#list_by_subscription_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the available namespaces within the subscription, irrespective of the resource groups.
-
#list_by_subscription_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the available namespaces within the subscription, irrespective of the resource groups.
-
#list_keys(resource_group_name, namespace_name, authorization_rule_name, custom_headers: nil) ⇒ ResourceListKeys
Gets the primary and secondary connection strings for the namespace.
-
#list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the primary and secondary connection strings for the namespace.
-
#list_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the primary and secondary connection strings for the namespace.
-
#regenerate_keys(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers: nil) ⇒ ResourceListKeys
Regenerates the primary or secondary connection strings for the namespace.
-
#regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Regenerates the primary or secondary connection strings for the namespace.
-
#regenerate_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Regenerates the primary or secondary connection strings for the namespace.
-
#update(resource_group_name, namespace_name, parameters, custom_headers: nil) ⇒ NamespaceResource
Updates a service namespace.
-
#update_async(resource_group_name, namespace_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Updates a service namespace.
-
#update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates a service namespace.
Constructor Details
#initialize(client) ⇒ Namespaces
Creates and initializes a new instance of the Namespaces class.
17 18 19 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ ServiceBusManagementClient (readonly)
Returns reference to the ServiceBusManagementClient.
22 23 24 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 22 def client @client end |
Instance Method Details
#begin_create_or_update(resource_group_name, namespace_name, parameters, custom_headers: nil) ⇒ NamespaceResource
Creates or updates a service namespace. Once created, this namespace’s resource manifest is immutable. This operation is idempotent.
Azure subscription. create a namespace resource. will be added to the HTTP request.
1272 1273 1274 1275 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1272 def begin_create_or_update(resource_group_name, namespace_name, parameters, custom_headers:nil) response = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Creates or updates a service namespace. Once created, this namespace’s resource manifest is immutable. This operation is idempotent.
Azure subscription. create a namespace resource. to the HTTP request.
1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1309 def begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceCreateOrUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 201 || status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_create_or_update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates or updates a service namespace. Once created, this namespace’s resource manifest is immutable. This operation is idempotent.
Azure subscription. create a namespace resource. will be added to the HTTP request.
1291 1292 1293 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1291 def begin_create_or_update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value! end |
#begin_delete(resource_group_name, namespace_name, custom_headers: nil) ⇒ Object
Deletes an existing namespace. This operation also removes all associated resources under the namespace.
Azure subscription. will be added to the HTTP request.
1393 1394 1395 1396 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1393 def begin_delete(resource_group_name, namespace_name, custom_headers:nil) response = begin_delete_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! nil end |
#begin_delete_async(resource_group_name, namespace_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes an existing namespace. This operation also removes all associated resources under the namespace.
Azure subscription. to the HTTP request.
1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1426 def begin_delete_async(resource_group_name, namespace_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 || status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end promise.execute end |
#begin_delete_with_http_info(resource_group_name, namespace_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes an existing namespace. This operation also removes all associated resources under the namespace.
Azure subscription. will be added to the HTTP request.
1410 1411 1412 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1410 def begin_delete_with_http_info(resource_group_name, namespace_name, custom_headers:nil) begin_delete_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! end |
#check_name_availability_method(parameters, custom_headers: nil) ⇒ CheckNameAvailabilityResult
Check the give namespace name availability.
the given namespace name will be added to the HTTP request.
34 35 36 37 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 34 def check_name_availability_method(parameters, custom_headers:nil) response = check_name_availability_method_async(parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#check_name_availability_method_async(parameters, custom_headers: nil) ⇒ Concurrent::Promise
Check the give namespace name availability.
the given namespace name to the HTTP request.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 63 def check_name_availability_method_async(parameters, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::CheckNameAvailability.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/CheckNameAvailability' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::CheckNameAvailabilityResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#check_name_availability_method_with_http_info(parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Check the give namespace name availability.
the given namespace name will be added to the HTTP request.
49 50 51 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 49 def check_name_availability_method_with_http_info(parameters, custom_headers:nil) check_name_availability_method_async(parameters, custom_headers:custom_headers).value! end |
#create_or_update(resource_group_name, namespace_name, parameters, custom_headers: nil) ⇒ NamespaceResource
Creates or updates a service namespace. Once created, this namespace’s resource manifest is immutable. This operation is idempotent.
Azure subscription. create a namespace resource. will be added to the HTTP request.
316 317 318 319 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 316 def create_or_update(resource_group_name, namespace_name, parameters, custom_headers:nil) response = create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Azure subscription. create a namespace resource. will be added to the HTTP request.
response.
333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 333 def create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:nil) # Send request promise = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceResource.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#create_or_update_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers: nil) ⇒ SharedAccessAuthorizationRuleResource
Creates or updates an authorization rule for a namespace.
Azure subscription. shared access authorization rule. will be added to the HTTP request.
730 731 732 733 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 730 def (resource_group_name, namespace_name, , parameters, custom_headers:nil) response = (resource_group_name, namespace_name, , parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Creates or updates an authorization rule for a namespace.
Azure subscription. shared access authorization rule. to the HTTP request.
767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 767 def (resource_group_name, namespace_name, , parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'authorization_rule_name is nil' if .nil? fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MaxLength': '50'" if !.nil? && .length > 50 fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !.nil? && .length < 1 fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::SharedAccessAuthorizationRuleCreateOrUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => ,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::SharedAccessAuthorizationRuleResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#create_or_update_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates or updates an authorization rule for a namespace.
Azure subscription. shared access authorization rule. will be added to the HTTP request.
749 750 751 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 749 def (resource_group_name, namespace_name, , parameters, custom_headers:nil) (resource_group_name, namespace_name, , parameters, custom_headers:custom_headers).value! end |
#delete(resource_group_name, namespace_name, custom_headers: nil) ⇒ Object
Deletes an existing namespace. This operation also removes all associated resources under the namespace.
Azure subscription. will be added to the HTTP request.
361 362 363 364 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 361 def delete(resource_group_name, namespace_name, custom_headers:nil) response = delete_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! nil end |
#delete_async(resource_group_name, namespace_name, custom_headers: nil) ⇒ Concurrent::Promise
Azure subscription. will be added to the HTTP request.
response.
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 376 def delete_async(resource_group_name, namespace_name, custom_headers:nil) # Send request promise = begin_delete_async(resource_group_name, namespace_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#delete_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers: nil) ⇒ Object
Deletes a namespace authorization rule.
Azure subscription. will be added to the HTTP request.
846 847 848 849 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 846 def (resource_group_name, namespace_name, , custom_headers:nil) response = (resource_group_name, namespace_name, , custom_headers:custom_headers).value! nil end |
#delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a namespace authorization rule.
Azure subscription. to the HTTP request.
879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 879 def (resource_group_name, namespace_name, , custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'authorization_rule_name is nil' if .nil? fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MaxLength': '50'" if !.nil? && .length > 50 fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !.nil? && .length < 1 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => ,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 || status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end promise.execute end |
#delete_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a namespace authorization rule.
Azure subscription. will be added to the HTTP request.
863 864 865 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 863 def (resource_group_name, namespace_name, , custom_headers:nil) (resource_group_name, namespace_name, , custom_headers:custom_headers).value! end |
#get(resource_group_name, namespace_name, custom_headers: nil) ⇒ NamespaceResource
Gets a description for the specified namespace.
Azure subscription. will be added to the HTTP request.
403 404 405 406 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 403 def get(resource_group_name, namespace_name, custom_headers:nil) response = get_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(resource_group_name, namespace_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a description for the specified namespace.
Azure subscription. to the HTTP request.
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 434 def get_async(resource_group_name, namespace_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers: nil) ⇒ SharedAccessAuthorizationRuleResource
Gets an authorization rule for a namespace by rule name.
Azure subscription. will be added to the HTTP request.
941 942 943 944 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 941 def (resource_group_name, namespace_name, , custom_headers:nil) response = (resource_group_name, namespace_name, , custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets an authorization rule for a namespace by rule name.
Azure subscription. to the HTTP request.
974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 974 def (resource_group_name, namespace_name, , custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'authorization_rule_name is nil' if .nil? fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MaxLength': '50'" if !.nil? && .length > 50 fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !.nil? && .length < 1 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => ,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::SharedAccessAuthorizationRuleResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets an authorization rule for a namespace by rule name.
Azure subscription. will be added to the HTTP request.
958 959 960 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 958 def (resource_group_name, namespace_name, , custom_headers:nil) (resource_group_name, namespace_name, , custom_headers:custom_headers).value! end |
#get_with_http_info(resource_group_name, namespace_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a description for the specified namespace.
Azure subscription. will be added to the HTTP request.
419 420 421 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 419 def get_with_http_info(resource_group_name, namespace_name, custom_headers:nil) get_async(resource_group_name, namespace_name, custom_headers:custom_headers).value! end |
#list_authorization_rules(resource_group_name, namespace_name, custom_headers: nil) ⇒ Array<SharedAccessAuthorizationRuleResource>
Gets the authorization rules for a namespace.
Azure subscription. will be added to the HTTP request.
628 629 630 631 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 628 def (resource_group_name, namespace_name, custom_headers:nil) first_page = (resource_group_name, namespace_name, custom_headers:custom_headers) first_page.get_all_items end |
#list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers: nil) ⇒ SharedAccessAuthorizationRuleListResult
Gets the authorization rules for a namespace.
Azure subscription. will be added to the HTTP request.
to pages of the response.
1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1795 def (resource_group_name, namespace_name, custom_headers:nil) response = (resource_group_name, namespace_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| (next_page_link, custom_headers:custom_headers) end page end end |
#list_authorization_rules_async(resource_group_name, namespace_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the authorization rules for a namespace.
Azure subscription. to the HTTP request.
659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 659 def (resource_group_name, namespace_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::SharedAccessAuthorizationRuleListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_authorization_rules_next(next_page_link, custom_headers: nil) ⇒ SharedAccessAuthorizationRuleListResult
Gets the authorization rules for a namespace.
to List operation. will be added to the HTTP request.
1662 1663 1664 1665 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1662 def (next_page_link, custom_headers:nil) response = (next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_authorization_rules_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets the authorization rules for a namespace.
to List operation. to the HTTP request.
1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1691 def (next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::SharedAccessAuthorizationRuleListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_authorization_rules_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the authorization rules for a namespace.
to List operation. will be added to the HTTP request.
1677 1678 1679 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1677 def (next_page_link, custom_headers:nil) (next_page_link, custom_headers:custom_headers).value! end |
#list_authorization_rules_with_http_info(resource_group_name, namespace_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the authorization rules for a namespace.
Azure subscription. will be added to the HTTP request.
644 645 646 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 644 def (resource_group_name, namespace_name, custom_headers:nil) (resource_group_name, namespace_name, custom_headers:custom_headers).value! end |
#list_by_resource_group(resource_group_name, custom_headers: nil) ⇒ Array<NamespaceResource>
Gets the available namespaces within a resource group.
Azure subscription. will be added to the HTTP request.
219 220 221 222 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 219 def list_by_resource_group(resource_group_name, custom_headers:nil) first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers) first_page.get_all_items end |
#list_by_resource_group_as_lazy(resource_group_name, custom_headers: nil) ⇒ NamespaceListResult
Gets the available namespaces within a resource group.
Azure subscription. will be added to the HTTP request.
response.
1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1772 def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil) response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_by_resource_group_async(resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the available namespaces within a resource group.
Azure subscription. to the HTTP request.
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 248 def list_by_resource_group_async(resource_group_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_resource_group_next(next_page_link, custom_headers: nil) ⇒ NamespaceListResult
Gets the available namespaces within a resource group.
to List operation. will be added to the HTTP request.
1574 1575 1576 1577 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1574 def list_by_resource_group_next(next_page_link, custom_headers:nil) response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets the available namespaces within a resource group.
to List operation. to the HTTP request.
1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1603 def list_by_resource_group_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_resource_group_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the available namespaces within a resource group.
to List operation. will be added to the HTTP request.
1589 1590 1591 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1589 def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil) list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_by_resource_group_with_http_info(resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the available namespaces within a resource group.
Azure subscription. will be added to the HTTP request.
234 235 236 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 234 def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil) list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value! end |
#list_by_subscription(custom_headers: nil) ⇒ Array<NamespaceResource>
Gets all the available namespaces within the subscription, irrespective of the resource groups.
will be added to the HTTP request.
131 132 133 134 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 131 def list_by_subscription(custom_headers:nil) first_page = list_by_subscription_as_lazy(custom_headers:custom_headers) first_page.get_all_items end |
#list_by_subscription_as_lazy(custom_headers: nil) ⇒ NamespaceListResult
Gets all the available namespaces within the subscription, irrespective of the resource groups.
will be added to the HTTP request.
response.
1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1750 def list_by_subscription_as_lazy(custom_headers:nil) response = list_by_subscription_async(custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_subscription_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_by_subscription_async(custom_headers: nil) ⇒ Concurrent::Promise
Gets all the available namespaces within the subscription, irrespective of the resource groups.
to the HTTP request.
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 158 def list_by_subscription_async(custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/namespaces' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_subscription_next(next_page_link, custom_headers: nil) ⇒ NamespaceListResult
Gets all the available namespaces within the subscription, irrespective of the resource groups.
to List operation. will be added to the HTTP request.
1484 1485 1486 1487 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1484 def list_by_subscription_next(next_page_link, custom_headers:nil) response = list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_subscription_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the available namespaces within the subscription, irrespective of the resource groups.
to List operation. to the HTTP request.
1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1515 def list_by_subscription_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_subscription_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the available namespaces within the subscription, irrespective of the resource groups.
to List operation. will be added to the HTTP request.
1500 1501 1502 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1500 def list_by_subscription_next_with_http_info(next_page_link, custom_headers:nil) list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_by_subscription_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the available namespaces within the subscription, irrespective of the resource groups.
will be added to the HTTP request.
145 146 147 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 145 def list_by_subscription_with_http_info(custom_headers:nil) list_by_subscription_async(custom_headers:custom_headers).value! end |
#list_keys(resource_group_name, namespace_name, authorization_rule_name, custom_headers: nil) ⇒ ResourceListKeys
Gets the primary and secondary connection strings for the namespace.
Azure subscription. will be added to the HTTP request.
1046 1047 1048 1049 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1046 def list_keys(resource_group_name, namespace_name, , custom_headers:nil) response = list_keys_async(resource_group_name, namespace_name, , custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the primary and secondary connection strings for the namespace.
Azure subscription. to the HTTP request.
1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1079 def list_keys_async(resource_group_name, namespace_name, , custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'authorization_rule_name is nil' if .nil? fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MaxLength': '50'" if !.nil? && .length > 50 fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !.nil? && .length < 1 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => ,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::ResourceListKeys.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the primary and secondary connection strings for the namespace.
Azure subscription. will be added to the HTTP request.
1063 1064 1065 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1063 def list_keys_with_http_info(resource_group_name, namespace_name, , custom_headers:nil) list_keys_async(resource_group_name, namespace_name, , custom_headers:custom_headers).value! end |
#regenerate_keys(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers: nil) ⇒ ResourceListKeys
Regenerates the primary or secondary connection strings for the namespace.
Azure subscription. regenerate the authorization rule. will be added to the HTTP request.
1153 1154 1155 1156 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1153 def regenerate_keys(resource_group_name, namespace_name, , parameters, custom_headers:nil) response = regenerate_keys_async(resource_group_name, namespace_name, , parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Regenerates the primary or secondary connection strings for the namespace.
Azure subscription. regenerate the authorization rule. to the HTTP request.
1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1190 def regenerate_keys_async(resource_group_name, namespace_name, , parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'authorization_rule_name is nil' if .nil? fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MaxLength': '50'" if !.nil? && .length > 50 fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !.nil? && .length < 1 fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::RegenerateKeysParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => ,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::ResourceListKeys.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#regenerate_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Regenerates the primary or secondary connection strings for the namespace.
Azure subscription. regenerate the authorization rule. will be added to the HTTP request.
1172 1173 1174 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 1172 def regenerate_keys_with_http_info(resource_group_name, namespace_name, , parameters, custom_headers:nil) regenerate_keys_async(resource_group_name, namespace_name, , parameters, custom_headers:custom_headers).value! end |
#update(resource_group_name, namespace_name, parameters, custom_headers: nil) ⇒ NamespaceResource
Updates a service namespace. Once created, this namespace’s resource manifest is immutable. This operation is idempotent.
Azure subscription. namespace resource. will be added to the HTTP request.
505 506 507 508 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 505 def update(resource_group_name, namespace_name, parameters, custom_headers:nil) response = update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#update_async(resource_group_name, namespace_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Updates a service namespace. Once created, this namespace’s resource manifest is immutable. This operation is idempotent.
Azure subscription. namespace resource. to the HTTP request.
542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 542 def update_async(resource_group_name, namespace_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50 fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6 fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 201 || status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates a service namespace. Once created, this namespace’s resource manifest is immutable. This operation is idempotent.
Azure subscription. namespace resource. will be added to the HTTP request.
524 525 526 |
# File 'lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb', line 524 def update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil) update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value! end |