class Azure::ADHybridHealthService::Mgmt::V2014_01_01::ServiceMembersOperations
REST APIs for Azure
Active Directory Connect Health
Attributes
@return [ADHybridHealthService] reference to the ADHybridHealthService
Private Class Methods
Creates and initializes a new instance of the ServiceMembersOperations
class. @param client service class for accessing basic functionality.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 17 def initialize(client) @client = client end
Private Instance Methods
Onboards a server, for a given service, to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service under which the server is to be onboarded. @param service_member [ServiceMember] The server object. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ServiceMember] operation results.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 137 def add(service_name, service_member, custom_headers:nil) response = add_async(service_name, service_member, custom_headers:custom_headers).value! response.body unless response.nil? end
Onboards a server, for a given service, to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service under which the server is to be onboarded. @param service_member [ServiceMember] The server object. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 170 def add_async(service_name, service_member, custom_headers:nil) fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, 'service_member is nil' if service_member.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::ADHybridHealthService::Mgmt::V2014_01_01::Models::ServiceMember.mapper() request_content = @client.serialize(request_mapper, service_member) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'serviceName' => service_name}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.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::ADHybridHealthService::Mgmt::V2014_01_01::Models::ServiceMember.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Onboards a server, for a given service, to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service under which the server is to be onboarded. @param service_member [ServiceMember] The server object. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 154 def add_with_http_info(service_name, service_member, custom_headers:nil) add_async(service_name, service_member, custom_headers:custom_headers).value! end
Deletes a server that has been onboarded to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param confirm [Boolean] Indicates if the server will be permanently deleted or disabled. True indicates that the server will be permanently deleted and False indicates that the server will be marked disabled and then deleted after 30 days, if it is not re-registered. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 341 def delete(service_name, service_member_id, confirm:nil, custom_headers:nil) response = delete_async(service_name, service_member_id, confirm:confirm, custom_headers:custom_headers).value! nil end
Deletes a server that has been onboarded to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param confirm [Boolean] Indicates if the server will be permanently deleted or disabled. True indicates that the server will be permanently deleted and False indicates that the server will be marked disabled and then deleted after 30 days, if it is not re-registered. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 380 def delete_async(service_name, service_member_id, confirm:nil, custom_headers:nil) fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, 'service_member_id is nil' if service_member_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 = 'providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'serviceName' => service_name,'serviceMemberId' => service_member_id}, query_params: {'confirm' => confirm,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 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
Deletes the data uploaded by the server to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 734 def delete_data(service_name, service_member_id, custom_headers:nil) response = delete_data_async(service_name, service_member_id, custom_headers:custom_headers).value! nil end
Deletes the data uploaded by the server to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 765 def delete_data_async(service_name, service_member_id, custom_headers:nil) fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, 'service_member_id is nil' if service_member_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 = 'providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/data' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'serviceName' => service_name,'serviceMemberId' => service_member_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 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
Deletes the data uploaded by the server to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 750 def delete_data_with_http_info(service_name, service_member_id, custom_headers:nil) delete_data_async(service_name, service_member_id, custom_headers:custom_headers).value! end
Deletes a server that has been onboarded to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param confirm [Boolean] Indicates if the server will be permanently deleted or disabled. True indicates that the server will be permanently deleted and False indicates that the server will be marked disabled and then deleted after 30 days, if it is not re-registered. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 361 def delete_with_http_info(service_name, service_member_id, confirm:nil, custom_headers:nil) delete_async(service_name, service_member_id, confirm:confirm, custom_headers:custom_headers).value! end
Gets the details of a server, for a given service, that are onboarded to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ServiceMember] operation results.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 242 def get(service_name, service_member_id, custom_headers:nil) response = get_async(service_name, service_member_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the details of a server, for a given service, that are onboarded to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 273 def get_async(service_name, service_member_id, custom_headers:nil) fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, 'service_member_id is nil' if service_member_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 = 'providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'serviceName' => service_name,'serviceMemberId' => service_member_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? 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::ADHybridHealthService::Mgmt::V2014_01_01::Models::ServiceMember.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the list of connectors and run profile names.
@param service_name [String] The name of the service. @param service_member_id The service member id. @param metric_name [String] The name of the metric. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ConnectorMetadata] operation results.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1305 def get_connector_metadata(service_name, service_member_id, metric_name, custom_headers:nil) response = get_connector_metadata_async(service_name, service_member_id, metric_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the list of connectors and run profile names.
@param service_name [String] The name of the service. @param service_member_id The service member id. @param metric_name [String] The name of the metric. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1336 def get_connector_metadata_async(service_name, service_member_id, metric_name, custom_headers:nil) fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, 'service_member_id is nil' if service_member_id.nil? fail ArgumentError, 'metric_name is nil' if metric_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/metrics/{metricName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'serviceName' => service_name,'serviceMemberId' => service_member_id,'metricName' => metric_name}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? 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::ADHybridHealthService::Mgmt::V2014_01_01::Models::ConnectorMetadata.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the list of connectors and run profile names.
@param service_name [String] The name of the service. @param service_member_id The service member id. @param metric_name [String] The name of the metric. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1321 def get_connector_metadata_with_http_info(service_name, service_member_id, metric_name, custom_headers:nil) get_connector_metadata_async(service_name, service_member_id, metric_name, custom_headers:custom_headers).value! end
Gets the server related metrics for a given metric and group combination.
@param service_name [String] The name of the service. @param metric_name [String] The metric name @param group_name [String] The group name @param service_member_id The server id. @param group_key [String] The group key @param from_date [DateTime] The start date. @param to_date [DateTime] The end date. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MetricSets] operation results.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1106 def get_metrics(service_name, metric_name, group_name, service_member_id, group_key:nil, from_date:nil, to_date:nil, custom_headers:nil) response = get_metrics_async(service_name, metric_name, group_name, service_member_id, group_key:group_key, from_date:from_date, to_date:to_date, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the server related metrics for a given metric and group combination.
@param service_name [String] The name of the service. @param metric_name [String] The metric name @param group_name [String] The group name @param service_member_id The server id. @param group_key [String] The group key @param from_date [DateTime] The start date. @param to_date [DateTime] The end date. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1145 def get_metrics_async(service_name, metric_name, group_name, service_member_id, group_key:nil, from_date:nil, to_date:nil, custom_headers:nil) fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, 'metric_name is nil' if metric_name.nil? fail ArgumentError, 'group_name is nil' if group_name.nil? fail ArgumentError, 'service_member_id is nil' if service_member_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 = 'providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/metrics/{metricName}/groups/{groupName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'serviceName' => service_name,'metricName' => metric_name,'groupName' => group_name,'serviceMemberId' => service_member_id}, query_params: {'groupKey' => group_key,'fromDate' => from_date,'toDate' => to_date,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? 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::ADHybridHealthService::Mgmt::V2014_01_01::Models::MetricSets.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the server related metrics for a given metric and group combination.
@param service_name [String] The name of the service. @param metric_name [String] The metric name @param group_name [String] The group name @param service_member_id The server id. @param group_key [String] The group key @param from_date [DateTime] The start date. @param to_date [DateTime] The end date. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1126 def get_metrics_with_http_info(service_name, metric_name, group_name, service_member_id, group_key:nil, from_date:nil, to_date:nil, custom_headers:nil) get_metrics_async(service_name, metric_name, group_name, service_member_id, group_key:group_key, from_date:from_date, to_date:to_date, custom_headers:custom_headers).value! end
Gets the service configuration.
@param service_name [String] The name of the service. @param service_member_id [String] The server Id. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ServiceConfiguration] operation results.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1211 def get_service_configuration(service_name, service_member_id, custom_headers:nil) response = get_service_configuration_async(service_name, service_member_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the service configuration.
@param service_name [String] The name of the service. @param service_member_id [String] The server Id. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1240 def get_service_configuration_async(service_name, service_member_id, custom_headers:nil) fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, 'service_member_id is nil' if service_member_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 = 'providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/serviceconfiguration' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'serviceName' => service_name,'serviceMemberId' => service_member_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? 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::ADHybridHealthService::Mgmt::V2014_01_01::Models::ServiceConfiguration.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the service configuration.
@param service_name [String] The name of the service. @param service_member_id [String] The server Id. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1226 def get_service_configuration_with_http_info(service_name, service_member_id, custom_headers:nil) get_service_configuration_async(service_name, service_member_id, custom_headers:custom_headers).value! end
Gets the details of a server, for a given service, that are onboarded to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 258 def get_with_http_info(service_name, service_member_id, custom_headers:nil) get_async(service_name, service_member_id, custom_headers:custom_headers).value! end
Gets the details of the servers, for a given service, that are onboarded to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service. @param filter [String] The server property filter to apply. @param dimension_type [String] The server specific dimension. @param dimension_signature [String] The value of the dimension. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ServiceMember>] operation results.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 37 def list(service_name, filter:nil, dimension_type:nil, dimension_signature:nil, custom_headers:nil) first_page = list_as_lazy(service_name, filter:filter, dimension_type:dimension_type, dimension_signature:dimension_signature, custom_headers:custom_headers) first_page.get_all_items end
Gets the details of an alert for a given service and server combination.
@param service_member_id The server Id for which the alert details needs to be queried. @param service_name [String] The name of the service. @param filter [String] The alert property filter to apply. @param state [String] The alert state to query for. @param from [DateTime] The start date to query for. @param to [DateTime] The end date till when to query for. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<Alert>] operation results.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 439 def list_alerts(service_member_id, service_name, filter:nil, state:nil, from:nil, to:nil, custom_headers:nil) first_page = list_alerts_as_lazy(service_member_id, service_name, filter:filter, state:state, from:from, to:to, custom_headers:custom_headers) first_page.get_all_items end
Gets the details of an alert for a given service and server combination.
@param service_member_id The server Id for which the alert details needs to be queried. @param service_name [String] The name of the service. @param filter [String] The alert property filter to apply. @param state [String] The alert state to query for. @param from [DateTime] The start date to query for. @param to [DateTime] The end date till when to query for. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Alerts] which provide lazy access to pages of the response.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1703 def list_alerts_as_lazy(service_member_id, service_name, filter:nil, state:nil, from:nil, to:nil, custom_headers:nil) response = list_alerts_async(service_member_id, service_name, filter:filter, state:state, from:from, to:to, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_alerts_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets the details of an alert for a given service and server combination.
@param service_member_id The server Id for which the alert details needs to be queried. @param service_name [String] The name of the service. @param filter [String] The alert property filter to apply. @param state [String] The alert state to query for. @param from [DateTime] The start date to query for. @param to [DateTime] The end date till when to query for. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 478 def list_alerts_async(service_member_id, service_name, filter:nil, state:nil, from:nil, to:nil, custom_headers:nil) fail ArgumentError, 'service_member_id is nil' if service_member_id.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/alerts' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'serviceMemberId' => service_member_id,'serviceName' => service_name}, query_params: {'$filter' => filter,'state' => state,'from' => from,'to' => to,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? 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::ADHybridHealthService::Mgmt::V2014_01_01::Models::Alerts.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the details of an alert for a given service and server combination.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Alerts] operation results.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1494 def list_alerts_next(next_page_link, custom_headers:nil) response = list_alerts_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the details of an alert for a given service and server combination.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1523 def list_alerts_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? 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::ADHybridHealthService::Mgmt::V2014_01_01::Models::Alerts.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the details of an alert for a given service and server combination.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1509 def list_alerts_next_with_http_info(next_page_link, custom_headers:nil) list_alerts_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets the details of an alert for a given service and server combination.
@param service_member_id The server Id for which the alert details needs to be queried. @param service_name [String] The name of the service. @param filter [String] The alert property filter to apply. @param state [String] The alert state to query for. @param from [DateTime] The start date to query for. @param to [DateTime] The end date till when to query for. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 459 def list_alerts_with_http_info(service_member_id, service_name, filter:nil, state:nil, from:nil, to:nil, custom_headers:nil) list_alerts_async(service_member_id, service_name, filter:filter, state:state, from:from, to:to, custom_headers:custom_headers).value! end
Gets the details of the servers, for a given service, that are onboarded to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service. @param filter [String] The server property filter to apply. @param dimension_type [String] The server specific dimension. @param dimension_signature [String] The value of the dimension. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ServiceMembers] which provide lazy access to pages of the response.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1677 def list_as_lazy(service_name, filter:nil, dimension_type:nil, dimension_signature:nil, custom_headers:nil) response = list_async(service_name, filter:filter, dimension_type:dimension_type, dimension_signature:dimension_signature, 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
Gets the details of the servers, for a given service, that are onboarded to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service. @param filter [String] The server property filter to apply. @param dimension_type [String] The server specific dimension. @param dimension_signature [String] The value of the dimension. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 72 def list_async(service_name, filter:nil, dimension_type:nil, dimension_signature:nil, custom_headers:nil) fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'serviceName' => service_name}, query_params: {'$filter' => filter,'dimensionType' => dimension_type,'dimensionSignature' => dimension_signature,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? 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::ADHybridHealthService::Mgmt::V2014_01_01::Models::ServiceMembers.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the connector details for a service.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Connectors] operation results.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 542 def list_connectors(service_name, service_member_id, custom_headers:nil) response = list_connectors_async(service_name, service_member_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the connector details for a service.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 571 def list_connectors_async(service_name, service_member_id, custom_headers:nil) fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, 'service_member_id is nil' if service_member_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 = 'providers/Microsoft.ADHybridHealthService/service/{serviceName}/servicemembers/{serviceMemberId}/connectors' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'serviceName' => service_name,'serviceMemberId' => service_member_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? 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::ADHybridHealthService::Mgmt::V2014_01_01::Models::Connectors.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the connector details for a service.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 557 def list_connectors_with_http_info(service_name, service_member_id, custom_headers:nil) list_connectors_async(service_name, service_member_id, custom_headers:custom_headers).value! end
Gets the credentials of the server which is needed by the agent to connect to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param filter [String] The property filter to apply. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Credentials] operation results.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 637 def list_credentials(service_name, service_member_id, filter:nil, custom_headers:nil) response = list_credentials_async(service_name, service_member_id, filter:filter, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the credentials of the server which is needed by the agent to connect to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param filter [String] The property filter to apply. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 670 def list_credentials_async(service_name, service_member_id, filter:nil, custom_headers:nil) fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, 'service_member_id is nil' if service_member_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 = 'providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/credentials' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'serviceName' => service_name,'serviceMemberId' => service_member_id}, query_params: {'$filter' => filter,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? 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::ADHybridHealthService::Mgmt::V2014_01_01::Models::Credentials.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the credentials of the server which is needed by the agent to connect to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param filter [String] The property filter to apply. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 654 def list_credentials_with_http_info(service_name, service_member_id, filter:nil, custom_headers:nil) list_credentials_async(service_name, service_member_id, filter:filter, custom_headers:custom_headers).value! end
Gets the last time when the server uploaded data to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DataFreshnessDetails] operation results.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 820 def list_data_freshness(service_name, service_member_id, custom_headers:nil) response = list_data_freshness_async(service_name, service_member_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the last time when the server uploaded data to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 851 def list_data_freshness_async(service_name, service_member_id, custom_headers:nil) fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, 'service_member_id is nil' if service_member_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 = 'providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/datafreshness' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'serviceName' => service_name,'serviceMemberId' => service_member_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? 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::ADHybridHealthService::Mgmt::V2014_01_01::Models::DataFreshnessDetails.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the last time when the server uploaded data to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 836 def list_data_freshness_with_http_info(service_name, service_member_id, custom_headers:nil) list_data_freshness_async(service_name, service_member_id, custom_headers:custom_headers).value! end
Gets the export status.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ExportStatus>] operation results.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 915 def list_export_status(service_name, service_member_id, custom_headers:nil) first_page = list_export_status_as_lazy(service_name, service_member_id, custom_headers:custom_headers) first_page.get_all_items end
Gets the export status.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ExportStatuses] which provide lazy access to pages of the response.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1724 def list_export_status_as_lazy(service_name, service_member_id, custom_headers:nil) response = list_export_status_async(service_name, service_member_id, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_export_status_next_async(next_page_link, custom_headers:custom_headers) end page end end
Gets the export status.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 944 def list_export_status_async(service_name, service_member_id, custom_headers:nil) fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, 'service_member_id is nil' if service_member_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 = 'providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/exportstatus' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'serviceName' => service_name,'serviceMemberId' => service_member_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? 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::ADHybridHealthService::Mgmt::V2014_01_01::Models::ExportStatuses.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the export status.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ExportStatuses] operation results.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1584 def list_export_status_next(next_page_link, custom_headers:nil) response = list_export_status_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the export status.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1613 def list_export_status_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? 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::ADHybridHealthService::Mgmt::V2014_01_01::Models::ExportStatuses.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the export status.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1599 def list_export_status_next_with_http_info(next_page_link, custom_headers:nil) list_export_status_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets the export status.
@param service_name [String] The name of the service. @param service_member_id The server Id. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 930 def list_export_status_with_http_info(service_name, service_member_id, custom_headers:nil) list_export_status_async(service_name, service_member_id, custom_headers:custom_headers).value! end
Gets the global configuration.
@param service_name [String] The name of the service. @param service_member_id [String] The server id. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [GlobalConfigurations] operation results.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1008 def list_global_configuration(service_name, service_member_id, custom_headers:nil) response = list_global_configuration_async(service_name, service_member_id, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets the global configuration.
@param service_name [String] The name of the service. @param service_member_id [String] The server id. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1037 def list_global_configuration_async(service_name, service_member_id, custom_headers:nil) fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, 'service_member_id is nil' if service_member_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 = 'providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/globalconfiguration' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'serviceName' => service_name,'serviceMemberId' => service_member_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? 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::ADHybridHealthService::Mgmt::V2014_01_01::Models::GlobalConfigurations.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the global configuration.
@param service_name [String] The name of the service. @param service_member_id [String] The server id. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1023 def list_global_configuration_with_http_info(service_name, service_member_id, custom_headers:nil) list_global_configuration_async(service_name, service_member_id, custom_headers:custom_headers).value! end
Gets the details of the servers, for a given service, that are onboarded to Azure
Active Directory Connect Health Service
.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ServiceMembers] operation results.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1402 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
Gets the details of the servers, for a given service, that are onboarded to Azure
Active Directory Connect Health Service
.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1433 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 options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? 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::ADHybridHealthService::Mgmt::V2014_01_01::Models::ServiceMembers.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Gets the details of the servers, for a given service, that are onboarded to Azure
Active Directory Connect Health Service
.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 1418 def list_next_with_http_info(next_page_link, custom_headers:nil) list_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets the details of the servers, for a given service, that are onboarded to Azure
Active Directory Connect Health Service
.
@param service_name [String] The name of the service. @param filter [String] The server property filter to apply. @param dimension_type [String] The server specific dimension. @param dimension_signature [String] The value of the dimension. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb, line 55 def list_with_http_info(service_name, filter:nil, dimension_type:nil, dimension_signature:nil, custom_headers:nil) list_async(service_name, filter:filter, dimension_type:dimension_type, dimension_signature:dimension_signature, custom_headers:custom_headers).value! end