Class: Azure::ARM::Logic::Workflows
- Inherits:
-
Object
- Object
- Azure::ARM::Logic::Workflows
- Includes:
- MsRestAzure
- Defined in:
- lib/generated/azure_mgmt_logic/workflows.rb
Overview
REST API for Azure Logic Apps.
Instance Attribute Summary collapse
-
#client ⇒ LogicManagementClient
readonly
Reference to the LogicManagementClient.
Instance Method Summary collapse
-
#create_or_update(resource_group_name, workflow_name, workflow, custom_headers = nil) ⇒ Workflow
Creates or updates a workflow.
-
#create_or_update_async(resource_group_name, workflow_name, workflow, custom_headers = nil) ⇒ Concurrent::Promise
Creates or updates a workflow.
-
#create_or_update_with_http_info(resource_group_name, workflow_name, workflow, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Creates or updates a workflow.
-
#delete(resource_group_name, workflow_name, custom_headers = nil) ⇒ Object
Deletes a workflow.
-
#delete_async(resource_group_name, workflow_name, custom_headers = nil) ⇒ Concurrent::Promise
Deletes a workflow.
-
#delete_with_http_info(resource_group_name, workflow_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a workflow.
-
#disable(resource_group_name, workflow_name, custom_headers = nil) ⇒ Object
Disables a workflow.
-
#disable_async(resource_group_name, workflow_name, custom_headers = nil) ⇒ Concurrent::Promise
Disables a workflow.
-
#disable_with_http_info(resource_group_name, workflow_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Disables a workflow.
-
#enable(resource_group_name, workflow_name, custom_headers = nil) ⇒ Object
Enables a workflow.
-
#enable_async(resource_group_name, workflow_name, custom_headers = nil) ⇒ Concurrent::Promise
Enables a workflow.
-
#enable_with_http_info(resource_group_name, workflow_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Enables a workflow.
-
#generate_upgraded_definition(resource_group_name, workflow_name, parameters, custom_headers = nil) ⇒ Object
Generates the upgraded definition for a workflow.
-
#generate_upgraded_definition_async(resource_group_name, workflow_name, parameters, custom_headers = nil) ⇒ Concurrent::Promise
Generates the upgraded definition for a workflow.
-
#generate_upgraded_definition_with_http_info(resource_group_name, workflow_name, parameters, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Generates the upgraded definition for a workflow.
-
#get(resource_group_name, workflow_name, custom_headers = nil) ⇒ Workflow
Gets a workflow.
-
#get_async(resource_group_name, workflow_name, custom_headers = nil) ⇒ Concurrent::Promise
Gets a workflow.
-
#get_with_http_info(resource_group_name, workflow_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a workflow.
-
#initialize(client) ⇒ Workflows
constructor
Creates and initializes a new instance of the Workflows class.
-
#list_by_resource_group(resource_group_name, top = nil, filter = nil, custom_headers = nil) ⇒ Array<Workflow>
Gets a list of workflows by resource group.
-
#list_by_resource_group_as_lazy(resource_group_name, top = nil, filter = nil, custom_headers = nil) ⇒ WorkflowListResult
Gets a list of workflows by resource group.
-
#list_by_resource_group_async(resource_group_name, top = nil, filter = nil, custom_headers = nil) ⇒ Concurrent::Promise
Gets a list of workflows by resource group.
-
#list_by_resource_group_next(next_page_link, custom_headers = nil) ⇒ WorkflowListResult
Gets a list of workflows by resource group.
-
#list_by_resource_group_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise
Gets a list of workflows by resource group.
-
#list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of workflows by resource group.
-
#list_by_resource_group_with_http_info(resource_group_name, top = nil, filter = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of workflows by resource group.
-
#list_by_subscription(top = nil, filter = nil, custom_headers = nil) ⇒ Array<Workflow>
Gets a list of workflows by subscription.
-
#list_by_subscription_as_lazy(top = nil, filter = nil, custom_headers = nil) ⇒ WorkflowListResult
Gets a list of workflows by subscription.
-
#list_by_subscription_async(top = nil, filter = nil, custom_headers = nil) ⇒ Concurrent::Promise
Gets a list of workflows by subscription.
-
#list_by_subscription_next(next_page_link, custom_headers = nil) ⇒ WorkflowListResult
Gets a list of workflows by subscription.
-
#list_by_subscription_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise
Gets a list of workflows by subscription.
-
#list_by_subscription_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of workflows by subscription.
-
#list_by_subscription_with_http_info(top = nil, filter = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of workflows by subscription.
-
#list_swagger(resource_group_name, workflow_name, custom_headers = nil) ⇒ Object
Gets an OpenAPI definition for the workflow.
-
#list_swagger_async(resource_group_name, workflow_name, custom_headers = nil) ⇒ Concurrent::Promise
Gets an OpenAPI definition for the workflow.
-
#list_swagger_with_http_info(resource_group_name, workflow_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets an OpenAPI definition for the workflow.
-
#regenerate_access_key(resource_group_name, workflow_name, key_type, custom_headers = nil) ⇒ Object
Regenerates the callback URL access key for request triggers.
-
#regenerate_access_key_async(resource_group_name, workflow_name, key_type, custom_headers = nil) ⇒ Concurrent::Promise
Regenerates the callback URL access key for request triggers.
-
#regenerate_access_key_with_http_info(resource_group_name, workflow_name, key_type, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Regenerates the callback URL access key for request triggers.
-
#update(resource_group_name, workflow_name, workflow, custom_headers = nil) ⇒ Workflow
Updates a workflow.
-
#update_async(resource_group_name, workflow_name, workflow, custom_headers = nil) ⇒ Concurrent::Promise
Updates a workflow.
-
#update_with_http_info(resource_group_name, workflow_name, workflow, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Updates a workflow.
-
#validate(resource_group_name, location, workflow_name, workflow, custom_headers = nil) ⇒ Object
Validates the workflow definition.
-
#validate_async(resource_group_name, location, workflow_name, workflow, custom_headers = nil) ⇒ Concurrent::Promise
Validates the workflow definition.
-
#validate_with_http_info(resource_group_name, location, workflow_name, workflow, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Validates the workflow definition.
Constructor Details
#initialize(client) ⇒ Workflows
Creates and initializes a new instance of the Workflows class.
17 18 19 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ LogicManagementClient (readonly)
Returns reference to the LogicManagementClient.
22 23 24 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 22 def client @client end |
Instance Method Details
#create_or_update(resource_group_name, workflow_name, workflow, custom_headers = nil) ⇒ Workflow
Creates or updates a workflow.
will be added to the HTTP request.
308 309 310 311 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 308 def create_or_update(resource_group_name, workflow_name, workflow, custom_headers = nil) response = create_or_update_async(resource_group_name, workflow_name, workflow, custom_headers).value! response.body unless response.nil? end |
#create_or_update_async(resource_group_name, workflow_name, workflow, custom_headers = nil) ⇒ Concurrent::Promise
Creates or updates a workflow.
to the HTTP request.
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 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 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 339 def create_or_update_async(resource_group_name, workflow_name, workflow, 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, 'workflow_name is nil' if workflow_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'workflow is nil' if workflow.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request request_mapper = Azure::ARM::Logic::Models::Workflow.mapper() request_content = @client.serialize(request_mapper, workflow) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}' 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,'workflowName' => workflow_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 || status_code == 201 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::ARM::Logic::Models::Workflow.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 == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::Logic::Models::Workflow.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, workflow_name, workflow, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Creates or updates a workflow.
will be added to the HTTP request.
324 325 326 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 324 def create_or_update_with_http_info(resource_group_name, workflow_name, workflow, custom_headers = nil) create_or_update_async(resource_group_name, workflow_name, workflow, custom_headers).value! end |
#delete(resource_group_name, workflow_name, custom_headers = nil) ⇒ Object
Deletes a workflow.
will be added to the HTTP request.
524 525 526 527 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 524 def delete(resource_group_name, workflow_name, custom_headers = nil) response = delete_async(resource_group_name, workflow_name, custom_headers).value! nil end |
#delete_async(resource_group_name, workflow_name, custom_headers = nil) ⇒ Concurrent::Promise
Deletes a workflow.
to the HTTP request.
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 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 553 def delete_async(resource_group_name, workflow_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, 'workflow_name is nil' if workflow_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # 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.Logic/workflows/{workflowName}' 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,'workflowName' => workflow_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 end promise.execute end |
#delete_with_http_info(resource_group_name, workflow_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a workflow.
will be added to the HTTP request.
539 540 541 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 539 def delete_with_http_info(resource_group_name, workflow_name, custom_headers = nil) delete_async(resource_group_name, workflow_name, custom_headers).value! end |
#disable(resource_group_name, workflow_name, custom_headers = nil) ⇒ Object
Disables a workflow.
will be added to the HTTP request.
604 605 606 607 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 604 def disable(resource_group_name, workflow_name, custom_headers = nil) response = disable_async(resource_group_name, workflow_name, custom_headers).value! nil end |
#disable_async(resource_group_name, workflow_name, custom_headers = nil) ⇒ Concurrent::Promise
Disables a workflow.
to the HTTP request.
633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 633 def disable_async(resource_group_name, workflow_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, 'workflow_name is nil' if workflow_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # 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.Logic/workflows/{workflowName}/disable' 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,'workflowName' => workflow_name}, 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? result end promise.execute end |
#disable_with_http_info(resource_group_name, workflow_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Disables a workflow.
will be added to the HTTP request.
619 620 621 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 619 def disable_with_http_info(resource_group_name, workflow_name, custom_headers = nil) disable_async(resource_group_name, workflow_name, custom_headers).value! end |
#enable(resource_group_name, workflow_name, custom_headers = nil) ⇒ Object
Enables a workflow.
will be added to the HTTP request.
684 685 686 687 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 684 def enable(resource_group_name, workflow_name, custom_headers = nil) response = enable_async(resource_group_name, workflow_name, custom_headers).value! nil end |
#enable_async(resource_group_name, workflow_name, custom_headers = nil) ⇒ Concurrent::Promise
Enables a workflow.
to the HTTP request.
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 741 742 743 744 745 746 747 748 749 750 751 752 753 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 713 def enable_async(resource_group_name, workflow_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, 'workflow_name is nil' if workflow_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # 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.Logic/workflows/{workflowName}/enable' 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,'workflowName' => workflow_name}, 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? result end promise.execute end |
#enable_with_http_info(resource_group_name, workflow_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Enables a workflow.
will be added to the HTTP request.
699 700 701 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 699 def enable_with_http_info(resource_group_name, workflow_name, custom_headers = nil) enable_async(resource_group_name, workflow_name, custom_headers).value! end |
#generate_upgraded_definition(resource_group_name, workflow_name, parameters, custom_headers = nil) ⇒ Object
Generates the upgraded definition for a workflow.
generating an upgraded definition. will be added to the HTTP request.
767 768 769 770 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 767 def generate_upgraded_definition(resource_group_name, workflow_name, parameters, custom_headers = nil) response = generate_upgraded_definition_async(resource_group_name, workflow_name, parameters, custom_headers).value! response.body unless response.nil? end |
#generate_upgraded_definition_async(resource_group_name, workflow_name, parameters, custom_headers = nil) ⇒ Concurrent::Promise
Generates the upgraded definition for a workflow.
generating an upgraded definition. to the HTTP request.
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 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 800 def generate_upgraded_definition_async(resource_group_name, workflow_name, 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, 'workflow_name is nil' if workflow_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request request_mapper = Azure::ARM::Logic::Models::GenerateUpgradedDefinitionParameters.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.Logic/workflows/{workflowName}/generateUpgradedDefinition' 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,'workflowName' => workflow_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 end promise.execute end |
#generate_upgraded_definition_with_http_info(resource_group_name, workflow_name, parameters, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Generates the upgraded definition for a workflow.
generating an upgraded definition. will be added to the HTTP request.
784 785 786 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 784 def generate_upgraded_definition_with_http_info(resource_group_name, workflow_name, parameters, custom_headers = nil) generate_upgraded_definition_async(resource_group_name, workflow_name, parameters, custom_headers).value! end |
#get(resource_group_name, workflow_name, custom_headers = nil) ⇒ Workflow
Gets a workflow.
will be added to the HTTP request.
216 217 218 219 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 216 def get(resource_group_name, workflow_name, custom_headers = nil) response = get_async(resource_group_name, workflow_name, custom_headers).value! response.body unless response.nil? end |
#get_async(resource_group_name, workflow_name, custom_headers = nil) ⇒ Concurrent::Promise
Gets a workflow.
to the HTTP request.
245 246 247 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 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 245 def get_async(resource_group_name, workflow_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, 'workflow_name is nil' if workflow_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # 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.Logic/workflows/{workflowName}' 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,'workflowName' => workflow_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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::Logic::Models::Workflow.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_with_http_info(resource_group_name, workflow_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a workflow.
will be added to the HTTP request.
231 232 233 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 231 def get_with_http_info(resource_group_name, workflow_name, custom_headers = nil) get_async(resource_group_name, workflow_name, custom_headers).value! end |
#list_by_resource_group(resource_group_name, top = nil, filter = nil, custom_headers = nil) ⇒ Array<Workflow>
Gets a list of workflows by resource group.
will be added to the HTTP request.
124 125 126 127 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 124 def list_by_resource_group(resource_group_name, top = nil, filter = nil, custom_headers = nil) first_page = list_by_resource_group_as_lazy(resource_group_name, top, filter, custom_headers) first_page.get_all_items end |
#list_by_resource_group_as_lazy(resource_group_name, top = nil, filter = nil, custom_headers = nil) ⇒ WorkflowListResult
Gets a list of workflows by resource group.
will be added to the HTTP request.
response.
1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 1331 def list_by_resource_group_as_lazy(resource_group_name, top = nil, filter = nil, custom_headers = nil) response = list_by_resource_group_async(resource_group_name, top, filter, 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) end page end end |
#list_by_resource_group_async(resource_group_name, top = nil, filter = nil, custom_headers = nil) ⇒ Concurrent::Promise
Gets a list of workflows by resource group.
to the HTTP request.
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 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 155 def list_by_resource_group_async(resource_group_name, top = nil, filter = 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, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # 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.Logic/workflows' 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,'$top' => top,'$filter' => filter}, 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::ARM::Logic::Models::WorkflowListResult.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) ⇒ WorkflowListResult
Gets a list of workflows by resource group.
to List operation. will be added to the HTTP request.
1220 1221 1222 1223 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 1220 def list_by_resource_group_next(next_page_link, custom_headers = nil) response = list_by_resource_group_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end |
#list_by_resource_group_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise
Gets a list of workflows by resource group.
to List operation. to the HTTP request.
1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 1249 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 = {} # 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::ARM::Logic::Models::WorkflowListResult.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 a list of workflows by resource group.
to List operation. will be added to the HTTP request.
1235 1236 1237 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 1235 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).value! end |
#list_by_resource_group_with_http_info(resource_group_name, top = nil, filter = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of workflows by resource group.
will be added to the HTTP request.
140 141 142 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 140 def list_by_resource_group_with_http_info(resource_group_name, top = nil, filter = nil, custom_headers = nil) list_by_resource_group_async(resource_group_name, top, filter, custom_headers).value! end |
#list_by_subscription(top = nil, filter = nil, custom_headers = nil) ⇒ Array<Workflow>
Gets a list of workflows by subscription.
will be added to the HTTP request.
34 35 36 37 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 34 def list_by_subscription(top = nil, filter = nil, custom_headers = nil) first_page = list_by_subscription_as_lazy(top, filter, custom_headers) first_page.get_all_items end |
#list_by_subscription_as_lazy(top = nil, filter = nil, custom_headers = nil) ⇒ WorkflowListResult
Gets a list of workflows by subscription.
will be added to the HTTP request.
response.
1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 1308 def list_by_subscription_as_lazy(top = nil, filter = nil, custom_headers = nil) response = list_by_subscription_async(top, filter, 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) end page end end |
#list_by_subscription_async(top = nil, filter = nil, custom_headers = nil) ⇒ Concurrent::Promise
Gets a list of workflows by subscription.
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 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 63 def list_by_subscription_async(top = nil, filter = nil, 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 = {} # 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.Logic/workflows' 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,'$top' => top,'$filter' => filter}, 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::ARM::Logic::Models::WorkflowListResult.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) ⇒ WorkflowListResult
Gets a list of workflows by subscription.
to List operation. will be added to the HTTP request.
1133 1134 1135 1136 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 1133 def list_by_subscription_next(next_page_link, custom_headers = nil) response = list_by_subscription_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end |
#list_by_subscription_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise
Gets a list of workflows by subscription.
to List operation. to the HTTP request.
1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 1162 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 = {} # 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::ARM::Logic::Models::WorkflowListResult.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 a list of workflows by subscription.
to List operation. will be added to the HTTP request.
1148 1149 1150 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 1148 def list_by_subscription_next_with_http_info(next_page_link, custom_headers = nil) list_by_subscription_next_async(next_page_link, custom_headers).value! end |
#list_by_subscription_with_http_info(top = nil, filter = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of workflows by subscription.
will be added to the HTTP request.
49 50 51 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 49 def list_by_subscription_with_http_info(top = nil, filter = nil, custom_headers = nil) list_by_subscription_async(top, filter, custom_headers).value! end |
#list_swagger(resource_group_name, workflow_name, custom_headers = nil) ⇒ Object
Gets an OpenAPI definition for the workflow.
will be added to the HTTP request.
862 863 864 865 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 862 def list_swagger(resource_group_name, workflow_name, custom_headers = nil) response = list_swagger_async(resource_group_name, workflow_name, custom_headers).value! response.body unless response.nil? end |
#list_swagger_async(resource_group_name, workflow_name, custom_headers = nil) ⇒ Concurrent::Promise
Gets an OpenAPI definition for the workflow.
to the HTTP request.
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 928 929 930 931 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 891 def list_swagger_async(resource_group_name, workflow_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, 'workflow_name is nil' if workflow_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # 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.Logic/workflows/{workflowName}/listSwagger' 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,'workflowName' => workflow_name}, 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? result end promise.execute end |
#list_swagger_with_http_info(resource_group_name, workflow_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets an OpenAPI definition for the workflow.
will be added to the HTTP request.
877 878 879 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 877 def list_swagger_with_http_info(resource_group_name, workflow_name, custom_headers = nil) list_swagger_async(resource_group_name, workflow_name, custom_headers).value! end |
#regenerate_access_key(resource_group_name, workflow_name, key_type, custom_headers = nil) ⇒ Object
Regenerates the callback URL access key for request triggers.
will be added to the HTTP request.
943 944 945 946 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 943 def regenerate_access_key(resource_group_name, workflow_name, key_type, custom_headers = nil) response = regenerate_access_key_async(resource_group_name, workflow_name, key_type, custom_headers).value! nil end |
#regenerate_access_key_async(resource_group_name, workflow_name, key_type, custom_headers = nil) ⇒ Concurrent::Promise
Regenerates the callback URL access key for request triggers.
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 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 974 def regenerate_access_key_async(resource_group_name, workflow_name, key_type, 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, 'workflow_name is nil' if workflow_name.nil? fail ArgumentError, 'key_type is nil' if key_type.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request request_mapper = Azure::ARM::Logic::Models::RegenerateActionParameter.mapper() request_content = @client.serialize(request_mapper, key_type) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey' 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,'workflowName' => workflow_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 end promise.execute end |
#regenerate_access_key_with_http_info(resource_group_name, workflow_name, key_type, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Regenerates the callback URL access key for request triggers.
will be added to the HTTP request.
959 960 961 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 959 def regenerate_access_key_with_http_info(resource_group_name, workflow_name, key_type, custom_headers = nil) regenerate_access_key_async(resource_group_name, workflow_name, key_type, custom_headers).value! end |
#update(resource_group_name, workflow_name, workflow, custom_headers = nil) ⇒ Workflow
Updates a workflow.
will be added to the HTTP request.
422 423 424 425 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 422 def update(resource_group_name, workflow_name, workflow, custom_headers = nil) response = update_async(resource_group_name, workflow_name, workflow, custom_headers).value! response.body unless response.nil? end |
#update_async(resource_group_name, workflow_name, workflow, custom_headers = nil) ⇒ Concurrent::Promise
Updates a workflow.
to the HTTP request.
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 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 453 def update_async(resource_group_name, workflow_name, workflow, 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, 'workflow_name is nil' if workflow_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'workflow is nil' if workflow.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request request_mapper = Azure::ARM::Logic::Models::Workflow.mapper() request_content = @client.serialize(request_mapper, workflow) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}' 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,'workflowName' => workflow_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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::Logic::Models::Workflow.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, workflow_name, workflow, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Updates a workflow.
will be added to the HTTP request.
438 439 440 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 438 def update_with_http_info(resource_group_name, workflow_name, workflow, custom_headers = nil) update_async(resource_group_name, workflow_name, workflow, custom_headers).value! end |
#validate(resource_group_name, location, workflow_name, workflow, custom_headers = nil) ⇒ Object
Validates the workflow definition.
will be added to the HTTP request.
1037 1038 1039 1040 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 1037 def validate(resource_group_name, location, workflow_name, workflow, custom_headers = nil) response = validate_async(resource_group_name, location, workflow_name, workflow, custom_headers).value! nil end |
#validate_async(resource_group_name, location, workflow_name, workflow, custom_headers = nil) ⇒ Concurrent::Promise
Validates the workflow definition.
to the HTTP request.
1070 1071 1072 1073 1074 1075 1076 1077 1078 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 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 1070 def validate_async(resource_group_name, location, workflow_name, workflow, 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, 'location is nil' if location.nil? fail ArgumentError, 'workflow_name is nil' if workflow_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'workflow is nil' if workflow.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request request_mapper = Azure::ARM::Logic::Models::Workflow.mapper() request_content = @client.serialize(request_mapper, workflow) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate' 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,'location' => location,'workflowName' => workflow_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 end promise.execute end |
#validate_with_http_info(resource_group_name, location, workflow_name, workflow, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Validates the workflow definition.
will be added to the HTTP request.
1054 1055 1056 |
# File 'lib/generated/azure_mgmt_logic/workflows.rb', line 1054 def validate_with_http_info(resource_group_name, location, workflow_name, workflow, custom_headers = nil) validate_async(resource_group_name, location, workflow_name, workflow, custom_headers).value! end |