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:



534
535
536
537
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 534

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.



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
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 569

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}'
  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 || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_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(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    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.



552
553
554
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 552

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



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

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.



901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 901

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}'
  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 || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_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(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    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.



885
886
887
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 885

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:



705
706
707
708
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 705

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.



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
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 740

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}'
  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 || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_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(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    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.



723
724
725
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 723

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:



486
487
488
489
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 486

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



503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 503

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:



368
369
370
371
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 368

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.



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
460
461
462
463
464
465
466
467
468
469
470
471
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 407

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}'
  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 || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_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(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    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.



388
389
390
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 388

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



825
826
827
828
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 825

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



841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 841

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
117
118
119
# 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}'
  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 || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_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(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    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



1058
1059
1060
1061
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1058

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.



1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1093

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'
  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 || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_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(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    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.



1076
1077
1078
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1076

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:



958
959
960
961
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 958

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.



991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 991

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}'
  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 || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_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(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    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:



134
135
136
137
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 134

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.



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
218
219
220
221
222
223
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 169

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}'
  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 || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_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(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    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.



152
153
154
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 152

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.



975
976
977
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 975

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:



1425
1426
1427
1428
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1425

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:



1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1382

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_link|
      list_next_async(next_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.



1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1498

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'
  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 || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_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(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    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:



1218
1219
1220
1221
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1218

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:



1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1173

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_link|
      list_by_resource_group_next_async(next_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.



1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1295

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'
  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 || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_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(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    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:



1655
1656
1657
1658
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1655

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.



1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1686

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}'
  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 || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_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(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    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.



1671
1672
1673
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1671

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.



1257
1258
1259
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1257

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:



263
264
265
266
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 263

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:



239
240
241
242
243
244
245
246
247
248
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 239

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_link|
      list_firewall_rules_next_async(next_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.



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
343
344
345
346
347
348
349
350
351
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 298

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'
  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 || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_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(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    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:



1562
1563
1564
1565
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1562

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.



1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1593

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}'
  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 || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_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(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    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.



1578
1579
1580
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1578

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.



281
282
283
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 281

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:



1748
1749
1750
1751
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1748

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.



1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1779

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}'
  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 || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_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(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    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.



1764
1765
1766
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1764

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.



1462
1463
1464
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 1462

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:



657
658
659
660
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 657

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



674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
# File 'lib/generated/azure_mgmt_datalake_store/account.rb', line 674

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