Class: Azure::DataFactory::Mgmt::V2018_06_01::Factories
- Inherits:
-
Object
- Object
- Azure::DataFactory::Mgmt::V2018_06_01::Factories
- Includes:
- MsRestAzure
- Defined in:
- lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb
Overview
The Azure Data Factory V2 management API provides a RESTful set of web services that interact with Azure Data Factory V2 services.
Instance Attribute Summary collapse
-
#client ⇒ DataFactoryManagementClient
readonly
Reference to the DataFactoryManagementClient.
Instance Method Summary collapse
-
#configure_factory_repo(location_id, factory_repo_update, custom_headers: nil) ⇒ Factory
Updates a factory’s repo information.
-
#configure_factory_repo_async(location_id, factory_repo_update, custom_headers: nil) ⇒ Concurrent::Promise
Updates a factory’s repo information.
-
#configure_factory_repo_with_http_info(location_id, factory_repo_update, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates a factory’s repo information.
-
#create_or_update(resource_group_name, factory_name, factory, if_match: nil, custom_headers: nil) ⇒ Factory
Creates or updates a factory.
-
#create_or_update_async(resource_group_name, factory_name, factory, if_match: nil, custom_headers: nil) ⇒ Concurrent::Promise
Creates or updates a factory.
-
#create_or_update_with_http_info(resource_group_name, factory_name, factory, if_match: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates or updates a factory.
-
#delete(resource_group_name, factory_name, custom_headers: nil) ⇒ Object
Deletes a factory.
-
#delete_async(resource_group_name, factory_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a factory.
-
#delete_with_http_info(resource_group_name, factory_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a factory.
-
#get(resource_group_name, factory_name, if_none_match: nil, custom_headers: nil) ⇒ Factory
Gets a factory.
-
#get_async(resource_group_name, factory_name, if_none_match: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets a factory.
-
#get_data_plane_access(resource_group_name, factory_name, policy, custom_headers: nil) ⇒ AccessPolicyResponse
Get Data Plane access.
-
#get_data_plane_access_async(resource_group_name, factory_name, policy, custom_headers: nil) ⇒ Concurrent::Promise
Get Data Plane access.
-
#get_data_plane_access_with_http_info(resource_group_name, factory_name, policy, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get Data Plane access.
-
#get_git_hub_access_token(resource_group_name, factory_name, git_hub_access_token_request, custom_headers: nil) ⇒ GitHubAccessTokenResponse
Get GitHub Access Token.
-
#get_git_hub_access_token_async(resource_group_name, factory_name, git_hub_access_token_request, custom_headers: nil) ⇒ Concurrent::Promise
Get GitHub Access Token.
-
#get_git_hub_access_token_with_http_info(resource_group_name, factory_name, git_hub_access_token_request, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get GitHub Access Token.
-
#get_with_http_info(resource_group_name, factory_name, if_none_match: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a factory.
-
#initialize(client) ⇒ Factories
constructor
Creates and initializes a new instance of the Factories class.
-
#list(custom_headers: nil) ⇒ Array<Factory>
Lists factories under the specified subscription.
-
#list_as_lazy(custom_headers: nil) ⇒ FactoryListResponse
Lists factories under the specified subscription.
-
#list_async(custom_headers: nil) ⇒ Concurrent::Promise
Lists factories under the specified subscription.
-
#list_by_resource_group(resource_group_name, custom_headers: nil) ⇒ Array<Factory>
Lists factories.
-
#list_by_resource_group_as_lazy(resource_group_name, custom_headers: nil) ⇒ FactoryListResponse
Lists factories.
-
#list_by_resource_group_async(resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Lists factories.
-
#list_by_resource_group_next(next_page_link, custom_headers: nil) ⇒ FactoryListResponse
Lists factories.
-
#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists factories.
-
#list_by_resource_group_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists factories.
-
#list_by_resource_group_with_http_info(resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists factories.
-
#list_next(next_page_link, custom_headers: nil) ⇒ FactoryListResponse
Lists factories under the specified subscription.
-
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists factories under the specified subscription.
-
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists factories under the specified subscription.
-
#list_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists factories under the specified subscription.
-
#update(resource_group_name, factory_name, factory_update_parameters, custom_headers: nil) ⇒ Factory
Updates a factory.
-
#update_async(resource_group_name, factory_name, factory_update_parameters, custom_headers: nil) ⇒ Concurrent::Promise
Updates a factory.
-
#update_with_http_info(resource_group_name, factory_name, factory_update_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates a factory.
Constructor Details
#initialize(client) ⇒ Factories
Creates and initializes a new instance of the Factories class.
18 19 20 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 18 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ DataFactoryManagementClient (readonly)
Returns reference to the DataFactoryManagementClient.
23 24 25 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 23 def client @client end |
Instance Method Details
#configure_factory_repo(location_id, factory_repo_update, custom_headers: nil) ⇒ Factory
Updates a factory’s repo information.
definition. will be added to the HTTP request.
122 123 124 125 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 122 def configure_factory_repo(location_id, factory_repo_update, custom_headers:nil) response = configure_factory_repo_async(location_id, factory_repo_update, custom_headers:custom_headers).value! response.body unless response.nil? end |
#configure_factory_repo_async(location_id, factory_repo_update, custom_headers: nil) ⇒ Concurrent::Promise
Updates a factory’s repo information.
definition. to the HTTP request.
153 154 155 156 157 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 208 209 210 211 212 213 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 153 def configure_factory_repo_async(location_id, factory_repo_update, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'location_id is nil' if location_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'factory_repo_update is nil' if factory_repo_update.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::DataFactory::Mgmt::V2018_06_01::Models::FactoryRepoUpdate.mapper() request_content = @client.serialize(request_mapper, factory_repo_update) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/configureFactoryRepo' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'locationId' => location_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? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::DataFactory::Mgmt::V2018_06_01::Models::Factory.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 |
#configure_factory_repo_with_http_info(location_id, factory_repo_update, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates a factory’s repo information.
definition. will be added to the HTTP request.
138 139 140 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 138 def configure_factory_repo_with_http_info(location_id, factory_repo_update, custom_headers:nil) configure_factory_repo_async(location_id, factory_repo_update, custom_headers:custom_headers).value! end |
#create_or_update(resource_group_name, factory_name, factory, if_match: nil, custom_headers: nil) ⇒ Factory
Creates or updates a factory.
for update, for which it should match existing entity or can be * for unconditional update. will be added to the HTTP request.
322 323 324 325 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 322 def create_or_update(resource_group_name, factory_name, factory, if_match:nil, custom_headers:nil) response = create_or_update_async(resource_group_name, factory_name, factory, if_match:if_match, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_or_update_async(resource_group_name, factory_name, factory, if_match: nil, custom_headers: nil) ⇒ Concurrent::Promise
Creates or updates a factory.
for update, for which it should match existing entity or can be * for unconditional update. to the HTTP request.
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 359 def create_or_update_async(resource_group_name, factory_name, factory, if_match:nil, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'factory_name is nil' if factory_name.nil? fail ArgumentError, "'factory_name' should satisfy the constraint - 'MaxLength': '63'" if !factory_name.nil? && factory_name.length > 63 fail ArgumentError, "'factory_name' should satisfy the constraint - 'MinLength': '3'" if !factory_name.nil? && factory_name.length < 3 fail ArgumentError, "'factory_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'" if !factory_name.nil? && factory_name.match(Regexp.new('^^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'factory is nil' if factory.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['If-Match'] = if_match unless if_match.nil? request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::DataFactory::Mgmt::V2018_06_01::Models::Factory.mapper() request_content = @client.serialize(request_mapper, factory) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'factoryName' => factory_name}, 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? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::DataFactory::Mgmt::V2018_06_01::Models::Factory.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_with_http_info(resource_group_name, factory_name, factory, if_match: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates or updates a factory.
for update, for which it should match existing entity or can be * for unconditional update. will be added to the HTTP request.
341 342 343 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 341 def create_or_update_with_http_info(resource_group_name, factory_name, factory, if_match:nil, custom_headers:nil) create_or_update_async(resource_group_name, factory_name, factory, if_match:if_match, custom_headers:custom_headers).value! end |
#delete(resource_group_name, factory_name, custom_headers: nil) ⇒ Object
Deletes a factory.
will be added to the HTTP request.
662 663 664 665 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 662 def delete(resource_group_name, factory_name, custom_headers:nil) response = delete_async(resource_group_name, factory_name, custom_headers:custom_headers).value! nil end |
#delete_async(resource_group_name, factory_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a factory.
to the HTTP request.
691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 691 def delete_async(resource_group_name, factory_name, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'factory_name is nil' if factory_name.nil? fail ArgumentError, "'factory_name' should satisfy the constraint - 'MaxLength': '63'" if !factory_name.nil? && factory_name.length > 63 fail ArgumentError, "'factory_name' should satisfy the constraint - 'MinLength': '3'" if !factory_name.nil? && factory_name.length < 3 fail ArgumentError, "'factory_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'" if !factory_name.nil? && factory_name.match(Regexp.new('^^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.DataFactory/factories/{factoryName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'factoryName' => factory_name}, 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 == 200 || status_code == 204 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.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#delete_with_http_info(resource_group_name, factory_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a factory.
will be added to the HTTP request.
677 678 679 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 677 def delete_with_http_info(resource_group_name, factory_name, custom_headers:nil) delete_async(resource_group_name, factory_name, custom_headers:custom_headers).value! end |
#get(resource_group_name, factory_name, if_none_match: nil, custom_headers: nil) ⇒ Factory
Gets a factory.
specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. will be added to the HTTP request.
556 557 558 559 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 556 def get(resource_group_name, factory_name, if_none_match:nil, custom_headers:nil) response = get_async(resource_group_name, factory_name, if_none_match:if_none_match, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(resource_group_name, factory_name, if_none_match: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets a factory.
specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. to the HTTP request.
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 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 591 def get_async(resource_group_name, factory_name, if_none_match:nil, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'factory_name is nil' if factory_name.nil? fail ArgumentError, "'factory_name' should satisfy the constraint - 'MaxLength': '63'" if !factory_name.nil? && factory_name.length > 63 fail ArgumentError, "'factory_name' should satisfy the constraint - 'MinLength': '3'" if !factory_name.nil? && factory_name.length < 3 fail ArgumentError, "'factory_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'" if !factory_name.nil? && factory_name.match(Regexp.new('^^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.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['If-None-Match'] = if_none_match unless if_none_match.nil? request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'factoryName' => factory_name}, 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 || status_code == 304 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.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::DataFactory::Mgmt::V2018_06_01::Models::Factory.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_data_plane_access(resource_group_name, factory_name, policy, custom_headers: nil) ⇒ AccessPolicyResponse
Get Data Plane access.
will be added to the HTTP request.
867 868 869 870 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 867 def get_data_plane_access(resource_group_name, factory_name, policy, custom_headers:nil) response = get_data_plane_access_async(resource_group_name, factory_name, policy, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_data_plane_access_async(resource_group_name, factory_name, policy, custom_headers: nil) ⇒ Concurrent::Promise
Get Data Plane access.
to the HTTP request.
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 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 898 def get_data_plane_access_async(resource_group_name, factory_name, policy, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'factory_name is nil' if factory_name.nil? fail ArgumentError, "'factory_name' should satisfy the constraint - 'MaxLength': '63'" if !factory_name.nil? && factory_name.length > 63 fail ArgumentError, "'factory_name' should satisfy the constraint - 'MinLength': '3'" if !factory_name.nil? && factory_name.length < 3 fail ArgumentError, "'factory_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'" if !factory_name.nil? && factory_name.match(Regexp.new('^^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'policy is nil' if policy.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::DataFactory::Mgmt::V2018_06_01::Models::UserAccessPolicy.mapper() request_content = @client.serialize(request_mapper, policy) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/getDataPlaneAccess' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'factoryName' => factory_name}, 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? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::DataFactory::Mgmt::V2018_06_01::Models::AccessPolicyResponse.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_data_plane_access_with_http_info(resource_group_name, factory_name, policy, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get Data Plane access.
will be added to the HTTP request.
883 884 885 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 883 def get_data_plane_access_with_http_info(resource_group_name, factory_name, policy, custom_headers:nil) get_data_plane_access_async(resource_group_name, factory_name, policy, custom_headers:custom_headers).value! end |
#get_git_hub_access_token(resource_group_name, factory_name, git_hub_access_token_request, custom_headers: nil) ⇒ GitHubAccessTokenResponse
Get GitHub Access Token.
access token request definition. will be added to the HTTP request.
754 755 756 757 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 754 def get_git_hub_access_token(resource_group_name, factory_name, git_hub_access_token_request, custom_headers:nil) response = get_git_hub_access_token_async(resource_group_name, factory_name, git_hub_access_token_request, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_git_hub_access_token_async(resource_group_name, factory_name, git_hub_access_token_request, custom_headers: nil) ⇒ Concurrent::Promise
Get GitHub Access Token.
access token request definition. to the HTTP request.
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 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 787 def get_git_hub_access_token_async(resource_group_name, factory_name, git_hub_access_token_request, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'factory_name is nil' if factory_name.nil? fail ArgumentError, "'factory_name' should satisfy the constraint - 'MaxLength': '63'" if !factory_name.nil? && factory_name.length > 63 fail ArgumentError, "'factory_name' should satisfy the constraint - 'MinLength': '3'" if !factory_name.nil? && factory_name.length < 3 fail ArgumentError, "'factory_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'" if !factory_name.nil? && factory_name.match(Regexp.new('^^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'git_hub_access_token_request is nil' if git_hub_access_token_request.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::DataFactory::Mgmt::V2018_06_01::Models::GitHubAccessTokenRequest.mapper() request_content = @client.serialize(request_mapper, git_hub_access_token_request) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/getGitHubAccessToken' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'factoryName' => factory_name}, 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? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::DataFactory::Mgmt::V2018_06_01::Models::GitHubAccessTokenResponse.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_git_hub_access_token_with_http_info(resource_group_name, factory_name, git_hub_access_token_request, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get GitHub Access Token.
access token request definition. will be added to the HTTP request.
771 772 773 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 771 def get_git_hub_access_token_with_http_info(resource_group_name, factory_name, git_hub_access_token_request, custom_headers:nil) get_git_hub_access_token_async(resource_group_name, factory_name, git_hub_access_token_request, custom_headers:custom_headers).value! end |
#get_with_http_info(resource_group_name, factory_name, if_none_match: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a factory.
specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. will be added to the HTTP request.
574 575 576 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 574 def get_with_http_info(resource_group_name, factory_name, if_none_match:nil, custom_headers:nil) get_async(resource_group_name, factory_name, if_none_match:if_none_match, custom_headers:custom_headers).value! end |
#list(custom_headers: nil) ⇒ Array<Factory>
Lists factories under the specified subscription.
will be added to the HTTP request.
33 34 35 36 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 33 def list(custom_headers:nil) first_page = list_as_lazy(custom_headers:custom_headers) first_page.get_all_items end |
#list_as_lazy(custom_headers: nil) ⇒ FactoryListResponse
Lists factories under the specified subscription.
will be added to the HTTP request.
response.
1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 1156 def list_as_lazy(custom_headers:nil) response = list_async(custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_async(custom_headers: nil) ⇒ Concurrent::Promise
Lists factories under the specified subscription.
to the HTTP request.
58 59 60 61 62 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 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 58 def list_async(custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.DataFactory/factories' 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? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::DataFactory::Mgmt::V2018_06_01::Models::FactoryListResponse.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(resource_group_name, custom_headers: nil) ⇒ Array<Factory>
Lists factories.
will be added to the HTTP request.
224 225 226 227 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 224 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) ⇒ FactoryListResponse
Lists factories.
will be added to the HTTP request.
response.
1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 1177 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
Lists factories.
to the HTTP request.
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 301 302 303 304 305 306 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 251 def list_by_resource_group_async(resource_group_name, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.DataFactory/factories' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name}, 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? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::DataFactory::Mgmt::V2018_06_01::Models::FactoryListResponse.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) ⇒ FactoryListResponse
Lists factories.
to List operation. will be added to the HTTP request.
1067 1068 1069 1070 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 1067 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
Lists factories.
to List operation. to the HTTP request.
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 1138 1139 1140 1141 1142 1143 1144 1145 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 1096 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? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::DataFactory::Mgmt::V2018_06_01::Models::FactoryListResponse.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
Lists factories.
to List operation. will be added to the HTTP request.
1082 1083 1084 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 1082 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
Lists factories.
will be added to the HTTP request.
238 239 240 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 238 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_next(next_page_link, custom_headers: nil) ⇒ FactoryListResponse
Lists factories under the specified subscription.
to List operation. will be added to the HTTP request.
977 978 979 980 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 977 def list_next(next_page_link, custom_headers:nil) response = list_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists factories under the specified subscription.
to List operation. to the HTTP request.
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 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 1006 def list_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? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::DataFactory::Mgmt::V2018_06_01::Models::FactoryListResponse.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_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists factories under the specified subscription.
to List operation. will be added to the HTTP request.
992 993 994 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 992 def list_next_with_http_info(next_page_link, custom_headers:nil) list_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists factories under the specified subscription.
will be added to the HTTP request.
46 47 48 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 46 def list_with_http_info(custom_headers:nil) list_async(custom_headers:custom_headers).value! end |
#update(resource_group_name, factory_name, factory_update_parameters, custom_headers: nil) ⇒ Factory
Updates a factory.
updating a factory. will be added to the HTTP request.
441 442 443 444 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 441 def update(resource_group_name, factory_name, factory_update_parameters, custom_headers:nil) response = update_async(resource_group_name, factory_name, factory_update_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#update_async(resource_group_name, factory_name, factory_update_parameters, custom_headers: nil) ⇒ Concurrent::Promise
Updates a factory.
updating a factory. to the HTTP request.
474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 474 def update_async(resource_group_name, factory_name, factory_update_parameters, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'factory_name is nil' if factory_name.nil? fail ArgumentError, "'factory_name' should satisfy the constraint - 'MaxLength': '63'" if !factory_name.nil? && factory_name.length > 63 fail ArgumentError, "'factory_name' should satisfy the constraint - 'MinLength': '3'" if !factory_name.nil? && factory_name.length < 3 fail ArgumentError, "'factory_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'" if !factory_name.nil? && factory_name.match(Regexp.new('^^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'factory_update_parameters is nil' if factory_update_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::DataFactory::Mgmt::V2018_06_01::Models::FactoryUpdateParameters.mapper() request_content = @client.serialize(request_mapper, factory_update_parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'factoryName' => factory_name}, 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 == 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.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::DataFactory::Mgmt::V2018_06_01::Models::Factory.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, factory_name, factory_update_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates a factory.
updating a factory. will be added to the HTTP request.
458 459 460 |
# File 'lib/2018-06-01/generated/azure_mgmt_data_factory/factories.rb', line 458 def update_with_http_info(resource_group_name, factory_name, factory_update_parameters, custom_headers:nil) update_async(resource_group_name, factory_name, factory_update_parameters, custom_headers:custom_headers).value! end |