azure_mgmt_hanaonazure 0.17.0 → 0.17.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c5b995174522172f7ac055b241c88f3d1193e44c
4
- data.tar.gz: 04d10cd4fb64d87d1c7d916c0c342eac489b74c3
2
+ SHA256:
3
+ metadata.gz: 895b9113e54347e3a62675972c22238d8a92ae941e371563cd948f99885e7744
4
+ data.tar.gz: f1140972c3ae3db2b4002a355107a7b39bd58fa8e4eadc387b884e872e6476dd
5
5
  SHA512:
6
- metadata.gz: ed5d49c8e68ad0e322a85eec1be9102bf7665057082c19b0da324a7880cf85dfd8b587c99182bb535cb81caf480580de607f2801f28ef57ccb4bc5d8d7ff3108
7
- data.tar.gz: 6dc2a0cc9541e545b26e21dd0f19adbd64051bbb265f7465b711165193d5f4510602e3da82c908187414b32a39dc537d49b2324f8a4e488b645d8966a5ef3e07
6
+ metadata.gz: 3ddf6a02d804b1b25283221abe0bd39241cb8f6926f716afaecca3cc8a7b2d304844f7cbfb41c9a31cd4471d85858c7ffe49733e0ffe7ffea939664b1b9d88dc
7
+ data.tar.gz: 44ae29f5bbef27a89bbd93badc5de9d1d8f25109344296398e9624c2c51244c6c874f86238fb6b50ac4f31be98a246f9bc1afe9e827749fdd8921771376b5088
@@ -22,26 +22,30 @@ require 'ms_rest_azure'
22
22
  module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
23
23
  autoload :Operations, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/operations.rb'
24
24
  autoload :HanaInstances, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb'
25
+ autoload :SapMonitors, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/sap_monitors.rb'
25
26
  autoload :HanaManagementClient, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_management_client.rb'
26
27
 
27
28
  module Models
28
- autoload :Resource, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/resource.rb'
29
29
  autoload :HanaInstancesListResult, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/hana_instances_list_result.rb'
30
- autoload :Disk, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/disk.rb'
31
30
  autoload :Display, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/display.rb'
32
- autoload :OSProfile, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/osprofile.rb'
31
+ autoload :HardwareProfile, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/hardware_profile.rb'
33
32
  autoload :Operation, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/operation.rb'
34
- autoload :NetworkProfile, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/network_profile.rb'
35
- autoload :OperationList, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/operation_list.rb'
36
33
  autoload :StorageProfile, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/storage_profile.rb'
34
+ autoload :OperationList, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/operation_list.rb'
35
+ autoload :IpAddress, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/ip_address.rb'
37
36
  autoload :ErrorResponse, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/error_response.rb'
38
- autoload :HardwareProfile, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/hardware_profile.rb'
37
+ autoload :NetworkProfile, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/network_profile.rb'
38
+ autoload :Disk, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/disk.rb'
39
39
  autoload :Tags, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/tags.rb'
40
- autoload :IpAddress, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/ip_address.rb'
40
+ autoload :Resource, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/resource.rb'
41
41
  autoload :MonitoringDetails, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/monitoring_details.rb'
42
+ autoload :OSProfile, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/osprofile.rb'
43
+ autoload :SapMonitorListResult, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/sap_monitor_list_result.rb'
42
44
  autoload :HanaInstance, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/hana_instance.rb'
45
+ autoload :SapMonitor, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/sap_monitor.rb'
43
46
  autoload :HanaHardwareTypeNamesEnum, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/hana_hardware_type_names_enum.rb'
44
47
  autoload :HanaInstanceSizeNamesEnum, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/hana_instance_size_names_enum.rb'
45
48
  autoload :HanaInstancePowerStateEnum, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/hana_instance_power_state_enum.rb'
49
+ autoload :HanaProvisioningStatesEnum, '2017-11-03-preview/generated/azure_mgmt_hanaonazure/models/hana_provisioning_states_enum.rb'
46
50
  end
47
51
  end
@@ -97,6 +97,8 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
97
97
  end
98
98
 
99
99
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
100
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
101
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
100
102
  # Deserialize Response
101
103
  if status_code == 200
102
104
  begin
@@ -200,6 +202,8 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
200
202
  end
201
203
 
202
204
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
205
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
206
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
203
207
  # Deserialize Response
204
208
  if status_code == 200
205
209
  begin
@@ -301,6 +305,8 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
301
305
  end
302
306
 
303
307
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
308
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
309
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
304
310
  # Deserialize Response
305
311
  if status_code == 200
306
312
  begin
@@ -318,6 +324,96 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
318
324
  promise.execute
319
325
  end
320
326
 
327
+ #
328
+ # Creates a SAP HANA instance.
329
+ #
330
+ # Creates a SAP HANA instance for the specified subscription, resource group,
331
+ # and instance name.
332
+ #
333
+ # @param resource_group_name [String] Name of the resource group.
334
+ # @param hana_instance_name [String] Name of the SAP HANA on Azure instance.
335
+ # @param hana_instance_parameter [HanaInstance] Request body representing a
336
+ # HanaInstance
337
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
338
+ # will be added to the HTTP request.
339
+ #
340
+ # @return [HanaInstance] operation results.
341
+ #
342
+ def create(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers:nil)
343
+ response = create_async(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers:custom_headers).value!
344
+ response.body unless response.nil?
345
+ end
346
+
347
+ #
348
+ # @param resource_group_name [String] Name of the resource group.
349
+ # @param hana_instance_name [String] Name of the SAP HANA on Azure instance.
350
+ # @param hana_instance_parameter [HanaInstance] Request body representing a
351
+ # HanaInstance
352
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
353
+ # will be added to the HTTP request.
354
+ #
355
+ # @return [Concurrent::Promise] promise which provides async access to http
356
+ # response.
357
+ #
358
+ def create_async(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers:nil)
359
+ # Send request
360
+ promise = begin_create_async(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers:custom_headers)
361
+
362
+ promise = promise.then do |response|
363
+ # Defining deserialization method.
364
+ deserialize_method = lambda do |parsed_response|
365
+ result_mapper = Azure::Hanaonazure::Mgmt::V2017_11_03_preview::Models::HanaInstance.mapper()
366
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
367
+ end
368
+
369
+ # Waiting for response.
370
+ @client.get_long_running_operation_result(response, deserialize_method)
371
+ end
372
+
373
+ promise
374
+ end
375
+
376
+ #
377
+ # Deletes a SAP HANA instance.
378
+ #
379
+ # Deletes a SAP HANA instance with the specified subscription, resource group,
380
+ # and instance name.
381
+ #
382
+ # @param resource_group_name [String] Name of the resource group.
383
+ # @param hana_instance_name [String] Name of the SAP HANA on Azure instance.
384
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
385
+ # will be added to the HTTP request.
386
+ #
387
+ def delete(resource_group_name, hana_instance_name, custom_headers:nil)
388
+ response = delete_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value!
389
+ nil
390
+ end
391
+
392
+ #
393
+ # @param resource_group_name [String] Name of the resource group.
394
+ # @param hana_instance_name [String] Name of the SAP HANA on Azure instance.
395
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
396
+ # will be added to the HTTP request.
397
+ #
398
+ # @return [Concurrent::Promise] promise which provides async access to http
399
+ # response.
400
+ #
401
+ def delete_async(resource_group_name, hana_instance_name, custom_headers:nil)
402
+ # Send request
403
+ promise = begin_delete_async(resource_group_name, hana_instance_name, custom_headers:custom_headers)
404
+
405
+ promise = promise.then do |response|
406
+ # Defining deserialization method.
407
+ deserialize_method = lambda do |parsed_response|
408
+ end
409
+
410
+ # Waiting for response.
411
+ @client.get_long_running_operation_result(response, deserialize_method)
412
+ end
413
+
414
+ promise
415
+ end
416
+
321
417
  #
322
418
  # Patches the Tags field of a SAP HANA instance.
323
419
  #
@@ -416,6 +512,8 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
416
512
  end
417
513
 
418
514
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
515
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
516
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
419
517
  # Deserialize Response
420
518
  if status_code == 200
421
519
  begin
@@ -471,6 +569,82 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
471
569
  promise
472
570
  end
473
571
 
572
+ #
573
+ # The operation to start a SAP HANA instance.
574
+ #
575
+ # @param resource_group_name [String] Name of the resource group.
576
+ # @param hana_instance_name [String] Name of the SAP HANA on Azure instance.
577
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
578
+ # will be added to the HTTP request.
579
+ #
580
+ def start(resource_group_name, hana_instance_name, custom_headers:nil)
581
+ response = start_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value!
582
+ nil
583
+ end
584
+
585
+ #
586
+ # @param resource_group_name [String] Name of the resource group.
587
+ # @param hana_instance_name [String] Name of the SAP HANA on Azure instance.
588
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
589
+ # will be added to the HTTP request.
590
+ #
591
+ # @return [Concurrent::Promise] promise which provides async access to http
592
+ # response.
593
+ #
594
+ def start_async(resource_group_name, hana_instance_name, custom_headers:nil)
595
+ # Send request
596
+ promise = begin_start_async(resource_group_name, hana_instance_name, custom_headers:custom_headers)
597
+
598
+ promise = promise.then do |response|
599
+ # Defining deserialization method.
600
+ deserialize_method = lambda do |parsed_response|
601
+ end
602
+
603
+ # Waiting for response.
604
+ @client.get_long_running_operation_result(response, deserialize_method)
605
+ end
606
+
607
+ promise
608
+ end
609
+
610
+ #
611
+ # The operation to shutdown a SAP HANA instance.
612
+ #
613
+ # @param resource_group_name [String] Name of the resource group.
614
+ # @param hana_instance_name [String] Name of the SAP HANA on Azure instance.
615
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
616
+ # will be added to the HTTP request.
617
+ #
618
+ def shutdown(resource_group_name, hana_instance_name, custom_headers:nil)
619
+ response = shutdown_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value!
620
+ nil
621
+ end
622
+
623
+ #
624
+ # @param resource_group_name [String] Name of the resource group.
625
+ # @param hana_instance_name [String] Name of the SAP HANA on Azure instance.
626
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
627
+ # will be added to the HTTP request.
628
+ #
629
+ # @return [Concurrent::Promise] promise which provides async access to http
630
+ # response.
631
+ #
632
+ def shutdown_async(resource_group_name, hana_instance_name, custom_headers:nil)
633
+ # Send request
634
+ promise = begin_shutdown_async(resource_group_name, hana_instance_name, custom_headers:custom_headers)
635
+
636
+ promise = promise.then do |response|
637
+ # Defining deserialization method.
638
+ deserialize_method = lambda do |parsed_response|
639
+ end
640
+
641
+ # Waiting for response.
642
+ @client.get_long_running_operation_result(response, deserialize_method)
643
+ end
644
+
645
+ promise
646
+ end
647
+
474
648
  #
475
649
  # The operation to add a monitor to an SAP HANA instance.
476
650
  #
@@ -513,6 +687,225 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
513
687
  promise
514
688
  end
515
689
 
690
+ #
691
+ # Creates a SAP HANA instance.
692
+ #
693
+ # Creates a SAP HANA instance for the specified subscription, resource group,
694
+ # and instance name.
695
+ #
696
+ # @param resource_group_name [String] Name of the resource group.
697
+ # @param hana_instance_name [String] Name of the SAP HANA on Azure instance.
698
+ # @param hana_instance_parameter [HanaInstance] Request body representing a
699
+ # HanaInstance
700
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
701
+ # will be added to the HTTP request.
702
+ #
703
+ # @return [HanaInstance] operation results.
704
+ #
705
+ def begin_create(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers:nil)
706
+ response = begin_create_async(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers:custom_headers).value!
707
+ response.body unless response.nil?
708
+ end
709
+
710
+ #
711
+ # Creates a SAP HANA instance.
712
+ #
713
+ # Creates a SAP HANA instance for the specified subscription, resource group,
714
+ # and instance name.
715
+ #
716
+ # @param resource_group_name [String] Name of the resource group.
717
+ # @param hana_instance_name [String] Name of the SAP HANA on Azure instance.
718
+ # @param hana_instance_parameter [HanaInstance] Request body representing a
719
+ # HanaInstance
720
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
721
+ # will be added to the HTTP request.
722
+ #
723
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
724
+ #
725
+ def begin_create_with_http_info(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers:nil)
726
+ begin_create_async(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers:custom_headers).value!
727
+ end
728
+
729
+ #
730
+ # Creates a SAP HANA instance.
731
+ #
732
+ # Creates a SAP HANA instance for the specified subscription, resource group,
733
+ # and instance name.
734
+ #
735
+ # @param resource_group_name [String] Name of the resource group.
736
+ # @param hana_instance_name [String] Name of the SAP HANA on Azure instance.
737
+ # @param hana_instance_parameter [HanaInstance] Request body representing a
738
+ # HanaInstance
739
+ # @param [Hash{String => String}] A hash of custom headers that will be added
740
+ # to the HTTP request.
741
+ #
742
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
743
+ #
744
+ def begin_create_async(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers:nil)
745
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
746
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
747
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
748
+ fail ArgumentError, 'hana_instance_name is nil' if hana_instance_name.nil?
749
+ fail ArgumentError, 'hana_instance_parameter is nil' if hana_instance_parameter.nil?
750
+
751
+
752
+ request_headers = {}
753
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
754
+
755
+ # Set Headers
756
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
757
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
758
+
759
+ # Serialize Request
760
+ request_mapper = Azure::Hanaonazure::Mgmt::V2017_11_03_preview::Models::HanaInstance.mapper()
761
+ request_content = @client.serialize(request_mapper, hana_instance_parameter)
762
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
763
+
764
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}'
765
+
766
+ request_url = @base_url || @client.base_url
767
+
768
+ options = {
769
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
770
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'hanaInstanceName' => hana_instance_name},
771
+ query_params: {'api-version' => @client.api_version},
772
+ body: request_content,
773
+ headers: request_headers.merge(custom_headers || {}),
774
+ base_url: request_url
775
+ }
776
+ promise = @client.make_request_async(:put, path_template, options)
777
+
778
+ promise = promise.then do |result|
779
+ http_response = result.response
780
+ status_code = http_response.status
781
+ response_content = http_response.body
782
+ unless status_code == 200 || status_code == 201
783
+ error_model = JSON.load(response_content)
784
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
785
+ end
786
+
787
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
788
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
789
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
790
+ # Deserialize Response
791
+ if status_code == 200
792
+ begin
793
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
794
+ result_mapper = Azure::Hanaonazure::Mgmt::V2017_11_03_preview::Models::HanaInstance.mapper()
795
+ result.body = @client.deserialize(result_mapper, parsed_response)
796
+ rescue Exception => e
797
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
798
+ end
799
+ end
800
+ # Deserialize Response
801
+ if status_code == 201
802
+ begin
803
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
804
+ result_mapper = Azure::Hanaonazure::Mgmt::V2017_11_03_preview::Models::HanaInstance.mapper()
805
+ result.body = @client.deserialize(result_mapper, parsed_response)
806
+ rescue Exception => e
807
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
808
+ end
809
+ end
810
+
811
+ result
812
+ end
813
+
814
+ promise.execute
815
+ end
816
+
817
+ #
818
+ # Deletes a SAP HANA instance.
819
+ #
820
+ # Deletes a SAP HANA instance with the specified subscription, resource group,
821
+ # and instance name.
822
+ #
823
+ # @param resource_group_name [String] Name of the resource group.
824
+ # @param hana_instance_name [String] Name of the SAP HANA on Azure instance.
825
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
826
+ # will be added to the HTTP request.
827
+ #
828
+ #
829
+ def begin_delete(resource_group_name, hana_instance_name, custom_headers:nil)
830
+ response = begin_delete_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value!
831
+ nil
832
+ end
833
+
834
+ #
835
+ # Deletes a SAP HANA instance.
836
+ #
837
+ # Deletes a SAP HANA instance with the specified subscription, resource group,
838
+ # and instance name.
839
+ #
840
+ # @param resource_group_name [String] Name of the resource group.
841
+ # @param hana_instance_name [String] Name of the SAP HANA on Azure instance.
842
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
843
+ # will be added to the HTTP request.
844
+ #
845
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
846
+ #
847
+ def begin_delete_with_http_info(resource_group_name, hana_instance_name, custom_headers:nil)
848
+ begin_delete_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value!
849
+ end
850
+
851
+ #
852
+ # Deletes a SAP HANA instance.
853
+ #
854
+ # Deletes a SAP HANA instance with the specified subscription, resource group,
855
+ # and instance name.
856
+ #
857
+ # @param resource_group_name [String] Name of the resource group.
858
+ # @param hana_instance_name [String] Name of the SAP HANA on Azure instance.
859
+ # @param [Hash{String => String}] A hash of custom headers that will be added
860
+ # to the HTTP request.
861
+ #
862
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
863
+ #
864
+ def begin_delete_async(resource_group_name, hana_instance_name, custom_headers:nil)
865
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
866
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
867
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
868
+ fail ArgumentError, 'hana_instance_name is nil' if hana_instance_name.nil?
869
+
870
+
871
+ request_headers = {}
872
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
873
+
874
+ # Set Headers
875
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
876
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
877
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}'
878
+
879
+ request_url = @base_url || @client.base_url
880
+
881
+ options = {
882
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
883
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'hanaInstanceName' => hana_instance_name},
884
+ query_params: {'api-version' => @client.api_version},
885
+ headers: request_headers.merge(custom_headers || {}),
886
+ base_url: request_url
887
+ }
888
+ promise = @client.make_request_async(:delete, path_template, options)
889
+
890
+ promise = promise.then do |result|
891
+ http_response = result.response
892
+ status_code = http_response.status
893
+ response_content = http_response.body
894
+ unless status_code == 200 || status_code == 202 || status_code == 204
895
+ error_model = JSON.load(response_content)
896
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
897
+ end
898
+
899
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
900
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
901
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
902
+
903
+ result
904
+ end
905
+
906
+ promise.execute
907
+ end
908
+
516
909
  #
517
910
  # The operation to restart a SAP HANA instance.
518
911
  #
@@ -583,10 +976,178 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
583
976
  response_content = http_response.body
584
977
  unless status_code == 200 || status_code == 202
585
978
  error_model = JSON.load(response_content)
586
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
979
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
980
+ end
981
+
982
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
983
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
984
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
985
+
986
+ result
987
+ end
988
+
989
+ promise.execute
990
+ end
991
+
992
+ #
993
+ # The operation to start a SAP HANA instance.
994
+ #
995
+ # @param resource_group_name [String] Name of the resource group.
996
+ # @param hana_instance_name [String] Name of the SAP HANA on Azure instance.
997
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
998
+ # will be added to the HTTP request.
999
+ #
1000
+ #
1001
+ def begin_start(resource_group_name, hana_instance_name, custom_headers:nil)
1002
+ response = begin_start_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value!
1003
+ nil
1004
+ end
1005
+
1006
+ #
1007
+ # The operation to start a SAP HANA instance.
1008
+ #
1009
+ # @param resource_group_name [String] Name of the resource group.
1010
+ # @param hana_instance_name [String] Name of the SAP HANA on Azure instance.
1011
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1012
+ # will be added to the HTTP request.
1013
+ #
1014
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1015
+ #
1016
+ def begin_start_with_http_info(resource_group_name, hana_instance_name, custom_headers:nil)
1017
+ begin_start_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value!
1018
+ end
1019
+
1020
+ #
1021
+ # The operation to start a SAP HANA instance.
1022
+ #
1023
+ # @param resource_group_name [String] Name of the resource group.
1024
+ # @param hana_instance_name [String] Name of the SAP HANA on Azure instance.
1025
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1026
+ # to the HTTP request.
1027
+ #
1028
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1029
+ #
1030
+ def begin_start_async(resource_group_name, hana_instance_name, custom_headers:nil)
1031
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1032
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1033
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1034
+ fail ArgumentError, 'hana_instance_name is nil' if hana_instance_name.nil?
1035
+
1036
+
1037
+ request_headers = {}
1038
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1039
+
1040
+ # Set Headers
1041
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1042
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1043
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/start'
1044
+
1045
+ request_url = @base_url || @client.base_url
1046
+
1047
+ options = {
1048
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1049
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'hanaInstanceName' => hana_instance_name},
1050
+ query_params: {'api-version' => @client.api_version},
1051
+ headers: request_headers.merge(custom_headers || {}),
1052
+ base_url: request_url
1053
+ }
1054
+ promise = @client.make_request_async(:post, path_template, options)
1055
+
1056
+ promise = promise.then do |result|
1057
+ http_response = result.response
1058
+ status_code = http_response.status
1059
+ response_content = http_response.body
1060
+ unless status_code == 200 || status_code == 202
1061
+ error_model = JSON.load(response_content)
1062
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1063
+ end
1064
+
1065
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1066
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1067
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1068
+
1069
+ result
1070
+ end
1071
+
1072
+ promise.execute
1073
+ end
1074
+
1075
+ #
1076
+ # The operation to shutdown a SAP HANA instance.
1077
+ #
1078
+ # @param resource_group_name [String] Name of the resource group.
1079
+ # @param hana_instance_name [String] Name of the SAP HANA on Azure instance.
1080
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1081
+ # will be added to the HTTP request.
1082
+ #
1083
+ #
1084
+ def begin_shutdown(resource_group_name, hana_instance_name, custom_headers:nil)
1085
+ response = begin_shutdown_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value!
1086
+ nil
1087
+ end
1088
+
1089
+ #
1090
+ # The operation to shutdown a SAP HANA instance.
1091
+ #
1092
+ # @param resource_group_name [String] Name of the resource group.
1093
+ # @param hana_instance_name [String] Name of the SAP HANA on Azure instance.
1094
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1095
+ # will be added to the HTTP request.
1096
+ #
1097
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1098
+ #
1099
+ def begin_shutdown_with_http_info(resource_group_name, hana_instance_name, custom_headers:nil)
1100
+ begin_shutdown_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value!
1101
+ end
1102
+
1103
+ #
1104
+ # The operation to shutdown a SAP HANA instance.
1105
+ #
1106
+ # @param resource_group_name [String] Name of the resource group.
1107
+ # @param hana_instance_name [String] Name of the SAP HANA on Azure instance.
1108
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1109
+ # to the HTTP request.
1110
+ #
1111
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1112
+ #
1113
+ def begin_shutdown_async(resource_group_name, hana_instance_name, custom_headers:nil)
1114
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1115
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1116
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1117
+ fail ArgumentError, 'hana_instance_name is nil' if hana_instance_name.nil?
1118
+
1119
+
1120
+ request_headers = {}
1121
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1122
+
1123
+ # Set Headers
1124
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1125
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1126
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/shutdown'
1127
+
1128
+ request_url = @base_url || @client.base_url
1129
+
1130
+ options = {
1131
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1132
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'hanaInstanceName' => hana_instance_name},
1133
+ query_params: {'api-version' => @client.api_version},
1134
+ headers: request_headers.merge(custom_headers || {}),
1135
+ base_url: request_url
1136
+ }
1137
+ promise = @client.make_request_async(:post, path_template, options)
1138
+
1139
+ promise = promise.then do |result|
1140
+ http_response = result.response
1141
+ status_code = http_response.status
1142
+ response_content = http_response.body
1143
+ unless status_code == 200 || status_code == 202
1144
+ error_model = JSON.load(response_content)
1145
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
587
1146
  end
588
1147
 
589
1148
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1149
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1150
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
590
1151
 
591
1152
  result
592
1153
  end
@@ -682,6 +1243,8 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
682
1243
  end
683
1244
 
684
1245
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1246
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1247
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
685
1248
 
686
1249
  result
687
1250
  end
@@ -769,6 +1332,8 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
769
1332
  end
770
1333
 
771
1334
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1335
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1336
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
772
1337
  # Deserialize Response
773
1338
  if status_code == 200
774
1339
  begin
@@ -872,6 +1437,8 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
872
1437
  end
873
1438
 
874
1439
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1440
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1441
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
875
1442
  # Deserialize Response
876
1443
  if status_code == 200
877
1444
  begin