Class: Azure::Logic::Mgmt::V2018_07_01_preview::Workflows

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb

Overview

REST API for Azure Logic Apps.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Workflows

Creates and initializes a new instance of the Workflows class.

Parameters:

  • client

    service class for accessing basic functionality.



17
18
19
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 17

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientLogicManagementClient (readonly)

Returns reference to the LogicManagementClient.

Returns:



22
23
24
# File 'lib/2018-07-01-preview/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.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • workflow (Workflow)

    The workflow.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Workflow)

    operation results.



317
318
319
320
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 317

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: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.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • workflow (Workflow)

    The workflow.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
410
411
412
413
414
415
416
417
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 348

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 = {}
  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::Logic::Mgmt::V2018_07_01_preview::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

  options = {
      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, options)

  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::Logic::Mgmt::V2018_07_01_preview::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.message, 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::Logic::Mgmt::V2018_07_01_preview::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.message, 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.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • workflow (Workflow)

    The workflow.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



333
334
335
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 333

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:custom_headers).value!
end

#delete(resource_group_name, workflow_name, custom_headers: nil) ⇒ Object

Deletes a workflow.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



531
532
533
534
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 531

def delete(resource_group_name, workflow_name, custom_headers:nil)
  response = delete_async(resource_group_name, workflow_name, custom_headers:custom_headers).value!
  nil
end

#delete_async(resource_group_name, workflow_name, custom_headers: nil) ⇒ Concurrent::Promise

Deletes a workflow.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 560

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 = {}
  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.Logic/workflows/{workflowName}'

  request_url = @base_url || @client.base_url

  options = {
      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, options)

  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.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



546
547
548
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 546

def delete_with_http_info(resource_group_name, workflow_name, custom_headers:nil)
  delete_async(resource_group_name, workflow_name, custom_headers:custom_headers).value!
end

#disable(resource_group_name, workflow_name, custom_headers: nil) ⇒ Object

Disables a workflow.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



612
613
614
615
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 612

def disable(resource_group_name, workflow_name, custom_headers:nil)
  response = disable_async(resource_group_name, workflow_name, custom_headers:custom_headers).value!
  nil
end

#disable_async(resource_group_name, workflow_name, custom_headers: nil) ⇒ Concurrent::Promise

Disables a workflow.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
674
675
676
677
678
679
680
681
682
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 641

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 = {}
  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.Logic/workflows/{workflowName}/disable'

  request_url = @base_url || @client.base_url

  options = {
      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, options)

  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.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



627
628
629
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 627

def disable_with_http_info(resource_group_name, workflow_name, custom_headers:nil)
  disable_async(resource_group_name, workflow_name, custom_headers:custom_headers).value!
end

#enable(resource_group_name, workflow_name, custom_headers: nil) ⇒ Object

Enables a workflow.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



693
694
695
696
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 693

def enable(resource_group_name, workflow_name, custom_headers:nil)
  response = enable_async(resource_group_name, workflow_name, custom_headers:custom_headers).value!
  nil
end

#enable_async(resource_group_name, workflow_name, custom_headers: nil) ⇒ Concurrent::Promise

Enables a workflow.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
754
755
756
757
758
759
760
761
762
763
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 722

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 = {}
  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.Logic/workflows/{workflowName}/enable'

  request_url = @base_url || @client.base_url

  options = {
      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, options)

  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.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



708
709
710
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 708

def enable_with_http_info(resource_group_name, workflow_name, custom_headers:nil)
  enable_async(resource_group_name, workflow_name, custom_headers: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.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • parameters (GenerateUpgradedDefinitionParameters)

    Parameters for

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



777
778
779
780
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 777

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: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.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • parameters (GenerateUpgradedDefinitionParameters)

    Parameters for

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
855
856
857
858
859
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 810

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 = {}
  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::Logic::Mgmt::V2018_07_01_preview::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

  options = {
      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, options)

  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.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • parameters (GenerateUpgradedDefinitionParameters)

    Parameters for

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



794
795
796
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 794

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:custom_headers).value!
end

#get(resource_group_name, workflow_name, custom_headers: nil) ⇒ Workflow

Gets a workflow.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Workflow)

    operation results.



224
225
226
227
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 224

def get(resource_group_name, workflow_name, custom_headers:nil)
  response = get_async(resource_group_name, workflow_name, custom_headers: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.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 253

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 = {}
  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.Logic/workflows/{workflowName}'

  request_url = @base_url || @client.base_url

  options = {
      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, options)

  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::Logic::Mgmt::V2018_07_01_preview::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.message, 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.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



239
240
241
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 239

def get_with_http_info(resource_group_name, workflow_name, custom_headers:nil)
  get_async(resource_group_name, workflow_name, custom_headers: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.

filters include: State, Trigger, and ReferencedResourceId. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • top (Integer) (defaults to: nil)

    The number of items to be included in the result.

  • filter (String) (defaults to: nil)

    The filter to apply on the operation. Options for

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<Workflow>)

    operation results.



129
130
131
132
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 129

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:top, filter:filter, custom_headers: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.

filters include: State, Trigger, and ReferencedResourceId. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • top (Integer) (defaults to: nil)

    The number of items to be included in the result.

  • filter (String) (defaults to: nil)

    The filter to apply on the operation. Options for

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (WorkflowListResult)

    which provide lazy access to pages of the



1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 1633

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:top, filter:filter, 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, top: nil, filter: nil, custom_headers: nil) ⇒ Concurrent::Promise

Gets a list of workflows by resource group.

filters include: State, Trigger, and ReferencedResourceId. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • top (Integer) (defaults to: nil)

    The number of items to be included in the result.

  • filter (String) (defaults to: nil)

    The filter to apply on the operation. Options for

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 162

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 = {}
  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.Logic/workflows'

  request_url = @base_url || @client.base_url

  options = {
      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, options)

  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::Logic::Mgmt::V2018_07_01_preview::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.message, 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.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (WorkflowListResult)

    operation results.



1519
1520
1521
1522
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 1519

def list_by_resource_group_next(next_page_link, custom_headers:nil)
  response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise

Gets a list of workflows by resource group.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 1548

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

  options = {
      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, options)

  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::Logic::Mgmt::V2018_07_01_preview::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.message, 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.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1534
1535
1536
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 1534

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, top: nil, filter: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets a list of workflows by resource group.

filters include: State, Trigger, and ReferencedResourceId. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • top (Integer) (defaults to: nil)

    The number of items to be included in the result.

  • filter (String) (defaults to: nil)

    The filter to apply on the operation. Options for

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



146
147
148
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 146

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:top, filter:filter, custom_headers:custom_headers).value!
end

#list_by_subscription(top: nil, filter: nil, custom_headers: nil) ⇒ Array<Workflow>

Gets a list of workflows by subscription.

filters include: State, Trigger, and ReferencedResourceId. will be added to the HTTP request.

Parameters:

  • top (Integer) (defaults to: nil)

    The number of items to be included in the result.

  • filter (String) (defaults to: nil)

    The filter to apply on the operation. Options for

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<Workflow>)

    operation results.



35
36
37
38
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 35

def list_by_subscription(top:nil, filter:nil, custom_headers:nil)
  first_page = list_by_subscription_as_lazy(top:top, filter:filter, custom_headers: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.

filters include: State, Trigger, and ReferencedResourceId. will be added to the HTTP request.

response.

Parameters:

  • top (Integer) (defaults to: nil)

    The number of items to be included in the result.

  • filter (String) (defaults to: nil)

    The filter to apply on the operation. Options for

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (WorkflowListResult)

    which provide lazy access to pages of the



1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 1609

def list_by_subscription_as_lazy(top:nil, filter:nil, custom_headers:nil)
  response = list_by_subscription_async(top:top, filter:filter, custom_headers:custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_by_subscription_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end

#list_by_subscription_async(top: nil, filter: nil, custom_headers: nil) ⇒ Concurrent::Promise

Gets a list of workflows by subscription.

filters include: State, Trigger, and ReferencedResourceId. to the HTTP request.

Parameters:

  • top (Integer) (defaults to: nil)

    The number of items to be included in the result.

  • filter (String) (defaults to: nil)

    The filter to apply on the operation. Options for

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 66

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 = {}
  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.Logic/workflows'

  request_url = @base_url || @client.base_url

  options = {
      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, options)

  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::Logic::Mgmt::V2018_07_01_preview::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.message, 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.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (WorkflowListResult)

    operation results.



1431
1432
1433
1434
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 1431

def list_by_subscription_next(next_page_link, custom_headers:nil)
  response = list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_by_subscription_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise

Gets a list of workflows by subscription.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 1460

def list_by_subscription_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      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, options)

  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::Logic::Mgmt::V2018_07_01_preview::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.message, 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.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1446
1447
1448
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 1446

def list_by_subscription_next_with_http_info(next_page_link, custom_headers:nil)
  list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
end

#list_by_subscription_with_http_info(top: nil, filter: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets a list of workflows by subscription.

filters include: State, Trigger, and ReferencedResourceId. will be added to the HTTP request.

Parameters:

  • top (Integer) (defaults to: nil)

    The number of items to be included in the result.

  • filter (String) (defaults to: nil)

    The filter to apply on the operation. Options for

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



51
52
53
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 51

def list_by_subscription_with_http_info(top:nil, filter:nil, custom_headers:nil)
  list_by_subscription_async(top:top, filter:filter, custom_headers:custom_headers).value!
end

#list_callback_url(resource_group_name, workflow_name, list_callback_url, custom_headers: nil) ⇒ WorkflowTriggerCallbackUrl

Get the workflow callback Url.

list. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • list_callback_url (GetCallbackUrlParameters)

    Which callback url to

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (WorkflowTriggerCallbackUrl)

    operation results.



873
874
875
876
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 873

def list_callback_url(resource_group_name, workflow_name, list_callback_url, custom_headers:nil)
  response = list_callback_url_async(resource_group_name, workflow_name, list_callback_url, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_callback_url_async(resource_group_name, workflow_name, list_callback_url, custom_headers: nil) ⇒ Concurrent::Promise

Get the workflow callback Url.

list. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • list_callback_url (GetCallbackUrlParameters)

    Which callback url to

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 906

def list_callback_url_async(resource_group_name, workflow_name, list_callback_url, 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, 'list_callback_url is nil' if list_callback_url.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?

  # Serialize Request
  request_mapper = Azure::Logic::Mgmt::V2018_07_01_preview::Models::GetCallbackUrlParameters.mapper()
  request_content = @client.serialize(request_mapper,  list_callback_url)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl'

  request_url = @base_url || @client.base_url

  options = {
      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, options)

  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::Logic::Mgmt::V2018_07_01_preview::Models::WorkflowTriggerCallbackUrl.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_callback_url_with_http_info(resource_group_name, workflow_name, list_callback_url, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Get the workflow callback Url.

list. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • list_callback_url (GetCallbackUrlParameters)

    Which callback url to

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



890
891
892
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 890

def list_callback_url_with_http_info(resource_group_name, workflow_name, list_callback_url, custom_headers:nil)
  list_callback_url_async(resource_group_name, workflow_name, list_callback_url, custom_headers: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.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



977
978
979
980
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 977

def list_swagger(resource_group_name, workflow_name, custom_headers:nil)
  response = list_swagger_async(resource_group_name, workflow_name, custom_headers: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.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 1006

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 = {}
  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.Logic/workflows/{workflowName}/listSwagger'

  request_url = @base_url || @client.base_url

  options = {
      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, options)

  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.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



992
993
994
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 992

def list_swagger_with_http_info(resource_group_name, workflow_name, custom_headers:nil)
  list_swagger_async(resource_group_name, workflow_name, custom_headers:custom_headers).value!
end

#move(resource_group_name, workflow_name, move, custom_headers: nil) ⇒ Object

Moves an existing workflow.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • move (Workflow)

    The workflow to move.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



1059
1060
1061
1062
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 1059

def move(resource_group_name, workflow_name, move, custom_headers:nil)
  response = move_async(resource_group_name, workflow_name, move, custom_headers:custom_headers).value!
  nil
end

#move_async(resource_group_name, workflow_name, move, custom_headers: nil) ⇒ Concurrent::Promise

Moves an existing workflow.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • move (Workflow)

    The workflow to move.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 1090

def move_async(resource_group_name, workflow_name, move, 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, 'move is nil' if move.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?

  # Serialize Request
  request_mapper = Azure::Logic::Mgmt::V2018_07_01_preview::Models::Workflow.mapper()
  request_content = @client.serialize(request_mapper,  move)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move'

  request_url = @base_url || @client.base_url

  options = {
      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, options)

  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 == 202
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?

    result
  end

  promise.execute
end

#move_with_http_info(resource_group_name, workflow_name, move, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Moves an existing workflow.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • move (Workflow)

    The workflow to move.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1075
1076
1077
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 1075

def move_with_http_info(resource_group_name, workflow_name, move, custom_headers:nil)
  move_async(resource_group_name, workflow_name, move, custom_headers: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.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • key_type (RegenerateActionParameter)

    The access key type.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



1151
1152
1153
1154
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 1151

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: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.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • key_type (RegenerateActionParameter)

    The access key type.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 1182

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 = {}
  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::Logic::Mgmt::V2018_07_01_preview::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

  options = {
      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, options)

  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.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • key_type (RegenerateActionParameter)

    The access key type.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1167
1168
1169
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 1167

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: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.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • workflow (Workflow)

    The workflow.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Workflow)

    operation results.



430
431
432
433
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 430

def update(resource_group_name, workflow_name, workflow, custom_headers:nil)
  response = update_async(resource_group_name, workflow_name, workflow, custom_headers: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.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • workflow (Workflow)

    The workflow.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
514
515
516
517
518
519
520
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 461

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 = {}
  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::Logic::Mgmt::V2018_07_01_preview::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

  options = {
      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, options)

  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::Logic::Mgmt::V2018_07_01_preview::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.message, 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.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • workflow (Workflow)

    The workflow.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



446
447
448
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 446

def update_with_http_info(resource_group_name, workflow_name, workflow, custom_headers:nil)
  update_async(resource_group_name, workflow_name, workflow, custom_headers:custom_headers).value!
end

#validate_by_location(resource_group_name, location, workflow_name, workflow, custom_headers: nil) ⇒ Object

Validates the workflow definition.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • location (String)

    The workflow location.

  • workflow_name (String)

    The workflow name.

  • workflow (Workflow)

    The workflow definition.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



1336
1337
1338
1339
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 1336

def validate_by_location(resource_group_name, location, workflow_name, workflow, custom_headers:nil)
  response = validate_by_location_async(resource_group_name, location, workflow_name, workflow, custom_headers:custom_headers).value!
  nil
end

#validate_by_location_async(resource_group_name, location, workflow_name, workflow, custom_headers: nil) ⇒ Concurrent::Promise

Validates the workflow definition.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • location (String)

    The workflow location.

  • workflow_name (String)

    The workflow name.

  • workflow (Workflow)

    The workflow definition.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 1369

def validate_by_location_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 = {}
  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::Logic::Mgmt::V2018_07_01_preview::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

  options = {
      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, options)

  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_by_location_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.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • location (String)

    The workflow location.

  • workflow_name (String)

    The workflow name.

  • workflow (Workflow)

    The workflow definition.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1353
1354
1355
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 1353

def validate_by_location_with_http_info(resource_group_name, location, workflow_name, workflow, custom_headers:nil)
  validate_by_location_async(resource_group_name, location, workflow_name, workflow, custom_headers:custom_headers).value!
end

#validate_by_resource_group(resource_group_name, workflow_name, validate, custom_headers: nil) ⇒ Object

Validates the workflow.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • validate (Workflow)

    The workflow.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



1243
1244
1245
1246
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 1243

def validate_by_resource_group(resource_group_name, workflow_name, validate, custom_headers:nil)
  response = validate_by_resource_group_async(resource_group_name, workflow_name, validate, custom_headers:custom_headers).value!
  nil
end

#validate_by_resource_group_async(resource_group_name, workflow_name, validate, custom_headers: nil) ⇒ Concurrent::Promise

Validates the workflow.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • validate (Workflow)

    The workflow.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 1274

def validate_by_resource_group_async(resource_group_name, workflow_name, validate, 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, 'validate is nil' if validate.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?

  # Serialize Request
  request_mapper = Azure::Logic::Mgmt::V2018_07_01_preview::Models::Workflow.mapper()
  request_content = @client.serialize(request_mapper,  validate)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate'

  request_url = @base_url || @client.base_url

  options = {
      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, options)

  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_by_resource_group_with_http_info(resource_group_name, workflow_name, validate, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Validates the workflow.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • workflow_name (String)

    The workflow name.

  • validate (Workflow)

    The workflow.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1259
1260
1261
# File 'lib/2018-07-01-preview/generated/azure_mgmt_logic/workflows.rb', line 1259

def validate_by_resource_group_with_http_info(resource_group_name, workflow_name, validate, custom_headers:nil)
  validate_by_resource_group_async(resource_group_name, workflow_name, validate, custom_headers:custom_headers).value!
end