Class: Azure::Compute::Mgmt::V2020_10_01_preview::CloudServiceRoleInstances
- Inherits:
-
Object
- Object
- Azure::Compute::Mgmt::V2020_10_01_preview::CloudServiceRoleInstances
- Includes:
- MsRestAzure
- Defined in:
- lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb
Overview
Compute Client
Instance Attribute Summary collapse
-
#client ⇒ ComputeManagementClient
readonly
Reference to the ComputeManagementClient.
Instance Method Summary collapse
-
#begin_delete(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Object
Deletes a role instance from a cloud service.
-
#begin_delete_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a role instance from a cloud service.
-
#begin_delete_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a role instance from a cloud service.
-
#begin_rebuild(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Object
The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them.
-
#begin_rebuild_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Concurrent::Promise
The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them.
-
#begin_rebuild_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them.
-
#begin_reimage(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Object
The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles.
-
#begin_reimage_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Concurrent::Promise
The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles.
-
#begin_reimage_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles.
-
#begin_restart(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Object
The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service.
-
#begin_restart_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Concurrent::Promise
The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service.
-
#begin_restart_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service.
-
#delete(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Object
Deletes a role instance from a cloud service.
-
#delete_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#get(role_instance_name, resource_group_name, cloud_service_name, expand: nil, custom_headers: nil) ⇒ RoleInstance
Gets a role instance from a cloud service.
-
#get_async(role_instance_name, resource_group_name, cloud_service_name, expand: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets a role instance from a cloud service.
-
#get_instance_view(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ RoleInstanceInstanceView
Retrieves information about the run-time state of a role instance in a cloud service.
-
#get_instance_view_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Concurrent::Promise
Retrieves information about the run-time state of a role instance in a cloud service.
-
#get_instance_view_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Retrieves information about the run-time state of a role instance in a cloud service.
-
#get_remote_desktop_file(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ NOT_IMPLEMENTED
Gets a remote desktop file for a role instance in a cloud service.
-
#get_remote_desktop_file_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a remote desktop file for a role instance in a cloud service.
-
#get_remote_desktop_file_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a remote desktop file for a role instance in a cloud service.
-
#get_with_http_info(role_instance_name, resource_group_name, cloud_service_name, expand: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a role instance from a cloud service.
-
#initialize(client) ⇒ CloudServiceRoleInstances
constructor
Creates and initializes a new instance of the CloudServiceRoleInstances class.
-
#list(resource_group_name, cloud_service_name, expand: nil, custom_headers: nil) ⇒ Array<RoleInstance>
Gets the list of all role instances in a cloud service.
-
#list_as_lazy(resource_group_name, cloud_service_name, expand: nil, custom_headers: nil) ⇒ RoleInstanceListResult
Gets the list of all role instances in a cloud service.
-
#list_async(resource_group_name, cloud_service_name, expand: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets the list of all role instances in a cloud service.
-
#list_next(next_page_link, custom_headers: nil) ⇒ RoleInstanceListResult
Gets the list of all role instances in a cloud service.
-
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets the list of all role instances in a cloud service.
-
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the list of all role instances in a cloud service.
-
#list_with_http_info(resource_group_name, cloud_service_name, expand: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the list of all role instances in a cloud service.
-
#rebuild(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Object
The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them.
-
#rebuild_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#reimage(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Object
The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles.
-
#reimage_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#restart(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Object
The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service.
-
#restart_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
Constructor Details
#initialize(client) ⇒ CloudServiceRoleInstances
Creates and initializes a new instance of the CloudServiceRoleInstances class.
17 18 19 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ ComputeManagementClient (readonly)
Returns reference to the ComputeManagementClient.
22 23 24 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 22 def client @client end |
Instance Method Details
#begin_delete(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Object
Deletes a role instance from a cloud service.
will be added to the HTTP request.
615 616 617 618 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 615 def begin_delete(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) response = begin_delete_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value! nil end |
#begin_delete_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a role instance from a cloud service.
to the HTTP request.
646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 646 def begin_delete_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) fail ArgumentError, 'role_instance_name is nil' if role_instance_name.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'cloud_service_name is nil' if cloud_service_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'roleInstanceName' => role_instance_name,'resourceGroupName' => resource_group_name,'cloudServiceName' => cloud_service_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_delete_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a role instance from a cloud service.
will be added to the HTTP request.
631 632 633 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 631 def begin_delete_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) begin_delete_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value! end |
#begin_rebuild(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Object
The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instance.
will be added to the HTTP request.
885 886 887 888 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 885 def begin_rebuild(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) response = begin_rebuild_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value! nil end |
#begin_rebuild_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Concurrent::Promise
The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instance.
to the HTTP request.
922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 922 def begin_rebuild_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) fail ArgumentError, 'role_instance_name is nil' if role_instance_name.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'cloud_service_name is nil' if cloud_service_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/rebuild' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'roleInstanceName' => role_instance_name,'resourceGroupName' => resource_group_name,'cloudServiceName' => cloud_service_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_rebuild_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instance.
will be added to the HTTP request.
904 905 906 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 904 def begin_rebuild_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) begin_rebuild_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value! end |
#begin_reimage(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Object
The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles.
will be added to the HTTP request.
793 794 795 796 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 793 def begin_reimage(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) response = begin_reimage_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value! nil end |
#begin_reimage_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Concurrent::Promise
The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles.
to the HTTP request.
826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 826 def begin_reimage_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) fail ArgumentError, 'role_instance_name is nil' if role_instance_name.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'cloud_service_name is nil' if cloud_service_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/reimage' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'roleInstanceName' => role_instance_name,'resourceGroupName' => resource_group_name,'cloudServiceName' => cloud_service_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_reimage_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles.
will be added to the HTTP request.
810 811 812 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 810 def begin_reimage_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) begin_reimage_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value! end |
#begin_restart(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Object
The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service.
will be added to the HTTP request.
703 704 705 706 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 703 def begin_restart(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) response = begin_restart_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value! nil end |
#begin_restart_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Concurrent::Promise
The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service.
to the HTTP request.
736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 736 def begin_restart_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) fail ArgumentError, 'role_instance_name is nil' if role_instance_name.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'cloud_service_name is nil' if cloud_service_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/restart' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'roleInstanceName' => role_instance_name,'resourceGroupName' => resource_group_name,'cloudServiceName' => cloud_service_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_restart_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service.
will be added to the HTTP request.
720 721 722 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 720 def begin_restart_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) begin_restart_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value! end |
#delete(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Object
Deletes a role instance from a cloud service.
will be added to the HTTP request.
33 34 35 36 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 33 def delete(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) response = delete_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value! nil end |
#delete_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 48 def delete_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) # Send request promise = begin_delete_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: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 |
#get(role_instance_name, resource_group_name, cloud_service_name, expand: nil, custom_headers: nil) ⇒ RoleInstance
Gets a role instance from a cloud service.
operation. Possible values include: 'instanceView' will be added to the HTTP request.
77 78 79 80 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 77 def get(role_instance_name, resource_group_name, cloud_service_name, expand:nil, custom_headers:nil) response = get_async(role_instance_name, resource_group_name, cloud_service_name, expand:, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(role_instance_name, resource_group_name, cloud_service_name, expand: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets a role instance from a cloud service.
operation. Possible values include: 'instanceView' to the HTTP request.
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 112 def get_async(role_instance_name, resource_group_name, cloud_service_name, expand:nil, custom_headers:nil) fail ArgumentError, 'role_instance_name is nil' if role_instance_name.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'cloud_service_name is nil' if cloud_service_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'roleInstanceName' => role_instance_name,'resourceGroupName' => resource_group_name,'cloudServiceName' => cloud_service_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version,'$expand' => }, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2020_10_01_preview::Models::RoleInstance.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_instance_view(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ RoleInstanceInstanceView
Retrieves information about the run-time state of a role instance in a cloud service.
will be added to the HTTP request.
180 181 182 183 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 180 def get_instance_view(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) response = get_instance_view_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_instance_view_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Concurrent::Promise
Retrieves information about the run-time state of a role instance in a cloud service.
to the HTTP request.
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 213 def get_instance_view_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) fail ArgumentError, 'role_instance_name is nil' if role_instance_name.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'cloud_service_name is nil' if cloud_service_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/instanceView' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'roleInstanceName' => role_instance_name,'resourceGroupName' => resource_group_name,'cloudServiceName' => cloud_service_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2020_10_01_preview::Models::RoleInstanceInstanceView.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_instance_view_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Retrieves information about the run-time state of a role instance in a cloud service.
will be added to the HTTP request.
197 198 199 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 197 def get_instance_view_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) get_instance_view_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value! end |
#get_remote_desktop_file(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ NOT_IMPLEMENTED
Gets a remote desktop file for a role instance in a cloud service.
will be added to the HTTP request.
511 512 513 514 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 511 def get_remote_desktop_file(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) response = get_remote_desktop_file_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_remote_desktop_file_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a remote desktop file for a role instance in a cloud service.
to the HTTP request.
542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 542 def get_remote_desktop_file_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) fail ArgumentError, 'role_instance_name is nil' if role_instance_name.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'cloud_service_name is nil' if cloud_service_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/remoteDesktopFile' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'roleInstanceName' => role_instance_name,'resourceGroupName' => resource_group_name,'cloudServiceName' => cloud_service_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'Stream' } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_remote_desktop_file_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a remote desktop file for a role instance in a cloud service.
will be added to the HTTP request.
527 528 529 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 527 def get_remote_desktop_file_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) get_remote_desktop_file_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value! end |
#get_with_http_info(role_instance_name, resource_group_name, cloud_service_name, expand: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a role instance from a cloud service.
operation. Possible values include: 'instanceView' will be added to the HTTP request.
95 96 97 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 95 def get_with_http_info(role_instance_name, resource_group_name, cloud_service_name, expand:nil, custom_headers:nil) get_async(role_instance_name, resource_group_name, cloud_service_name, expand:, custom_headers:custom_headers).value! end |
#list(resource_group_name, cloud_service_name, expand: nil, custom_headers: nil) ⇒ Array<RoleInstance>
Gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next page of role instances. Do this till nextLink is null to fetch all the role instances.
operation. Possible values include: 'instanceView' will be added to the HTTP request.
283 284 285 286 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 283 def list(resource_group_name, cloud_service_name, expand:nil, custom_headers:nil) first_page = list_as_lazy(resource_group_name, cloud_service_name, expand:, custom_headers:custom_headers) first_page.get_all_items end |
#list_as_lazy(resource_group_name, cloud_service_name, expand: nil, custom_headers: nil) ⇒ RoleInstanceListResult
Gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next page of role instances. Do this till nextLink is null to fetch all the role instances.
operation. Possible values include: 'instanceView' will be added to the HTTP request.
response.
1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 1079 def list_as_lazy(resource_group_name, cloud_service_name, expand:nil, custom_headers:nil) response = list_async(resource_group_name, cloud_service_name, expand:, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_async(resource_group_name, cloud_service_name, expand: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next page of role instances. Do this till nextLink is null to fetch all the role instances.
operation. Possible values include: 'instanceView' to the HTTP request.
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 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 320 def list_async(resource_group_name, cloud_service_name, expand:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'cloud_service_name is nil' if cloud_service_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'cloudServiceName' => cloud_service_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version,'$expand' => }, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2020_10_01_preview::Models::RoleInstanceListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_next(next_page_link, custom_headers: nil) ⇒ RoleInstanceListResult
Gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next page of role instances. Do this till nextLink is null to fetch all the role instances.
to List operation. will be added to the HTTP request.
980 981 982 983 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 980 def list_next(next_page_link, custom_headers:nil) response = list_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next page of role instances. Do this till nextLink is null to fetch all the role instances.
to List operation. to the HTTP request.
1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 1013 def list_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2020_10_01_preview::Models::RoleInstanceListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next page of role instances. Do this till nextLink is null to fetch all the role instances.
to List operation. will be added to the HTTP request.
997 998 999 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 997 def list_next_with_http_info(next_page_link, custom_headers:nil) list_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_with_http_info(resource_group_name, cloud_service_name, expand: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next page of role instances. Do this till nextLink is null to fetch all the role instances.
operation. Possible values include: 'instanceView' will be added to the HTTP request.
302 303 304 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 302 def list_with_http_info(resource_group_name, cloud_service_name, expand:nil, custom_headers:nil) list_async(resource_group_name, cloud_service_name, expand:, custom_headers:custom_headers).value! end |
#rebuild(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Object
The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instance.
will be added to the HTTP request.
469 470 471 472 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 469 def rebuild(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) response = rebuild_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value! nil end |
#rebuild_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 484 def rebuild_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) # Send request promise = begin_rebuild_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: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 |
#reimage(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Object
The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles.
will be added to the HTTP request.
426 427 428 429 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 426 def reimage(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) response = reimage_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value! nil end |
#reimage_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 441 def reimage_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) # Send request promise = begin_reimage_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: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 |
#restart(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Object
The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service.
will be added to the HTTP request.
385 386 387 388 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 385 def restart(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) response = restart_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value! nil end |
#restart_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 |
# File 'lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb', line 400 def restart_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil) # Send request promise = begin_restart_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers: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 |