Class: Azure::ARM::DataLakeStore::Account

Inherits:
Object
  • Object
show all
Includes:
Models, MsRestAzure
Defined in:
lib/generated/azure_mgmt_datalake_store/account.rb

Overview

Creates an Azure Data Lake Store account management client.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Account

Creates and initializes a new instance of the Account class.

Parameters:

  • client

    service class for accessing basic functionality.



18
19
20
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 18

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientDataLakeStoreAccountManagementClient (readonly)

Returns reference to the DataLakeStoreAccountManagementClient.

Returns:



23
24
25
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 23

def client
  @client
end

Instance Method Details

#begin_create(resource_group_name, name, parameters, custom_headers = nil) ⇒ DataLakeStoreAccount

Creates the specified Data Lake Store account.

that contains the Data Lake Store account. Data Lake Store account. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • name (String)

    The name of the Data Lake Store account to create.

  • parameters (DataLakeStoreAccount)

    Parameters supplied to create the

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

    A hash of custom headers that

Returns:



522
523
524
525
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 522

def begin_create(resource_group_name, name, parameters, custom_headers = nil)
  response = begin_create_async(resource_group_name, name, parameters, custom_headers).value!
  response.body unless response.nil?
end

#begin_create_async(resource_group_name, name, parameters, custom_headers = nil) ⇒ Concurrent::Promise

Creates the specified Data Lake Store account.

that contains the Data Lake Store account. Data Lake Store account. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • name (String)

    The name of the Data Lake Store account to create.

  • parameters (DataLakeStoreAccount)

    Parameters supplied to create the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 557

def begin_create_async(resource_group_name, name, parameters, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'parameters is nil' if parameters.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


  request_headers = {}

  # 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 = DataLakeStoreAccount.mapper()
  request_content = @client.serialize(request_mapper,  parameters, 'parameters')
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{name}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:put, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 201 || status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 201
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = DataLakeStoreAccount.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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 == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = DataLakeStoreAccount.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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

#begin_create_with_http_info(resource_group_name, name, parameters, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Creates the specified Data Lake Store account.

that contains the Data Lake Store account. Data Lake Store account. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • name (String)

    The name of the Data Lake Store account to create.

  • parameters (DataLakeStoreAccount)

    Parameters supplied to create the

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



540
541
542
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 540

def begin_create_with_http_info(resource_group_name, name, parameters, custom_headers = nil)
  begin_create_async(resource_group_name, name, parameters, custom_headers).value!
end

#begin_delete(resource_group_name, account_name, custom_headers = nil) ⇒ Object

Deletes the specified Data Lake Store account.

that contains the Data Lake Store account. delete. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account to

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

    A hash of custom headers that



850
851
852
853
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 850

def begin_delete(resource_group_name, , custom_headers = nil)
  response = begin_delete_async(resource_group_name, , custom_headers).value!
  nil
end

#begin_delete_async(resource_group_name, account_name, custom_headers = nil) ⇒ Concurrent::Promise

Deletes the specified Data Lake Store account.

that contains the Data Lake Store account. delete. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account to

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 883

def begin_delete_async(resource_group_name, , custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'account_name is nil' if .nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


  request_headers = {}

  # 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.DataLakeStore/accounts/{accountName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'accountName' => ,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, 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 == 404 || status_code == 204 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

    result
  end

  promise.execute
end

#begin_delete_with_http_info(resource_group_name, account_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Deletes the specified Data Lake Store account.

that contains the Data Lake Store account. delete. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account to

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



867
868
869
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 867

def begin_delete_with_http_info(resource_group_name, , custom_headers = nil)
  begin_delete_async(resource_group_name, , custom_headers).value!
end

#begin_update(resource_group_name, name, parameters, custom_headers = nil) ⇒ DataLakeStoreAccount

Updates the specified Data Lake Store account information.

that contains the Data Lake Store account. Data Lake Store account. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • name (String)

    The name of the Data Lake Store account to update.

  • parameters (DataLakeStoreAccount)

    Parameters supplied to update the

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

    A hash of custom headers that

Returns:



690
691
692
693
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 690

def begin_update(resource_group_name, name, parameters, custom_headers = nil)
  response = begin_update_async(resource_group_name, name, parameters, custom_headers).value!
  response.body unless response.nil?
end

#begin_update_async(resource_group_name, name, parameters, custom_headers = nil) ⇒ Concurrent::Promise

Updates the specified Data Lake Store account information.

that contains the Data Lake Store account. Data Lake Store account. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • name (String)

    The name of the Data Lake Store account to update.

  • parameters (DataLakeStoreAccount)

    Parameters supplied to update the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 725

def begin_update_async(resource_group_name, name, parameters, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'parameters is nil' if parameters.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


  request_headers = {}

  # 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 = DataLakeStoreAccount.mapper()
  request_content = @client.serialize(request_mapper,  parameters, 'parameters')
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{name}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:patch, path_template, 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 = DataLakeStoreAccount.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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 = DataLakeStoreAccount.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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

#begin_update_with_http_info(resource_group_name, name, parameters, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Updates the specified Data Lake Store account information.

that contains the Data Lake Store account. Data Lake Store account. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • name (String)

    The name of the Data Lake Store account to update.

  • parameters (DataLakeStoreAccount)

    Parameters supplied to update the

  • 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/generated/azure_mgmt_datalake_store/account.rb', line 708

def begin_update_with_http_info(resource_group_name, name, parameters, custom_headers = nil)
  begin_update_async(resource_group_name, name, parameters, custom_headers).value!
end

#create(resource_group_name, name, parameters, custom_headers = nil) ⇒ DataLakeStoreAccount

Creates the specified Data Lake Store account.

that contains the Data Lake Store account. Data Lake Store account. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • name (String)

    The name of the Data Lake Store account to create.

  • parameters (DataLakeStoreAccount)

    Parameters supplied to create the

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

    A hash of custom headers that

Returns:



474
475
476
477
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 474

def create(resource_group_name, name, parameters, custom_headers = nil)
  response = create_async(resource_group_name, name, parameters, custom_headers).value!
  response.body unless response.nil?
end

#create_async(resource_group_name, name, parameters, custom_headers = nil) ⇒ Concurrent::Promise

that contains the Data Lake Store account. Data Lake Store account. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • name (String)

    The name of the Data Lake Store account to create.

  • parameters (DataLakeStoreAccount)

    Parameters supplied to create the

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 491

def create_async(resource_group_name, name, parameters, custom_headers = nil)
  # Send request
  promise = begin_create_async(resource_group_name, name, parameters, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = DataLakeStoreAccount.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#create_or_update_firewall_rule(resource_group_name, account_name, name, parameters, custom_headers = nil) ⇒ FirewallRule

Creates or updates the specified firewall rule.

that contains the Data Lake Store account. which to add the firewall rule. firewall rule. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account to

  • name (String)

    The name of the firewall rule to create or update.

  • parameters (FirewallRule)

    Parameters supplied to create the create

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

    A hash of custom headers that

Returns:



359
360
361
362
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 359

def create_or_update_firewall_rule(resource_group_name, , name, parameters, custom_headers = nil)
  response = create_or_update_firewall_rule_async(resource_group_name, , name, parameters, custom_headers).value!
  response.body unless response.nil?
end

#create_or_update_firewall_rule_async(resource_group_name, account_name, name, parameters, custom_headers = nil) ⇒ Concurrent::Promise

Creates or updates the specified firewall rule.

that contains the Data Lake Store account. which to add the firewall rule. firewall rule. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account to

  • name (String)

    The name of the firewall rule to create or update.

  • parameters (FirewallRule)

    Parameters supplied to create the create

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 398

def create_or_update_firewall_rule_async(resource_group_name, , name, parameters, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'account_name is nil' if .nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'parameters is nil' if parameters.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


  request_headers = {}

  # 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 = FirewallRule.mapper()
  request_content = @client.serialize(request_mapper,  parameters, 'parameters')
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{name}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'accountName' => ,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:put, path_template, 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 = FirewallRule.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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_firewall_rule_with_http_info(resource_group_name, account_name, name, parameters, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Creates or updates the specified firewall rule.

that contains the Data Lake Store account. which to add the firewall rule. firewall rule. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account to

  • name (String)

    The name of the firewall rule to create or update.

  • parameters (FirewallRule)

    Parameters supplied to create the create

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



379
380
381
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 379

def create_or_update_firewall_rule_with_http_info(resource_group_name, , name, parameters, custom_headers = nil)
  create_or_update_firewall_rule_async(resource_group_name, , name, parameters, custom_headers).value!
end

#delete(resource_group_name, account_name, custom_headers = nil) ⇒ Object

Deletes the specified Data Lake Store account.

that contains the Data Lake Store account. delete. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account to

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

    A hash of custom headers that



807
808
809
810
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 807

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

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

that contains the Data Lake Store account. delete. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account to

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 823

def delete_async(resource_group_name, , custom_headers = nil)
  # Send request
  promise = begin_delete_async(resource_group_name, , custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#delete_firewall_rule(resource_group_name, account_name, firewall_rule_name, custom_headers = nil) ⇒ Object

Deletes the specified firewall rule from the specified Data Lake Store account

that contains the Data Lake Store account. which to delete the firewall rule. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account from

  • firewall_rule_name (String)

    The name of the firewall rule to delete.

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

    A hash of custom headers that



38
39
40
41
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 38

def delete_firewall_rule(resource_group_name, , firewall_rule_name, custom_headers = nil)
  response = delete_firewall_rule_async(resource_group_name, , firewall_rule_name, custom_headers).value!
  nil
end

#delete_firewall_rule_async(resource_group_name, account_name, firewall_rule_name, custom_headers = nil) ⇒ Concurrent::Promise

Deletes the specified firewall rule from the specified Data Lake Store account

that contains the Data Lake Store account. which to delete the firewall rule. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account from

  • firewall_rule_name (String)

    The name of the firewall rule to delete.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 75

def delete_firewall_rule_async(resource_group_name, , firewall_rule_name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'account_name is nil' if .nil?
  fail ArgumentError, 'firewall_rule_name is nil' if firewall_rule_name.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


  request_headers = {}

  # 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.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'accountName' => ,'firewallRuleName' => firewall_rule_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, 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_firewall_rule_with_http_info(resource_group_name, account_name, firewall_rule_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Deletes the specified firewall rule from the specified Data Lake Store account

that contains the Data Lake Store account. which to delete the firewall rule. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account from

  • firewall_rule_name (String)

    The name of the firewall rule to delete.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



57
58
59
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 57

def delete_firewall_rule_with_http_info(resource_group_name, , firewall_rule_name, custom_headers = nil)
  delete_firewall_rule_async(resource_group_name, , firewall_rule_name, custom_headers).value!
end

#enable_key_vault(resource_group_name, account_name, custom_headers = nil) ⇒ Object

Attempts to enable a user managed key vault for encryption of the specified Data Lake Store account.

that contains the Data Lake Store account. attempt to enable the Key Vault for. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account to

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

    A hash of custom headers that



1034
1035
1036
1037
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1034

def enable_key_vault(resource_group_name, , custom_headers = nil)
  response = enable_key_vault_async(resource_group_name, , custom_headers).value!
  nil
end

#enable_key_vault_async(resource_group_name, account_name, custom_headers = nil) ⇒ Concurrent::Promise

Attempts to enable a user managed key vault for encryption of the specified Data Lake Store account.

that contains the Data Lake Store account. attempt to enable the Key Vault for. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account to

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1069
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
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1069

def enable_key_vault_async(resource_group_name, , custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'account_name is nil' if .nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


  request_headers = {}

  # 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.DataLakeStore/accounts/{accountName}/enableKeyVault'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'accountName' => ,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, 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_key_vault_with_http_info(resource_group_name, account_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Attempts to enable a user managed key vault for encryption of the specified Data Lake Store account.

that contains the Data Lake Store account. attempt to enable the Key Vault for. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account to

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1052
1053
1054
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1052

def enable_key_vault_with_http_info(resource_group_name, , custom_headers = nil)
  enable_key_vault_async(resource_group_name, , custom_headers).value!
end

#get(resource_group_name, account_name, custom_headers = nil) ⇒ DataLakeStoreAccount

Gets the specified Data Lake Store account.

that contains the Data Lake Store account. retrieve. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account to

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

    A hash of custom headers that

Returns:



937
938
939
940
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 937

def get(resource_group_name, , custom_headers = nil)
  response = get_async(resource_group_name, , custom_headers).value!
  response.body unless response.nil?
end

#get_async(resource_group_name, account_name, custom_headers = nil) ⇒ Concurrent::Promise

Gets the specified Data Lake Store account.

that contains the Data Lake Store account. retrieve. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account to

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



970
971
972
973
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
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 970

def get_async(resource_group_name, , custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'account_name is nil' if .nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


  request_headers = {}

  # 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.DataLakeStore/accounts/{accountName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'accountName' => ,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, 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 = DataLakeStoreAccount.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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_firewall_rule(resource_group_name, account_name, firewall_rule_name, custom_headers = nil) ⇒ FirewallRule

Gets the specified Data Lake Store firewall rule.

that contains the Data Lake Store account. which to get the firewall rule. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account from

  • firewall_rule_name (String)

    The name of the firewall rule to retrieve.

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

    A hash of custom headers that

Returns:



131
132
133
134
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 131

def get_firewall_rule(resource_group_name, , firewall_rule_name, custom_headers = nil)
  response = get_firewall_rule_async(resource_group_name, , firewall_rule_name, custom_headers).value!
  response.body unless response.nil?
end

#get_firewall_rule_async(resource_group_name, account_name, firewall_rule_name, custom_headers = nil) ⇒ Concurrent::Promise

Gets the specified Data Lake Store firewall rule.

that contains the Data Lake Store account. which to get the firewall rule. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account from

  • firewall_rule_name (String)

    The name of the firewall rule to retrieve.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 166

def get_firewall_rule_async(resource_group_name, , firewall_rule_name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'account_name is nil' if .nil?
  fail ArgumentError, 'firewall_rule_name is nil' if firewall_rule_name.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


  request_headers = {}

  # 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.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'accountName' => ,'firewallRuleName' => firewall_rule_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, 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 = FirewallRule.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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_firewall_rule_with_http_info(resource_group_name, account_name, firewall_rule_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Gets the specified Data Lake Store firewall rule.

that contains the Data Lake Store account. which to get the firewall rule. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account from

  • firewall_rule_name (String)

    The name of the firewall rule to retrieve.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



149
150
151
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 149

def get_firewall_rule_with_http_info(resource_group_name, , firewall_rule_name, custom_headers = nil)
  get_firewall_rule_async(resource_group_name, , firewall_rule_name, custom_headers).value!
end

#get_with_http_info(resource_group_name, account_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Gets the specified Data Lake Store account.

that contains the Data Lake Store account. retrieve. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account to

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



954
955
956
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 954

def get_with_http_info(resource_group_name, , custom_headers = nil)
  get_async(resource_group_name, , custom_headers).value!
end

#list(filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil) ⇒ Array<DataLakeStoreAccount>

Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any.

elements. Optional. with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. expressions with an optional “asc” (the default) or “desc” depending on the order you’d like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. will be added to the HTTP request.

Parameters:

  • filter (String) (defaults to: nil)

    OData filter. Optional.

  • top (Integer) (defaults to: nil)

    The number of items to return. Optional.

  • skip (Integer) (defaults to: nil)

    The number of items to skip over before returning

  • expand (String) (defaults to: nil)

    OData expansion. Expand related resources in line

  • select (String) (defaults to: nil)

    OData Select statement. Limits the properties on each

  • orderby (String) (defaults to: nil)

    OrderBy clause. One or more comma-separated

  • count (Boolean) (defaults to: nil)

    The Boolean value of true or false to request a count

  • search (String) (defaults to: nil)

    A free form search. A free-text search expression to

  • format (String) (defaults to: nil)

    The desired return format. Return the response in

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

    A hash of custom headers that

Returns:



1395
1396
1397
1398
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1395

def list(filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
  first_page = list_as_lazy(filter, top, skip, expand, select, orderby, count, search, format, custom_headers)
  first_page.get_all_items
end

#list_as_lazy(filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil) ⇒ DataLakeStoreAccountListResult

Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any.

elements. Optional. with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. expressions with an optional “asc” (the default) or “desc” depending on the order you’d like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. will be added to the HTTP request.

of the response.

Parameters:

  • filter (String) (defaults to: nil)

    OData filter. Optional.

  • top (Integer) (defaults to: nil)

    The number of items to return. Optional.

  • skip (Integer) (defaults to: nil)

    The number of items to skip over before returning

  • expand (String) (defaults to: nil)

    OData expansion. Expand related resources in line

  • select (String) (defaults to: nil)

    OData Select statement. Limits the properties on each

  • orderby (String) (defaults to: nil)

    OrderBy clause. One or more comma-separated

  • count (Boolean) (defaults to: nil)

    The Boolean value of true or false to request a count

  • search (String) (defaults to: nil)

    A free form search. A free-text search expression to

  • format (String) (defaults to: nil)

    The desired return format. Return the response in

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

    A hash of custom headers that

Returns:



1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1352

def list_as_lazy(filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
  response = list_async(filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_next_async(next_page_link, custom_headers)
    end
    page
  end
end

#list_async(filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil) ⇒ Concurrent::Promise

Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any.

elements. Optional. with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. expressions with an optional “asc” (the default) or “desc” depending on the order you’d like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. to the HTTP request.

Parameters:

  • filter (String) (defaults to: nil)

    OData filter. Optional.

  • top (Integer) (defaults to: nil)

    The number of items to return. Optional.

  • skip (Integer) (defaults to: nil)

    The number of items to skip over before returning

  • expand (String) (defaults to: nil)

    OData expansion. Expand related resources in line

  • select (String) (defaults to: nil)

    OData Select statement. Limits the properties on each

  • orderby (String) (defaults to: nil)

    OrderBy clause. One or more comma-separated

  • count (Boolean) (defaults to: nil)

    The Boolean value of true or false to request a count

  • search (String) (defaults to: nil)

    A free form search. A free-text search expression to

  • format (String) (defaults to: nil)

    The desired return format. Return the response in

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
1508
1509
1510
1511
1512
1513
1514
1515
1516
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1468

def list_async(filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


  request_headers = {}

  # 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.DataLakeStore/accounts'

  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: {'$filter' => filter,'$top' => top,'$skip' => skip,'$expand' => expand,'$select' => select,'$orderby' => orderby,'$count' => count,'$search' => search,'$format' => format,'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 = DataLakeStoreAccountListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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(resource_group_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil) ⇒ Array<DataLakeStoreAccount>

Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any.

that contains the Data Lake Store account(s). elements. Optional. with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. expressions with an optional “asc” (the default) or “desc” depending on the order you’d like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • filter (String) (defaults to: nil)

    OData filter. Optional.

  • top (Integer) (defaults to: nil)

    The number of items to return. Optional.

  • skip (Integer) (defaults to: nil)

    The number of items to skip over before returning

  • expand (String) (defaults to: nil)

    OData expansion. Expand related resources in line

  • select (String) (defaults to: nil)

    OData Select statement. Limits the properties on each

  • orderby (String) (defaults to: nil)

    OrderBy clause. One or more comma-separated

  • count (Boolean) (defaults to: nil)

    A Boolean value of true or false to request a count

  • search (String) (defaults to: nil)

    A free form search. A free-text search expression to

  • format (String) (defaults to: nil)

    The desired return format. Return the response in

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

    A hash of custom headers that

Returns:



1191
1192
1193
1194
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1191

def list_by_resource_group(resource_group_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
  first_page = list_by_resource_group_as_lazy(resource_group_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers)
  first_page.get_all_items
end

#list_by_resource_group_as_lazy(resource_group_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil) ⇒ DataLakeStoreAccountListResult

Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any.

that contains the Data Lake Store account(s). elements. Optional. with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. expressions with an optional “asc” (the default) or “desc” depending on the order you’d like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. will be added to the HTTP request.

of the response.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • filter (String) (defaults to: nil)

    OData filter. Optional.

  • top (Integer) (defaults to: nil)

    The number of items to return. Optional.

  • skip (Integer) (defaults to: nil)

    The number of items to skip over before returning

  • expand (String) (defaults to: nil)

    OData expansion. Expand related resources in line

  • select (String) (defaults to: nil)

    OData Select statement. Limits the properties on each

  • orderby (String) (defaults to: nil)

    OrderBy clause. One or more comma-separated

  • count (Boolean) (defaults to: nil)

    A Boolean value of true or false to request a count

  • search (String) (defaults to: nil)

    A free form search. A free-text search expression to

  • format (String) (defaults to: nil)

    The desired return format. Return the response in

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

    A hash of custom headers that

Returns:



1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1146

def list_by_resource_group_as_lazy(resource_group_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
  response = list_by_resource_group_async(resource_group_name, filter, top, skip, expand, select, orderby, count, search, format, 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, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil) ⇒ Concurrent::Promise

Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any.

that contains the Data Lake Store account(s). elements. Optional. with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. expressions with an optional “asc” (the default) or “desc” depending on the order you’d like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • filter (String) (defaults to: nil)

    OData filter. Optional.

  • top (Integer) (defaults to: nil)

    The number of items to return. Optional.

  • skip (Integer) (defaults to: nil)

    The number of items to skip over before returning

  • expand (String) (defaults to: nil)

    OData expansion. Expand related resources in line

  • select (String) (defaults to: nil)

    OData Select statement. Limits the properties on each

  • orderby (String) (defaults to: nil)

    OrderBy clause. One or more comma-separated

  • count (Boolean) (defaults to: nil)

    A Boolean value of true or false to request a count

  • search (String) (defaults to: nil)

    A free form search. A free-text search expression to

  • format (String) (defaults to: nil)

    The desired return format. Return the response in

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1268

def list_by_resource_group_async(resource_group_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = 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?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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.DataLakeStore/accounts'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
      query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'$expand' => expand,'$select' => select,'$orderby' => orderby,'$count' => count,'$search' => search,'$format' => format,'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 = DataLakeStoreAccountListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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) ⇒ DataLakeStoreAccountListResult

Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any.

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

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

    A hash of custom headers that

Returns:



1619
1620
1621
1622
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1619

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

Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any.

call to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1650

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

  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 = DataLakeStoreAccountListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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

Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any.

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1635
1636
1637
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1635

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, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any.

that contains the Data Lake Store account(s). elements. Optional. with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. expressions with an optional “asc” (the default) or “desc” depending on the order you’d like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • filter (String) (defaults to: nil)

    OData filter. Optional.

  • top (Integer) (defaults to: nil)

    The number of items to return. Optional.

  • skip (Integer) (defaults to: nil)

    The number of items to skip over before returning

  • expand (String) (defaults to: nil)

    OData expansion. Expand related resources in line

  • select (String) (defaults to: nil)

    OData Select statement. Limits the properties on each

  • orderby (String) (defaults to: nil)

    OrderBy clause. One or more comma-separated

  • count (Boolean) (defaults to: nil)

    A Boolean value of true or false to request a count

  • search (String) (defaults to: nil)

    A free form search. A free-text search expression to

  • format (String) (defaults to: nil)

    The desired return format. Return the response in

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1230
1231
1232
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1230

def list_by_resource_group_with_http_info(resource_group_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
  list_by_resource_group_async(resource_group_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
end

#list_firewall_rules(resource_group_name, account_name, custom_headers = nil) ⇒ Array<FirewallRule>

Lists the Data Lake Store firewall rules within the specified Data Lake Store account.

that contains the Data Lake Store account. which to get the firewall rules. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account from

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

    A hash of custom headers that

Returns:



257
258
259
260
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 257

def list_firewall_rules(resource_group_name, , custom_headers = nil)
  first_page = list_firewall_rules_as_lazy(resource_group_name, , custom_headers)
  first_page.get_all_items
end

#list_firewall_rules_as_lazy(resource_group_name, account_name, custom_headers = nil) ⇒ DataLakeStoreFirewallRuleListResult

Lists the Data Lake Store firewall rules within the specified Data Lake Store account.

that contains the Data Lake Store account. which to get the firewall rules. will be added to the HTTP request.

pages of the response.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account from

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

    A hash of custom headers that

Returns:



233
234
235
236
237
238
239
240
241
242
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 233

def list_firewall_rules_as_lazy(resource_group_name, , custom_headers = nil)
  response = list_firewall_rules_async(resource_group_name, , custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_firewall_rules_next_async(next_page_link, custom_headers)
    end
    page
  end
end

#list_firewall_rules_async(resource_group_name, account_name, custom_headers = nil) ⇒ Concurrent::Promise

Lists the Data Lake Store firewall rules within the specified Data Lake Store account.

that contains the Data Lake Store account. which to get the firewall rules. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account from

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 292

def list_firewall_rules_async(resource_group_name, , custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'account_name is nil' if .nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


  request_headers = {}

  # 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.DataLakeStore/accounts/{accountName}/firewallRules'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'accountName' => ,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, 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 = DataLakeStoreFirewallRuleListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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_firewall_rules_next(next_page_link, custom_headers = nil) ⇒ DataLakeStoreFirewallRuleListResult

Lists the Data Lake Store firewall rules within the specified Data Lake Store account.

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

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

    A hash of custom headers that

Returns:



1529
1530
1531
1532
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1529

def list_firewall_rules_next(next_page_link, custom_headers = nil)
  response = list_firewall_rules_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_firewall_rules_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Lists the Data Lake Store firewall rules within the specified Data Lake Store account.

call to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1560

def list_firewall_rules_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

  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 = DataLakeStoreFirewallRuleListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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_firewall_rules_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Lists the Data Lake Store firewall rules within the specified Data Lake Store account.

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1545
1546
1547
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1545

def list_firewall_rules_next_with_http_info(next_page_link, custom_headers = nil)
  list_firewall_rules_next_async(next_page_link, custom_headers).value!
end

#list_firewall_rules_with_http_info(resource_group_name, account_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Lists the Data Lake Store firewall rules within the specified Data Lake Store account.

that contains the Data Lake Store account. which to get the firewall rules. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • account_name (String)

    The name of the Data Lake Store account from

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



275
276
277
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 275

def list_firewall_rules_with_http_info(resource_group_name, , custom_headers = nil)
  list_firewall_rules_async(resource_group_name, , custom_headers).value!
end

#list_next(next_page_link, custom_headers = nil) ⇒ DataLakeStoreAccountListResult

Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any.

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

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

    A hash of custom headers that

Returns:



1709
1710
1711
1712
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1709

def list_next(next_page_link, custom_headers = nil)
  response = list_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any.

call to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1740

def list_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

  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 = DataLakeStoreAccountListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any.

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1725
1726
1727
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1725

def list_next_with_http_info(next_page_link, custom_headers = nil)
  list_next_async(next_page_link, custom_headers).value!
end

#list_with_http_info(filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any.

elements. Optional. with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. expressions with an optional “asc” (the default) or “desc” depending on the order you’d like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. will be added to the HTTP request.

Parameters:

  • filter (String) (defaults to: nil)

    OData filter. Optional.

  • top (Integer) (defaults to: nil)

    The number of items to return. Optional.

  • skip (Integer) (defaults to: nil)

    The number of items to skip over before returning

  • expand (String) (defaults to: nil)

    OData expansion. Expand related resources in line

  • select (String) (defaults to: nil)

    OData Select statement. Limits the properties on each

  • orderby (String) (defaults to: nil)

    OrderBy clause. One or more comma-separated

  • count (Boolean) (defaults to: nil)

    The Boolean value of true or false to request a count

  • search (String) (defaults to: nil)

    A free form search. A free-text search expression to

  • format (String) (defaults to: nil)

    The desired return format. Return the response in

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1432
1433
1434
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1432

def list_with_http_info(filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
  list_async(filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
end

#update(resource_group_name, name, parameters, custom_headers = nil) ⇒ DataLakeStoreAccount

Updates the specified Data Lake Store account information.

that contains the Data Lake Store account. Data Lake Store account. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • name (String)

    The name of the Data Lake Store account to update.

  • parameters (DataLakeStoreAccount)

    Parameters supplied to update the

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

    A hash of custom headers that

Returns:



642
643
644
645
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 642

def update(resource_group_name, name, parameters, custom_headers = nil)
  response = update_async(resource_group_name, name, parameters, custom_headers).value!
  response.body unless response.nil?
end

#update_async(resource_group_name, name, parameters, custom_headers = nil) ⇒ Concurrent::Promise

that contains the Data Lake Store account. Data Lake Store account. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the Azure resource group

  • name (String)

    The name of the Data Lake Store account to update.

  • parameters (DataLakeStoreAccount)

    Parameters supplied to update the

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 659

def update_async(resource_group_name, name, parameters, custom_headers = nil)
  # Send request
  promise = begin_update_async(resource_group_name, name, parameters, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = DataLakeStoreAccount.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end