class Azure::ServiceFabric::V6_2_0_9::ServiceFabricClientAPIs

A service client - single point of access to the REST API.

Attributes

accept_language[RW]

@return [String] The preferred language for the response.

base_url[RW]

@return [String] the base URI of the service.

credentials[R]

@return Credentials needed for the client to connect to Azure.

generate_client_request_id[RW]

@return [Boolean] Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.

long_running_operation_retry_timeout[RW]

@return [Integer] The retry timeout in seconds for Long Running Operations. Default value is 30.

Public Class Methods

new(credentials = nil, base_url = nil, options = nil) click to toggle source

Creates initializes a new instance of the ServiceFabricClientAPIs class. @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client. @param base_url [String] the base URI of the service. @param options [Array] filters to be applied to the HTTP requests.

Calls superclass method
# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 38
def initialize(credentials = nil, base_url = nil, options = nil)
  super(credentials, options)
  @base_url = base_url || 'http://localhost:19080'

  fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
  @credentials = credentials

  @accept_language = 'en-US'
  @long_running_operation_retry_timeout = 30
  @generate_client_request_id = true
  add_telemetry
end

Public Instance Methods

backup_partition(partition_id, backup_partition_description:nil, backup_timeout:10, timeout:60, custom_headers:nil) click to toggle source

Triggers backup of the partition's state.

Creates a backup of the stateful persisted partition's state. In case the partition is already being periodically backed up, then by default the new backup is created at the same backup storage. One can also override the same by specifying the backup storage details as part of the request body. Once the backup is initiated, its progress can be tracked using the GetBackupProgress operation. In case, the operation times out, specify a greater backup timeout value in the query parameter.

@param partition_id The identity of the partition. @param backup_partition_description [BackupPartitionDescription] Describes the parameters to backup the partition now. If not present, backup operation uses default parameters from the backup policy current associated with this partition. @param backup_timeout [Integer] Specifies the maximum amount of time, in minutes, to wait for the backup operation to complete. Post that, the operation completes with timeout error. However, in certain corner cases it could be that though the operation returns back timeout, the backup actually goes through. In case of timeout error, its recommended to invoke this operation again with a greater timeout value. The default value for the same is 10 minutes. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25769
def backup_partition(partition_id, backup_partition_description:nil, backup_timeout:10, timeout:60, custom_headers:nil)
  response = backup_partition_async(partition_id, backup_partition_description:backup_partition_description, backup_timeout:backup_timeout, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
backup_partition_async(partition_id, backup_partition_description:nil, backup_timeout:10, timeout:60, custom_headers:nil) click to toggle source

Triggers backup of the partition's state.

Creates a backup of the stateful persisted partition's state. In case the partition is already being periodically backed up, then by default the new backup is created at the same backup storage. One can also override the same by specifying the backup storage details as part of the request body. Once the backup is initiated, its progress can be tracked using the GetBackupProgress operation. In case, the operation times out, specify a greater backup timeout value in the query parameter.

@param partition_id The identity of the partition. @param backup_partition_description [BackupPartitionDescription] Describes the parameters to backup the partition now. If not present, backup operation uses default parameters from the backup policy current associated with this partition. @param backup_timeout [Integer] Specifies the maximum amount of time, in minutes, to wait for the backup operation to complete. Post that, the operation completes with timeout error. However, in certain corner cases it could be that though the operation returns back timeout, the backup actually goes through. In case of timeout error, its recommended to invoke this operation again with a greater timeout value. The default value for the same is 10 minutes. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25844
def backup_partition_async(partition_id, backup_partition_description:nil, backup_timeout:10, timeout:60, custom_headers:nil)
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::BackupPartitionDescription.mapper()
  request_content = self.serialize(request_mapper,  backup_partition_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Partitions/{partitionId}/$/Backup'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'BackupTimeout' => backup_timeout,'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
backup_partition_with_http_info(partition_id, backup_partition_description:nil, backup_timeout:10, timeout:60, custom_headers:nil) click to toggle source

Triggers backup of the partition's state.

Creates a backup of the stateful persisted partition's state. In case the partition is already being periodically backed up, then by default the new backup is created at the same backup storage. One can also override the same by specifying the backup storage details as part of the request body. Once the backup is initiated, its progress can be tracked using the GetBackupProgress operation. In case, the operation times out, specify a greater backup timeout value in the query parameter.

@param partition_id The identity of the partition. @param backup_partition_description [BackupPartitionDescription] Describes the parameters to backup the partition now. If not present, backup operation uses default parameters from the backup policy current associated with this partition. @param backup_timeout [Integer] Specifies the maximum amount of time, in minutes, to wait for the backup operation to complete. Post that, the operation completes with timeout error. However, in certain corner cases it could be that though the operation returns back timeout, the backup actually goes through. In case of timeout error, its recommended to invoke this operation again with a greater timeout value. The default value for the same is 10 minutes. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25807
def backup_partition_with_http_info(partition_id, backup_partition_description:nil, backup_timeout:10, timeout:60, custom_headers:nil)
  backup_partition_async(partition_id, backup_partition_description:backup_partition_description, backup_timeout:backup_timeout, timeout:timeout, custom_headers:custom_headers).value!
end
cancel_operation(operation_id, force, timeout:60, custom_headers:nil) click to toggle source

Cancels a user-induced fault operation.

The following is a list of APIs that start fault operations that may be cancelled using CancelOperation -

  • StartDataLoss

  • StartQuorumLoss

  • StartPartitionRestart

  • StartNodeTransition

If force is false, then the specified user-induced operation will be gracefully stopped and cleaned up. If force is true, the command will be aborted, and some internal state may be left behind. Specifying force as true should be used with care. Calling this API with force set to true is not allowed until this API has already been called on the same test command with force set to false first, or unless the test command already has an OperationState of OperationState.RollingBack. Clarification: OperationState.RollingBack means that the system will/is be cleaning up internal system state caused by executing the command. It will not restore data if the test command was to cause data loss. For example, if you call StartDataLoss then call this API, the system will only clean up internal state from running the command. It will not restore the target partition's data, if the command progressed far enough to cause data loss.

Important note: if this API is invoked with force==true, internal state may be left behind.

@param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param force [Boolean] Indicates whether to gracefully rollback and clean up internal system state modified by executing the user-induced operation. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22351
def cancel_operation(operation_id, force, timeout:60, custom_headers:nil)
  response = cancel_operation_async(operation_id, force, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
cancel_operation_async(operation_id, force, timeout:60, custom_headers:nil) click to toggle source

Cancels a user-induced fault operation.

The following is a list of APIs that start fault operations that may be cancelled using CancelOperation -

  • StartDataLoss

  • StartQuorumLoss

  • StartPartitionRestart

  • StartNodeTransition

If force is false, then the specified user-induced operation will be gracefully stopped and cleaned up. If force is true, the command will be aborted, and some internal state may be left behind. Specifying force as true should be used with care. Calling this API with force set to true is not allowed until this API has already been called on the same test command with force set to false first, or unless the test command already has an OperationState of OperationState.RollingBack. Clarification: OperationState.RollingBack means that the system will/is be cleaning up internal system state caused by executing the command. It will not restore data if the test command was to cause data loss. For example, if you call StartDataLoss then call this API, the system will only clean up internal state from running the command. It will not restore the target partition's data, if the command progressed far enough to cause data loss.

Important note: if this API is invoked with force==true, internal state may be left behind.

@param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param force [Boolean] Indicates whether to gracefully rollback and clean up internal system state modified by executing the user-induced operation. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22446
def cancel_operation_async(operation_id, force, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'operation_id is nil' if operation_id.nil?
  fail ArgumentError, 'force is nil' if force.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Faults/$/Cancel'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'OperationId' => operation_id,'Force' => force,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
cancel_operation_with_http_info(operation_id, force, timeout:60, custom_headers:nil) click to toggle source

Cancels a user-induced fault operation.

The following is a list of APIs that start fault operations that may be cancelled using CancelOperation -

  • StartDataLoss

  • StartQuorumLoss

  • StartPartitionRestart

  • StartNodeTransition

If force is false, then the specified user-induced operation will be gracefully stopped and cleaned up. If force is true, the command will be aborted, and some internal state may be left behind. Specifying force as true should be used with care. Calling this API with force set to true is not allowed until this API has already been called on the same test command with force set to false first, or unless the test command already has an OperationState of OperationState.RollingBack. Clarification: OperationState.RollingBack means that the system will/is be cleaning up internal system state caused by executing the command. It will not restore data if the test command was to cause data loss. For example, if you call StartDataLoss then call this API, the system will only clean up internal state from running the command. It will not restore the target partition's data, if the command progressed far enough to cause data loss.

Important note: if this API is invoked with force==true, internal state may be left behind.

@param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param force [Boolean] Indicates whether to gracefully rollback and clean up internal system state modified by executing the user-induced operation. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22399
def cancel_operation_with_http_info(operation_id, force, timeout:60, custom_headers:nil)
  cancel_operation_async(operation_id, force, timeout:timeout, custom_headers:custom_headers).value!
end
cancel_repair_task(repair_task_cancel_description, custom_headers:nil) click to toggle source

Requests the cancellation of the given repair task.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param repair_task_cancel_description [RepairTaskCancelDescription] Describes the repair task to be cancelled. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [RepairTaskUpdateInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13944
def cancel_repair_task(repair_task_cancel_description, custom_headers:nil)
  response = cancel_repair_task_async(repair_task_cancel_description, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
cancel_repair_task_async(repair_task_cancel_description, custom_headers:nil) click to toggle source

Requests the cancellation of the given repair task.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param repair_task_cancel_description [RepairTaskCancelDescription] Describes the repair task to be cancelled. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13979
def cancel_repair_task_async(repair_task_cancel_description, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'repair_task_cancel_description is nil' if repair_task_cancel_description.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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::RepairTaskCancelDescription.mapper()
  request_content = self.serialize(request_mapper,  repair_task_cancel_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '$/CancelRepairTask'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::RepairTaskUpdateInfo.mapper()
        result.body = self.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
cancel_repair_task_with_http_info(repair_task_cancel_description, custom_headers:nil) click to toggle source

Requests the cancellation of the given repair task.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param repair_task_cancel_description [RepairTaskCancelDescription] Describes the repair task to be cancelled. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13962
def cancel_repair_task_with_http_info(repair_task_cancel_description, custom_headers:nil)
  cancel_repair_task_async(repair_task_cancel_description, custom_headers:custom_headers).value!
end
commit_image_store_upload_session(session_id, timeout:60, custom_headers:nil) click to toggle source

Commit an image store upload session.

When all file chunks have been uploaded, the upload session needs to be committed explicitly to complete the upload. Image store preserves the upload session until the expiration time, which is 30 minutes after the last chunk received.

@param session_id A GUID generated by the user for a file uploading. It identifies an image store upload session which keeps track of all file chunks until it is committed. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 20093
def commit_image_store_upload_session(session_id, timeout:60, custom_headers:nil)
  response = commit_image_store_upload_session_async(session_id, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
commit_image_store_upload_session_async(session_id, timeout:60, custom_headers:nil) click to toggle source

Commit an image store upload session.

When all file chunks have been uploaded, the upload session needs to be committed explicitly to complete the upload. Image store preserves the upload session until the expiration time, which is 30 minutes after the last chunk received.

@param session_id A GUID generated by the user for a file uploading. It identifies an image store upload session which keeps track of all file chunks until it is committed. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 20142
def commit_image_store_upload_session_async(session_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'session_id is nil' if session_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'ImageStore/$/CommitUploadSession'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'session-id' => session_id,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
commit_image_store_upload_session_with_http_info(session_id, timeout:60, custom_headers:nil) click to toggle source

Commit an image store upload session.

When all file chunks have been uploaded, the upload session needs to be committed explicitly to complete the upload. Image store preserves the upload session until the expiration time, which is 30 minutes after the last chunk received.

@param session_id A GUID generated by the user for a file uploading. It identifies an image store upload session which keeps track of all file chunks until it is committed. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 20118
def commit_image_store_upload_session_with_http_info(session_id, timeout:60, custom_headers:nil)
  commit_image_store_upload_session_async(session_id, timeout:timeout, custom_headers:custom_headers).value!
end
copy_image_store_content(image_store_copy_description, timeout:60, custom_headers:nil) click to toggle source

Copies image store content internally

Copies the image store content from the source image store relative path to the destination image store relative path.

@param image_store_copy_description [ImageStoreCopyDescription] Describes the copy description for the image store. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19874
def copy_image_store_content(image_store_copy_description, timeout:60, custom_headers:nil)
  response = copy_image_store_content_async(image_store_copy_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
copy_image_store_content_async(image_store_copy_description, timeout:60, custom_headers:nil) click to toggle source

Copies image store content internally

Copies the image store content from the source image store relative path to the destination image store relative path.

@param image_store_copy_description [ImageStoreCopyDescription] Describes the copy description for the image store. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19917
def copy_image_store_content_async(image_store_copy_description, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'image_store_copy_description is nil' if image_store_copy_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ImageStoreCopyDescription.mapper()
  request_content = self.serialize(request_mapper,  image_store_copy_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'ImageStore/$/Copy'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
copy_image_store_content_with_http_info(image_store_copy_description, timeout:60, custom_headers:nil) click to toggle source

Copies image store content internally

Copies the image store content from the source image store relative path to the destination image store relative path.

@param image_store_copy_description [ImageStoreCopyDescription] Describes the copy description for the image store. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19896
def copy_image_store_content_with_http_info(image_store_copy_description, timeout:60, custom_headers:nil)
  copy_image_store_content_async(image_store_copy_description, timeout:timeout, custom_headers:custom_headers).value!
end
create_application(application_description, timeout:60, custom_headers:nil) click to toggle source

Creates a Service Fabric application.

Creates a Service Fabric application using the specified description.

@param application_description [ApplicationDescription] Description for creating an application. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 6143
def create_application(application_description, timeout:60, custom_headers:nil)
  response = create_application_async(application_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
create_application_async(application_description, timeout:60, custom_headers:nil) click to toggle source

Creates a Service Fabric application.

Creates a Service Fabric application using the specified description.

@param application_description [ApplicationDescription] Description for creating an application. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 6184
def create_application_async(application_description, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'application_description is nil' if application_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ApplicationDescription.mapper()
  request_content = self.serialize(request_mapper,  application_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Applications/$/Create'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 201
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
create_application_with_http_info(application_description, timeout:60, custom_headers:nil) click to toggle source

Creates a Service Fabric application.

Creates a Service Fabric application using the specified description.

@param application_description [ApplicationDescription] Description for creating an application. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 6164
def create_application_with_http_info(application_description, timeout:60, custom_headers:nil)
  create_application_async(application_description, timeout:timeout, custom_headers:custom_headers).value!
end
create_backup_policy(backup_policy_description, timeout:60, custom_headers:nil) click to toggle source

Creates a backup policy.

Creates a backup policy which can be associated later with a Service Fabric application, service or a partition for periodic backup.

@param backup_policy_description [BackupPolicyDescription] Describes the backup policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22507
def create_backup_policy(backup_policy_description, timeout:60, custom_headers:nil)
  response = create_backup_policy_async(backup_policy_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
create_backup_policy_async(backup_policy_description, timeout:60, custom_headers:nil) click to toggle source

Creates a backup policy.

Creates a backup policy which can be associated later with a Service Fabric application, service or a partition for periodic backup.

@param backup_policy_description [BackupPolicyDescription] Describes the backup policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22550
def create_backup_policy_async(backup_policy_description, timeout:60, custom_headers:nil)
  fail ArgumentError, 'backup_policy_description is nil' if backup_policy_description.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::BackupPolicyDescription.mapper()
  request_content = self.serialize(request_mapper,  backup_policy_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'BackupRestore/BackupPolicies/$/Create'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 201
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
create_backup_policy_with_http_info(backup_policy_description, timeout:60, custom_headers:nil) click to toggle source

Creates a backup policy.

Creates a backup policy which can be associated later with a Service Fabric application, service or a partition for periodic backup.

@param backup_policy_description [BackupPolicyDescription] Describes the backup policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22529
def create_backup_policy_with_http_info(backup_policy_description, timeout:60, custom_headers:nil)
  create_backup_policy_async(backup_policy_description, timeout:timeout, custom_headers:custom_headers).value!
end
create_compose_deployment(create_compose_deployment_description, timeout:60, custom_headers:nil) click to toggle source

Creates a Service Fabric compose deployment.

Compose is a file format that describes multi-container applications. This API allows deploying container based applications defined in compose format in a Service Fabric cluster. Once the deployment is created it's status can be tracked via `GetComposeDeploymentStatus` API.

@param create_compose_deployment_description

CreateComposeDeploymentDescription

Describes the compose deployment that

needs to be created. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 17931
def create_compose_deployment(create_compose_deployment_description, timeout:60, custom_headers:nil)
  response = create_compose_deployment_async(create_compose_deployment_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
create_compose_deployment_async(create_compose_deployment_description, timeout:60, custom_headers:nil) click to toggle source

Creates a Service Fabric compose deployment.

Compose is a file format that describes multi-container applications. This API allows deploying container based applications defined in compose format in a Service Fabric cluster. Once the deployment is created it's status can be tracked via `GetComposeDeploymentStatus` API.

@param create_compose_deployment_description

CreateComposeDeploymentDescription

Describes the compose deployment that

needs to be created. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 17980
def create_compose_deployment_async(create_compose_deployment_description, timeout:60, custom_headers:nil)
  api_version = '6.0-preview'
  fail ArgumentError, 'create_compose_deployment_description is nil' if create_compose_deployment_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::CreateComposeDeploymentDescription.mapper()
  request_content = self.serialize(request_mapper,  create_compose_deployment_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'ComposeDeployments/$/Create'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.make_request_async(:put, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
create_compose_deployment_with_http_info(create_compose_deployment_description, timeout:60, custom_headers:nil) click to toggle source

Creates a Service Fabric compose deployment.

Compose is a file format that describes multi-container applications. This API allows deploying container based applications defined in compose format in a Service Fabric cluster. Once the deployment is created it's status can be tracked via `GetComposeDeploymentStatus` API.

@param create_compose_deployment_description

CreateComposeDeploymentDescription

Describes the compose deployment that

needs to be created. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 17956
def create_compose_deployment_with_http_info(create_compose_deployment_description, timeout:60, custom_headers:nil)
  create_compose_deployment_async(create_compose_deployment_description, timeout:timeout, custom_headers:custom_headers).value!
end
create_name(name_description, timeout:60, custom_headers:nil) click to toggle source

Creates a Service Fabric name.

Creates the specified Service Fabric name.

@param name_description [NameDescription] Describes the Service Fabric name to be created. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26469
def create_name(name_description, timeout:60, custom_headers:nil)
  response = create_name_async(name_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
create_name_async(name_description, timeout:60, custom_headers:nil) click to toggle source

Creates a Service Fabric name.

Creates the specified Service Fabric name.

@param name_description [NameDescription] Describes the Service Fabric name to be created. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26510
def create_name_async(name_description, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'name_description is nil' if name_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::NameDescription.mapper()
  request_content = self.serialize(request_mapper,  name_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Names/$/Create'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 201
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
create_name_with_http_info(name_description, timeout:60, custom_headers:nil) click to toggle source

Creates a Service Fabric name.

Creates the specified Service Fabric name.

@param name_description [NameDescription] Describes the Service Fabric name to be created. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26490
def create_name_with_http_info(name_description, timeout:60, custom_headers:nil)
  create_name_async(name_description, timeout:timeout, custom_headers:custom_headers).value!
end
create_repair_task(repair_task, custom_headers:nil) click to toggle source

Creates a new repair task.

For clusters that have the Repair Manager Service configured, this API provides a way to create repair tasks that run automatically or manually. For repair tasks that run automatically, an appropriate repair executor must be running for each repair action to run automatically. These are currently only available in specially-configured Azure Cloud Services.

To create a manual repair task, provide the set of impacted node names and the expected impact. When the state of the created repair task changes to approved, you can safely perform repair actions on those nodes.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param repair_task [RepairTask] Describes the repair task to be created or updated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [RepairTaskUpdateInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13809
def create_repair_task(repair_task, custom_headers:nil)
  response = create_repair_task_async(repair_task, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
create_repair_task_async(repair_task, custom_headers:nil) click to toggle source

Creates a new repair task.

For clusters that have the Repair Manager Service configured, this API provides a way to create repair tasks that run automatically or manually. For repair tasks that run automatically, an appropriate repair executor must be running for each repair action to run automatically. These are currently only available in specially-configured Azure Cloud Services.

To create a manual repair task, provide the set of impacted node names and the expected impact. When the state of the created repair task changes to approved, you can safely perform repair actions on those nodes.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param repair_task [RepairTask] Describes the repair task to be created or updated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13872
def create_repair_task_async(repair_task, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'repair_task is nil' if repair_task.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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::RepairTask.mapper()
  request_content = self.serialize(request_mapper,  repair_task)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '$/CreateRepairTask'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::RepairTaskUpdateInfo.mapper()
        result.body = self.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
create_repair_task_with_http_info(repair_task, custom_headers:nil) click to toggle source

Creates a new repair task.

For clusters that have the Repair Manager Service configured, this API provides a way to create repair tasks that run automatically or manually. For repair tasks that run automatically, an appropriate repair executor must be running for each repair action to run automatically. These are currently only available in specially-configured Azure Cloud Services.

To create a manual repair task, provide the set of impacted node names and the expected impact. When the state of the created repair task changes to approved, you can safely perform repair actions on those nodes.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param repair_task [RepairTask] Describes the repair task to be created or updated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13841
def create_repair_task_with_http_info(repair_task, custom_headers:nil)
  create_repair_task_async(repair_task, custom_headers:custom_headers).value!
end
create_service(application_id, service_description, timeout:60, custom_headers:nil) click to toggle source

Creates the specified Service Fabric service.

This api allows creating a new Service Fabric stateless or stateful service under a specified Service Fabric application. The description for creating the service includes partitioning information and optional properties for placement and load balancing. Some of the properties can later be modified using `UpdateService` API.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_description [ServiceDescription] The information necessary to create a service. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 10246
def create_service(application_id, service_description, timeout:60, custom_headers:nil)
  response = create_service_async(application_id, service_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
create_service_async(application_id, service_description, timeout:60, custom_headers:nil) click to toggle source

Creates the specified Service Fabric service.

This api allows creating a new Service Fabric stateless or stateful service under a specified Service Fabric application. The description for creating the service includes partitioning information and optional properties for placement and load balancing. Some of the properties can later be modified using `UpdateService` API.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_description [ServiceDescription] The information necessary to create a service. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 10307
def create_service_async(application_id, service_description, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, 'service_description is nil' if service_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ServiceDescription.mapper()
  request_content = self.serialize(request_mapper,  service_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Applications/{applicationId}/$/GetServices/$/Create'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
create_service_from_template(application_id, service_from_template_description, timeout:60, custom_headers:nil) click to toggle source

Creates a Service Fabric service from the service template.

Creates a Service Fabric service from the service template defined in the application manifest. A service template contains the properties that will be same for the service instance of the same type. The API allows overriding the properties that are usually different for different services of the same service type.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_from_template_description [ServiceFromTemplateDescription] Describes the service that needs to be created from the template defined in the application manifest. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 10386
def create_service_from_template(application_id, service_from_template_description, timeout:60, custom_headers:nil)
  response = create_service_from_template_async(application_id, service_from_template_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
create_service_from_template_async(application_id, service_from_template_description, timeout:60, custom_headers:nil) click to toggle source

Creates a Service Fabric service from the service template.

Creates a Service Fabric service from the service template defined in the application manifest. A service template contains the properties that will be same for the service instance of the same type. The API allows overriding the properties that are usually different for different services of the same service type.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_from_template_description [ServiceFromTemplateDescription] Describes the service that needs to be created from the template defined in the application manifest. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 10449
def create_service_from_template_async(application_id, service_from_template_description, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, 'service_from_template_description is nil' if service_from_template_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ServiceFromTemplateDescription.mapper()
  request_content = self.serialize(request_mapper,  service_from_template_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Applications/{applicationId}/$/GetServices/$/CreateFromTemplate'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
create_service_from_template_with_http_info(application_id, service_from_template_description, timeout:60, custom_headers:nil) click to toggle source

Creates a Service Fabric service from the service template.

Creates a Service Fabric service from the service template defined in the application manifest. A service template contains the properties that will be same for the service instance of the same type. The API allows overriding the properties that are usually different for different services of the same service type.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_from_template_description [ServiceFromTemplateDescription] Describes the service that needs to be created from the template defined in the application manifest. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 10418
def create_service_from_template_with_http_info(application_id, service_from_template_description, timeout:60, custom_headers:nil)
  create_service_from_template_async(application_id, service_from_template_description, timeout:timeout, custom_headers:custom_headers).value!
end
create_service_with_http_info(application_id, service_description, timeout:60, custom_headers:nil) click to toggle source

Creates the specified Service Fabric service.

This api allows creating a new Service Fabric stateless or stateful service under a specified Service Fabric application. The description for creating the service includes partitioning information and optional properties for placement and load balancing. Some of the properties can later be modified using `UpdateService` API.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_description [ServiceDescription] The information necessary to create a service. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 10277
def create_service_with_http_info(application_id, service_description, timeout:60, custom_headers:nil)
  create_service_async(application_id, service_description, timeout:timeout, custom_headers:custom_headers).value!
end
delete_application(application_id, force_remove:nil, timeout:60, custom_headers:nil) click to toggle source

Deletes an existing Service Fabric application.

Deletes an existing Service Fabric application. An application must be created before it can be deleted. Deleting an application will delete all services that are part of that application. By default, Service Fabric will try to close service replicas in a graceful manner and then delete the service. However, if a service is having issues closing the replica gracefully, the delete operation may take a long time or get stuck. Use the optional ForceRemove flag to skip the graceful close sequence and forcefully delete the application and all of the its services.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param force_remove [Boolean] Remove a Service Fabric application or service forcefully without going through the graceful shutdown sequence. This parameter can be used to forcefully delete an application or service for which delete is timing out due to issues in the service code that prevents graceful close of replicas. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 6266
def delete_application(application_id, force_remove:nil, timeout:60, custom_headers:nil)
  response = delete_application_async(application_id, force_remove:force_remove, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
delete_application_async(application_id, force_remove:nil, timeout:60, custom_headers:nil) click to toggle source

Deletes an existing Service Fabric application.

Deletes an existing Service Fabric application. An application must be created before it can be deleted. Deleting an application will delete all services that are part of that application. By default, Service Fabric will try to close service replicas in a graceful manner and then delete the service. However, if a service is having issues closing the replica gracefully, the delete operation may take a long time or get stuck. Use the optional ForceRemove flag to skip the graceful close sequence and forcefully delete the application and all of the its services.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param force_remove [Boolean] Remove a Service Fabric application or service forcefully without going through the graceful shutdown sequence. This parameter can be used to forcefully delete an application or service for which delete is timing out due to issues in the service code that prevents graceful close of replicas. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 6339
def delete_application_async(application_id, force_remove:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Applications/{applicationId}/$/Delete'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'ForceRemove' => force_remove,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
delete_application_with_http_info(application_id, force_remove:nil, timeout:60, custom_headers:nil) click to toggle source

Deletes an existing Service Fabric application.

Deletes an existing Service Fabric application. An application must be created before it can be deleted. Deleting an application will delete all services that are part of that application. By default, Service Fabric will try to close service replicas in a graceful manner and then delete the service. However, if a service is having issues closing the replica gracefully, the delete operation may take a long time or get stuck. Use the optional ForceRemove flag to skip the graceful close sequence and forcefully delete the application and all of the its services.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param force_remove [Boolean] Remove a Service Fabric application or service forcefully without going through the graceful shutdown sequence. This parameter can be used to forcefully delete an application or service for which delete is timing out due to issues in the service code that prevents graceful close of replicas. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 6303
def delete_application_with_http_info(application_id, force_remove:nil, timeout:60, custom_headers:nil)
  delete_application_async(application_id, force_remove:force_remove, timeout:timeout, custom_headers:custom_headers).value!
end
delete_backup_policy(backup_policy_name, timeout:60, custom_headers:nil) click to toggle source

Deletes the backup policy.

Deletes an existing backup policy. A backup policy must be created before it can be deleted. A currently active backup policy, associated with any Service Fabric application, service or partition, cannot be deleted without first deleting the mapping.

@param backup_policy_name [String] The name of the backup policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22618
def delete_backup_policy(backup_policy_name, timeout:60, custom_headers:nil)
  response = delete_backup_policy_async(backup_policy_name, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
delete_backup_policy_async(backup_policy_name, timeout:60, custom_headers:nil) click to toggle source

Deletes the backup policy.

Deletes an existing backup policy. A backup policy must be created before it can be deleted. A currently active backup policy, associated with any Service Fabric application, service or partition, cannot be deleted without first deleting the mapping.

@param backup_policy_name [String] The name of the backup policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22663
def delete_backup_policy_async(backup_policy_name, timeout:60, custom_headers:nil)
  fail ArgumentError, 'backup_policy_name is nil' if backup_policy_name.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'BackupRestore/BackupPolicies/{backupPolicyName}/$/Delete'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'backupPolicyName' => backup_policy_name},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
delete_backup_policy_with_http_info(backup_policy_name, timeout:60, custom_headers:nil) click to toggle source

Deletes the backup policy.

Deletes an existing backup policy. A backup policy must be created before it can be deleted. A currently active backup policy, associated with any Service Fabric application, service or partition, cannot be deleted without first deleting the mapping.

@param backup_policy_name [String] The name of the backup policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22641
def delete_backup_policy_with_http_info(backup_policy_name, timeout:60, custom_headers:nil)
  delete_backup_policy_async(backup_policy_name, timeout:timeout, custom_headers:custom_headers).value!
end
delete_image_store_content(content_path, timeout:60, custom_headers:nil) click to toggle source

Deletes existing image store content.

Deletes existing image store content being found within the given image store relative path. This can be used to delete uploaded application packages once they are provisioned.

@param content_path [String] Relative path to file or folder in the image store from its root. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19661
def delete_image_store_content(content_path, timeout:60, custom_headers:nil)
  response = delete_image_store_content_async(content_path, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
delete_image_store_content_async(content_path, timeout:60, custom_headers:nil) click to toggle source

Deletes existing image store content.

Deletes existing image store content being found within the given image store relative path. This can be used to delete uploaded application packages once they are provisioned.

@param content_path [String] Relative path to file or folder in the image store from its root. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19706
def delete_image_store_content_async(content_path, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'content_path is nil' if content_path.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'ImageStore/{contentPath}'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'contentPath' => content_path},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
delete_image_store_content_with_http_info(content_path, timeout:60, custom_headers:nil) click to toggle source

Deletes existing image store content.

Deletes existing image store content being found within the given image store relative path. This can be used to delete uploaded application packages once they are provisioned.

@param content_path [String] Relative path to file or folder in the image store from its root. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19684
def delete_image_store_content_with_http_info(content_path, timeout:60, custom_headers:nil)
  delete_image_store_content_async(content_path, timeout:timeout, custom_headers:custom_headers).value!
end
delete_image_store_upload_session(session_id, timeout:60, custom_headers:nil) click to toggle source

Cancels an image store upload session.

The DELETE request will cause the existing upload session to expire and remove any previously uploaded file chunks.

@param session_id A GUID generated by the user for a file uploading. It identifies an image store upload session which keeps track of all file chunks until it is committed. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19985
def delete_image_store_upload_session(session_id, timeout:60, custom_headers:nil)
  response = delete_image_store_upload_session_async(session_id, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
delete_image_store_upload_session_async(session_id, timeout:60, custom_headers:nil) click to toggle source

Cancels an image store upload session.

The DELETE request will cause the existing upload session to expire and remove any previously uploaded file chunks.

@param session_id A GUID generated by the user for a file uploading. It identifies an image store upload session which keeps track of all file chunks until it is committed. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 20030
def delete_image_store_upload_session_async(session_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'session_id is nil' if session_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'ImageStore/$/DeleteUploadSession'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'session-id' => session_id,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
delete_image_store_upload_session_with_http_info(session_id, timeout:60, custom_headers:nil) click to toggle source

Cancels an image store upload session.

The DELETE request will cause the existing upload session to expire and remove any previously uploaded file chunks.

@param session_id A GUID generated by the user for a file uploading. It identifies an image store upload session which keeps track of all file chunks until it is committed. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 20008
def delete_image_store_upload_session_with_http_info(session_id, timeout:60, custom_headers:nil)
  delete_image_store_upload_session_async(session_id, timeout:timeout, custom_headers:custom_headers).value!
end
delete_name(name_id, timeout:60, custom_headers:nil) click to toggle source

Deletes a Service Fabric name.

Deletes the specified Service Fabric name. A name must be created before it can be deleted. Deleting a name with child properties will fail.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26678
def delete_name(name_id, timeout:60, custom_headers:nil)
  response = delete_name_async(name_id, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
delete_name_async(name_id, timeout:60, custom_headers:nil) click to toggle source

Deletes a Service Fabric name.

Deletes the specified Service Fabric name. A name must be created before it can be deleted. Deleting a name with child properties will fail.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26721
def delete_name_async(name_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'name_id is nil' if name_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Names/{nameId}'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nameId' => name_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
delete_name_with_http_info(name_id, timeout:60, custom_headers:nil) click to toggle source

Deletes a Service Fabric name.

Deletes the specified Service Fabric name. A name must be created before it can be deleted. Deleting a name with child properties will fail.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26700
def delete_name_with_http_info(name_id, timeout:60, custom_headers:nil)
  delete_name_async(name_id, timeout:timeout, custom_headers:custom_headers).value!
end
delete_property(name_id, property_name, timeout:60, custom_headers:nil) click to toggle source

Deletes the specified Service Fabric property.

Deletes the specified Service Fabric property under a given name. A property must be created before it can be deleted.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param property_name [String] Specifies the name of the property to get. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27318
def delete_property(name_id, property_name, timeout:60, custom_headers:nil)
  response = delete_property_async(name_id, property_name, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
delete_property_async(name_id, property_name, timeout:60, custom_headers:nil) click to toggle source

Deletes the specified Service Fabric property.

Deletes the specified Service Fabric property under a given name. A property must be created before it can be deleted.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param property_name [String] Specifies the name of the property to get. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27363
def delete_property_async(name_id, property_name, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'name_id is nil' if name_id.nil?
  fail ArgumentError, 'property_name is nil' if property_name.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Names/{nameId}/$/GetProperty'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nameId' => name_id},
      query_params: {'api-version' => api_version,'PropertyName' => property_name,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
delete_property_with_http_info(name_id, property_name, timeout:60, custom_headers:nil) click to toggle source

Deletes the specified Service Fabric property.

Deletes the specified Service Fabric property under a given name. A property must be created before it can be deleted.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param property_name [String] Specifies the name of the property to get. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27341
def delete_property_with_http_info(name_id, property_name, timeout:60, custom_headers:nil)
  delete_property_async(name_id, property_name, timeout:timeout, custom_headers:custom_headers).value!
end
delete_repair_task(repair_task_delete_description, custom_headers:nil) click to toggle source

Deletes a completed repair task.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param repair_task_delete_description [RepairTaskDeleteDescription] Describes the repair task to be deleted. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14050
def delete_repair_task(repair_task_delete_description, custom_headers:nil)
  response = delete_repair_task_async(repair_task_delete_description, custom_headers:custom_headers).value!
  nil
end
delete_repair_task_async(repair_task_delete_description, custom_headers:nil) click to toggle source

Deletes a completed repair task.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param repair_task_delete_description [RepairTaskDeleteDescription] Describes the repair task to be deleted. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14085
def delete_repair_task_async(repair_task_delete_description, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'repair_task_delete_description is nil' if repair_task_delete_description.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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::RepairTaskDeleteDescription.mapper()
  request_content = self.serialize(request_mapper,  repair_task_delete_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '$/DeleteRepairTask'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
delete_repair_task_with_http_info(repair_task_delete_description, custom_headers:nil) click to toggle source

Deletes a completed repair task.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param repair_task_delete_description [RepairTaskDeleteDescription] Describes the repair task to be deleted. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14068
def delete_repair_task_with_http_info(repair_task_delete_description, custom_headers:nil)
  delete_repair_task_async(repair_task_delete_description, custom_headers:custom_headers).value!
end
delete_service(service_id, force_remove:nil, timeout:60, custom_headers:nil) click to toggle source

Deletes an existing Service Fabric service.

Deletes an existing Service Fabric service. A service must be created before it can be deleted. By default, Service Fabric will try to close service replicas in a graceful manner and then delete the service. However, if the service is having issues closing the replica gracefully, the delete operation may take a long time or get stuck. Use the optional ForceRemove flag to skip the graceful close sequence and forcefully delete the service.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param force_remove [Boolean] Remove a Service Fabric application or service forcefully without going through the graceful shutdown sequence. This parameter can be used to forcefully delete an application or service for which delete is timing out due to issues in the service code that prevents graceful close of replicas. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 10532
def delete_service(service_id, force_remove:nil, timeout:60, custom_headers:nil)
  response = delete_service_async(service_id, force_remove:force_remove, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
delete_service_async(service_id, force_remove:nil, timeout:60, custom_headers:nil) click to toggle source

Deletes an existing Service Fabric service.

Deletes an existing Service Fabric service. A service must be created before it can be deleted. By default, Service Fabric will try to close service replicas in a graceful manner and then delete the service. However, if the service is having issues closing the replica gracefully, the delete operation may take a long time or get stuck. Use the optional ForceRemove flag to skip the graceful close sequence and forcefully delete the service.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param force_remove [Boolean] Remove a Service Fabric application or service forcefully without going through the graceful shutdown sequence. This parameter can be used to forcefully delete an application or service for which delete is timing out due to issues in the service code that prevents graceful close of replicas. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 10603
def delete_service_async(service_id, force_remove:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Services/{serviceId}/$/Delete'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id},
      query_params: {'api-version' => api_version,'ForceRemove' => force_remove,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
delete_service_with_http_info(service_id, force_remove:nil, timeout:60, custom_headers:nil) click to toggle source

Deletes an existing Service Fabric service.

Deletes an existing Service Fabric service. A service must be created before it can be deleted. By default, Service Fabric will try to close service replicas in a graceful manner and then delete the service. However, if the service is having issues closing the replica gracefully, the delete operation may take a long time or get stuck. Use the optional ForceRemove flag to skip the graceful close sequence and forcefully delete the service.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param force_remove [Boolean] Remove a Service Fabric application or service forcefully without going through the graceful shutdown sequence. This parameter can be used to forcefully delete an application or service for which delete is timing out due to issues in the service code that prevents graceful close of replicas. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 10568
def delete_service_with_http_info(service_id, force_remove:nil, timeout:60, custom_headers:nil)
  delete_service_async(service_id, force_remove:force_remove, timeout:timeout, custom_headers:custom_headers).value!
end
deploy_service_package_to_node(node_name, deploy_service_package_to_node_description, timeout:60, custom_headers:nil) click to toggle source

Downloads all of the code packages associated with specified service manifest on the specified node.

This API provides a way to download code packages including the container images on a specific node outside of the normal application deployment and upgrade path. This is useful for the large code packages and container images to be present on the node before the actual application deployment and upgrade, thus significantly reducing the total time required for the deployment or upgrade.

@param node_name [String] The name of the node. @param deploy_service_package_to_node_description

DeployServicePackageToNodeDescription

Describes information for deploying a

service package to a Service Fabric node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 17167
def deploy_service_package_to_node(node_name, deploy_service_package_to_node_description, timeout:60, custom_headers:nil)
  response = deploy_service_package_to_node_async(node_name, deploy_service_package_to_node_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
deploy_service_package_to_node_async(node_name, deploy_service_package_to_node_description, timeout:60, custom_headers:nil) click to toggle source

Downloads all of the code packages associated with specified service manifest on the specified node.

This API provides a way to download code packages including the container images on a specific node outside of the normal application deployment and upgrade path. This is useful for the large code packages and container images to be present on the node before the actual application deployment and upgrade, thus significantly reducing the total time required for the deployment or upgrade.

@param node_name [String] The name of the node. @param deploy_service_package_to_node_description

DeployServicePackageToNodeDescription

Describes information for deploying a

service package to a Service Fabric node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 17224
def deploy_service_package_to_node_async(node_name, deploy_service_package_to_node_description, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'deploy_service_package_to_node_description is nil' if deploy_service_package_to_node_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::DeployServicePackageToNodeDescription.mapper()
  request_content = self.serialize(request_mapper,  deploy_service_package_to_node_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Nodes/{nodeName}/$/DeployServicePackage'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
deploy_service_package_to_node_with_http_info(node_name, deploy_service_package_to_node_description, timeout:60, custom_headers:nil) click to toggle source

Downloads all of the code packages associated with specified service manifest on the specified node.

This API provides a way to download code packages including the container images on a specific node outside of the normal application deployment and upgrade path. This is useful for the large code packages and container images to be present on the node before the actual application deployment and upgrade, thus significantly reducing the total time required for the deployment or upgrade.

@param node_name [String] The name of the node. @param deploy_service_package_to_node_description

DeployServicePackageToNodeDescription

Describes information for deploying a

service package to a Service Fabric node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 17196
def deploy_service_package_to_node_with_http_info(node_name, deploy_service_package_to_node_description, timeout:60, custom_headers:nil)
  deploy_service_package_to_node_async(node_name, deploy_service_package_to_node_description, timeout:timeout, custom_headers:custom_headers).value!
end
disable_application_backup(application_id, timeout:60, custom_headers:nil) click to toggle source

Disables periodic backup of Service Fabric application.

Disables periodic backup of Service Fabric application which was previously enabled.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 23395
def disable_application_backup(application_id, timeout:60, custom_headers:nil)
  response = disable_application_backup_async(application_id, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
disable_application_backup_async(application_id, timeout:60, custom_headers:nil) click to toggle source

Disables periodic backup of Service Fabric application.

Disables periodic backup of Service Fabric application which was previously enabled.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 23446
def disable_application_backup_async(application_id, timeout:60, custom_headers:nil)
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Applications/{applicationId}/$/DisableBackup'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
disable_application_backup_with_http_info(application_id, timeout:60, custom_headers:nil) click to toggle source

Disables periodic backup of Service Fabric application.

Disables periodic backup of Service Fabric application which was previously enabled.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 23421
def disable_application_backup_with_http_info(application_id, timeout:60, custom_headers:nil)
  disable_application_backup_async(application_id, timeout:timeout, custom_headers:custom_headers).value!
end
disable_node(node_name, deactivation_intent_description, timeout:60, custom_headers:nil) click to toggle source

Deactivate a Service Fabric cluster node with the specified deactivation intent.

Deactivate a Service Fabric cluster node with the specified deactivation intent. Once the deactivation is in progress, the deactivation intent can be increased, but not decreased (for example, a node which is was deactivated with the Pause intent can be deactivated further with Restart, but not the other way around. Nodes may be reactivated using the Activate a node operation any time after they are deactivated. If the deactivation is not complete this will cancel the deactivation. A node which goes down and comes back up while deactivated will still need to be reactivated before services will be placed on that node.

@param node_name [String] The name of the node. @param deactivation_intent_description [DeactivationIntentDescription] Describes the intent or reason for deactivating the node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 4228
def disable_node(node_name, deactivation_intent_description, timeout:60, custom_headers:nil)
  response = disable_node_async(node_name, deactivation_intent_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
disable_node_async(node_name, deactivation_intent_description, timeout:60, custom_headers:nil) click to toggle source

Deactivate a Service Fabric cluster node with the specified deactivation intent.

Deactivate a Service Fabric cluster node with the specified deactivation intent. Once the deactivation is in progress, the deactivation intent can be increased, but not decreased (for example, a node which is was deactivated with the Pause intent can be deactivated further with Restart, but not the other way around. Nodes may be reactivated using the Activate a node operation any time after they are deactivated. If the deactivation is not complete this will cancel the deactivation. A node which goes down and comes back up while deactivated will still need to be reactivated before services will be placed on that node.

@param node_name [String] The name of the node. @param deactivation_intent_description [DeactivationIntentDescription] Describes the intent or reason for deactivating the node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 4289
def disable_node_async(node_name, deactivation_intent_description, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'deactivation_intent_description is nil' if deactivation_intent_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::DeactivationIntentDescription.mapper()
  request_content = self.serialize(request_mapper,  deactivation_intent_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Nodes/{nodeName}/$/Deactivate'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
disable_node_with_http_info(node_name, deactivation_intent_description, timeout:60, custom_headers:nil) click to toggle source

Deactivate a Service Fabric cluster node with the specified deactivation intent.

Deactivate a Service Fabric cluster node with the specified deactivation intent. Once the deactivation is in progress, the deactivation intent can be increased, but not decreased (for example, a node which is was deactivated with the Pause intent can be deactivated further with Restart, but not the other way around. Nodes may be reactivated using the Activate a node operation any time after they are deactivated. If the deactivation is not complete this will cancel the deactivation. A node which goes down and comes back up while deactivated will still need to be reactivated before services will be placed on that node.

@param node_name [String] The name of the node. @param deactivation_intent_description [DeactivationIntentDescription] Describes the intent or reason for deactivating the node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 4259
def disable_node_with_http_info(node_name, deactivation_intent_description, timeout:60, custom_headers:nil)
  disable_node_async(node_name, deactivation_intent_description, timeout:timeout, custom_headers:custom_headers).value!
end
disable_partition_backup(partition_id, timeout:60, custom_headers:nil) click to toggle source

Disables periodic backup of Service Fabric partition which was previously enabled.

Disables periodic backup of partition which was previously enabled. Backup must be explicitly enabled before it can be disabled. In case the backup is enabled for the Service Fabric application or service, which this partition is part of, this partition would continue to be periodically backed up as per the policy mapped at the higher level entity.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25181
def disable_partition_backup(partition_id, timeout:60, custom_headers:nil)
  response = disable_partition_backup_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
disable_partition_backup_async(partition_id, timeout:60, custom_headers:nil) click to toggle source

Disables periodic backup of Service Fabric partition which was previously enabled.

Disables periodic backup of partition which was previously enabled. Backup must be explicitly enabled before it can be disabled. In case the backup is enabled for the Service Fabric application or service, which this partition is part of, this partition would continue to be periodically backed up as per the policy mapped at the higher level entity.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25230
def disable_partition_backup_async(partition_id, timeout:60, custom_headers:nil)
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Partitions/{partitionId}/$/DisableBackup'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
disable_partition_backup_with_http_info(partition_id, timeout:60, custom_headers:nil) click to toggle source

Disables periodic backup of Service Fabric partition which was previously enabled.

Disables periodic backup of partition which was previously enabled. Backup must be explicitly enabled before it can be disabled. In case the backup is enabled for the Service Fabric application or service, which this partition is part of, this partition would continue to be periodically backed up as per the policy mapped at the higher level entity.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25206
def disable_partition_backup_with_http_info(partition_id, timeout:60, custom_headers:nil)
  disable_partition_backup_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
end
disable_service_backup(service_id, timeout:60, custom_headers:nil) click to toggle source

Disables periodic backup of Service Fabric service which was previously enabled.

Disables periodic backup of Service Fabric service which was previously enabled. Backup must be explicitly enabled before it can be disabled. In case the backup is enabled for the Service Fabric application, which this service is part of, this service would continue to be periodically backed up as per the policy mapped at the application level.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 24292
def disable_service_backup(service_id, timeout:60, custom_headers:nil)
  response = disable_service_backup_async(service_id, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
disable_service_backup_async(service_id, timeout:60, custom_headers:nil) click to toggle source

Disables periodic backup of Service Fabric service which was previously enabled.

Disables periodic backup of Service Fabric service which was previously enabled. Backup must be explicitly enabled before it can be disabled. In case the backup is enabled for the Service Fabric application, which this service is part of, this service would continue to be periodically backed up as per the policy mapped at the application level.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 24353
def disable_service_backup_async(service_id, timeout:60, custom_headers:nil)
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Services/{serviceId}/$/DisableBackup'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
disable_service_backup_with_http_info(service_id, timeout:60, custom_headers:nil) click to toggle source

Disables periodic backup of Service Fabric service which was previously enabled.

Disables periodic backup of Service Fabric service which was previously enabled. Backup must be explicitly enabled before it can be disabled. In case the backup is enabled for the Service Fabric application, which this service is part of, this service would continue to be periodically backed up as per the policy mapped at the application level.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 24323
def disable_service_backup_with_http_info(service_id, timeout:60, custom_headers:nil)
  disable_service_backup_async(service_id, timeout:timeout, custom_headers:custom_headers).value!
end
enable_application_backup(application_id, enable_backup_description, timeout:60, custom_headers:nil) click to toggle source

Enables periodic backup of stateful partitions under this Service Fabric application.

Enables periodic backup of stateful partitions which are part of this Service Fabric application. Each partition is backed up individually as per the specified backup policy description. Note only C# based Reliable Actor and Reliable Stateful services are currently supported for periodic backup.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param enable_backup_description [EnableBackupDescription] Specifies the parameters for enabling backup. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 23259
def enable_application_backup(application_id, enable_backup_description, timeout:60, custom_headers:nil)
  response = enable_application_backup_async(application_id, enable_backup_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
enable_application_backup_async(application_id, enable_backup_description, timeout:60, custom_headers:nil) click to toggle source

Enables periodic backup of stateful partitions under this Service Fabric application.

Enables periodic backup of stateful partitions which are part of this Service Fabric application. Each partition is backed up individually as per the specified backup policy description. Note only C# based Reliable Actor and Reliable Stateful services are currently supported for periodic backup.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param enable_backup_description [EnableBackupDescription] Specifies the parameters for enabling backup. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 23322
def enable_application_backup_async(application_id, enable_backup_description, timeout:60, custom_headers:nil)
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, 'enable_backup_description is nil' if enable_backup_description.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::EnableBackupDescription.mapper()
  request_content = self.serialize(request_mapper,  enable_backup_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Applications/{applicationId}/$/EnableBackup'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
enable_application_backup_with_http_info(application_id, enable_backup_description, timeout:60, custom_headers:nil) click to toggle source

Enables periodic backup of stateful partitions under this Service Fabric application.

Enables periodic backup of stateful partitions which are part of this Service Fabric application. Each partition is backed up individually as per the specified backup policy description. Note only C# based Reliable Actor and Reliable Stateful services are currently supported for periodic backup.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param enable_backup_description [EnableBackupDescription] Specifies the parameters for enabling backup. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 23291
def enable_application_backup_with_http_info(application_id, enable_backup_description, timeout:60, custom_headers:nil)
  enable_application_backup_async(application_id, enable_backup_description, timeout:timeout, custom_headers:custom_headers).value!
end
enable_node(node_name, timeout:60, custom_headers:nil) click to toggle source

Activate a Service Fabric cluster node which is currently deactivated.

Activates a Service Fabric cluster node which is currently deactivated. Once activated, the node will again become a viable target for placing new replicas, and any deactivated replicas remaining on the node will be reactivated.

@param node_name [String] The name of the node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 4359
def enable_node(node_name, timeout:60, custom_headers:nil)
  response = enable_node_async(node_name, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
enable_node_async(node_name, timeout:60, custom_headers:nil) click to toggle source

Activate a Service Fabric cluster node which is currently deactivated.

Activates a Service Fabric cluster node which is currently deactivated. Once activated, the node will again become a viable target for placing new replicas, and any deactivated replicas remaining on the node will be reactivated.

@param node_name [String] The name of the node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 4404
def enable_node_async(node_name, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Nodes/{nodeName}/$/Activate'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
enable_node_with_http_info(node_name, timeout:60, custom_headers:nil) click to toggle source

Activate a Service Fabric cluster node which is currently deactivated.

Activates a Service Fabric cluster node which is currently deactivated. Once activated, the node will again become a viable target for placing new replicas, and any deactivated replicas remaining on the node will be reactivated.

@param node_name [String] The name of the node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 4382
def enable_node_with_http_info(node_name, timeout:60, custom_headers:nil)
  enable_node_async(node_name, timeout:timeout, custom_headers:custom_headers).value!
end
enable_partition_backup(partition_id, enable_backup_description, timeout:60, custom_headers:nil) click to toggle source

Enables periodic backup of the stateful persisted partition.

Enables periodic backup of stateful persisted partition. Each partition is backed up as per the specified backup policy description. In case the application or service, which is partition is part of, is already enabled for backup then this operation would override the policy being used to take the periodic backup of this partition. Note only C# based Reliable Actor and Reliable Stateful services are currently supported for periodic backup.

@param partition_id The identity of the partition. @param enable_backup_description [EnableBackupDescription] Specifies the parameters for enabling backup. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25054
def enable_partition_backup(partition_id, enable_backup_description, timeout:60, custom_headers:nil)
  response = enable_partition_backup_async(partition_id, enable_backup_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
enable_partition_backup_async(partition_id, enable_backup_description, timeout:60, custom_headers:nil) click to toggle source

Enables periodic backup of the stateful persisted partition.

Enables periodic backup of stateful persisted partition. Each partition is backed up as per the specified backup policy description. In case the application or service, which is partition is part of, is already enabled for backup then this operation would override the policy being used to take the periodic backup of this partition. Note only C# based Reliable Actor and Reliable Stateful services are currently supported for periodic backup.

@param partition_id The identity of the partition. @param enable_backup_description [EnableBackupDescription] Specifies the parameters for enabling backup. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25109
def enable_partition_backup_async(partition_id, enable_backup_description, timeout:60, custom_headers:nil)
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, 'enable_backup_description is nil' if enable_backup_description.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::EnableBackupDescription.mapper()
  request_content = self.serialize(request_mapper,  enable_backup_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Partitions/{partitionId}/$/EnableBackup'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
enable_partition_backup_with_http_info(partition_id, enable_backup_description, timeout:60, custom_headers:nil) click to toggle source

Enables periodic backup of the stateful persisted partition.

Enables periodic backup of stateful persisted partition. Each partition is backed up as per the specified backup policy description. In case the application or service, which is partition is part of, is already enabled for backup then this operation would override the policy being used to take the periodic backup of this partition. Note only C# based Reliable Actor and Reliable Stateful services are currently supported for periodic backup.

@param partition_id The identity of the partition. @param enable_backup_description [EnableBackupDescription] Specifies the parameters for enabling backup. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25082
def enable_partition_backup_with_http_info(partition_id, enable_backup_description, timeout:60, custom_headers:nil)
  enable_partition_backup_async(partition_id, enable_backup_description, timeout:timeout, custom_headers:custom_headers).value!
end
enable_service_backup(service_id, enable_backup_description, timeout:60, custom_headers:nil) click to toggle source

Enables periodic backup of stateful partitions under this Service Fabric service.

Enables periodic backup of stateful partitions which are part of this Service Fabric service. Each partition is backed up individually as per the specified backup policy description. In case the application, which the service is part of, is already enabled for backup then this operation would override the policy being used to take the periodic backup for this service and its partitions (unless explicitly overridden at the partition level). Note only C# based Reliable Actor and Reliable Stateful services are currently supported for periodic backup.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param enable_backup_description [EnableBackupDescription] Specifies the parameters for enabling backup. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 24143
def enable_service_backup(service_id, enable_backup_description, timeout:60, custom_headers:nil)
  response = enable_service_backup_async(service_id, enable_backup_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
enable_service_backup_async(service_id, enable_backup_description, timeout:60, custom_headers:nil) click to toggle source

Enables periodic backup of stateful partitions under this Service Fabric service.

Enables periodic backup of stateful partitions which are part of this Service Fabric service. Each partition is backed up individually as per the specified backup policy description. In case the application, which the service is part of, is already enabled for backup then this operation would override the policy being used to take the periodic backup for this service and its partitions (unless explicitly overridden at the partition level). Note only C# based Reliable Actor and Reliable Stateful services are currently supported for periodic backup.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param enable_backup_description [EnableBackupDescription] Specifies the parameters for enabling backup. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 24214
def enable_service_backup_async(service_id, enable_backup_description, timeout:60, custom_headers:nil)
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  fail ArgumentError, 'enable_backup_description is nil' if enable_backup_description.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::EnableBackupDescription.mapper()
  request_content = self.serialize(request_mapper,  enable_backup_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Services/{serviceId}/$/EnableBackup'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
enable_service_backup_with_http_info(service_id, enable_backup_description, timeout:60, custom_headers:nil) click to toggle source

Enables periodic backup of stateful partitions under this Service Fabric service.

Enables periodic backup of stateful partitions which are part of this Service Fabric service. Each partition is backed up individually as per the specified backup policy description. In case the application, which the service is part of, is already enabled for backup then this operation would override the policy being used to take the periodic backup for this service and its partitions (unless explicitly overridden at the partition level). Note only C# based Reliable Actor and Reliable Stateful services are currently supported for periodic backup.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param enable_backup_description [EnableBackupDescription] Specifies the parameters for enabling backup. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 24179
def enable_service_backup_with_http_info(service_id, enable_backup_description, timeout:60, custom_headers:nil)
  enable_service_backup_async(service_id, enable_backup_description, timeout:timeout, custom_headers:custom_headers).value!
end
force_approve_repair_task(repair_task_approve_description, custom_headers:nil) click to toggle source

Forces the approval of the given repair task.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param repair_task_approve_description [RepairTaskApproveDescription] Describes the repair task to be approved. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [RepairTaskUpdateInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14292
def force_approve_repair_task(repair_task_approve_description, custom_headers:nil)
  response = force_approve_repair_task_async(repair_task_approve_description, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
force_approve_repair_task_async(repair_task_approve_description, custom_headers:nil) click to toggle source

Forces the approval of the given repair task.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param repair_task_approve_description [RepairTaskApproveDescription] Describes the repair task to be approved. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14327
def force_approve_repair_task_async(repair_task_approve_description, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'repair_task_approve_description is nil' if repair_task_approve_description.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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::RepairTaskApproveDescription.mapper()
  request_content = self.serialize(request_mapper,  repair_task_approve_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '$/ForceApproveRepairTask'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::RepairTaskUpdateInfo.mapper()
        result.body = self.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
force_approve_repair_task_with_http_info(repair_task_approve_description, custom_headers:nil) click to toggle source

Forces the approval of the given repair task.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param repair_task_approve_description [RepairTaskApproveDescription] Describes the repair task to be approved. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14310
def force_approve_repair_task_with_http_info(repair_task_approve_description, custom_headers:nil)
  force_approve_repair_task_async(repair_task_approve_description, custom_headers:custom_headers).value!
end
get_aad_metadata(timeout:60, custom_headers:nil) click to toggle source

Gets the Azure Active Directory metadata used for secured connection to cluster.

Gets the Azure Active Directory metadata used for secured connection to cluster. This API is not supposed to be called separately. It provides information needed to set up an Azure Active Directory secured connection with a Service Fabric cluster.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [AadMetadataObject] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 3146
def get_aad_metadata(timeout:60, custom_headers:nil)
  response = get_aad_metadata_async(timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_aad_metadata_async(timeout:60, custom_headers:nil) click to toggle source

Gets the Azure Active Directory metadata used for secured connection to cluster.

Gets the Azure Active Directory metadata used for secured connection to cluster. This API is not supposed to be called separately. It provides information needed to set up an Azure Active Directory secured connection with a Service Fabric cluster.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 3193
def get_aad_metadata_async(timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = '$/GetAadMetadata'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::AadMetadataObject.mapper()
        result.body = self.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
get_aad_metadata_with_http_info(timeout:60, custom_headers:nil) click to toggle source

Gets the Azure Active Directory metadata used for secured connection to cluster.

Gets the Azure Active Directory metadata used for secured connection to cluster. This API is not supposed to be called separately. It provides information needed to set up an Azure Active Directory secured connection with a Service Fabric cluster.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 3170
def get_aad_metadata_with_http_info(timeout:60, custom_headers:nil)
  get_aad_metadata_async(timeout:timeout, custom_headers:custom_headers).value!
end
get_all_entities_backed_up_by_policy(backup_policy_name, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the list of backup entities that are associated with this policy.

Returns a list of Service Fabric application, service or partition which are associated with this backup policy.

@param backup_policy_name [String] The name of the backup policy. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PagedBackupEntityList] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22995
def get_all_entities_backed_up_by_policy(backup_policy_name, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  response = get_all_entities_backed_up_by_policy_async(backup_policy_name, continuation_token:continuation_token, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_all_entities_backed_up_by_policy_async(backup_policy_name, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the list of backup entities that are associated with this policy.

Returns a list of Service Fabric application, service or partition which are associated with this backup policy.

@param backup_policy_name [String] The name of the backup policy. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 23064
def get_all_entities_backed_up_by_policy_async(backup_policy_name, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  fail ArgumentError, 'backup_policy_name is nil' if backup_policy_name.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'max_results' should satisfy the constraint - 'InclusiveMinimum': '0'" if !max_results.nil? && max_results < 0
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'BackupRestore/BackupPolicies/{backupPolicyName}/$/GetBackupEnabledEntities'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'backupPolicyName' => backup_policy_name},
      query_params: {'api-version' => api_version,'MaxResults' => max_results,'timeout' => timeout},
      skip_encoding_query_params: {'ContinuationToken' => continuation_token},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PagedBackupEntityList.mapper()
        result.body = self.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
get_all_entities_backed_up_by_policy_with_http_info(backup_policy_name, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the list of backup entities that are associated with this policy.

Returns a list of Service Fabric application, service or partition which are associated with this backup policy.

@param backup_policy_name [String] The name of the backup policy. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 23030
def get_all_entities_backed_up_by_policy_with_http_info(backup_policy_name, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  get_all_entities_backed_up_by_policy_async(backup_policy_name, continuation_token:continuation_token, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value!
end
get_application_backup_configuration_info(application_id, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the Service Fabric application backup configuration information.

Gets the Service Fabric backup configuration information for the application and the services and partitions under this application.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PagedBackupConfigurationInfoList] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 23526
def get_application_backup_configuration_info(application_id, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  response = get_application_backup_configuration_info_async(application_id, continuation_token:continuation_token, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_application_backup_configuration_info_async(application_id, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the Service Fabric application backup configuration information.

Gets the Service Fabric backup configuration information for the application and the services and partitions under this application.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 23605
def get_application_backup_configuration_info_async(application_id, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'max_results' should satisfy the constraint - 'InclusiveMinimum': '0'" if !max_results.nil? && max_results < 0
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Applications/{applicationId}/$/GetBackupConfigurationInfo'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'MaxResults' => max_results,'timeout' => timeout},
      skip_encoding_query_params: {'ContinuationToken' => continuation_token},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PagedBackupConfigurationInfoList.mapper()
        result.body = self.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
get_application_backup_configuration_info_with_http_info(application_id, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the Service Fabric application backup configuration information.

Gets the Service Fabric backup configuration information for the application and the services and partitions under this application.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 23566
def get_application_backup_configuration_info_with_http_info(application_id, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  get_application_backup_configuration_info_async(application_id, continuation_token:continuation_token, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value!
end
get_application_backup_list(application_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, continuation_token:nil, max_results:0, custom_headers:nil) click to toggle source

Gets the list of backups available for every partition in this application.

Returns a list of backups available for every partition in this Service Fabric application. The server enumerates all the backups available at the backup location configured in the backup policy. It also allows filtering of the result based on start and end datetime or just fetching the latest available backup for every partition.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param latest [Boolean] Specifies whether to get only the most recent backup available for a partition for the specified time range. @param start_date_time_filter [DateTime] Specify the start date time from which to enumerate backups, in datetime format. The date time must be specified in ISO8601 format. This is an optional parameter. If not specified, all backups from the beginning are enumerated. @param end_date_time_filter [DateTime] Specify the end date time till which to enumerate backups, in datetime format. The date time must be specified in ISO8601 format. This is an optional parameter. If not specified, enumeration is done till the most recent backup. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PagedBackupInfoList] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 23710
def get_application_backup_list(application_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, continuation_token:nil, max_results:0, custom_headers:nil)
  response = get_application_backup_list_async(application_id, timeout:timeout, latest:latest, start_date_time_filter:start_date_time_filter, end_date_time_filter:end_date_time_filter, continuation_token:continuation_token, max_results:max_results, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_application_backup_list_async(application_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, continuation_token:nil, max_results:0, custom_headers:nil) click to toggle source

Gets the list of backups available for every partition in this application.

Returns a list of backups available for every partition in this Service Fabric application. The server enumerates all the backups available at the backup location configured in the backup policy. It also allows filtering of the result based on start and end datetime or just fetching the latest available backup for every partition.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param latest [Boolean] Specifies whether to get only the most recent backup available for a partition for the specified time range. @param start_date_time_filter [DateTime] Specify the start date time from which to enumerate backups, in datetime format. The date time must be specified in ISO8601 format. This is an optional parameter. If not specified, all backups from the beginning are enumerated. @param end_date_time_filter [DateTime] Specify the end date time till which to enumerate backups, in datetime format. The date time must be specified in ISO8601 format. This is an optional parameter. If not specified, enumeration is done till the most recent backup. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 23815
def get_application_backup_list_async(application_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, continuation_token:nil, max_results:0, custom_headers:nil)
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1
  fail ArgumentError, "'max_results' should satisfy the constraint - 'InclusiveMinimum': '0'" if !max_results.nil? && max_results < 0


  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'] = accept_language unless accept_language.nil?
  path_template = 'Applications/{applicationId}/$/GetBackups'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'timeout' => timeout,'Latest' => latest,'StartDateTimeFilter' => start_date_time_filter,'EndDateTimeFilter' => end_date_time_filter,'MaxResults' => max_results},
      skip_encoding_query_params: {'ContinuationToken' => continuation_token},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PagedBackupInfoList.mapper()
        result.body = self.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
get_application_backup_list_with_http_info(application_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, continuation_token:nil, max_results:0, custom_headers:nil) click to toggle source

Gets the list of backups available for every partition in this application.

Returns a list of backups available for every partition in this Service Fabric application. The server enumerates all the backups available at the backup location configured in the backup policy. It also allows filtering of the result based on start and end datetime or just fetching the latest available backup for every partition.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param latest [Boolean] Specifies whether to get only the most recent backup available for a partition for the specified time range. @param start_date_time_filter [DateTime] Specify the start date time from which to enumerate backups, in datetime format. The date time must be specified in ISO8601 format. This is an optional parameter. If not specified, all backups from the beginning are enumerated. @param end_date_time_filter [DateTime] Specify the end date time till which to enumerate backups, in datetime format. The date time must be specified in ISO8601 format. This is an optional parameter. If not specified, enumeration is done till the most recent backup. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 23763
def get_application_backup_list_with_http_info(application_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, continuation_token:nil, max_results:0, custom_headers:nil)
  get_application_backup_list_async(application_id, timeout:timeout, latest:latest, start_date_time_filter:start_date_time_filter, end_date_time_filter:end_date_time_filter, continuation_token:continuation_token, max_results:max_results, custom_headers:custom_headers).value!
end
get_application_event_list(application_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets an Application-related events.

The response is list of ApplicationEvent objects.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 28230
def get_application_event_list(application_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  response = get_application_event_list_async(application_id, start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_application_event_list_async(application_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets an Application-related events.

The response is list of ApplicationEvent objects.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 28305
def get_application_event_list_async(application_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  api_version = '6.2-preview'
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1
  fail ArgumentError, 'start_time_utc is nil' if start_time_utc.nil?
  fail ArgumentError, 'end_time_utc is nil' if end_time_utc.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'] = accept_language unless accept_language.nil?
  path_template = 'EventsStore/Applications/{applicationId}/$/Events'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'timeout' => timeout,'StartTimeUtc' => start_time_utc,'EndTimeUtc' => end_time_utc,'EventsTypesFilter' => events_types_filter,'ExcludeAnalysisEvents' => exclude_analysis_events,'SkipCorrelationLookup' => skip_correlation_lookup},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ApplicationEventElementType',
                type: {
                  name: 'Composite',
                  class_name: 'ApplicationEvent'
                }
            }
          }
        }
        result.body = self.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
get_application_event_list_with_http_info(application_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets an Application-related events.

The response is list of ApplicationEvent objects.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 28268
def get_application_event_list_with_http_info(application_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  get_application_event_list_async(application_id, start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
end
get_application_health(application_id, events_health_state_filter:0, deployed_applications_health_state_filter:0, services_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the health of the service fabric application.

Returns the heath state of the service fabric application. The response reports either Ok, Error or Warning health state. If the entity is not found in the health store, it will return Error.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param deployed_applications_health_state_filter [Integer] Allows filtering of the deployed applications health state objects returned in the result of application health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only deployed applications that match the filter will be returned. All deployed applications are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of deployed applications with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param services_health_state_filter [Integer] Allows filtering of the services health state objects returned in the result of services health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only services that match the filter are returned. All services are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of services with HealthState value of OK (2) and Warning (4) will be returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ApplicationHealth] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 6972
def get_application_health(application_id, events_health_state_filter:0, deployed_applications_health_state_filter:0, services_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil)
  response = get_application_health_async(application_id, events_health_state_filter:events_health_state_filter, deployed_applications_health_state_filter:deployed_applications_health_state_filter, services_health_state_filter:services_health_state_filter, exclude_health_statistics:exclude_health_statistics, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_application_health_async(application_id, events_health_state_filter:0, deployed_applications_health_state_filter:0, services_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the health of the service fabric application.

Returns the heath state of the service fabric application. The response reports either Ok, Error or Warning health state. If the entity is not found in the health store, it will return Error.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param deployed_applications_health_state_filter [Integer] Allows filtering of the deployed applications health state objects returned in the result of application health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only deployed applications that match the filter will be returned. All deployed applications are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of deployed applications with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param services_health_state_filter [Integer] Allows filtering of the services health state objects returned in the result of services health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only services that match the filter are returned. All services are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of services with HealthState value of OK (2) and Warning (4) will be returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 7167
def get_application_health_async(application_id, events_health_state_filter:0, deployed_applications_health_state_filter:0, services_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil)
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Applications/{applicationId}/$/GetHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'EventsHealthStateFilter' => events_health_state_filter,'DeployedApplicationsHealthStateFilter' => deployed_applications_health_state_filter,'ServicesHealthStateFilter' => services_health_state_filter,'ExcludeHealthStatistics' => exclude_health_statistics,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ApplicationHealth.mapper()
        result.body = self.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
get_application_health_using_policy(application_id, events_health_state_filter:0, deployed_applications_health_state_filter:0, services_health_state_filter:0, exclude_health_statistics:false, application_health_policy:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric application using the specified policy.

Gets the health of a Service Fabric application. Use EventsHealthStateFilter to filter the collection of health events reported on the node based on the health state. Use ClusterHealthPolicies to override the health policies used to evaluate the health.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param deployed_applications_health_state_filter [Integer] Allows filtering of the deployed applications health state objects returned in the result of application health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only deployed applications that match the filter will be returned. All deployed applications are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of deployed applications with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param services_health_state_filter [Integer] Allows filtering of the services health state objects returned in the result of services health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only services that match the filter are returned. All services are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of services with HealthState value of OK (2) and Warning (4) will be returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param application_health_policy [ApplicationHealthPolicy] Describes the health policies used to evaluate the health of an application or one of its children. If not present, the health evaluation uses the health policy from application manifest or the default health policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ApplicationHealth] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 7321
def get_application_health_using_policy(application_id, events_health_state_filter:0, deployed_applications_health_state_filter:0, services_health_state_filter:0, exclude_health_statistics:false, application_health_policy:nil, timeout:60, custom_headers:nil)
  response = get_application_health_using_policy_async(application_id, events_health_state_filter:events_health_state_filter, deployed_applications_health_state_filter:deployed_applications_health_state_filter, services_health_state_filter:services_health_state_filter, exclude_health_statistics:exclude_health_statistics, application_health_policy:application_health_policy, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_application_health_using_policy_async(application_id, events_health_state_filter:0, deployed_applications_health_state_filter:0, services_health_state_filter:0, exclude_health_statistics:false, application_health_policy:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric application using the specified policy.

Gets the health of a Service Fabric application. Use EventsHealthStateFilter to filter the collection of health events reported on the node based on the health state. Use ClusterHealthPolicies to override the health policies used to evaluate the health.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param deployed_applications_health_state_filter [Integer] Allows filtering of the deployed applications health state objects returned in the result of application health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only deployed applications that match the filter will be returned. All deployed applications are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of deployed applications with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param services_health_state_filter [Integer] Allows filtering of the services health state objects returned in the result of services health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only services that match the filter are returned. All services are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of services with HealthState value of OK (2) and Warning (4) will be returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param application_health_policy [ApplicationHealthPolicy] Describes the health policies used to evaluate the health of an application or one of its children. If not present, the health evaluation uses the health policy from application manifest or the default health policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 7528
def get_application_health_using_policy_async(application_id, events_health_state_filter:0, deployed_applications_health_state_filter:0, services_health_state_filter:0, exclude_health_statistics:false, application_health_policy:nil, timeout:60, custom_headers:nil)
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ApplicationHealthPolicy.mapper()
  request_content = self.serialize(request_mapper,  application_health_policy)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Applications/{applicationId}/$/GetHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'EventsHealthStateFilter' => events_health_state_filter,'DeployedApplicationsHealthStateFilter' => deployed_applications_health_state_filter,'ServicesHealthStateFilter' => services_health_state_filter,'ExcludeHealthStatistics' => exclude_health_statistics,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ApplicationHealth.mapper()
        result.body = self.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
get_application_health_using_policy_with_http_info(application_id, events_health_state_filter:0, deployed_applications_health_state_filter:0, services_health_state_filter:0, exclude_health_statistics:false, application_health_policy:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric application using the specified policy.

Gets the health of a Service Fabric application. Use EventsHealthStateFilter to filter the collection of health events reported on the node based on the health state. Use ClusterHealthPolicies to override the health policies used to evaluate the health.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param deployed_applications_health_state_filter [Integer] Allows filtering of the deployed applications health state objects returned in the result of application health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only deployed applications that match the filter will be returned. All deployed applications are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of deployed applications with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param services_health_state_filter [Integer] Allows filtering of the services health state objects returned in the result of services health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only services that match the filter are returned. All services are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of services with HealthState value of OK (2) and Warning (4) will be returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param application_health_policy [ApplicationHealthPolicy] Describes the health policies used to evaluate the health of an application or one of its children. If not present, the health evaluation uses the health policy from application manifest or the default health policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 7425
def get_application_health_using_policy_with_http_info(application_id, events_health_state_filter:0, deployed_applications_health_state_filter:0, services_health_state_filter:0, exclude_health_statistics:false, application_health_policy:nil, timeout:60, custom_headers:nil)
  get_application_health_using_policy_async(application_id, events_health_state_filter:events_health_state_filter, deployed_applications_health_state_filter:deployed_applications_health_state_filter, services_health_state_filter:services_health_state_filter, exclude_health_statistics:exclude_health_statistics, application_health_policy:application_health_policy, timeout:timeout, custom_headers:custom_headers).value!
end
get_application_health_with_http_info(application_id, events_health_state_filter:0, deployed_applications_health_state_filter:0, services_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the health of the service fabric application.

Returns the heath state of the service fabric application. The response reports either Ok, Error or Warning health state. If the entity is not found in the health store, it will return Error.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param deployed_applications_health_state_filter [Integer] Allows filtering of the deployed applications health state objects returned in the result of application health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only deployed applications that match the filter will be returned. All deployed applications are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of deployed applications with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param services_health_state_filter [Integer] Allows filtering of the services health state objects returned in the result of services health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only services that match the filter are returned. All services are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of services with HealthState value of OK (2) and Warning (4) will be returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 7070
def get_application_health_with_http_info(application_id, events_health_state_filter:0, deployed_applications_health_state_filter:0, services_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil)
  get_application_health_async(application_id, events_health_state_filter:events_health_state_filter, deployed_applications_health_state_filter:deployed_applications_health_state_filter, services_health_state_filter:services_health_state_filter, exclude_health_statistics:exclude_health_statistics, timeout:timeout, custom_headers:custom_headers).value!
end
get_application_info(application_id, exclude_application_parameters:false, timeout:60, custom_headers:nil) click to toggle source

Gets information about a Service Fabric application.

Returns the information about the application that was created or in the process of being created in the Service Fabric cluster and whose name matches the one specified as the parameter. The response includes the name, type, status, parameters and other details about the application.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param exclude_application_parameters [Boolean] The flag that specifies whether application parameters will be excluded from the result. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ApplicationInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 6765
def get_application_info(application_id, exclude_application_parameters:false, timeout:60, custom_headers:nil)
  response = get_application_info_async(application_id, exclude_application_parameters:exclude_application_parameters, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_application_info_async(application_id, exclude_application_parameters:false, timeout:60, custom_headers:nil) click to toggle source

Gets information about a Service Fabric application.

Returns the information about the application that was created or in the process of being created in the Service Fabric cluster and whose name matches the one specified as the parameter. The response includes the name, type, status, parameters and other details about the application.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param exclude_application_parameters [Boolean] The flag that specifies whether application parameters will be excluded from the result. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 6824
def get_application_info_async(application_id, exclude_application_parameters:false, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Applications/{applicationId}'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'ExcludeApplicationParameters' => exclude_application_parameters,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ApplicationInfo.mapper()
        result.body = self.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
get_application_info_list(application_definition_kind_filter:0, application_type_name:nil, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the list of applications created in the Service Fabric cluster that match the specified filters.

Gets the information about the applications that were created or in the process of being created in the Service Fabric cluster and match the specified filters. The response includes the name, type, status, parameters, and other details about the application. If the applications do not fit in a page, one page of results is returned as well as a continuation token which can be used to get the next page. Filters ApplicationTypeName and ApplicationDefinitionKindFilter cannot be specified at the same time.

@param application_definition_kind_filter [Integer] Used to filter on ApplicationDefinitionKind which is the mechanism used to define a Service Fabric application.

  • Default - Default value, which performs the same function as selecting

“All”. The value is 0.

  • All - Filter that matches input with any ApplicationDefinitionKind value.

The value is 65535.

  • ServiceFabricApplicationDescription - Filter that matches input with

ApplicationDefinitionKind value ServiceFabricApplicationDescription. The value is 1.

  • Compose - Filter that matches input with ApplicationDefinitionKind value

Compose. The value is 2. @param application_type_name [String] The application type name used to filter the applications to query for. This value should not contain the application type version. @param exclude_application_parameters [Boolean] The flag that specifies whether application parameters will be excluded from the result. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PagedApplicationInfoList] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 6572
def get_application_info_list(application_definition_kind_filter:0, application_type_name:nil, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  response = get_application_info_list_async(application_definition_kind_filter:application_definition_kind_filter, application_type_name:application_type_name, exclude_application_parameters:exclude_application_parameters, continuation_token:continuation_token, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_application_info_list_async(application_definition_kind_filter:0, application_type_name:nil, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the list of applications created in the Service Fabric cluster that match the specified filters.

Gets the information about the applications that were created or in the process of being created in the Service Fabric cluster and match the specified filters. The response includes the name, type, status, parameters, and other details about the application. If the applications do not fit in a page, one page of results is returned as well as a continuation token which can be used to get the next page. Filters ApplicationTypeName and ApplicationDefinitionKindFilter cannot be specified at the same time.

@param application_definition_kind_filter [Integer] Used to filter on ApplicationDefinitionKind which is the mechanism used to define a Service Fabric application.

  • Default - Default value, which performs the same function as selecting

“All”. The value is 0.

  • All - Filter that matches input with any ApplicationDefinitionKind value.

The value is 65535.

  • ServiceFabricApplicationDescription - Filter that matches input with

ApplicationDefinitionKind value ServiceFabricApplicationDescription. The value is 1.

  • Compose - Filter that matches input with ApplicationDefinitionKind value

Compose. The value is 2. @param application_type_name [String] The application type name used to filter the applications to query for. This value should not contain the application type version. @param exclude_application_parameters [Boolean] The flag that specifies whether application parameters will be excluded from the result. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 6685
def get_application_info_list_async(application_definition_kind_filter:0, application_type_name:nil, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  api_version = '6.1'
  fail ArgumentError, "'max_results' should satisfy the constraint - 'InclusiveMinimum': '0'" if !max_results.nil? && max_results < 0
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Applications'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'ApplicationDefinitionKindFilter' => application_definition_kind_filter,'ApplicationTypeName' => application_type_name,'ExcludeApplicationParameters' => exclude_application_parameters,'MaxResults' => max_results,'timeout' => timeout},
      skip_encoding_query_params: {'ContinuationToken' => continuation_token},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PagedApplicationInfoList.mapper()
        result.body = self.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
get_application_info_list_with_http_info(application_definition_kind_filter:0, application_type_name:nil, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the list of applications created in the Service Fabric cluster that match the specified filters.

Gets the information about the applications that were created or in the process of being created in the Service Fabric cluster and match the specified filters. The response includes the name, type, status, parameters, and other details about the application. If the applications do not fit in a page, one page of results is returned as well as a continuation token which can be used to get the next page. Filters ApplicationTypeName and ApplicationDefinitionKindFilter cannot be specified at the same time.

@param application_definition_kind_filter [Integer] Used to filter on ApplicationDefinitionKind which is the mechanism used to define a Service Fabric application.

  • Default - Default value, which performs the same function as selecting

“All”. The value is 0.

  • All - Filter that matches input with any ApplicationDefinitionKind value.

The value is 65535.

  • ServiceFabricApplicationDescription - Filter that matches input with

ApplicationDefinitionKind value ServiceFabricApplicationDescription. The value is 1.

  • Compose - Filter that matches input with ApplicationDefinitionKind value

Compose. The value is 2. @param application_type_name [String] The application type name used to filter the applications to query for. This value should not contain the application type version. @param exclude_application_parameters [Boolean] The flag that specifies whether application parameters will be excluded from the result. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 6629
def get_application_info_list_with_http_info(application_definition_kind_filter:0, application_type_name:nil, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  get_application_info_list_async(application_definition_kind_filter:application_definition_kind_filter, application_type_name:application_type_name, exclude_application_parameters:exclude_application_parameters, continuation_token:continuation_token, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value!
end
get_application_info_with_http_info(application_id, exclude_application_parameters:false, timeout:60, custom_headers:nil) click to toggle source

Gets information about a Service Fabric application.

Returns the information about the application that was created or in the process of being created in the Service Fabric cluster and whose name matches the one specified as the parameter. The response includes the name, type, status, parameters and other details about the application.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param exclude_application_parameters [Boolean] The flag that specifies whether application parameters will be excluded from the result. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 6795
def get_application_info_with_http_info(application_id, exclude_application_parameters:false, timeout:60, custom_headers:nil)
  get_application_info_async(application_id, exclude_application_parameters:exclude_application_parameters, timeout:timeout, custom_headers:custom_headers).value!
end
get_application_load_info(application_id, timeout:60, custom_headers:nil) click to toggle source

Gets load information about a Service Fabric application.

Returns the load information about the application that was created or in the process of being created in the Service Fabric cluster and whose name matches the one specified as the parameter. The response includes the name, minimum nodes, maximum nodes, the number of nodes the application is occupying currently, and application load metric information about the application.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ApplicationLoadInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 6408
def get_application_load_info(application_id, timeout:60, custom_headers:nil)
  response = get_application_load_info_async(application_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_application_load_info_async(application_id, timeout:60, custom_headers:nil) click to toggle source

Gets load information about a Service Fabric application.

Returns the load information about the application that was created or in the process of being created in the Service Fabric cluster and whose name matches the one specified as the parameter. The response includes the name, minimum nodes, maximum nodes, the number of nodes the application is occupying currently, and application load metric information about the application.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 6465
def get_application_load_info_async(application_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Applications/{applicationId}/$/GetLoadInformation'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ApplicationLoadInfo.mapper()
        result.body = self.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
get_application_load_info_with_http_info(application_id, timeout:60, custom_headers:nil) click to toggle source

Gets load information about a Service Fabric application.

Returns the load information about the application that was created or in the process of being created in the Service Fabric cluster and whose name matches the one specified as the parameter. The response includes the name, minimum nodes, maximum nodes, the number of nodes the application is occupying currently, and application load metric information about the application.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 6437
def get_application_load_info_with_http_info(application_id, timeout:60, custom_headers:nil)
  get_application_load_info_async(application_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_application_manifest(application_type_name, application_type_version, timeout:60, custom_headers:nil) click to toggle source

Gets the manifest describing an application type.

Gets the manifest describing an application type. The response contains the application manifest XML as a string.

@param application_type_name [String] The name of the application type. @param application_type_version [String] The version of the application type. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ApplicationTypeManifest] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 9679
def get_application_manifest(application_type_name, application_type_version, timeout:60, custom_headers:nil)
  response = get_application_manifest_async(application_type_name, application_type_version, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_application_manifest_async(application_type_name, application_type_version, timeout:60, custom_headers:nil) click to toggle source

Gets the manifest describing an application type.

Gets the manifest describing an application type. The response contains the application manifest XML as a string.

@param application_type_name [String] The name of the application type. @param application_type_version [String] The version of the application type. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 9722
def get_application_manifest_async(application_type_name, application_type_version, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'application_type_name is nil' if application_type_name.nil?
  fail ArgumentError, 'application_type_version is nil' if application_type_version.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'ApplicationTypes/{applicationTypeName}/$/GetApplicationManifest'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'applicationTypeName' => application_type_name},
      query_params: {'api-version' => api_version,'ApplicationTypeVersion' => application_type_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ApplicationTypeManifest.mapper()
        result.body = self.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
get_application_manifest_with_http_info(application_type_name, application_type_version, timeout:60, custom_headers:nil) click to toggle source

Gets the manifest describing an application type.

Gets the manifest describing an application type. The response contains the application manifest XML as a string.

@param application_type_name [String] The name of the application type. @param application_type_version [String] The version of the application type. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 9701
def get_application_manifest_with_http_info(application_type_name, application_type_version, timeout:60, custom_headers:nil)
  get_application_manifest_async(application_type_name, application_type_version, timeout:timeout, custom_headers:custom_headers).value!
end
get_application_name_info(service_id, timeout:60, custom_headers:nil) click to toggle source

Gets the name of the Service Fabric application for a service.

Gets the name of the application for the specified service. A 404 FABRIC_E_SERVICE_DOES_NOT_EXIST error is returned if a service with the provided service ID does not exist.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ApplicationNameInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 10111
def get_application_name_info(service_id, timeout:60, custom_headers:nil)
  response = get_application_name_info_async(service_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_application_name_info_async(service_id, timeout:60, custom_headers:nil) click to toggle source

Gets the name of the Service Fabric application for a service.

Gets the name of the application for the specified service. A 404 FABRIC_E_SERVICE_DOES_NOT_EXIST error is returned if a service with the provided service ID does not exist.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 10166
def get_application_name_info_async(service_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Services/{serviceId}/$/GetApplicationName'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ApplicationNameInfo.mapper()
        result.body = self.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
get_application_name_info_with_http_info(service_id, timeout:60, custom_headers:nil) click to toggle source

Gets the name of the Service Fabric application for a service.

Gets the name of the application for the specified service. A 404 FABRIC_E_SERVICE_DOES_NOT_EXIST error is returned if a service with the provided service ID does not exist.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 10139
def get_application_name_info_with_http_info(service_id, timeout:60, custom_headers:nil)
  get_application_name_info_async(service_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_application_type_info_list(application_type_definition_kind_filter:0, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the list of application types in the Service Fabric cluster.

Returns the information about the application types that are provisioned or in the process of being provisioned in the Service Fabric cluster. Each version of an application type is returned as one application type. The response includes the name, version, status and other details about the application type. This is a paged query, meaning that if not all of the application types fit in a page, one page of results is returned as well as a continuation token which can be used to get the next page. For example, if there are 10 application types but a page only fits the first 3 application types, or if max results is set to 3, then 3 is returned. To access the rest of the results, retrieve subsequent pages by using the returned continuation token in the next query. An empty continuation token is returned if there are no subsequent pages.

@param application_type_definition_kind_filter [Integer] Used to filter on ApplicationTypeDefinitionKind which is the mechanism used to define a Service Fabric application type.

  • Default - Default value, which performs the same function as selecting

“All”. The value is 0.

  • All - Filter that matches input with any ApplicationTypeDefinitionKind

value. The value is 65535.

  • ServiceFabricApplicationPackage - Filter that matches input with

ApplicationTypeDefinitionKind value ServiceFabricApplicationPackage. The value is 1.

  • Compose - Filter that matches input with ApplicationTypeDefinitionKind

value Compose. The value is 2. @param exclude_application_parameters [Boolean] The flag that specifies whether application parameters will be excluded from the result. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PagedApplicationTypeInfoList] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 4742
def get_application_type_info_list(application_type_definition_kind_filter:0, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  response = get_application_type_info_list_async(application_type_definition_kind_filter:application_type_definition_kind_filter, exclude_application_parameters:exclude_application_parameters, continuation_token:continuation_token, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_application_type_info_list_async(application_type_definition_kind_filter:0, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the list of application types in the Service Fabric cluster.

Returns the information about the application types that are provisioned or in the process of being provisioned in the Service Fabric cluster. Each version of an application type is returned as one application type. The response includes the name, version, status and other details about the application type. This is a paged query, meaning that if not all of the application types fit in a page, one page of results is returned as well as a continuation token which can be used to get the next page. For example, if there are 10 application types but a page only fits the first 3 application types, or if max results is set to 3, then 3 is returned. To access the rest of the results, retrieve subsequent pages by using the returned continuation token in the next query. An empty continuation token is returned if there are no subsequent pages.

@param application_type_definition_kind_filter [Integer] Used to filter on ApplicationTypeDefinitionKind which is the mechanism used to define a Service Fabric application type.

  • Default - Default value, which performs the same function as selecting

“All”. The value is 0.

  • All - Filter that matches input with any ApplicationTypeDefinitionKind

value. The value is 65535.

  • ServiceFabricApplicationPackage - Filter that matches input with

ApplicationTypeDefinitionKind value ServiceFabricApplicationPackage. The value is 1.

  • Compose - Filter that matches input with ApplicationTypeDefinitionKind

value Compose. The value is 2. @param exclude_application_parameters [Boolean] The flag that specifies whether application parameters will be excluded from the result. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 4857
def get_application_type_info_list_async(application_type_definition_kind_filter:0, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, "'max_results' should satisfy the constraint - 'InclusiveMinimum': '0'" if !max_results.nil? && max_results < 0
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'ApplicationTypes'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'ApplicationTypeDefinitionKindFilter' => application_type_definition_kind_filter,'ExcludeApplicationParameters' => exclude_application_parameters,'MaxResults' => max_results,'timeout' => timeout},
      skip_encoding_query_params: {'ContinuationToken' => continuation_token},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PagedApplicationTypeInfoList.mapper()
        result.body = self.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
get_application_type_info_list_by_name(application_type_name, application_type_version:nil, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the list of application types in the Service Fabric cluster matching exactly the specified name.

Returns the information about the application types that are provisioned or in the process of being provisioned in the Service Fabric cluster. These results are of application types whose name match exactly the one specified as the parameter, and which comply with the given query parameters. All versions of the application type matching the application type name are returned, with each version returned as one application type. The response includes the name, version, status and other details about the application type. This is a paged query, meaning that if not all of the application types fit in a page, one page of results is returned as well as a continuation token which can be used to get the next page. For example, if there are 10 application types but a page only fits the first 3 application types, or if max results is set to 3, then 3 is returned. To access the rest of the results, retrieve subsequent pages by using the returned continuation token in the next query. An empty continuation token is returned if there are no subsequent pages.

@param application_type_name [String] The name of the application type. @param application_type_version [String] The version of the application type. @param exclude_application_parameters [Boolean] The flag that specifies whether application parameters will be excluded from the result. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PagedApplicationTypeInfoList] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 4959
def get_application_type_info_list_by_name(application_type_name, application_type_version:nil, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  response = get_application_type_info_list_by_name_async(application_type_name, application_type_version:application_type_version, exclude_application_parameters:exclude_application_parameters, continuation_token:continuation_token, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_application_type_info_list_by_name_async(application_type_name, application_type_version:nil, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the list of application types in the Service Fabric cluster matching exactly the specified name.

Returns the information about the application types that are provisioned or in the process of being provisioned in the Service Fabric cluster. These results are of application types whose name match exactly the one specified as the parameter, and which comply with the given query parameters. All versions of the application type matching the application type name are returned, with each version returned as one application type. The response includes the name, version, status and other details about the application type. This is a paged query, meaning that if not all of the application types fit in a page, one page of results is returned as well as a continuation token which can be used to get the next page. For example, if there are 10 application types but a page only fits the first 3 application types, or if max results is set to 3, then 3 is returned. To access the rest of the results, retrieve subsequent pages by using the returned continuation token in the next query. An empty continuation token is returned if there are no subsequent pages.

@param application_type_name [String] The name of the application type. @param application_type_version [String] The version of the application type. @param exclude_application_parameters [Boolean] The flag that specifies whether application parameters will be excluded from the result. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 5062
def get_application_type_info_list_by_name_async(application_type_name, application_type_version:nil, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'application_type_name is nil' if application_type_name.nil?
  fail ArgumentError, "'max_results' should satisfy the constraint - 'InclusiveMinimum': '0'" if !max_results.nil? && max_results < 0
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'ApplicationTypes/{applicationTypeName}'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'applicationTypeName' => application_type_name},
      query_params: {'api-version' => api_version,'ApplicationTypeVersion' => application_type_version,'ExcludeApplicationParameters' => exclude_application_parameters,'MaxResults' => max_results,'timeout' => timeout},
      skip_encoding_query_params: {'ContinuationToken' => continuation_token},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PagedApplicationTypeInfoList.mapper()
        result.body = self.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
get_application_type_info_list_by_name_with_http_info(application_type_name, application_type_version:nil, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the list of application types in the Service Fabric cluster matching exactly the specified name.

Returns the information about the application types that are provisioned or in the process of being provisioned in the Service Fabric cluster. These results are of application types whose name match exactly the one specified as the parameter, and which comply with the given query parameters. All versions of the application type matching the application type name are returned, with each version returned as one application type. The response includes the name, version, status and other details about the application type. This is a paged query, meaning that if not all of the application types fit in a page, one page of results is returned as well as a continuation token which can be used to get the next page. For example, if there are 10 application types but a page only fits the first 3 application types, or if max results is set to 3, then 3 is returned. To access the rest of the results, retrieve subsequent pages by using the returned continuation token in the next query. An empty continuation token is returned if there are no subsequent pages.

@param application_type_name [String] The name of the application type. @param application_type_version [String] The version of the application type. @param exclude_application_parameters [Boolean] The flag that specifies whether application parameters will be excluded from the result. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 5011
def get_application_type_info_list_by_name_with_http_info(application_type_name, application_type_version:nil, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  get_application_type_info_list_by_name_async(application_type_name, application_type_version:application_type_version, exclude_application_parameters:exclude_application_parameters, continuation_token:continuation_token, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value!
end
get_application_type_info_list_with_http_info(application_type_definition_kind_filter:0, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the list of application types in the Service Fabric cluster.

Returns the information about the application types that are provisioned or in the process of being provisioned in the Service Fabric cluster. Each version of an application type is returned as one application type. The response includes the name, version, status and other details about the application type. This is a paged query, meaning that if not all of the application types fit in a page, one page of results is returned as well as a continuation token which can be used to get the next page. For example, if there are 10 application types but a page only fits the first 3 application types, or if max results is set to 3, then 3 is returned. To access the rest of the results, retrieve subsequent pages by using the returned continuation token in the next query. An empty continuation token is returned if there are no subsequent pages.

@param application_type_definition_kind_filter [Integer] Used to filter on ApplicationTypeDefinitionKind which is the mechanism used to define a Service Fabric application type.

  • Default - Default value, which performs the same function as selecting

“All”. The value is 0.

  • All - Filter that matches input with any ApplicationTypeDefinitionKind

value. The value is 65535.

  • ServiceFabricApplicationPackage - Filter that matches input with

ApplicationTypeDefinitionKind value ServiceFabricApplicationPackage. The value is 1.

  • Compose - Filter that matches input with ApplicationTypeDefinitionKind

value Compose. The value is 2. @param exclude_application_parameters [Boolean] The flag that specifies whether application parameters will be excluded from the result. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 4800
def get_application_type_info_list_with_http_info(application_type_definition_kind_filter:0, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  get_application_type_info_list_async(application_type_definition_kind_filter:application_type_definition_kind_filter, exclude_application_parameters:exclude_application_parameters, continuation_token:continuation_token, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value!
end
get_application_upgrade(application_id, timeout:60, custom_headers:nil) click to toggle source

Gets details for the latest upgrade performed on this application.

Returns information about the state of the latest application upgrade along with details to aid debugging application health issues.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ApplicationUpgradeProgressInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 7955
def get_application_upgrade(application_id, timeout:60, custom_headers:nil)
  response = get_application_upgrade_async(application_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_application_upgrade_async(application_id, timeout:60, custom_headers:nil) click to toggle source

Gets details for the latest upgrade performed on this application.

Returns information about the state of the latest application upgrade along with details to aid debugging application health issues.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 8006
def get_application_upgrade_async(application_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Applications/{applicationId}/$/GetUpgradeProgress'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ApplicationUpgradeProgressInfo.mapper()
        result.body = self.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
get_application_upgrade_with_http_info(application_id, timeout:60, custom_headers:nil) click to toggle source

Gets details for the latest upgrade performed on this application.

Returns information about the state of the latest application upgrade along with details to aid debugging application health issues.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 7981
def get_application_upgrade_with_http_info(application_id, timeout:60, custom_headers:nil)
  get_application_upgrade_async(application_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_applications_event_list(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets all Applications-related events.

The response is list of ApplicationEvent objects.

@param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 28405
def get_applications_event_list(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  response = get_applications_event_list_async(start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_applications_event_list_async(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets all Applications-related events.

The response is list of ApplicationEvent objects.

@param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 28468
def get_applications_event_list_async(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1
  fail ArgumentError, 'start_time_utc is nil' if start_time_utc.nil?
  fail ArgumentError, 'end_time_utc is nil' if end_time_utc.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'] = accept_language unless accept_language.nil?
  path_template = 'EventsStore/Applications/Events'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout,'StartTimeUtc' => start_time_utc,'EndTimeUtc' => end_time_utc,'EventsTypesFilter' => events_types_filter,'ExcludeAnalysisEvents' => exclude_analysis_events,'SkipCorrelationLookup' => skip_correlation_lookup},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ApplicationEventElementType',
                type: {
                  name: 'Composite',
                  class_name: 'ApplicationEvent'
                }
            }
          }
        }
        result.body = self.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
get_applications_event_list_with_http_info(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets all Applications-related events.

The response is list of ApplicationEvent objects.

@param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 28437
def get_applications_event_list_with_http_info(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  get_applications_event_list_async(start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
end
get_backup_policy_by_name(backup_policy_name, timeout:60, custom_headers:nil) click to toggle source

Gets a particular backup policy by name.

Gets a particular backup policy identified by {backupPolicyName}

@param backup_policy_name [String] The name of the backup policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [BackupPolicyDescription] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22871
def get_backup_policy_by_name(backup_policy_name, timeout:60, custom_headers:nil)
  response = get_backup_policy_by_name_async(backup_policy_name, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_backup_policy_by_name_async(backup_policy_name, timeout:60, custom_headers:nil) click to toggle source

Gets a particular backup policy by name.

Gets a particular backup policy identified by {backupPolicyName}

@param backup_policy_name [String] The name of the backup policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22910
def get_backup_policy_by_name_async(backup_policy_name, timeout:60, custom_headers:nil)
  fail ArgumentError, 'backup_policy_name is nil' if backup_policy_name.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'BackupRestore/BackupPolicies/{backupPolicyName}'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'backupPolicyName' => backup_policy_name},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::BackupPolicyDescription.mapper()
        result.body = self.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
get_backup_policy_by_name_with_http_info(backup_policy_name, timeout:60, custom_headers:nil) click to toggle source

Gets a particular backup policy by name.

Gets a particular backup policy identified by {backupPolicyName}

@param backup_policy_name [String] The name of the backup policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22891
def get_backup_policy_by_name_with_http_info(backup_policy_name, timeout:60, custom_headers:nil)
  get_backup_policy_by_name_async(backup_policy_name, timeout:timeout, custom_headers:custom_headers).value!
end
get_backup_policy_list(continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets all the backup policies configured.

Get a list of all the backup policies configured.

@param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PagedBackupPolicyDescriptionList] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22736
def get_backup_policy_list(continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  response = get_backup_policy_list_async(continuation_token:continuation_token, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_backup_policy_list_async(continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets all the backup policies configured.

Get a list of all the backup policies configured.

@param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22801
def get_backup_policy_list_async(continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  api_version = '6.2-preview'
  fail ArgumentError, "'max_results' should satisfy the constraint - 'InclusiveMinimum': '0'" if !max_results.nil? && max_results < 0
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'BackupRestore/BackupPolicies'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'MaxResults' => max_results,'timeout' => timeout},
      skip_encoding_query_params: {'ContinuationToken' => continuation_token},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PagedBackupPolicyDescriptionList.mapper()
        result.body = self.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
get_backup_policy_list_with_http_info(continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets all the backup policies configured.

Get a list of all the backup policies configured.

@param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22769
def get_backup_policy_list_with_http_info(continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  get_backup_policy_list_async(continuation_token:continuation_token, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value!
end
get_backups_from_backup_location(get_backup_by_storage_query_description, timeout:60, continuation_token:nil, max_results:0, custom_headers:nil) click to toggle source

Gets the list of backups available for the specified backed up entity at the specified backup location.

Gets the list of backups available for the specified backed up entity (Application, Service or Partition) at the specified backup location (FileShare or Azure Blob Storage).

@param get_backup_by_storage_query_description

GetBackupByStorageQueryDescription

Describes the filters and backup storage

details to be used for enumerating backups. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PagedBackupInfoList] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26314
def get_backups_from_backup_location(get_backup_by_storage_query_description, timeout:60, continuation_token:nil, max_results:0, custom_headers:nil)
  response = get_backups_from_backup_location_async(get_backup_by_storage_query_description, timeout:timeout, continuation_token:continuation_token, max_results:max_results, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_backups_from_backup_location_async(get_backup_by_storage_query_description, timeout:60, continuation_token:nil, max_results:0, custom_headers:nil) click to toggle source

Gets the list of backups available for the specified backed up entity at the specified backup location.

Gets the list of backups available for the specified backed up entity (Application, Service or Partition) at the specified backup location (FileShare or Azure Blob Storage).

@param get_backup_by_storage_query_description

GetBackupByStorageQueryDescription

Describes the filters and backup storage

details to be used for enumerating backups. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26391
def get_backups_from_backup_location_async(get_backup_by_storage_query_description, timeout:60, continuation_token:nil, max_results:0, custom_headers:nil)
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1
  fail ArgumentError, "'max_results' should satisfy the constraint - 'InclusiveMinimum': '0'" if !max_results.nil? && max_results < 0
  fail ArgumentError, 'get_backup_by_storage_query_description is nil' if get_backup_by_storage_query_description.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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::GetBackupByStorageQueryDescription.mapper()
  request_content = self.serialize(request_mapper,  get_backup_by_storage_query_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'BackupRestore/$/GetBackups'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout,'MaxResults' => max_results},
      skip_encoding_query_params: {'ContinuationToken' => continuation_token},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PagedBackupInfoList.mapper()
        result.body = self.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
get_backups_from_backup_location_with_http_info(get_backup_by_storage_query_description, timeout:60, continuation_token:nil, max_results:0, custom_headers:nil) click to toggle source

Gets the list of backups available for the specified backed up entity at the specified backup location.

Gets the list of backups available for the specified backed up entity (Application, Service or Partition) at the specified backup location (FileShare or Azure Blob Storage).

@param get_backup_by_storage_query_description

GetBackupByStorageQueryDescription

Describes the filters and backup storage

details to be used for enumerating backups. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26353
def get_backups_from_backup_location_with_http_info(get_backup_by_storage_query_description, timeout:60, continuation_token:nil, max_results:0, custom_headers:nil)
  get_backups_from_backup_location_async(get_backup_by_storage_query_description, timeout:timeout, continuation_token:continuation_token, max_results:max_results, custom_headers:custom_headers).value!
end
get_chaos(timeout:60, custom_headers:nil) click to toggle source

Get the status of Chaos.

Get the status of Chaos indicating whether or not Chaos is running, the Chaos parameters used for running Chaos and the status of the Chaos Schedule.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Chaos] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18655
def get_chaos(timeout:60, custom_headers:nil)
  response = get_chaos_async(timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_chaos_async(timeout:60, custom_headers:nil) click to toggle source

Get the status of Chaos.

Get the status of Chaos indicating whether or not Chaos is running, the Chaos parameters used for running Chaos and the status of the Chaos Schedule.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18694
def get_chaos_async(timeout:60, custom_headers:nil)
  api_version = '6.2'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Tools/Chaos'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::Chaos.mapper()
        result.body = self.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
get_chaos_events(continuation_token:nil, start_time_utc:nil, end_time_utc:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the next segment of the Chaos events based on the continuation token or the time range.

To get the next segment of the Chaos events, you can specify the ContinuationToken. To get the start of a new segment of Chaos events, you can specify the time range through StartTimeUtc and EndTimeUtc. You cannot specify both the ContinuationToken and the time range in the same call. When there are more than 100 Chaos events, the Chaos events are returned in multiple segments where a segment contains no more than 100 Chaos events and to get the next segment you make a call to this API with the continuation token.

@param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param start_time_utc [String] The Windows file time representing the start time of the time range for which a Chaos report is to be generated. Please consult [DateTime.ToFileTimeUtc Method](msdn.microsoft.com/en-us/library/system.datetime.tofiletimeutc(v=vs.110).aspx) for details. @param end_time_utc [String] The Windows file time representing the end time of the time range for which a Chaos report is to be generated. Please consult [DateTime.ToFileTimeUtc Method](msdn.microsoft.com/en-us/library/system.datetime.tofiletimeutc(v=vs.110).aspx) for details. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ChaosEventsSegment] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19030
def get_chaos_events(continuation_token:nil, start_time_utc:nil, end_time_utc:nil, max_results:0, timeout:60, custom_headers:nil)
  response = get_chaos_events_async(continuation_token:continuation_token, start_time_utc:start_time_utc, end_time_utc:end_time_utc, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_chaos_events_async(continuation_token:nil, start_time_utc:nil, end_time_utc:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the next segment of the Chaos events based on the continuation token or the time range.

To get the next segment of the Chaos events, you can specify the ContinuationToken. To get the start of a new segment of Chaos events, you can specify the time range through StartTimeUtc and EndTimeUtc. You cannot specify both the ContinuationToken and the time range in the same call. When there are more than 100 Chaos events, the Chaos events are returned in multiple segments where a segment contains no more than 100 Chaos events and to get the next segment you make a call to this API with the continuation token.

@param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param start_time_utc [String] The Windows file time representing the start time of the time range for which a Chaos report is to be generated. Please consult [DateTime.ToFileTimeUtc Method](msdn.microsoft.com/en-us/library/system.datetime.tofiletimeutc(v=vs.110).aspx) for details. @param end_time_utc [String] The Windows file time representing the end time of the time range for which a Chaos report is to be generated. Please consult [DateTime.ToFileTimeUtc Method](msdn.microsoft.com/en-us/library/system.datetime.tofiletimeutc(v=vs.110).aspx) for details. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19133
def get_chaos_events_async(continuation_token:nil, start_time_utc:nil, end_time_utc:nil, max_results:0, timeout:60, custom_headers:nil)
  api_version = '6.2'
  fail ArgumentError, "'max_results' should satisfy the constraint - 'InclusiveMinimum': '0'" if !max_results.nil? && max_results < 0
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Tools/Chaos/Events'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'StartTimeUtc' => start_time_utc,'EndTimeUtc' => end_time_utc,'MaxResults' => max_results,'timeout' => timeout},
      skip_encoding_query_params: {'ContinuationToken' => continuation_token},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ChaosEventsSegment.mapper()
        result.body = self.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
get_chaos_events_with_http_info(continuation_token:nil, start_time_utc:nil, end_time_utc:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the next segment of the Chaos events based on the continuation token or the time range.

To get the next segment of the Chaos events, you can specify the ContinuationToken. To get the start of a new segment of Chaos events, you can specify the time range through StartTimeUtc and EndTimeUtc. You cannot specify both the ContinuationToken and the time range in the same call. When there are more than 100 Chaos events, the Chaos events are returned in multiple segments where a segment contains no more than 100 Chaos events and to get the next segment you make a call to this API with the continuation token.

@param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param start_time_utc [String] The Windows file time representing the start time of the time range for which a Chaos report is to be generated. Please consult [DateTime.ToFileTimeUtc Method](msdn.microsoft.com/en-us/library/system.datetime.tofiletimeutc(v=vs.110).aspx) for details. @param end_time_utc [String] The Windows file time representing the end time of the time range for which a Chaos report is to be generated. Please consult [DateTime.ToFileTimeUtc Method](msdn.microsoft.com/en-us/library/system.datetime.tofiletimeutc(v=vs.110).aspx) for details. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19082
def get_chaos_events_with_http_info(continuation_token:nil, start_time_utc:nil, end_time_utc:nil, max_results:0, timeout:60, custom_headers:nil)
  get_chaos_events_async(continuation_token:continuation_token, start_time_utc:start_time_utc, end_time_utc:end_time_utc, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value!
end
get_chaos_schedule(custom_headers:nil) click to toggle source

Get the Chaos Schedule defining when and how to run Chaos.

Gets the version of the Chaos Schedule in use and the Chaos Schedule that defines when and how to run Chaos.

@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ChaosScheduleDescription] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19199
def get_chaos_schedule(custom_headers:nil)
  response = get_chaos_schedule_async(custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_chaos_schedule_async(custom_headers:nil) click to toggle source

Get the Chaos Schedule defining when and how to run Chaos.

Gets the version of the Chaos Schedule in use and the Chaos Schedule that defines when and how to run Chaos.

@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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19230
def get_chaos_schedule_async(custom_headers:nil)
  api_version = '6.2'


  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'] = accept_language unless accept_language.nil?
  path_template = 'Tools/Chaos/Schedule'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ChaosScheduleDescription.mapper()
        result.body = self.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
get_chaos_schedule_with_http_info(custom_headers:nil) click to toggle source

Get the Chaos Schedule defining when and how to run Chaos.

Gets the version of the Chaos Schedule in use and the Chaos Schedule that defines when and how to run Chaos.

@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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19215
def get_chaos_schedule_with_http_info(custom_headers:nil)
  get_chaos_schedule_async(custom_headers:custom_headers).value!
end
get_chaos_with_http_info(timeout:60, custom_headers:nil) click to toggle source

Get the status of Chaos.

Get the status of Chaos indicating whether or not Chaos is running, the Chaos parameters used for running Chaos and the status of the Chaos Schedule.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18675
def get_chaos_with_http_info(timeout:60, custom_headers:nil)
  get_chaos_async(timeout:timeout, custom_headers:custom_headers).value!
end
get_cluster_configuration(configuration_api_version, timeout:60, custom_headers:nil) click to toggle source

Get the Service Fabric standalone cluster configuration.

Get the Service Fabric standalone cluster configuration. The cluster configuration contains properties of the cluster that include different node types on the cluster, security configurations, fault and upgrade domain topologies, etc.

@param configuration_api_version [String] The API version of the Standalone cluster json configuration. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ClusterConfiguration] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 1929
def get_cluster_configuration(configuration_api_version, timeout:60, custom_headers:nil)
  response = get_cluster_configuration_async(configuration_api_version, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_cluster_configuration_async(configuration_api_version, timeout:60, custom_headers:nil) click to toggle source

Get the Service Fabric standalone cluster configuration.

Get the Service Fabric standalone cluster configuration. The cluster configuration contains properties of the cluster that include different node types on the cluster, security configurations, fault and upgrade domain topologies, etc.

@param configuration_api_version [String] The API version of the Standalone cluster json configuration. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 1976
def get_cluster_configuration_async(configuration_api_version, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'configuration_api_version is nil' if configuration_api_version.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = '$/GetClusterConfiguration'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'ConfigurationApiVersion' => configuration_api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ClusterConfiguration.mapper()
        result.body = self.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
get_cluster_configuration_upgrade_status(timeout:60, custom_headers:nil) click to toggle source

Get the cluster configuration upgrade status of a Service Fabric standalone cluster.

Get the cluster configuration upgrade status details of a Service Fabric standalone cluster.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ClusterConfigurationUpgradeStatusInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2046
def get_cluster_configuration_upgrade_status(timeout:60, custom_headers:nil)
  response = get_cluster_configuration_upgrade_status_async(timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_cluster_configuration_upgrade_status_async(timeout:60, custom_headers:nil) click to toggle source

Get the cluster configuration upgrade status of a Service Fabric standalone cluster.

Get the cluster configuration upgrade status details of a Service Fabric standalone cluster.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2087
def get_cluster_configuration_upgrade_status_async(timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = '$/GetClusterConfigurationUpgradeStatus'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ClusterConfigurationUpgradeStatusInfo.mapper()
        result.body = self.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
get_cluster_configuration_upgrade_status_with_http_info(timeout:60, custom_headers:nil) click to toggle source

Get the cluster configuration upgrade status of a Service Fabric standalone cluster.

Get the cluster configuration upgrade status details of a Service Fabric standalone cluster.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2067
def get_cluster_configuration_upgrade_status_with_http_info(timeout:60, custom_headers:nil)
  get_cluster_configuration_upgrade_status_async(timeout:timeout, custom_headers:custom_headers).value!
end
get_cluster_configuration_with_http_info(configuration_api_version, timeout:60, custom_headers:nil) click to toggle source

Get the Service Fabric standalone cluster configuration.

Get the Service Fabric standalone cluster configuration. The cluster configuration contains properties of the cluster that include different node types on the cluster, security configurations, fault and upgrade domain topologies, etc.

@param configuration_api_version [String] The API version of the Standalone cluster json configuration. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 1953
def get_cluster_configuration_with_http_info(configuration_api_version, timeout:60, custom_headers:nil)
  get_cluster_configuration_async(configuration_api_version, timeout:timeout, custom_headers:custom_headers).value!
end
get_cluster_event_list(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets all Cluster-related events.

The response is list of ClusterEvent objects.

@param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27575
def get_cluster_event_list(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  response = get_cluster_event_list_async(start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_cluster_event_list_async(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets all Cluster-related events.

The response is list of ClusterEvent objects.

@param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27638
def get_cluster_event_list_async(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1
  fail ArgumentError, 'start_time_utc is nil' if start_time_utc.nil?
  fail ArgumentError, 'end_time_utc is nil' if end_time_utc.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'] = accept_language unless accept_language.nil?
  path_template = 'EventsStore/Cluster/Events'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout,'StartTimeUtc' => start_time_utc,'EndTimeUtc' => end_time_utc,'EventsTypesFilter' => events_types_filter,'ExcludeAnalysisEvents' => exclude_analysis_events,'SkipCorrelationLookup' => skip_correlation_lookup},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ClusterEventElementType',
                type: {
                  name: 'Composite',
                  class_name: 'ClusterEvent'
                }
            }
          }
        }
        result.body = self.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
get_cluster_event_list_with_http_info(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets all Cluster-related events.

The response is list of ClusterEvent objects.

@param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27607
def get_cluster_event_list_with_http_info(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  get_cluster_event_list_async(start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
end
get_cluster_health(nodes_health_state_filter:0, applications_health_state_filter:0, events_health_state_filter:0, exclude_health_statistics:false, include_system_application_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric cluster.

Gets the health of a Service Fabric cluster. Use EventsHealthStateFilter to filter the collection of health events reported on the cluster based on the health state. Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the collection of nodes and applications returned based on their aggregated health state.

@param nodes_health_state_filter [Integer] Allows filtering of the node health state objects returned in the result of cluster health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only nodes that match the filter are returned. All nodes are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of nodes with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param applications_health_state_filter [Integer] Allows filtering of the application health state objects returned in the result of cluster health query based on their health state. The possible values for this parameter include integer value obtained from members or bitwise operations on members of HealthStateFilter enumeration. Only applications that match the filter are returned. All applications are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of applications with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param include_system_application_health_statistics [Boolean] Indicates whether the health statistics should include the fabric:/System application health statistics. False by default. If IncludeSystemApplicationHealthStatistics is set to true, the health statistics include the entities that belong to the fabric:/System application. Otherwise, the query result includes health statistics only for user applications. The health statistics must be included in the query result for this parameter to be applied. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ClusterHealth] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 349
def get_cluster_health(nodes_health_state_filter:0, applications_health_state_filter:0, events_health_state_filter:0, exclude_health_statistics:false, include_system_application_health_statistics:false, timeout:60, custom_headers:nil)
  response = get_cluster_health_async(nodes_health_state_filter:nodes_health_state_filter, applications_health_state_filter:applications_health_state_filter, events_health_state_filter:events_health_state_filter, exclude_health_statistics:exclude_health_statistics, include_system_application_health_statistics:include_system_application_health_statistics, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_cluster_health_async(nodes_health_state_filter:0, applications_health_state_filter:0, events_health_state_filter:0, exclude_health_statistics:false, include_system_application_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric cluster.

Gets the health of a Service Fabric cluster. Use EventsHealthStateFilter to filter the collection of health events reported on the cluster based on the health state. Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the collection of nodes and applications returned based on their aggregated health state.

@param nodes_health_state_filter [Integer] Allows filtering of the node health state objects returned in the result of cluster health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only nodes that match the filter are returned. All nodes are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of nodes with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param applications_health_state_filter [Integer] Allows filtering of the application health state objects returned in the result of cluster health query based on their health state. The possible values for this parameter include integer value obtained from members or bitwise operations on members of HealthStateFilter enumeration. Only applications that match the filter are returned. All applications are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of applications with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param include_system_application_health_statistics [Boolean] Indicates whether the health statistics should include the fabric:/System application health statistics. False by default. If IncludeSystemApplicationHealthStatistics is set to true, the health statistics include the entities that belong to the fabric:/System application. Otherwise, the query result includes health statistics only for user applications. The health statistics must be included in the query result for this parameter to be applied. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 558
def get_cluster_health_async(nodes_health_state_filter:0, applications_health_state_filter:0, events_health_state_filter:0, exclude_health_statistics:false, include_system_application_health_statistics:false, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = '$/GetClusterHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'NodesHealthStateFilter' => nodes_health_state_filter,'ApplicationsHealthStateFilter' => applications_health_state_filter,'EventsHealthStateFilter' => events_health_state_filter,'ExcludeHealthStatistics' => exclude_health_statistics,'IncludeSystemApplicationHealthStatistics' => include_system_application_health_statistics,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ClusterHealth.mapper()
        result.body = self.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
get_cluster_health_chunk(timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric cluster using health chunks.

Gets the health of a Service Fabric cluster using health chunks. Includes the aggregated health state of the cluster, but none of the cluster entities. To expand the cluster health and get the health state of all or some of the entities, use the POST URI and specify the cluster health chunk query description.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ClusterHealthChunk] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 1034
def get_cluster_health_chunk(timeout:60, custom_headers:nil)
  response = get_cluster_health_chunk_async(timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_cluster_health_chunk_async(timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric cluster using health chunks.

Gets the health of a Service Fabric cluster using health chunks. Includes the aggregated health state of the cluster, but none of the cluster entities. To expand the cluster health and get the health state of all or some of the entities, use the POST URI and specify the cluster health chunk query description.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 1079
def get_cluster_health_chunk_async(timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = '$/GetClusterHealthChunk'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ClusterHealthChunk.mapper()
        result.body = self.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
get_cluster_health_chunk_using_policy_and_advanced_filters(cluster_health_chunk_query_description:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric cluster using health chunks.

Gets the health of a Service Fabric cluster using health chunks. The health evaluation is done based on the input cluster health chunk query description. The query description allows users to specify health policies for evaluating the cluster and its children. Users can specify very flexible filters to select which cluster entities to return. The selection can be done based on the entities health state and based on the hierarchy. The query can return multi-level children of the entities based on the specified filters. For example, it can return one application with a specified name, and for this application, return only services that are in Error or Warning, and all partitions and replicas for one of these services.

@param cluster_health_chunk_query_description

ClusterHealthChunkQueryDescription

Describes the cluster and application

health policies used to evaluate the cluster health and the filters to select which cluster entities to be returned. If the cluster health policy is present, it is used to evaluate the cluster events and the cluster nodes. If not present, the health evaluation uses the cluster health policy defined in the cluster manifest or the default cluster health policy. By default, each application is evaluated using its specific application health policy, defined in the application manifest, or the default health policy, if no policy is defined in manifest. If the application health policy map is specified, and it has an entry for an application, the specified application health policy is used to evaluate the application health. Users can specify very flexible filters to select which cluster entities to include in response. The selection can be done based on the entities health state and based on the hierarchy. The query can return multi-level children of the entities based on the specified filters. For example, it can return one application with a specified name, and for this application, return only services that are in Error or Warning, and all partitions and replicas for one of these services. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ClusterHealthChunk] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 1179
def get_cluster_health_chunk_using_policy_and_advanced_filters(cluster_health_chunk_query_description:nil, timeout:60, custom_headers:nil)
  response = get_cluster_health_chunk_using_policy_and_advanced_filters_async(cluster_health_chunk_query_description:cluster_health_chunk_query_description, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_cluster_health_chunk_using_policy_and_advanced_filters_async(cluster_health_chunk_query_description:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric cluster using health chunks.

Gets the health of a Service Fabric cluster using health chunks. The health evaluation is done based on the input cluster health chunk query description. The query description allows users to specify health policies for evaluating the cluster and its children. Users can specify very flexible filters to select which cluster entities to return. The selection can be done based on the entities health state and based on the hierarchy. The query can return multi-level children of the entities based on the specified filters. For example, it can return one application with a specified name, and for this application, return only services that are in Error or Warning, and all partitions and replicas for one of these services.

@param cluster_health_chunk_query_description

ClusterHealthChunkQueryDescription

Describes the cluster and application

health policies used to evaluate the cluster health and the filters to select which cluster entities to be returned. If the cluster health policy is present, it is used to evaluate the cluster events and the cluster nodes. If not present, the health evaluation uses the cluster health policy defined in the cluster manifest or the default cluster health policy. By default, each application is evaluated using its specific application health policy, defined in the application manifest, or the default health policy, if no policy is defined in manifest. If the application health policy map is specified, and it has an entry for an application, the specified application health policy is used to evaluate the application health. Users can specify very flexible filters to select which cluster entities to include in response. The selection can be done based on the entities health state and based on the hierarchy. The query can return multi-level children of the entities based on the specified filters. For example, it can return one application with a specified name, and for this application, return only services that are in Error or Warning, and all partitions and replicas for one of these services. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 1282
def get_cluster_health_chunk_using_policy_and_advanced_filters_async(cluster_health_chunk_query_description:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ClusterHealthChunkQueryDescription.mapper()
  request_content = self.serialize(request_mapper,  cluster_health_chunk_query_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '$/GetClusterHealthChunk'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ClusterHealthChunk.mapper()
        result.body = self.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
get_cluster_health_chunk_using_policy_and_advanced_filters_with_http_info(cluster_health_chunk_query_description:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric cluster using health chunks.

Gets the health of a Service Fabric cluster using health chunks. The health evaluation is done based on the input cluster health chunk query description. The query description allows users to specify health policies for evaluating the cluster and its children. Users can specify very flexible filters to select which cluster entities to return. The selection can be done based on the entities health state and based on the hierarchy. The query can return multi-level children of the entities based on the specified filters. For example, it can return one application with a specified name, and for this application, return only services that are in Error or Warning, and all partitions and replicas for one of these services.

@param cluster_health_chunk_query_description

ClusterHealthChunkQueryDescription

Describes the cluster and application

health policies used to evaluate the cluster health and the filters to select which cluster entities to be returned. If the cluster health policy is present, it is used to evaluate the cluster events and the cluster nodes. If not present, the health evaluation uses the cluster health policy defined in the cluster manifest or the default cluster health policy. By default, each application is evaluated using its specific application health policy, defined in the application manifest, or the default health policy, if no policy is defined in manifest. If the application health policy map is specified, and it has an entry for an application, the specified application health policy is used to evaluate the application health. Users can specify very flexible filters to select which cluster entities to include in response. The selection can be done based on the entities health state and based on the hierarchy. The query can return multi-level children of the entities based on the specified filters. For example, it can return one application with a specified name, and for this application, return only services that are in Error or Warning, and all partitions and replicas for one of these services. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 1231
def get_cluster_health_chunk_using_policy_and_advanced_filters_with_http_info(cluster_health_chunk_query_description:nil, timeout:60, custom_headers:nil)
  get_cluster_health_chunk_using_policy_and_advanced_filters_async(cluster_health_chunk_query_description:cluster_health_chunk_query_description, timeout:timeout, custom_headers:custom_headers).value!
end
get_cluster_health_chunk_with_http_info(timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric cluster using health chunks.

Gets the health of a Service Fabric cluster using health chunks. Includes the aggregated health state of the cluster, but none of the cluster entities. To expand the cluster health and get the health state of all or some of the entities, use the POST URI and specify the cluster health chunk query description.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 1057
def get_cluster_health_chunk_with_http_info(timeout:60, custom_headers:nil)
  get_cluster_health_chunk_async(timeout:timeout, custom_headers:custom_headers).value!
end
get_cluster_health_using_policy(nodes_health_state_filter:0, applications_health_state_filter:0, events_health_state_filter:0, exclude_health_statistics:false, include_system_application_health_statistics:false, cluster_health_policies:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric cluster using the specified policy.

Gets the health of a Service Fabric cluster. Use EventsHealthStateFilter to filter the collection of health events reported on the cluster based on the health state. Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the collection of nodes and applications returned based on their aggregated health state. Use ClusterHealthPolicies to override the health policies used to evaluate the health.

@param nodes_health_state_filter [Integer] Allows filtering of the node health state objects returned in the result of cluster health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only nodes that match the filter are returned. All nodes are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of nodes with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param applications_health_state_filter [Integer] Allows filtering of the application health state objects returned in the result of cluster health query based on their health state. The possible values for this parameter include integer value obtained from members or bitwise operations on members of HealthStateFilter enumeration. Only applications that match the filter are returned. All applications are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of applications with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param include_system_application_health_statistics [Boolean] Indicates whether the health statistics should include the fabric:/System application health statistics. False by default. If IncludeSystemApplicationHealthStatistics is set to true, the health statistics include the entities that belong to the fabric:/System application. Otherwise, the query result includes health statistics only for user applications. The health statistics must be included in the query result for this parameter to be applied. @param cluster_health_policies [ClusterHealthPolicies] Describes the health policies used to evaluate the cluster health. If not present, the health evaluation uses the cluster health policy defined in the cluster manifest or the default cluster health policy. By default, each application is evaluated using its specific application health policy, defined in the application manifest, or the default health policy, if no policy is defined in manifest. If the application health policy map is specified, and it has an entry for an application, the specified application health policy is used to evaluate the application health. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ClusterHealth] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 723
def get_cluster_health_using_policy(nodes_health_state_filter:0, applications_health_state_filter:0, events_health_state_filter:0, exclude_health_statistics:false, include_system_application_health_statistics:false, cluster_health_policies:nil, timeout:60, custom_headers:nil)
  response = get_cluster_health_using_policy_async(nodes_health_state_filter:nodes_health_state_filter, applications_health_state_filter:applications_health_state_filter, events_health_state_filter:events_health_state_filter, exclude_health_statistics:exclude_health_statistics, include_system_application_health_statistics:include_system_application_health_statistics, cluster_health_policies:cluster_health_policies, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_cluster_health_using_policy_async(nodes_health_state_filter:0, applications_health_state_filter:0, events_health_state_filter:0, exclude_health_statistics:false, include_system_application_health_statistics:false, cluster_health_policies:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric cluster using the specified policy.

Gets the health of a Service Fabric cluster. Use EventsHealthStateFilter to filter the collection of health events reported on the cluster based on the health state. Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the collection of nodes and applications returned based on their aggregated health state. Use ClusterHealthPolicies to override the health policies used to evaluate the health.

@param nodes_health_state_filter [Integer] Allows filtering of the node health state objects returned in the result of cluster health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only nodes that match the filter are returned. All nodes are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of nodes with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param applications_health_state_filter [Integer] Allows filtering of the application health state objects returned in the result of cluster health query based on their health state. The possible values for this parameter include integer value obtained from members or bitwise operations on members of HealthStateFilter enumeration. Only applications that match the filter are returned. All applications are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of applications with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param include_system_application_health_statistics [Boolean] Indicates whether the health statistics should include the fabric:/System application health statistics. False by default. If IncludeSystemApplicationHealthStatistics is set to true, the health statistics include the entities that belong to the fabric:/System application. Otherwise, the query result includes health statistics only for user applications. The health statistics must be included in the query result for this parameter to be applied. @param cluster_health_policies [ClusterHealthPolicies] Describes the health policies used to evaluate the cluster health. If not present, the health evaluation uses the cluster health policy defined in the cluster manifest or the default cluster health policy. By default, each application is evaluated using its specific application health policy, defined in the application manifest, or the default health policy, if no policy is defined in manifest. If the application health policy map is specified, and it has an entry for an application, the specified application health policy is used to evaluate the application health. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 956
def get_cluster_health_using_policy_async(nodes_health_state_filter:0, applications_health_state_filter:0, events_health_state_filter:0, exclude_health_statistics:false, include_system_application_health_statistics:false, cluster_health_policies:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ClusterHealthPolicies.mapper()
  request_content = self.serialize(request_mapper,  cluster_health_policies)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '$/GetClusterHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'NodesHealthStateFilter' => nodes_health_state_filter,'ApplicationsHealthStateFilter' => applications_health_state_filter,'EventsHealthStateFilter' => events_health_state_filter,'ExcludeHealthStatistics' => exclude_health_statistics,'IncludeSystemApplicationHealthStatistics' => include_system_application_health_statistics,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ClusterHealth.mapper()
        result.body = self.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
get_cluster_health_using_policy_with_http_info(nodes_health_state_filter:0, applications_health_state_filter:0, events_health_state_filter:0, exclude_health_statistics:false, include_system_application_health_statistics:false, cluster_health_policies:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric cluster using the specified policy.

Gets the health of a Service Fabric cluster. Use EventsHealthStateFilter to filter the collection of health events reported on the cluster based on the health state. Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the collection of nodes and applications returned based on their aggregated health state. Use ClusterHealthPolicies to override the health policies used to evaluate the health.

@param nodes_health_state_filter [Integer] Allows filtering of the node health state objects returned in the result of cluster health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only nodes that match the filter are returned. All nodes are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of nodes with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param applications_health_state_filter [Integer] Allows filtering of the application health state objects returned in the result of cluster health query based on their health state. The possible values for this parameter include integer value obtained from members or bitwise operations on members of HealthStateFilter enumeration. Only applications that match the filter are returned. All applications are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of applications with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param include_system_application_health_statistics [Boolean] Indicates whether the health statistics should include the fabric:/System application health statistics. False by default. If IncludeSystemApplicationHealthStatistics is set to true, the health statistics include the entities that belong to the fabric:/System application. Otherwise, the query result includes health statistics only for user applications. The health statistics must be included in the query result for this parameter to be applied. @param cluster_health_policies [ClusterHealthPolicies] Describes the health policies used to evaluate the cluster health. If not present, the health evaluation uses the cluster health policy defined in the cluster manifest or the default cluster health policy. By default, each application is evaluated using its specific application health policy, defined in the application manifest, or the default health policy, if no policy is defined in manifest. If the application health policy map is specified, and it has an entry for an application, the specified application health policy is used to evaluate the application health. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 840
def get_cluster_health_using_policy_with_http_info(nodes_health_state_filter:0, applications_health_state_filter:0, events_health_state_filter:0, exclude_health_statistics:false, include_system_application_health_statistics:false, cluster_health_policies:nil, timeout:60, custom_headers:nil)
  get_cluster_health_using_policy_async(nodes_health_state_filter:nodes_health_state_filter, applications_health_state_filter:applications_health_state_filter, events_health_state_filter:events_health_state_filter, exclude_health_statistics:exclude_health_statistics, include_system_application_health_statistics:include_system_application_health_statistics, cluster_health_policies:cluster_health_policies, timeout:timeout, custom_headers:custom_headers).value!
end
get_cluster_health_with_http_info(nodes_health_state_filter:0, applications_health_state_filter:0, events_health_state_filter:0, exclude_health_statistics:false, include_system_application_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric cluster.

Gets the health of a Service Fabric cluster. Use EventsHealthStateFilter to filter the collection of health events reported on the cluster based on the health state. Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the collection of nodes and applications returned based on their aggregated health state.

@param nodes_health_state_filter [Integer] Allows filtering of the node health state objects returned in the result of cluster health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only nodes that match the filter are returned. All nodes are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of nodes with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param applications_health_state_filter [Integer] Allows filtering of the application health state objects returned in the result of cluster health query based on their health state. The possible values for this parameter include integer value obtained from members or bitwise operations on members of HealthStateFilter enumeration. Only applications that match the filter are returned. All applications are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of applications with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param include_system_application_health_statistics [Boolean] Indicates whether the health statistics should include the fabric:/System application health statistics. False by default. If IncludeSystemApplicationHealthStatistics is set to true, the health statistics include the entities that belong to the fabric:/System application. Otherwise, the query result includes health statistics only for user applications. The health statistics must be included in the query result for this parameter to be applied. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 454
def get_cluster_health_with_http_info(nodes_health_state_filter:0, applications_health_state_filter:0, events_health_state_filter:0, exclude_health_statistics:false, include_system_application_health_statistics:false, timeout:60, custom_headers:nil)
  get_cluster_health_async(nodes_health_state_filter:nodes_health_state_filter, applications_health_state_filter:applications_health_state_filter, events_health_state_filter:events_health_state_filter, exclude_health_statistics:exclude_health_statistics, include_system_application_health_statistics:include_system_application_health_statistics, timeout:timeout, custom_headers:custom_headers).value!
end
get_cluster_manifest(timeout:60, custom_headers:nil) click to toggle source

Get the Service Fabric cluster manifest.

Get the Service Fabric cluster manifest. The cluster manifest contains properties of the cluster that include different node types on the cluster, security configurations, fault and upgrade domain topologies, etc.

These properties are specified as part of the ClusterConfig.JSON file while deploying a stand alone cluster. However, most of the information in the cluster manifest is generated internally by service fabric during cluster deployment in other deployment scenarios (e.g. when using azure portal).

The contents of the cluster manifest are for informational purposes only and users are not expected to take a dependency on the format of the file contents or its interpretation.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ClusterManifest] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 135
def get_cluster_manifest(timeout:60, custom_headers:nil)
  response = get_cluster_manifest_async(timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_cluster_manifest_async(timeout:60, custom_headers:nil) click to toggle source

Get the Service Fabric cluster manifest.

Get the Service Fabric cluster manifest. The cluster manifest contains properties of the cluster that include different node types on the cluster, security configurations, fault and upgrade domain topologies, etc.

These properties are specified as part of the ClusterConfig.JSON file while deploying a stand alone cluster. However, most of the information in the cluster manifest is generated internally by service fabric during cluster deployment in other deployment scenarios (e.g. when using azure portal).

The contents of the cluster manifest are for informational purposes only and users are not expected to take a dependency on the format of the file contents or its interpretation.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 196
def get_cluster_manifest_async(timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = '$/GetClusterManifest'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ClusterManifest.mapper()
        result.body = self.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
get_cluster_manifest_with_http_info(timeout:60, custom_headers:nil) click to toggle source

Get the Service Fabric cluster manifest.

Get the Service Fabric cluster manifest. The cluster manifest contains properties of the cluster that include different node types on the cluster, security configurations, fault and upgrade domain topologies, etc.

These properties are specified as part of the ClusterConfig.JSON file while deploying a stand alone cluster. However, most of the information in the cluster manifest is generated internally by service fabric during cluster deployment in other deployment scenarios (e.g. when using azure portal).

The contents of the cluster manifest are for informational purposes only and users are not expected to take a dependency on the format of the file contents or its interpretation.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 166
def get_cluster_manifest_with_http_info(timeout:60, custom_headers:nil)
  get_cluster_manifest_async(timeout:timeout, custom_headers:custom_headers).value!
end
get_cluster_upgrade_progress(timeout:60, custom_headers:nil) click to toggle source

Gets the progress of the current cluster upgrade.

Gets the current progress of the ongoing cluster upgrade. If no upgrade is currently in progress, gets the last state of the previous cluster upgrade.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ClusterUpgradeProgressObject] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 1818
def get_cluster_upgrade_progress(timeout:60, custom_headers:nil)
  response = get_cluster_upgrade_progress_async(timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_cluster_upgrade_progress_async(timeout:60, custom_headers:nil) click to toggle source

Gets the progress of the current cluster upgrade.

Gets the current progress of the ongoing cluster upgrade. If no upgrade is currently in progress, gets the last state of the previous cluster upgrade.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 1857
def get_cluster_upgrade_progress_async(timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = '$/GetUpgradeProgress'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ClusterUpgradeProgressObject.mapper()
        result.body = self.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
get_cluster_upgrade_progress_with_http_info(timeout:60, custom_headers:nil) click to toggle source

Gets the progress of the current cluster upgrade.

Gets the current progress of the ongoing cluster upgrade. If no upgrade is currently in progress, gets the last state of the previous cluster upgrade.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 1838
def get_cluster_upgrade_progress_with_http_info(timeout:60, custom_headers:nil)
  get_cluster_upgrade_progress_async(timeout:timeout, custom_headers:custom_headers).value!
end
get_compose_deployment_status(deployment_name, timeout:60, custom_headers:nil) click to toggle source

Gets information about a Service Fabric compose deployment.

Returns the status of the compose deployment that was created or in the process of being created in the Service Fabric cluster and whose name matches the one specified as the parameter. The response includes the name, status and other details about the deployment.

@param deployment_name [String] The identity of the deployment. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ComposeDeploymentStatusInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18049
def get_compose_deployment_status(deployment_name, timeout:60, custom_headers:nil)
  response = get_compose_deployment_status_async(deployment_name, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_compose_deployment_status_async(deployment_name, timeout:60, custom_headers:nil) click to toggle source

Gets information about a Service Fabric compose deployment.

Returns the status of the compose deployment that was created or in the process of being created in the Service Fabric cluster and whose name matches the one specified as the parameter. The response includes the name, status and other details about the deployment.

@param deployment_name [String] The identity of the deployment. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18094
def get_compose_deployment_status_async(deployment_name, timeout:60, custom_headers:nil)
  api_version = '6.0-preview'
  fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'ComposeDeployments/{deploymentName}'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'deploymentName' => deployment_name},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ComposeDeploymentStatusInfo.mapper()
        result.body = self.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
get_compose_deployment_status_list(continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the list of compose deployments created in the Service Fabric cluster.

Gets the status about the compose deployments that were created or in the process of being created in the Service Fabric cluster. The response includes the name, status and other details about the compose deployments. If the list of deployments do not fit in a page, one page of results is returned as well as a continuation token which can be used to get the next page.

@param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PagedComposeDeploymentStatusInfoList] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18181
def get_compose_deployment_status_list(continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  response = get_compose_deployment_status_list_async(continuation_token:continuation_token, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_compose_deployment_status_list_async(continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the list of compose deployments created in the Service Fabric cluster.

Gets the status about the compose deployments that were created or in the process of being created in the Service Fabric cluster. The response includes the name, status and other details about the compose deployments. If the list of deployments do not fit in a page, one page of results is returned as well as a continuation token which can be used to get the next page.

@param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18254
def get_compose_deployment_status_list_async(continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  api_version = '6.0-preview'
  fail ArgumentError, "'max_results' should satisfy the constraint - 'InclusiveMinimum': '0'" if !max_results.nil? && max_results < 0
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'ComposeDeployments'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'MaxResults' => max_results,'timeout' => timeout},
      skip_encoding_query_params: {'ContinuationToken' => continuation_token},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PagedComposeDeploymentStatusInfoList.mapper()
        result.body = self.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
get_compose_deployment_status_list_with_http_info(continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the list of compose deployments created in the Service Fabric cluster.

Gets the status about the compose deployments that were created or in the process of being created in the Service Fabric cluster. The response includes the name, status and other details about the compose deployments. If the list of deployments do not fit in a page, one page of results is returned as well as a continuation token which can be used to get the next page.

@param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18218
def get_compose_deployment_status_list_with_http_info(continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  get_compose_deployment_status_list_async(continuation_token:continuation_token, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value!
end
get_compose_deployment_status_with_http_info(deployment_name, timeout:60, custom_headers:nil) click to toggle source

Gets information about a Service Fabric compose deployment.

Returns the status of the compose deployment that was created or in the process of being created in the Service Fabric cluster and whose name matches the one specified as the parameter. The response includes the name, status and other details about the deployment.

@param deployment_name [String] The identity of the deployment. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18072
def get_compose_deployment_status_with_http_info(deployment_name, timeout:60, custom_headers:nil)
  get_compose_deployment_status_async(deployment_name, timeout:timeout, custom_headers:custom_headers).value!
end
get_compose_deployment_upgrade_progress(deployment_name, timeout:60, custom_headers:nil) click to toggle source

Gets details for the latest upgrade performed on this Service Fabric compose deployment.

Returns the information about the state of the compose deployment upgrade along with details to aid debugging application health issues.

@param deployment_name [String] The identity of the deployment. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ComposeDeploymentUpgradeProgressInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18326
def get_compose_deployment_upgrade_progress(deployment_name, timeout:60, custom_headers:nil)
  response = get_compose_deployment_upgrade_progress_async(deployment_name, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_compose_deployment_upgrade_progress_async(deployment_name, timeout:60, custom_headers:nil) click to toggle source

Gets details for the latest upgrade performed on this Service Fabric compose deployment.

Returns the information about the state of the compose deployment upgrade along with details to aid debugging application health issues.

@param deployment_name [String] The identity of the deployment. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18369
def get_compose_deployment_upgrade_progress_async(deployment_name, timeout:60, custom_headers:nil)
  api_version = '6.0-preview'
  fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'ComposeDeployments/{deploymentName}/$/GetUpgradeProgress'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'deploymentName' => deployment_name},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ComposeDeploymentUpgradeProgressInfo.mapper()
        result.body = self.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
get_compose_deployment_upgrade_progress_with_http_info(deployment_name, timeout:60, custom_headers:nil) click to toggle source

Gets details for the latest upgrade performed on this Service Fabric compose deployment.

Returns the information about the state of the compose deployment upgrade along with details to aid debugging application health issues.

@param deployment_name [String] The identity of the deployment. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18348
def get_compose_deployment_upgrade_progress_with_http_info(deployment_name, timeout:60, custom_headers:nil)
  get_compose_deployment_upgrade_progress_async(deployment_name, timeout:timeout, custom_headers:custom_headers).value!
end
get_container_logs_deployed_on_node(node_name, application_id, service_manifest_name, code_package_name, tail:nil, previous:false, timeout:60, custom_headers:nil) click to toggle source

Gets the container logs for container deployed on a Service Fabric node.

Gets the container logs for container deployed on a Service Fabric node for the given code package.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_manifest_name [String] The name of a service manifest registered as part of an application type in a Service Fabric cluster. @param code_package_name [String] The name of code package specified in service manifest registered as part of an application type in a Service Fabric cluster. @param tail [String] Number of lines to show from the end of the logs. Default is 100. 'all' to show the complete logs. @param previous [Boolean] Specifies whether to get container logs from exited/dead containers of the code package instance. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ContainerLogs] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 17612
def get_container_logs_deployed_on_node(node_name, application_id, service_manifest_name, code_package_name, tail:nil, previous:false, timeout:60, custom_headers:nil)
  response = get_container_logs_deployed_on_node_async(node_name, application_id, service_manifest_name, code_package_name, tail:tail, previous:previous, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_container_logs_deployed_on_node_async(node_name, application_id, service_manifest_name, code_package_name, tail:nil, previous:false, timeout:60, custom_headers:nil) click to toggle source

Gets the container logs for container deployed on a Service Fabric node.

Gets the container logs for container deployed on a Service Fabric node for the given code package.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_manifest_name [String] The name of a service manifest registered as part of an application type in a Service Fabric cluster. @param code_package_name [String] The name of code package specified in service manifest registered as part of an application type in a Service Fabric cluster. @param tail [String] Number of lines to show from the end of the logs. Default is 100. 'all' to show the complete logs. @param previous [Boolean] Specifies whether to get container logs from exited/dead containers of the code package instance. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 17683
def get_container_logs_deployed_on_node_async(node_name, application_id, service_manifest_name, code_package_name, tail:nil, previous:false, timeout:60, custom_headers:nil)
  api_version = '6.2'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, 'service_manifest_name is nil' if service_manifest_name.nil?
  fail ArgumentError, 'code_package_name is nil' if code_package_name.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerLogs'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'ServiceManifestName' => service_manifest_name,'CodePackageName' => code_package_name,'Tail' => tail,'Previous' => previous,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ContainerLogs.mapper()
        result.body = self.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
get_container_logs_deployed_on_node_with_http_info(node_name, application_id, service_manifest_name, code_package_name, tail:nil, previous:false, timeout:60, custom_headers:nil) click to toggle source

Gets the container logs for container deployed on a Service Fabric node.

Gets the container logs for container deployed on a Service Fabric node for the given code package.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_manifest_name [String] The name of a service manifest registered as part of an application type in a Service Fabric cluster. @param code_package_name [String] The name of code package specified in service manifest registered as part of an application type in a Service Fabric cluster. @param tail [String] Number of lines to show from the end of the logs. Default is 100. 'all' to show the complete logs. @param previous [Boolean] Specifies whether to get container logs from exited/dead containers of the code package instance. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 17648
def get_container_logs_deployed_on_node_with_http_info(node_name, application_id, service_manifest_name, code_package_name, tail:nil, previous:false, timeout:60, custom_headers:nil)
  get_container_logs_deployed_on_node_async(node_name, application_id, service_manifest_name, code_package_name, tail:tail, previous:previous, timeout:timeout, custom_headers:custom_headers).value!
end
get_containers_event_list(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets all Containers-related events.

The response is list of ContainerInstanceEvent objects.

@param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27736
def get_containers_event_list(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  response = get_containers_event_list_async(start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_containers_event_list_async(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets all Containers-related events.

The response is list of ContainerInstanceEvent objects.

@param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27799
def get_containers_event_list_async(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1
  fail ArgumentError, 'start_time_utc is nil' if start_time_utc.nil?
  fail ArgumentError, 'end_time_utc is nil' if end_time_utc.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'] = accept_language unless accept_language.nil?
  path_template = 'EventsStore/Containers/Events'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout,'StartTimeUtc' => start_time_utc,'EndTimeUtc' => end_time_utc,'EventsTypesFilter' => events_types_filter,'ExcludeAnalysisEvents' => exclude_analysis_events,'SkipCorrelationLookup' => skip_correlation_lookup},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ContainerInstanceEventElementType',
                type: {
                  name: 'Composite',
                  class_name: 'ContainerInstanceEvent'
                }
            }
          }
        }
        result.body = self.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
get_containers_event_list_with_http_info(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets all Containers-related events.

The response is list of ContainerInstanceEvent objects.

@param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27768
def get_containers_event_list_with_http_info(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  get_containers_event_list_async(start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
end
get_correlated_event_list(event_instance_id, timeout:60, custom_headers:nil) click to toggle source

Gets all correlated events for a given event.

The response is list of FabricEvents.

@param event_instance_id [String] The EventInstanceId. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 29562
def get_correlated_event_list(event_instance_id, timeout:60, custom_headers:nil)
  response = get_correlated_event_list_async(event_instance_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_correlated_event_list_async(event_instance_id, timeout:60, custom_headers:nil) click to toggle source

Gets all correlated events for a given event.

The response is list of FabricEvents.

@param event_instance_id [String] The EventInstanceId. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 29601
def get_correlated_event_list_async(event_instance_id, timeout:60, custom_headers:nil)
  api_version = '6.2-preview'
  fail ArgumentError, 'event_instance_id is nil' if event_instance_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'EventsStore/CorrelatedEvents/{eventInstanceId}/$/Events'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'eventInstanceId' => event_instance_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'FabricEventElementType',
                type: {
                  name: 'Composite',
                  polymorphic_discriminator: 'Kind',
                  uber_parent: 'FabricEvent',
                  class_name: 'FabricEvent'
                }
            }
          }
        }
        result.body = self.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
get_correlated_event_list_with_http_info(event_instance_id, timeout:60, custom_headers:nil) click to toggle source

Gets all correlated events for a given event.

The response is list of FabricEvents.

@param event_instance_id [String] The EventInstanceId. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 29582
def get_correlated_event_list_with_http_info(event_instance_id, timeout:60, custom_headers:nil)
  get_correlated_event_list_async(event_instance_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_data_loss_progress(service_id, partition_id, operation_id, timeout:60, custom_headers:nil) click to toggle source

Gets the progress of a partition data loss operation started using the StartDataLoss API.

Gets the progress of a data loss operation started with StartDataLoss, using the OperationId.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PartitionDataLossProgress] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 21131
def get_data_loss_progress(service_id, partition_id, operation_id, timeout:60, custom_headers:nil)
  response = get_data_loss_progress_async(service_id, partition_id, operation_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_data_loss_progress_async(service_id, partition_id, operation_id, timeout:60, custom_headers:nil) click to toggle source

Gets the progress of a partition data loss operation started using the StartDataLoss API.

Gets the progress of a data loss operation started with StartDataLoss, using the OperationId.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 21192
def get_data_loss_progress_async(service_id, partition_id, operation_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, 'operation_id is nil' if operation_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetDataLossProgress'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id,'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'OperationId' => operation_id,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PartitionDataLossProgress.mapper()
        result.body = self.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
get_data_loss_progress_with_http_info(service_id, partition_id, operation_id, timeout:60, custom_headers:nil) click to toggle source

Gets the progress of a partition data loss operation started using the StartDataLoss API.

Gets the progress of a data loss operation started with StartDataLoss, using the OperationId.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 21162
def get_data_loss_progress_with_http_info(service_id, partition_id, operation_id, timeout:60, custom_headers:nil)
  get_data_loss_progress_async(service_id, partition_id, operation_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_deployed_application_health(node_name, application_id, events_health_state_filter:0, deployed_service_packages_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the information about health of an application deployed on a Service Fabric node.

Gets the information about health of an application deployed on a Service Fabric node. Use EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported on the deployed application based on health state. Use DeployedServicePackagesHealthStateFilter to optionally filter for DeployedServicePackageHealth children based on health state.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param deployed_service_packages_health_state_filter [Integer] Allows filtering of the deployed service package health state objects returned in the result of deployed application health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only deployed service packages that match the filter are returned. All deployed service packages are used to evaluate the aggregated health state of the deployed application. If not specified, all entries are returned. The state values are flag based enumeration, so the value can be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of service packages with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [DeployedApplicationHealth] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 8893
def get_deployed_application_health(node_name, application_id, events_health_state_filter:0, deployed_service_packages_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil)
  response = get_deployed_application_health_async(node_name, application_id, events_health_state_filter:events_health_state_filter, deployed_service_packages_health_state_filter:deployed_service_packages_health_state_filter, exclude_health_statistics:exclude_health_statistics, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_deployed_application_health_async(node_name, application_id, events_health_state_filter:0, deployed_service_packages_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the information about health of an application deployed on a Service Fabric node.

Gets the information about health of an application deployed on a Service Fabric node. Use EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported on the deployed application based on health state. Use DeployedServicePackagesHealthStateFilter to optionally filter for DeployedServicePackageHealth children based on health state.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param deployed_service_packages_health_state_filter [Integer] Allows filtering of the deployed service package health state objects returned in the result of deployed application health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only deployed service packages that match the filter are returned. All deployed service packages are used to evaluate the aggregated health state of the deployed application. If not specified, all entries are returned. The state values are flag based enumeration, so the value can be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of service packages with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 9052
def get_deployed_application_health_async(node_name, application_id, events_health_state_filter:0, deployed_service_packages_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'EventsHealthStateFilter' => events_health_state_filter,'DeployedServicePackagesHealthStateFilter' => deployed_service_packages_health_state_filter,'ExcludeHealthStatistics' => exclude_health_statistics,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::DeployedApplicationHealth.mapper()
        result.body = self.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
get_deployed_application_health_using_policy(node_name, application_id, events_health_state_filter:0, deployed_service_packages_health_state_filter:0, application_health_policy:nil, exclude_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the information about health of an application deployed on a Service Fabric node. using the specified policy.

Gets the information about health of an application deployed on a Service Fabric node using the specified policy. Use EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported on the deployed application based on health state. Use DeployedServicePackagesHealthStateFilter to optionally filter for DeployedServicePackageHealth children based on health state. Use ApplicationHealthPolicy to optionally override the health policies used to evaluate the health. This API only uses 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the deployed application.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param deployed_service_packages_health_state_filter [Integer] Allows filtering of the deployed service package health state objects returned in the result of deployed application health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only deployed service packages that match the filter are returned. All deployed service packages are used to evaluate the aggregated health state of the deployed application. If not specified, all entries are returned. The state values are flag based enumeration, so the value can be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of service packages with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param application_health_policy [ApplicationHealthPolicy] Describes the health policies used to evaluate the health of an application or one of its children. If not present, the health evaluation uses the health policy from application manifest or the default health policy. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [DeployedApplicationHealth] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 9194
def get_deployed_application_health_using_policy(node_name, application_id, events_health_state_filter:0, deployed_service_packages_health_state_filter:0, application_health_policy:nil, exclude_health_statistics:false, timeout:60, custom_headers:nil)
  response = get_deployed_application_health_using_policy_async(node_name, application_id, events_health_state_filter:events_health_state_filter, deployed_service_packages_health_state_filter:deployed_service_packages_health_state_filter, application_health_policy:application_health_policy, exclude_health_statistics:exclude_health_statistics, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_deployed_application_health_using_policy_async(node_name, application_id, events_health_state_filter:0, deployed_service_packages_health_state_filter:0, application_health_policy:nil, exclude_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the information about health of an application deployed on a Service Fabric node. using the specified policy.

Gets the information about health of an application deployed on a Service Fabric node using the specified policy. Use EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported on the deployed application based on health state. Use DeployedServicePackagesHealthStateFilter to optionally filter for DeployedServicePackageHealth children based on health state. Use ApplicationHealthPolicy to optionally override the health policies used to evaluate the health. This API only uses 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the deployed application.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param deployed_service_packages_health_state_filter [Integer] Allows filtering of the deployed service package health state objects returned in the result of deployed application health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only deployed service packages that match the filter are returned. All deployed service packages are used to evaluate the aggregated health state of the deployed application. If not specified, all entries are returned. The state values are flag based enumeration, so the value can be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of service packages with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param application_health_policy [ApplicationHealthPolicy] Describes the health policies used to evaluate the health of an application or one of its children. If not present, the health evaluation uses the health policy from application manifest or the default health policy. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 9373
def get_deployed_application_health_using_policy_async(node_name, application_id, events_health_state_filter:0, deployed_service_packages_health_state_filter:0, application_health_policy:nil, exclude_health_statistics:false, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ApplicationHealthPolicy.mapper()
  request_content = self.serialize(request_mapper,  application_health_policy)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'EventsHealthStateFilter' => events_health_state_filter,'DeployedServicePackagesHealthStateFilter' => deployed_service_packages_health_state_filter,'ExcludeHealthStatistics' => exclude_health_statistics,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::DeployedApplicationHealth.mapper()
        result.body = self.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
get_deployed_application_health_using_policy_with_http_info(node_name, application_id, events_health_state_filter:0, deployed_service_packages_health_state_filter:0, application_health_policy:nil, exclude_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the information about health of an application deployed on a Service Fabric node. using the specified policy.

Gets the information about health of an application deployed on a Service Fabric node using the specified policy. Use EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported on the deployed application based on health state. Use DeployedServicePackagesHealthStateFilter to optionally filter for DeployedServicePackageHealth children based on health state. Use ApplicationHealthPolicy to optionally override the health policies used to evaluate the health. This API only uses 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the deployed application.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param deployed_service_packages_health_state_filter [Integer] Allows filtering of the deployed service package health state objects returned in the result of deployed application health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only deployed service packages that match the filter are returned. All deployed service packages are used to evaluate the aggregated health state of the deployed application. If not specified, all entries are returned. The state values are flag based enumeration, so the value can be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of service packages with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param application_health_policy [ApplicationHealthPolicy] Describes the health policies used to evaluate the health of an application or one of its children. If not present, the health evaluation uses the health policy from application manifest or the default health policy. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 9284
def get_deployed_application_health_using_policy_with_http_info(node_name, application_id, events_health_state_filter:0, deployed_service_packages_health_state_filter:0, application_health_policy:nil, exclude_health_statistics:false, timeout:60, custom_headers:nil)
  get_deployed_application_health_using_policy_async(node_name, application_id, events_health_state_filter:events_health_state_filter, deployed_service_packages_health_state_filter:deployed_service_packages_health_state_filter, application_health_policy:application_health_policy, exclude_health_statistics:exclude_health_statistics, timeout:timeout, custom_headers:custom_headers).value!
end
get_deployed_application_health_with_http_info(node_name, application_id, events_health_state_filter:0, deployed_service_packages_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the information about health of an application deployed on a Service Fabric node.

Gets the information about health of an application deployed on a Service Fabric node. Use EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported on the deployed application based on health state. Use DeployedServicePackagesHealthStateFilter to optionally filter for DeployedServicePackageHealth children based on health state.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param deployed_service_packages_health_state_filter [Integer] Allows filtering of the deployed service package health state objects returned in the result of deployed application health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only deployed service packages that match the filter are returned. All deployed service packages are used to evaluate the aggregated health state of the deployed application. If not specified, all entries are returned. The state values are flag based enumeration, so the value can be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of service packages with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 8973
def get_deployed_application_health_with_http_info(node_name, application_id, events_health_state_filter:0, deployed_service_packages_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil)
  get_deployed_application_health_async(node_name, application_id, events_health_state_filter:events_health_state_filter, deployed_service_packages_health_state_filter:deployed_service_packages_health_state_filter, exclude_health_statistics:exclude_health_statistics, timeout:timeout, custom_headers:custom_headers).value!
end
get_deployed_application_info(node_name, application_id, timeout:60, include_health_state:false, custom_headers:nil) click to toggle source

Gets the information about an application deployed on a Service Fabric node.

Gets the information about an application deployed on a Service Fabric node. This query returns system application information if the application ID provided is for system application. Results encompass deployed applications in active, activating, and downloading states. This query requires that the node name corresponds to a node on the cluster. The query fails if the provided node name does not point to any active Service Fabric nodes on the cluster.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param include_health_state [Boolean] Include the health state of an entity. If this parameter is false or not specified, then the health state returned is “Unknown”. When set to true, the query goes in parallel to the node and the health system service before the results are merged. As a result, the query is more expensive and may take a longer time. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [DeployedApplicationInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 8686
def get_deployed_application_info(node_name, application_id, timeout:60, include_health_state:false, custom_headers:nil)
  response = get_deployed_application_info_async(node_name, application_id, timeout:timeout, include_health_state:include_health_state, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_deployed_application_info_async(node_name, application_id, timeout:60, include_health_state:false, custom_headers:nil) click to toggle source

Gets the information about an application deployed on a Service Fabric node.

Gets the information about an application deployed on a Service Fabric node. This query returns system application information if the application ID provided is for system application. Results encompass deployed applications in active, activating, and downloading states. This query requires that the node name corresponds to a node on the cluster. The query fails if the provided node name does not point to any active Service Fabric nodes on the cluster.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param include_health_state [Boolean] Include the health state of an entity. If this parameter is false or not specified, then the health state returned is “Unknown”. When set to true, the query goes in parallel to the node and the health system service before the results are merged. As a result, the query is more expensive and may take a longer time. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 8761
def get_deployed_application_info_async(node_name, application_id, timeout:60, include_health_state:false, custom_headers:nil)
  api_version = '6.1'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Nodes/{nodeName}/$/GetApplications/{applicationId}'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'timeout' => timeout,'IncludeHealthState' => include_health_state},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::DeployedApplicationInfo.mapper()
        result.body = self.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
get_deployed_application_info_list(node_name, timeout:60, include_health_state:false, continuation_token:nil, max_results:0, custom_headers:nil) click to toggle source

Gets the list of applications deployed on a Service Fabric node.

Gets the list of applications deployed on a Service Fabric node. The results do not include information about deployed system applications unless explicitly queried for by ID. Results encompass deployed applications in active, activating, and downloading states. This query requires that the node name corresponds to a node on the cluster. The query fails if the provided node name does not point to any active Service Fabric nodes on the cluster.

@param node_name [String] The name of the node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param include_health_state [Boolean] Include the health state of an entity. If this parameter is false or not specified, then the health state returned is “Unknown”. When set to true, the query goes in parallel to the node and the health system service before the results are merged. As a result, the query is more expensive and may take a longer time. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PagedDeployedApplicationInfoList] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 8507
def get_deployed_application_info_list(node_name, timeout:60, include_health_state:false, continuation_token:nil, max_results:0, custom_headers:nil)
  response = get_deployed_application_info_list_async(node_name, timeout:timeout, include_health_state:include_health_state, continuation_token:continuation_token, max_results:max_results, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_deployed_application_info_list_async(node_name, timeout:60, include_health_state:false, continuation_token:nil, max_results:0, custom_headers:nil) click to toggle source

Gets the list of applications deployed on a Service Fabric node.

Gets the list of applications deployed on a Service Fabric node. The results do not include information about deployed system applications unless explicitly queried for by ID. Results encompass deployed applications in active, activating, and downloading states. This query requires that the node name corresponds to a node on the cluster. The query fails if the provided node name does not point to any active Service Fabric nodes on the cluster.

@param node_name [String] The name of the node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param include_health_state [Boolean] Include the health state of an entity. If this parameter is false or not specified, then the health state returned is “Unknown”. When set to true, the query goes in parallel to the node and the health system service before the results are merged. As a result, the query is more expensive and may take a longer time. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 8596
def get_deployed_application_info_list_async(node_name, timeout:60, include_health_state:false, continuation_token:nil, max_results:0, custom_headers:nil)
  api_version = '6.1'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1
  fail ArgumentError, "'max_results' should satisfy the constraint - 'InclusiveMinimum': '0'" if !max_results.nil? && max_results < 0


  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'] = accept_language unless accept_language.nil?
  path_template = 'Nodes/{nodeName}/$/GetApplications'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      query_params: {'api-version' => api_version,'timeout' => timeout,'IncludeHealthState' => include_health_state,'MaxResults' => max_results},
      skip_encoding_query_params: {'ContinuationToken' => continuation_token},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PagedDeployedApplicationInfoList.mapper()
        result.body = self.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
get_deployed_application_info_list_with_http_info(node_name, timeout:60, include_health_state:false, continuation_token:nil, max_results:0, custom_headers:nil) click to toggle source

Gets the list of applications deployed on a Service Fabric node.

Gets the list of applications deployed on a Service Fabric node. The results do not include information about deployed system applications unless explicitly queried for by ID. Results encompass deployed applications in active, activating, and downloading states. This query requires that the node name corresponds to a node on the cluster. The query fails if the provided node name does not point to any active Service Fabric nodes on the cluster.

@param node_name [String] The name of the node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param include_health_state [Boolean] Include the health state of an entity. If this parameter is false or not specified, then the health state returned is “Unknown”. When set to true, the query goes in parallel to the node and the health system service before the results are merged. As a result, the query is more expensive and may take a longer time. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 8552
def get_deployed_application_info_list_with_http_info(node_name, timeout:60, include_health_state:false, continuation_token:nil, max_results:0, custom_headers:nil)
  get_deployed_application_info_list_async(node_name, timeout:timeout, include_health_state:include_health_state, continuation_token:continuation_token, max_results:max_results, custom_headers:custom_headers).value!
end
get_deployed_application_info_with_http_info(node_name, application_id, timeout:60, include_health_state:false, custom_headers:nil) click to toggle source

Gets the information about an application deployed on a Service Fabric node.

Gets the information about an application deployed on a Service Fabric node. This query returns system application information if the application ID provided is for system application. Results encompass deployed applications in active, activating, and downloading states. This query requires that the node name corresponds to a node on the cluster. The query fails if the provided node name does not point to any active Service Fabric nodes on the cluster.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param include_health_state [Boolean] Include the health state of an entity. If this parameter is false or not specified, then the health state returned is “Unknown”. When set to true, the query goes in parallel to the node and the health system service before the results are merged. As a result, the query is more expensive and may take a longer time. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 8724
def get_deployed_application_info_with_http_info(node_name, application_id, timeout:60, include_health_state:false, custom_headers:nil)
  get_deployed_application_info_async(node_name, application_id, timeout:timeout, include_health_state:include_health_state, custom_headers:custom_headers).value!
end
get_deployed_code_package_info_list(node_name, application_id, service_manifest_name:nil, code_package_name:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the list of code packages deployed on a Service Fabric node.

Gets the list of code packages deployed on a Service Fabric node for the given application.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_manifest_name [String] The name of a service manifest registered as part of an application type in a Service Fabric cluster. @param code_package_name [String] The name of code package specified in service manifest registered as part of an application type in a Service Fabric cluster. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 17304
def get_deployed_code_package_info_list(node_name, application_id, service_manifest_name:nil, code_package_name:nil, timeout:60, custom_headers:nil)
  response = get_deployed_code_package_info_list_async(node_name, application_id, service_manifest_name:service_manifest_name, code_package_name:code_package_name, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_deployed_code_package_info_list_async(node_name, application_id, service_manifest_name:nil, code_package_name:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the list of code packages deployed on a Service Fabric node.

Gets the list of code packages deployed on a Service Fabric node for the given application.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_manifest_name [String] The name of a service manifest registered as part of an application type in a Service Fabric cluster. @param code_package_name [String] The name of code package specified in service manifest registered as part of an application type in a Service Fabric cluster. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 17367
def get_deployed_code_package_info_list_async(node_name, application_id, service_manifest_name:nil, code_package_name:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'ServiceManifestName' => service_manifest_name,'CodePackageName' => code_package_name,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'DeployedCodePackageInfoElementType',
                type: {
                  name: 'Composite',
                  class_name: 'DeployedCodePackageInfo'
                }
            }
          }
        }
        result.body = self.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
get_deployed_code_package_info_list_with_http_info(node_name, application_id, service_manifest_name:nil, code_package_name:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the list of code packages deployed on a Service Fabric node.

Gets the list of code packages deployed on a Service Fabric node for the given application.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_manifest_name [String] The name of a service manifest registered as part of an application type in a Service Fabric cluster. @param code_package_name [String] The name of code package specified in service manifest registered as part of an application type in a Service Fabric cluster. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 17336
def get_deployed_code_package_info_list_with_http_info(node_name, application_id, service_manifest_name:nil, code_package_name:nil, timeout:60, custom_headers:nil)
  get_deployed_code_package_info_list_async(node_name, application_id, service_manifest_name:service_manifest_name, code_package_name:code_package_name, timeout:timeout, custom_headers:custom_headers).value!
end
get_deployed_service_package_health(node_name, application_id, service_package_name, events_health_state_filter:0, timeout:60, custom_headers:nil) click to toggle source

Gets the information about health of an service package for a specific application deployed for a Service Fabric node and application.

Gets the information about health of service package for a specific application deployed on a Service Fabric node. Use EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported on the deployed service package based on health state.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_package_name [String] The name of the service package. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [DeployedServicePackageHealth] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 16515
def get_deployed_service_package_health(node_name, application_id, service_package_name, events_health_state_filter:0, timeout:60, custom_headers:nil)
  response = get_deployed_service_package_health_async(node_name, application_id, service_package_name, events_health_state_filter:events_health_state_filter, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_deployed_service_package_health_async(node_name, application_id, service_package_name, events_health_state_filter:0, timeout:60, custom_headers:nil) click to toggle source

Gets the information about health of an service package for a specific application deployed for a Service Fabric node and application.

Gets the information about health of service package for a specific application deployed on a Service Fabric node. Use EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported on the deployed service package based on health state.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_package_name [String] The name of the service package. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 16618
def get_deployed_service_package_health_async(node_name, application_id, service_package_name, events_health_state_filter:0, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, 'service_package_name is nil' if service_package_name.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      skip_encoding_path_params: {'applicationId' => application_id,'servicePackageName' => service_package_name},
      query_params: {'api-version' => api_version,'EventsHealthStateFilter' => events_health_state_filter,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::DeployedServicePackageHealth.mapper()
        result.body = self.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
get_deployed_service_package_health_using_policy(node_name, application_id, service_package_name, events_health_state_filter:0, application_health_policy:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the information about health of service package for a specific application deployed on a Service Fabric node using the specified policy.

Gets the information about health of an service package for a specific application deployed on a Service Fabric node. using the specified policy. Use EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported on the deployed service package based on health state. Use ApplicationHealthPolicy to optionally override the health policies used to evaluate the health. This API only uses 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the deployed service package.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_package_name [String] The name of the service package. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param application_health_policy [ApplicationHealthPolicy] Describes the health policies used to evaluate the health of an application or one of its children. If not present, the health evaluation uses the health policy from application manifest or the default health policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [DeployedServicePackageHealth] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 16732
def get_deployed_service_package_health_using_policy(node_name, application_id, service_package_name, events_health_state_filter:0, application_health_policy:nil, timeout:60, custom_headers:nil)
  response = get_deployed_service_package_health_using_policy_async(node_name, application_id, service_package_name, events_health_state_filter:events_health_state_filter, application_health_policy:application_health_policy, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_deployed_service_package_health_using_policy_async(node_name, application_id, service_package_name, events_health_state_filter:0, application_health_policy:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the information about health of service package for a specific application deployed on a Service Fabric node using the specified policy.

Gets the information about health of an service package for a specific application deployed on a Service Fabric node. using the specified policy. Use EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported on the deployed service package based on health state. Use ApplicationHealthPolicy to optionally override the health policies used to evaluate the health. This API only uses 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the deployed service package.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_package_name [String] The name of the service package. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param application_health_policy [ApplicationHealthPolicy] Describes the health policies used to evaluate the health of an application or one of its children. If not present, the health evaluation uses the health policy from application manifest or the default health policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 16853
def get_deployed_service_package_health_using_policy_async(node_name, application_id, service_package_name, events_health_state_filter:0, application_health_policy:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, 'service_package_name is nil' if service_package_name.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ApplicationHealthPolicy.mapper()
  request_content = self.serialize(request_mapper,  application_health_policy)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      skip_encoding_path_params: {'applicationId' => application_id,'servicePackageName' => service_package_name},
      query_params: {'api-version' => api_version,'EventsHealthStateFilter' => events_health_state_filter,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::DeployedServicePackageHealth.mapper()
        result.body = self.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
get_deployed_service_package_health_using_policy_with_http_info(node_name, application_id, service_package_name, events_health_state_filter:0, application_health_policy:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the information about health of service package for a specific application deployed on a Service Fabric node using the specified policy.

Gets the information about health of an service package for a specific application deployed on a Service Fabric node. using the specified policy. Use EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported on the deployed service package based on health state. Use ApplicationHealthPolicy to optionally override the health policies used to evaluate the health. This API only uses 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the deployed service package.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_package_name [String] The name of the service package. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param application_health_policy [ApplicationHealthPolicy] Describes the health policies used to evaluate the health of an application or one of its children. If not present, the health evaluation uses the health policy from application manifest or the default health policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 16793
def get_deployed_service_package_health_using_policy_with_http_info(node_name, application_id, service_package_name, events_health_state_filter:0, application_health_policy:nil, timeout:60, custom_headers:nil)
  get_deployed_service_package_health_using_policy_async(node_name, application_id, service_package_name, events_health_state_filter:events_health_state_filter, application_health_policy:application_health_policy, timeout:timeout, custom_headers:custom_headers).value!
end
get_deployed_service_package_health_with_http_info(node_name, application_id, service_package_name, events_health_state_filter:0, timeout:60, custom_headers:nil) click to toggle source

Gets the information about health of an service package for a specific application deployed for a Service Fabric node and application.

Gets the information about health of service package for a specific application deployed on a Service Fabric node. Use EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported on the deployed service package based on health state.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_package_name [String] The name of the service package. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 16567
def get_deployed_service_package_health_with_http_info(node_name, application_id, service_package_name, events_health_state_filter:0, timeout:60, custom_headers:nil)
  get_deployed_service_package_health_async(node_name, application_id, service_package_name, events_health_state_filter:events_health_state_filter, timeout:timeout, custom_headers:custom_headers).value!
end
get_deployed_service_package_info_list(node_name, application_id, timeout:60, custom_headers:nil) click to toggle source

Gets the list of service packages deployed on a Service Fabric node.

Returns the information about the service packages deployed on a Service Fabric node for the given application.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 16184
def get_deployed_service_package_info_list(node_name, application_id, timeout:60, custom_headers:nil)
  response = get_deployed_service_package_info_list_async(node_name, application_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_deployed_service_package_info_list_async(node_name, application_id, timeout:60, custom_headers:nil) click to toggle source

Gets the list of service packages deployed on a Service Fabric node.

Returns the information about the service packages deployed on a Service Fabric node for the given application.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 16237
def get_deployed_service_package_info_list_async(node_name, application_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'DeployedServicePackageInfoElementType',
                type: {
                  name: 'Composite',
                  class_name: 'DeployedServicePackageInfo'
                }
            }
          }
        }
        result.body = self.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
get_deployed_service_package_info_list_by_name(node_name, application_id, service_package_name, timeout:60, custom_headers:nil) click to toggle source

Gets the list of service packages deployed on a Service Fabric node matching exactly the specified name.

Returns the information about the service packages deployed on a Service Fabric node for the given application. These results are of service packages whose name match exactly the service package name specified as the parameter.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_package_name [String] The name of the service package. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 16335
def get_deployed_service_package_info_list_by_name(node_name, application_id, service_package_name, timeout:60, custom_headers:nil)
  response = get_deployed_service_package_info_list_by_name_async(node_name, application_id, service_package_name, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_deployed_service_package_info_list_by_name_async(node_name, application_id, service_package_name, timeout:60, custom_headers:nil) click to toggle source

Gets the list of service packages deployed on a Service Fabric node matching exactly the specified name.

Returns the information about the service packages deployed on a Service Fabric node for the given application. These results are of service packages whose name match exactly the service package name specified as the parameter.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_package_name [String] The name of the service package. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 16394
def get_deployed_service_package_info_list_by_name_async(node_name, application_id, service_package_name, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, 'service_package_name is nil' if service_package_name.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      skip_encoding_path_params: {'applicationId' => application_id,'servicePackageName' => service_package_name},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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 == 204
      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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'DeployedServicePackageInfoElementType',
                type: {
                  name: 'Composite',
                  class_name: 'DeployedServicePackageInfo'
                }
            }
          }
        }
        result.body = self.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
get_deployed_service_package_info_list_by_name_with_http_info(node_name, application_id, service_package_name, timeout:60, custom_headers:nil) click to toggle source

Gets the list of service packages deployed on a Service Fabric node matching exactly the specified name.

Returns the information about the service packages deployed on a Service Fabric node for the given application. These results are of service packages whose name match exactly the service package name specified as the parameter.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_package_name [String] The name of the service package. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 16365
def get_deployed_service_package_info_list_by_name_with_http_info(node_name, application_id, service_package_name, timeout:60, custom_headers:nil)
  get_deployed_service_package_info_list_by_name_async(node_name, application_id, service_package_name, timeout:timeout, custom_headers:custom_headers).value!
end
get_deployed_service_package_info_list_with_http_info(node_name, application_id, timeout:60, custom_headers:nil) click to toggle source

Gets the list of service packages deployed on a Service Fabric node.

Returns the information about the service packages deployed on a Service Fabric node for the given application.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 16211
def get_deployed_service_package_info_list_with_http_info(node_name, application_id, timeout:60, custom_headers:nil)
  get_deployed_service_package_info_list_async(node_name, application_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_deployed_service_replica_detail_info(node_name, partition_id, replica_id, timeout:60, custom_headers:nil) click to toggle source

Gets the details of replica deployed on a Service Fabric node.

Gets the details of the replica deployed on a Service Fabric node. The information include service kind, service name, current service operation, current service operation start date time, partition ID, replica/instance ID, reported load, and other information.

@param node_name [String] The name of the node. @param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [DeployedServiceReplicaDetailInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 15673
def get_deployed_service_replica_detail_info(node_name, partition_id, replica_id, timeout:60, custom_headers:nil)
  response = get_deployed_service_replica_detail_info_async(node_name, partition_id, replica_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_deployed_service_replica_detail_info_async(node_name, partition_id, replica_id, timeout:60, custom_headers:nil) click to toggle source

Gets the details of replica deployed on a Service Fabric node.

Gets the details of the replica deployed on a Service Fabric node. The information include service kind, service name, current service operation, current service operation start date time, partition ID, replica/instance ID, reported load, and other information.

@param node_name [String] The name of the node. @param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 15722
def get_deployed_service_replica_detail_info_async(node_name, partition_id, replica_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, 'replica_id is nil' if replica_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetDetail'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      skip_encoding_path_params: {'partitionId' => partition_id,'replicaId' => replica_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::DeployedServiceReplicaDetailInfo.mapper()
        result.body = self.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
get_deployed_service_replica_detail_info_by_partition_id(node_name, partition_id, timeout:60, custom_headers:nil) click to toggle source

Gets the details of replica deployed on a Service Fabric node.

Gets the details of the replica deployed on a Service Fabric node. The information include service kind, service name, current service operation, current service operation start date time, partition ID, replica/instance ID, reported load, and other information.

@param node_name [String] The name of the node. @param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [DeployedServiceReplicaDetailInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 15799
def get_deployed_service_replica_detail_info_by_partition_id(node_name, partition_id, timeout:60, custom_headers:nil)
  response = get_deployed_service_replica_detail_info_by_partition_id_async(node_name, partition_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_deployed_service_replica_detail_info_by_partition_id_async(node_name, partition_id, timeout:60, custom_headers:nil) click to toggle source

Gets the details of replica deployed on a Service Fabric node.

Gets the details of the replica deployed on a Service Fabric node. The information include service kind, service name, current service operation, current service operation start date time, partition ID, replica/instance ID, reported load, and other information.

@param node_name [String] The name of the node. @param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 15846
def get_deployed_service_replica_detail_info_by_partition_id_async(node_name, partition_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::DeployedServiceReplicaDetailInfo.mapper()
        result.body = self.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
get_deployed_service_replica_detail_info_by_partition_id_with_http_info(node_name, partition_id, timeout:60, custom_headers:nil) click to toggle source

Gets the details of replica deployed on a Service Fabric node.

Gets the details of the replica deployed on a Service Fabric node. The information include service kind, service name, current service operation, current service operation start date time, partition ID, replica/instance ID, reported load, and other information.

@param node_name [String] The name of the node. @param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 15823
def get_deployed_service_replica_detail_info_by_partition_id_with_http_info(node_name, partition_id, timeout:60, custom_headers:nil)
  get_deployed_service_replica_detail_info_by_partition_id_async(node_name, partition_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_deployed_service_replica_detail_info_with_http_info(node_name, partition_id, replica_id, timeout:60, custom_headers:nil) click to toggle source

Gets the details of replica deployed on a Service Fabric node.

Gets the details of the replica deployed on a Service Fabric node. The information include service kind, service name, current service operation, current service operation start date time, partition ID, replica/instance ID, reported load, and other information.

@param node_name [String] The name of the node. @param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 15698
def get_deployed_service_replica_detail_info_with_http_info(node_name, partition_id, replica_id, timeout:60, custom_headers:nil)
  get_deployed_service_replica_detail_info_async(node_name, partition_id, replica_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_deployed_service_replica_info_list(node_name, application_id, partition_id:nil, service_manifest_name:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the list of replicas deployed on a Service Fabric node.

Gets the list containing the information about replicas deployed on a Service Fabric node. The information include partition ID, replica ID, status of the replica, name of the service, name of the service type, and other information. Use PartitionId or ServiceManifestName query parameters to return information about the deployed replicas matching the specified values for those parameters.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param partition_id The identity of the partition. @param service_manifest_name [String] The name of a service manifest registered as part of an application type in a Service Fabric cluster. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 15511
def get_deployed_service_replica_info_list(node_name, application_id, partition_id:nil, service_manifest_name:nil, timeout:60, custom_headers:nil)
  response = get_deployed_service_replica_info_list_async(node_name, application_id, partition_id:partition_id, service_manifest_name:service_manifest_name, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_deployed_service_replica_info_list_async(node_name, application_id, partition_id:nil, service_manifest_name:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the list of replicas deployed on a Service Fabric node.

Gets the list containing the information about replicas deployed on a Service Fabric node. The information include partition ID, replica ID, status of the replica, name of the service, name of the service type, and other information. Use PartitionId or ServiceManifestName query parameters to return information about the deployed replicas matching the specified values for those parameters.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param partition_id The identity of the partition. @param service_manifest_name [String] The name of a service manifest registered as part of an application type in a Service Fabric cluster. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 15578
def get_deployed_service_replica_info_list_async(node_name, application_id, partition_id:nil, service_manifest_name:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetReplicas'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'PartitionId' => partition_id,'ServiceManifestName' => service_manifest_name,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'DeployedServiceReplicaInfoElementType',
                type: {
                  name: 'Composite',
                  polymorphic_discriminator: 'ServiceKind',
                  uber_parent: 'DeployedServiceReplicaInfo',
                  class_name: 'DeployedServiceReplicaInfo'
                }
            }
          }
        }
        result.body = self.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
get_deployed_service_replica_info_list_with_http_info(node_name, application_id, partition_id:nil, service_manifest_name:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the list of replicas deployed on a Service Fabric node.

Gets the list containing the information about replicas deployed on a Service Fabric node. The information include partition ID, replica ID, status of the replica, name of the service, name of the service type, and other information. Use PartitionId or ServiceManifestName query parameters to return information about the deployed replicas matching the specified values for those parameters.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param partition_id The identity of the partition. @param service_manifest_name [String] The name of a service manifest registered as part of an application type in a Service Fabric cluster. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 15545
def get_deployed_service_replica_info_list_with_http_info(node_name, application_id, partition_id:nil, service_manifest_name:nil, timeout:60, custom_headers:nil)
  get_deployed_service_replica_info_list_async(node_name, application_id, partition_id:partition_id, service_manifest_name:service_manifest_name, timeout:timeout, custom_headers:custom_headers).value!
end
get_deployed_service_type_info_by_name(node_name, application_id, service_type_name, service_manifest_name:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the information about a specified service type of the application deployed on a node in a Service Fabric cluster.

Gets the list containing the information about a specific service type from the applications deployed on a node in a Service Fabric cluster. The response includes the name of the service type, its registration status, the code package that registered it and activation ID of the service package. Each entry represents one activation of a service type, differentiated by the activation ID.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_type_name [String] Specifies the name of a Service Fabric service type. @param service_manifest_name [String] The name of the service manifest to filter the list of deployed service type information. If specified, the response will only contain the information about service types that are defined in this service manifest. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 5979
def get_deployed_service_type_info_by_name(node_name, application_id, service_type_name, service_manifest_name:nil, timeout:60, custom_headers:nil)
  response = get_deployed_service_type_info_by_name_async(node_name, application_id, service_type_name, service_manifest_name:service_manifest_name, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_deployed_service_type_info_by_name_async(node_name, application_id, service_type_name, service_manifest_name:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the information about a specified service type of the application deployed on a node in a Service Fabric cluster.

Gets the list containing the information about a specific service type from the applications deployed on a node in a Service Fabric cluster. The response includes the name of the service type, its registration status, the code package that registered it and activation ID of the service package. Each entry represents one activation of a service type, differentiated by the activation ID.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_type_name [String] Specifies the name of a Service Fabric service type. @param service_manifest_name [String] The name of the service manifest to filter the list of deployed service type information. If specified, the response will only contain the information about service types that are defined in this service manifest. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 6054
def get_deployed_service_type_info_by_name_async(node_name, application_id, service_type_name, service_manifest_name:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, 'service_type_name is nil' if service_type_name.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes/{serviceTypeName}'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      skip_encoding_path_params: {'applicationId' => application_id,'serviceTypeName' => service_type_name},
      query_params: {'api-version' => api_version,'ServiceManifestName' => service_manifest_name,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'DeployedServiceTypeInfoElementType',
                type: {
                  name: 'Composite',
                  class_name: 'DeployedServiceTypeInfo'
                }
            }
          }
        }
        result.body = self.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
get_deployed_service_type_info_by_name_with_http_info(node_name, application_id, service_type_name, service_manifest_name:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the information about a specified service type of the application deployed on a node in a Service Fabric cluster.

Gets the list containing the information about a specific service type from the applications deployed on a node in a Service Fabric cluster. The response includes the name of the service type, its registration status, the code package that registered it and activation ID of the service package. Each entry represents one activation of a service type, differentiated by the activation ID.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_type_name [String] Specifies the name of a Service Fabric service type. @param service_manifest_name [String] The name of the service manifest to filter the list of deployed service type information. If specified, the response will only contain the information about service types that are defined in this service manifest. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 6017
def get_deployed_service_type_info_by_name_with_http_info(node_name, application_id, service_type_name, service_manifest_name:nil, timeout:60, custom_headers:nil)
  get_deployed_service_type_info_by_name_async(node_name, application_id, service_type_name, service_manifest_name:service_manifest_name, timeout:timeout, custom_headers:custom_headers).value!
end
get_deployed_service_type_info_list(node_name, application_id, service_manifest_name:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the list containing the information about service types from the applications deployed on a node in a Service Fabric cluster.

Gets the list containing the information about service types from the applications deployed on a node in a Service Fabric cluster. The response includes the name of the service type, its registration status, the code package that registered it and activation ID of the service package.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_manifest_name [String] The name of the service manifest to filter the list of deployed service type information. If specified, the response will only contain the information about service types that are defined in this service manifest. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 5806
def get_deployed_service_type_info_list(node_name, application_id, service_manifest_name:nil, timeout:60, custom_headers:nil)
  response = get_deployed_service_type_info_list_async(node_name, application_id, service_manifest_name:service_manifest_name, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_deployed_service_type_info_list_async(node_name, application_id, service_manifest_name:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the list containing the information about service types from the applications deployed on a node in a Service Fabric cluster.

Gets the list containing the information about service types from the applications deployed on a node in a Service Fabric cluster. The response includes the name of the service type, its registration status, the code package that registered it and activation ID of the service package.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_manifest_name [String] The name of the service manifest to filter the list of deployed service type information. If specified, the response will only contain the information about service types that are defined in this service manifest. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 5873
def get_deployed_service_type_info_list_async(node_name, application_id, service_manifest_name:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'ServiceManifestName' => service_manifest_name,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'DeployedServiceTypeInfoElementType',
                type: {
                  name: 'Composite',
                  class_name: 'DeployedServiceTypeInfo'
                }
            }
          }
        }
        result.body = self.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
get_deployed_service_type_info_list_with_http_info(node_name, application_id, service_manifest_name:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the list containing the information about service types from the applications deployed on a node in a Service Fabric cluster.

Gets the list containing the information about service types from the applications deployed on a node in a Service Fabric cluster. The response includes the name of the service type, its registration status, the code package that registered it and activation ID of the service package.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_manifest_name [String] The name of the service manifest to filter the list of deployed service type information. If specified, the response will only contain the information about service types that are defined in this service manifest. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 5840
def get_deployed_service_type_info_list_with_http_info(node_name, application_id, service_manifest_name:nil, timeout:60, custom_headers:nil)
  get_deployed_service_type_info_list_async(node_name, application_id, service_manifest_name:service_manifest_name, timeout:timeout, custom_headers:custom_headers).value!
end
get_fault_operation_list(type_filter, state_filter, timeout:60, custom_headers:nil) click to toggle source

Gets a list of user-induced fault operations filtered by provided input.

Gets the a list of user-induced fault operations filtered by provided input.

@param type_filter [Integer] Used to filter on OperationType for user-induced operations. 65535 - select all 1 - select PartitionDataLoss. 2 - select PartitionQuorumLoss. 4 - select PartitionRestart. 8 - select NodeTransition. @param state_filter [Integer] Used to filter on OperationState's for user-induced operations. 65535 - select All 1 - select Running 2 - select RollingBack 8 - select Completed 16 - select Faulted 32 - select Cancelled 64 - select ForceCancelled @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22169
def get_fault_operation_list(type_filter, state_filter, timeout:60, custom_headers:nil)
  response = get_fault_operation_list_async(type_filter, state_filter, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_fault_operation_list_async(type_filter, state_filter, timeout:60, custom_headers:nil) click to toggle source

Gets a list of user-induced fault operations filtered by provided input.

Gets the a list of user-induced fault operations filtered by provided input.

@param type_filter [Integer] Used to filter on OperationType for user-induced operations. 65535 - select all 1 - select PartitionDataLoss. 2 - select PartitionQuorumLoss. 4 - select PartitionRestart. 8 - select NodeTransition. @param state_filter [Integer] Used to filter on OperationState's for user-induced operations. 65535 - select All 1 - select Running 2 - select RollingBack 8 - select Completed 16 - select Faulted 32 - select Cancelled 64 - select ForceCancelled @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22238
def get_fault_operation_list_async(type_filter, state_filter, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'type_filter is nil' if type_filter.nil?
  fail ArgumentError, 'state_filter is nil' if state_filter.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Faults/'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'TypeFilter' => type_filter,'StateFilter' => state_filter,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'OperationStatusElementType',
                type: {
                  name: 'Composite',
                  class_name: 'OperationStatus'
                }
            }
          }
        }
        result.body = self.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
get_fault_operation_list_with_http_info(type_filter, state_filter, timeout:60, custom_headers:nil) click to toggle source

Gets a list of user-induced fault operations filtered by provided input.

Gets the a list of user-induced fault operations filtered by provided input.

@param type_filter [Integer] Used to filter on OperationType for user-induced operations. 65535 - select all 1 - select PartitionDataLoss. 2 - select PartitionQuorumLoss. 4 - select PartitionRestart. 8 - select NodeTransition. @param state_filter [Integer] Used to filter on OperationState's for user-induced operations. 65535 - select All 1 - select Running 2 - select RollingBack 8 - select Completed 16 - select Faulted 32 - select Cancelled 64 - select ForceCancelled @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22204
def get_fault_operation_list_with_http_info(type_filter, state_filter, timeout:60, custom_headers:nil)
  get_fault_operation_list_async(type_filter, state_filter, timeout:timeout, custom_headers:custom_headers).value!
end
get_image_store_content(content_path, timeout:60, custom_headers:nil) click to toggle source

Gets the image store content information.

Returns the information about the image store content at the specified contentPath relative to the root of the image store.

@param content_path [String] Relative path to file or folder in the image store from its root. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ImageStoreContent] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19546
def get_image_store_content(content_path, timeout:60, custom_headers:nil)
  response = get_image_store_content_async(content_path, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_image_store_content_async(content_path, timeout:60, custom_headers:nil) click to toggle source

Gets the image store content information.

Returns the information about the image store content at the specified contentPath relative to the root of the image store.

@param content_path [String] Relative path to file or folder in the image store from its root. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19589
def get_image_store_content_async(content_path, timeout:60, custom_headers:nil)
  api_version = '6.2'
  fail ArgumentError, 'content_path is nil' if content_path.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'ImageStore/{contentPath}'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'contentPath' => content_path},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ImageStoreContent.mapper()
        result.body = self.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
get_image_store_content_with_http_info(content_path, timeout:60, custom_headers:nil) click to toggle source

Gets the image store content information.

Returns the information about the image store content at the specified contentPath relative to the root of the image store.

@param content_path [String] Relative path to file or folder in the image store from its root. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19568
def get_image_store_content_with_http_info(content_path, timeout:60, custom_headers:nil)
  get_image_store_content_async(content_path, timeout:timeout, custom_headers:custom_headers).value!
end
get_image_store_root_content(timeout:60, custom_headers:nil) click to toggle source

Gets the content information at the root of the image store.

Returns the information about the image store content at the root of the image store.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ImageStoreContent] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19766
def get_image_store_root_content(timeout:60, custom_headers:nil)
  response = get_image_store_root_content_async(timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_image_store_root_content_async(timeout:60, custom_headers:nil) click to toggle source

Gets the content information at the root of the image store.

Returns the information about the image store content at the root of the image store.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19805
def get_image_store_root_content_async(timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'ImageStore'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ImageStoreContent.mapper()
        result.body = self.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
get_image_store_root_content_with_http_info(timeout:60, custom_headers:nil) click to toggle source

Gets the content information at the root of the image store.

Returns the information about the image store content at the root of the image store.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19786
def get_image_store_root_content_with_http_info(timeout:60, custom_headers:nil)
  get_image_store_root_content_async(timeout:timeout, custom_headers:custom_headers).value!
end
get_image_store_upload_session_by_id(session_id, timeout:60, custom_headers:nil) click to toggle source

Get the image store upload session by ID.

Gets the image store upload session identified by the given ID. User can query the upload session at any time during uploading.

@param session_id A GUID generated by the user for a file uploading. It identifies an image store upload session which keeps track of all file chunks until it is committed. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [UploadSession] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 20204
def get_image_store_upload_session_by_id(session_id, timeout:60, custom_headers:nil)
  response = get_image_store_upload_session_by_id_async(session_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_image_store_upload_session_by_id_async(session_id, timeout:60, custom_headers:nil) click to toggle source

Get the image store upload session by ID.

Gets the image store upload session identified by the given ID. User can query the upload session at any time during uploading.

@param session_id A GUID generated by the user for a file uploading. It identifies an image store upload session which keeps track of all file chunks until it is committed. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 20249
def get_image_store_upload_session_by_id_async(session_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'session_id is nil' if session_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'ImageStore/$/GetUploadSession'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'session-id' => session_id,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::UploadSession.mapper()
        result.body = self.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
get_image_store_upload_session_by_id_with_http_info(session_id, timeout:60, custom_headers:nil) click to toggle source

Get the image store upload session by ID.

Gets the image store upload session identified by the given ID. User can query the upload session at any time during uploading.

@param session_id A GUID generated by the user for a file uploading. It identifies an image store upload session which keeps track of all file chunks until it is committed. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 20227
def get_image_store_upload_session_by_id_with_http_info(session_id, timeout:60, custom_headers:nil)
  get_image_store_upload_session_by_id_async(session_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_image_store_upload_session_by_path(content_path, timeout:60, custom_headers:nil) click to toggle source

Get the image store upload session by relative path.

Gets the image store upload session associated with the given image store relative path. User can query the upload session at any time during uploading.

@param content_path [String] Relative path to file or folder in the image store from its root. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [UploadSession] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 20321
def get_image_store_upload_session_by_path(content_path, timeout:60, custom_headers:nil)
  response = get_image_store_upload_session_by_path_async(content_path, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_image_store_upload_session_by_path_async(content_path, timeout:60, custom_headers:nil) click to toggle source

Get the image store upload session by relative path.

Gets the image store upload session associated with the given image store relative path. User can query the upload session at any time during uploading.

@param content_path [String] Relative path to file or folder in the image store from its root. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 20366
def get_image_store_upload_session_by_path_async(content_path, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'content_path is nil' if content_path.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'ImageStore/{contentPath}/$/GetUploadSession'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'contentPath' => content_path},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::UploadSession.mapper()
        result.body = self.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
get_image_store_upload_session_by_path_with_http_info(content_path, timeout:60, custom_headers:nil) click to toggle source

Get the image store upload session by relative path.

Gets the image store upload session associated with the given image store relative path. User can query the upload session at any time during uploading.

@param content_path [String] Relative path to file or folder in the image store from its root. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 20344
def get_image_store_upload_session_by_path_with_http_info(content_path, timeout:60, custom_headers:nil)
  get_image_store_upload_session_by_path_async(content_path, timeout:timeout, custom_headers:custom_headers).value!
end
get_name_exists_info(name_id, timeout:60, custom_headers:nil) click to toggle source

Returns whether the Service Fabric name exists.

Returns whether the specified Service Fabric name exists.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26576
def get_name_exists_info(name_id, timeout:60, custom_headers:nil)
  response = get_name_exists_info_async(name_id, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
get_name_exists_info_async(name_id, timeout:60, custom_headers:nil) click to toggle source

Returns whether the Service Fabric name exists.

Returns whether the specified Service Fabric name exists.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26617
def get_name_exists_info_async(name_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'name_id is nil' if name_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Names/{nameId}'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nameId' => name_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
get_name_exists_info_with_http_info(name_id, timeout:60, custom_headers:nil) click to toggle source

Returns whether the Service Fabric name exists.

Returns whether the specified Service Fabric name exists.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26597
def get_name_exists_info_with_http_info(name_id, timeout:60, custom_headers:nil)
  get_name_exists_info_async(name_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_node_event_list(node_name, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets a Node-related events.

The response is list of NodeEvent objects.

@param node_name [String] The name of the node. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27898
def get_node_event_list(node_name, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  response = get_node_event_list_async(node_name, start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_node_event_list_async(node_name, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets a Node-related events.

The response is list of NodeEvent objects.

@param node_name [String] The name of the node. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27963
def get_node_event_list_async(node_name, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  api_version = '6.2-preview'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1
  fail ArgumentError, 'start_time_utc is nil' if start_time_utc.nil?
  fail ArgumentError, 'end_time_utc is nil' if end_time_utc.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'] = accept_language unless accept_language.nil?
  path_template = 'EventsStore/Nodes/{nodeName}/$/Events'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      query_params: {'api-version' => api_version,'timeout' => timeout,'StartTimeUtc' => start_time_utc,'EndTimeUtc' => end_time_utc,'EventsTypesFilter' => events_types_filter,'ExcludeAnalysisEvents' => exclude_analysis_events,'SkipCorrelationLookup' => skip_correlation_lookup},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'NodeEventElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NodeEvent'
                }
            }
          }
        }
        result.body = self.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
get_node_event_list_with_http_info(node_name, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets a Node-related events.

The response is list of NodeEvent objects.

@param node_name [String] The name of the node. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27931
def get_node_event_list_with_http_info(node_name, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  get_node_event_list_async(node_name, start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
end
get_node_health(node_name, events_health_state_filter:0, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric node.

Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection of health events reported on the node based on the health state. If the node that you specify by name does not exist in the health store, this returns an error.

@param node_name [String] The name of the node. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [NodeHealth] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 3544
def get_node_health(node_name, events_health_state_filter:0, timeout:60, custom_headers:nil)
  response = get_node_health_async(node_name, events_health_state_filter:events_health_state_filter, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_node_health_async(node_name, events_health_state_filter:0, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric node.

Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection of health events reported on the node based on the health state. If the node that you specify by name does not exist in the health store, this returns an error.

@param node_name [String] The name of the node. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 3631
def get_node_health_async(node_name, events_health_state_filter:0, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Nodes/{nodeName}/$/GetHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      query_params: {'api-version' => api_version,'EventsHealthStateFilter' => events_health_state_filter,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::NodeHealth.mapper()
        result.body = self.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
get_node_health_using_policy(node_name, events_health_state_filter:0, cluster_health_policy:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric node, by using the specified health policy.

Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection of health events reported on the node based on the health state. Use ClusterHealthPolicy in the POST body to override the health policies used to evaluate the health. If the node that you specify by name does not exist in the health store, this returns an error.

@param node_name [String] The name of the node. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param cluster_health_policy [ClusterHealthPolicy] Describes the health policies used to evaluate the health of a cluster or node. If not present, the health evaluation uses the health policy from cluster manifest or the default health policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [NodeHealth] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 3731
def get_node_health_using_policy(node_name, events_health_state_filter:0, cluster_health_policy:nil, timeout:60, custom_headers:nil)
  response = get_node_health_using_policy_async(node_name, events_health_state_filter:events_health_state_filter, cluster_health_policy:cluster_health_policy, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_node_health_using_policy_async(node_name, events_health_state_filter:0, cluster_health_policy:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric node, by using the specified health policy.

Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection of health events reported on the node based on the health state. Use ClusterHealthPolicy in the POST body to override the health policies used to evaluate the health. If the node that you specify by name does not exist in the health store, this returns an error.

@param node_name [String] The name of the node. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param cluster_health_policy [ClusterHealthPolicy] Describes the health policies used to evaluate the health of a cluster or node. If not present, the health evaluation uses the health policy from cluster manifest or the default health policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 3830
def get_node_health_using_policy_async(node_name, events_health_state_filter:0, cluster_health_policy:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ClusterHealthPolicy.mapper()
  request_content = self.serialize(request_mapper,  cluster_health_policy)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Nodes/{nodeName}/$/GetHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      query_params: {'api-version' => api_version,'EventsHealthStateFilter' => events_health_state_filter,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::NodeHealth.mapper()
        result.body = self.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
get_node_health_using_policy_with_http_info(node_name, events_health_state_filter:0, cluster_health_policy:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric node, by using the specified health policy.

Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection of health events reported on the node based on the health state. Use ClusterHealthPolicy in the POST body to override the health policies used to evaluate the health. If the node that you specify by name does not exist in the health store, this returns an error.

@param node_name [String] The name of the node. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param cluster_health_policy [ClusterHealthPolicy] Describes the health policies used to evaluate the health of a cluster or node. If not present, the health evaluation uses the health policy from cluster manifest or the default health policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 3781
def get_node_health_using_policy_with_http_info(node_name, events_health_state_filter:0, cluster_health_policy:nil, timeout:60, custom_headers:nil)
  get_node_health_using_policy_async(node_name, events_health_state_filter:events_health_state_filter, cluster_health_policy:cluster_health_policy, timeout:timeout, custom_headers:custom_headers).value!
end
get_node_health_with_http_info(node_name, events_health_state_filter:0, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric node.

Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection of health events reported on the node based on the health state. If the node that you specify by name does not exist in the health store, this returns an error.

@param node_name [String] The name of the node. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 3588
def get_node_health_with_http_info(node_name, events_health_state_filter:0, timeout:60, custom_headers:nil)
  get_node_health_async(node_name, events_health_state_filter:events_health_state_filter, timeout:timeout, custom_headers:custom_headers).value!
end
get_node_info(node_name, timeout:60, custom_headers:nil) click to toggle source

Gets the information about a specific node in the Service Fabric cluster.

Gets the information about a specific node in the Service Fabric Cluster. The response includes the name, status, id, health, uptime, and other details about the node.

@param node_name [String] The name of the node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [NodeInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 3407
def get_node_info(node_name, timeout:60, custom_headers:nil)
  response = get_node_info_async(node_name, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_node_info_async(node_name, timeout:60, custom_headers:nil) click to toggle source

Gets the information about a specific node in the Service Fabric cluster.

Gets the information about a specific node in the Service Fabric Cluster. The response includes the name, status, id, health, uptime, and other details about the node.

@param node_name [String] The name of the node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 3450
def get_node_info_async(node_name, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Nodes/{nodeName}'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::NodeInfo.mapper()
        result.body = self.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
get_node_info_list(continuation_token:nil, node_status_filter:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the list of nodes in the Service Fabric cluster.

Gets the list of nodes in the Service Fabric cluster. The response includes the name, status, id, health, uptime, and other details about the node.

@param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param node_status_filter [NodeStatusFilter] Allows filtering the nodes based on the NodeStatus. Only the nodes that are matching the specified filter value will be returned. The filter value can be one of the following. Possible values include: 'default', 'all', 'up', 'down', 'enabling', 'disabling', 'disabled', 'unknown', 'removed' @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PagedNodeInfoList] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 3273
def get_node_info_list(continuation_token:nil, node_status_filter:nil, timeout:60, custom_headers:nil)
  response = get_node_info_list_async(continuation_token:continuation_token, node_status_filter:node_status_filter, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_node_info_list_async(continuation_token:nil, node_status_filter:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the list of nodes in the Service Fabric cluster.

Gets the list of nodes in the Service Fabric cluster. The response includes the name, status, id, health, uptime, and other details about the node.

@param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param node_status_filter [NodeStatusFilter] Allows filtering the nodes based on the NodeStatus. Only the nodes that are matching the specified filter value will be returned. The filter value can be one of the following. Possible values include: 'default', 'all', 'up', 'down', 'enabling', 'disabling', 'disabled', 'unknown', 'removed' @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 3336
def get_node_info_list_async(continuation_token:nil, node_status_filter:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Nodes'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'NodeStatusFilter' => node_status_filter,'timeout' => timeout},
      skip_encoding_query_params: {'ContinuationToken' => continuation_token},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PagedNodeInfoList.mapper()
        result.body = self.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
get_node_info_list_with_http_info(continuation_token:nil, node_status_filter:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the list of nodes in the Service Fabric cluster.

Gets the list of nodes in the Service Fabric cluster. The response includes the name, status, id, health, uptime, and other details about the node.

@param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param node_status_filter [NodeStatusFilter] Allows filtering the nodes based on the NodeStatus. Only the nodes that are matching the specified filter value will be returned. The filter value can be one of the following. Possible values include: 'default', 'all', 'up', 'down', 'enabling', 'disabling', 'disabled', 'unknown', 'removed' @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 3305
def get_node_info_list_with_http_info(continuation_token:nil, node_status_filter:nil, timeout:60, custom_headers:nil)
  get_node_info_list_async(continuation_token:continuation_token, node_status_filter:node_status_filter, timeout:timeout, custom_headers:custom_headers).value!
end
get_node_info_with_http_info(node_name, timeout:60, custom_headers:nil) click to toggle source

Gets the information about a specific node in the Service Fabric cluster.

Gets the information about a specific node in the Service Fabric Cluster. The response includes the name, status, id, health, uptime, and other details about the node.

@param node_name [String] The name of the node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 3429
def get_node_info_with_http_info(node_name, timeout:60, custom_headers:nil)
  get_node_info_async(node_name, timeout:timeout, custom_headers:custom_headers).value!
end
get_node_load_info(node_name, timeout:60, custom_headers:nil) click to toggle source

Gets the load information of a Service Fabric node.

Retrieves the load information of a Service Fabric node for all the metrics that have load or capacity defined.

@param node_name [String] The name of the node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [NodeLoadInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 4107
def get_node_load_info(node_name, timeout:60, custom_headers:nil)
  response = get_node_load_info_async(node_name, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_node_load_info_async(node_name, timeout:60, custom_headers:nil) click to toggle source

Gets the load information of a Service Fabric node.

Retrieves the load information of a Service Fabric node for all the metrics that have load or capacity defined.

@param node_name [String] The name of the node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 4148
def get_node_load_info_async(node_name, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Nodes/{nodeName}/$/GetLoadInformation'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::NodeLoadInfo.mapper()
        result.body = self.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
get_node_load_info_with_http_info(node_name, timeout:60, custom_headers:nil) click to toggle source

Gets the load information of a Service Fabric node.

Retrieves the load information of a Service Fabric node for all the metrics that have load or capacity defined.

@param node_name [String] The name of the node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 4128
def get_node_load_info_with_http_info(node_name, timeout:60, custom_headers:nil)
  get_node_load_info_async(node_name, timeout:timeout, custom_headers:custom_headers).value!
end
get_node_transition_progress(node_name, operation_id, timeout:60, custom_headers:nil) click to toggle source

Gets the progress of an operation started using StartNodeTransition.

Gets the progress of an operation started with StartNodeTransition using the provided OperationId.

@param node_name [String] The name of the node. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [NodeTransitionProgress] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22038
def get_node_transition_progress(node_name, operation_id, timeout:60, custom_headers:nil)
  response = get_node_transition_progress_async(node_name, operation_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_node_transition_progress_async(node_name, operation_id, timeout:60, custom_headers:nil) click to toggle source

Gets the progress of an operation started using StartNodeTransition.

Gets the progress of an operation started with StartNodeTransition using the provided OperationId.

@param node_name [String] The name of the node. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22083
def get_node_transition_progress_async(node_name, operation_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'operation_id is nil' if operation_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Faults/Nodes/{nodeName}/$/GetTransitionProgress'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      query_params: {'api-version' => api_version,'OperationId' => operation_id,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::NodeTransitionProgress.mapper()
        result.body = self.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
get_node_transition_progress_with_http_info(node_name, operation_id, timeout:60, custom_headers:nil) click to toggle source

Gets the progress of an operation started using StartNodeTransition.

Gets the progress of an operation started with StartNodeTransition using the provided OperationId.

@param node_name [String] The name of the node. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 22061
def get_node_transition_progress_with_http_info(node_name, operation_id, timeout:60, custom_headers:nil)
  get_node_transition_progress_async(node_name, operation_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_nodes_event_list(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets all Nodes-related Events.

The response is list of NodeEvent objects.

@param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 28063
def get_nodes_event_list(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  response = get_nodes_event_list_async(start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_nodes_event_list_async(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets all Nodes-related Events.

The response is list of NodeEvent objects.

@param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 28126
def get_nodes_event_list_async(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1
  fail ArgumentError, 'start_time_utc is nil' if start_time_utc.nil?
  fail ArgumentError, 'end_time_utc is nil' if end_time_utc.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'] = accept_language unless accept_language.nil?
  path_template = 'EventsStore/Nodes/Events'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout,'StartTimeUtc' => start_time_utc,'EndTimeUtc' => end_time_utc,'EventsTypesFilter' => events_types_filter,'ExcludeAnalysisEvents' => exclude_analysis_events,'SkipCorrelationLookup' => skip_correlation_lookup},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'NodeEventElementType',
                type: {
                  name: 'Composite',
                  class_name: 'NodeEvent'
                }
            }
          }
        }
        result.body = self.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
get_nodes_event_list_with_http_info(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets all Nodes-related Events.

The response is list of NodeEvent objects.

@param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 28095
def get_nodes_event_list_with_http_info(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  get_nodes_event_list_async(start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
end
get_partition_backup_configuration_info(partition_id, timeout:60, custom_headers:nil) click to toggle source

Gets the partition backup configuration information

Gets the Service Fabric Backup configuration information for the specified partition.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PartitionBackupConfigurationInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25291
def get_partition_backup_configuration_info(partition_id, timeout:60, custom_headers:nil)
  response = get_partition_backup_configuration_info_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_partition_backup_configuration_info_async(partition_id, timeout:60, custom_headers:nil) click to toggle source

Gets the partition backup configuration information

Gets the Service Fabric Backup configuration information for the specified partition.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25332
def get_partition_backup_configuration_info_async(partition_id, timeout:60, custom_headers:nil)
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Partitions/{partitionId}/$/GetBackupConfigurationInfo'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PartitionBackupConfigurationInfo.mapper()
        result.body = self.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
get_partition_backup_configuration_info_with_http_info(partition_id, timeout:60, custom_headers:nil) click to toggle source

Gets the partition backup configuration information

Gets the Service Fabric Backup configuration information for the specified partition.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25312
def get_partition_backup_configuration_info_with_http_info(partition_id, timeout:60, custom_headers:nil)
  get_partition_backup_configuration_info_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_partition_backup_list(partition_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, custom_headers:nil) click to toggle source

Gets the list of backups available for the specified partition.

Returns a list of backups available for the specified partition. The server enumerates all the backups available in the backup store configured in the backup policy. It also allows filtering of the result based on start and end datetime or just fetching the latest available backup for the partition.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param latest [Boolean] Specifies whether to get only the most recent backup available for a partition for the specified time range. @param start_date_time_filter [DateTime] Specify the start date time from which to enumerate backups, in datetime format. The date time must be specified in ISO8601 format. This is an optional parameter. If not specified, all backups from the beginning are enumerated. @param end_date_time_filter [DateTime] Specify the end date time till which to enumerate backups, in datetime format. The date time must be specified in ISO8601 format. This is an optional parameter. If not specified, enumeration is done till the most recent backup. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PagedBackupInfoList] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25415
def get_partition_backup_list(partition_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, custom_headers:nil)
  response = get_partition_backup_list_async(partition_id, timeout:timeout, latest:latest, start_date_time_filter:start_date_time_filter, end_date_time_filter:end_date_time_filter, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_partition_backup_list_async(partition_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, custom_headers:nil) click to toggle source

Gets the list of backups available for the specified partition.

Returns a list of backups available for the specified partition. The server enumerates all the backups available in the backup store configured in the backup policy. It also allows filtering of the result based on start and end datetime or just fetching the latest available backup for the partition.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param latest [Boolean] Specifies whether to get only the most recent backup available for a partition for the specified time range. @param start_date_time_filter [DateTime] Specify the start date time from which to enumerate backups, in datetime format. The date time must be specified in ISO8601 format. This is an optional parameter. If not specified, all backups from the beginning are enumerated. @param end_date_time_filter [DateTime] Specify the end date time till which to enumerate backups, in datetime format. The date time must be specified in ISO8601 format. This is an optional parameter. If not specified, enumeration is done till the most recent backup. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25480
def get_partition_backup_list_async(partition_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, custom_headers:nil)
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Partitions/{partitionId}/$/GetBackups'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'timeout' => timeout,'Latest' => latest,'StartDateTimeFilter' => start_date_time_filter,'EndDateTimeFilter' => end_date_time_filter},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PagedBackupInfoList.mapper()
        result.body = self.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
get_partition_backup_list_with_http_info(partition_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, custom_headers:nil) click to toggle source

Gets the list of backups available for the specified partition.

Returns a list of backups available for the specified partition. The server enumerates all the backups available in the backup store configured in the backup policy. It also allows filtering of the result based on start and end datetime or just fetching the latest available backup for the partition.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param latest [Boolean] Specifies whether to get only the most recent backup available for a partition for the specified time range. @param start_date_time_filter [DateTime] Specify the start date time from which to enumerate backups, in datetime format. The date time must be specified in ISO8601 format. This is an optional parameter. If not specified, all backups from the beginning are enumerated. @param end_date_time_filter [DateTime] Specify the end date time till which to enumerate backups, in datetime format. The date time must be specified in ISO8601 format. This is an optional parameter. If not specified, enumeration is done till the most recent backup. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25448
def get_partition_backup_list_with_http_info(partition_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, custom_headers:nil)
  get_partition_backup_list_async(partition_id, timeout:timeout, latest:latest, start_date_time_filter:start_date_time_filter, end_date_time_filter:end_date_time_filter, custom_headers:custom_headers).value!
end
get_partition_backup_progress(partition_id, timeout:60, custom_headers:nil) click to toggle source

Gets details for the latest backup triggered for this partition.

Returns information about the state of the latest backup along with details or failure reason in case of completion.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [BackupProgressInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25912
def get_partition_backup_progress(partition_id, timeout:60, custom_headers:nil)
  response = get_partition_backup_progress_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_partition_backup_progress_async(partition_id, timeout:60, custom_headers:nil) click to toggle source

Gets details for the latest backup triggered for this partition.

Returns information about the state of the latest backup along with details or failure reason in case of completion.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25953
def get_partition_backup_progress_async(partition_id, timeout:60, custom_headers:nil)
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Partitions/{partitionId}/$/GetBackupProgress'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::BackupProgressInfo.mapper()
        result.body = self.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
get_partition_backup_progress_with_http_info(partition_id, timeout:60, custom_headers:nil) click to toggle source

Gets details for the latest backup triggered for this partition.

Returns information about the state of the latest backup along with details or failure reason in case of completion.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25933
def get_partition_backup_progress_with_http_info(partition_id, timeout:60, custom_headers:nil)
  get_partition_backup_progress_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_partition_event_list(partition_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets a Partition-related events.

The response is list of PartitionEvent objects.

@param partition_id The identity of the partition. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 28912
def get_partition_event_list(partition_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  response = get_partition_event_list_async(partition_id, start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_partition_event_list_async(partition_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets a Partition-related events.

The response is list of PartitionEvent objects.

@param partition_id The identity of the partition. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 28977
def get_partition_event_list_async(partition_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  api_version = '6.2-preview'
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1
  fail ArgumentError, 'start_time_utc is nil' if start_time_utc.nil?
  fail ArgumentError, 'end_time_utc is nil' if end_time_utc.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'] = accept_language unless accept_language.nil?
  path_template = 'EventsStore/Partitions/{partitionId}/$/Events'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'timeout' => timeout,'StartTimeUtc' => start_time_utc,'EndTimeUtc' => end_time_utc,'EventsTypesFilter' => events_types_filter,'ExcludeAnalysisEvents' => exclude_analysis_events,'SkipCorrelationLookup' => skip_correlation_lookup},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'PartitionEventElementType',
                type: {
                  name: 'Composite',
                  class_name: 'PartitionEvent'
                }
            }
          }
        }
        result.body = self.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
get_partition_event_list_with_http_info(partition_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets a Partition-related events.

The response is list of PartitionEvent objects.

@param partition_id The identity of the partition. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 28945
def get_partition_event_list_with_http_info(partition_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  get_partition_event_list_async(partition_id, start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
end
get_partition_health(partition_id, events_health_state_filter:0, replicas_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the health of the specified Service Fabric partition.

Gets the health information of the specified partition. Use EventsHealthStateFilter to filter the collection of health events reported on the service based on the health state. Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState objects on the partition. If you specify a partition that does not exist in the health store, this request returns an error.

@param partition_id The identity of the partition. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param replicas_health_state_filter [Integer] Allows filtering the collection of ReplicaHealthState objects on the partition. The value can be obtained from members or bitwise operations on members of HealthStateFilter. Only replicas that match the filter will be returned. All replicas will be used to evaluate the aggregated health state. If not specified, all entries will be returned.The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) will be returned. The possible values for this parameter include integer value of one of the following health states.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PartitionHealth] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 12401
def get_partition_health(partition_id, events_health_state_filter:0, replicas_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil)
  response = get_partition_health_async(partition_id, events_health_state_filter:events_health_state_filter, replicas_health_state_filter:replicas_health_state_filter, exclude_health_statistics:exclude_health_statistics, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_partition_health_async(partition_id, events_health_state_filter:0, replicas_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the health of the specified Service Fabric partition.

Gets the health information of the specified partition. Use EventsHealthStateFilter to filter the collection of health events reported on the service based on the health state. Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState objects on the partition. If you specify a partition that does not exist in the health store, this request returns an error.

@param partition_id The identity of the partition. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param replicas_health_state_filter [Integer] Allows filtering the collection of ReplicaHealthState objects on the partition. The value can be obtained from members or bitwise operations on members of HealthStateFilter. Only replicas that match the filter will be returned. All replicas will be used to evaluate the aggregated health state. If not specified, all entries will be returned.The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) will be returned. The possible values for this parameter include integer value of one of the following health states.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 12544
def get_partition_health_async(partition_id, events_health_state_filter:0, replicas_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Partitions/{partitionId}/$/GetHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'EventsHealthStateFilter' => events_health_state_filter,'ReplicasHealthStateFilter' => replicas_health_state_filter,'ExcludeHealthStatistics' => exclude_health_statistics,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PartitionHealth.mapper()
        result.body = self.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
get_partition_health_using_policy(partition_id, events_health_state_filter:0, replicas_health_state_filter:0, application_health_policy:nil, exclude_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the health of the specified Service Fabric partition, by using the specified health policy.

Gets the health information of the specified partition. If the application health policy is specified, the health evaluation uses it to get the aggregated health state. If the policy is not specified, the health evaluation uses the application health policy defined in the application manifest, or the default health policy, if no policy is defined in the manifest. Use EventsHealthStateFilter to filter the collection of health events reported on the partition based on the health state. Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState objects on the partition. Use ApplicationHealthPolicy in the POST body to override the health policies used to evaluate the health. If you specify a partition that does not exist in the health store, this request returns an error.

@param partition_id The identity of the partition. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param replicas_health_state_filter [Integer] Allows filtering the collection of ReplicaHealthState objects on the partition. The value can be obtained from members or bitwise operations on members of HealthStateFilter. Only replicas that match the filter will be returned. All replicas will be used to evaluate the aggregated health state. If not specified, all entries will be returned.The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) will be returned. The possible values for this parameter include integer value of one of the following health states.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param application_health_policy [ApplicationHealthPolicy] Describes the health policies used to evaluate the health of an application or one of its children. If not present, the health evaluation uses the health policy from application manifest or the default health policy. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PartitionHealth] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 12678
def get_partition_health_using_policy(partition_id, events_health_state_filter:0, replicas_health_state_filter:0, application_health_policy:nil, exclude_health_statistics:false, timeout:60, custom_headers:nil)
  response = get_partition_health_using_policy_async(partition_id, events_health_state_filter:events_health_state_filter, replicas_health_state_filter:replicas_health_state_filter, application_health_policy:application_health_policy, exclude_health_statistics:exclude_health_statistics, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_partition_health_using_policy_async(partition_id, events_health_state_filter:0, replicas_health_state_filter:0, application_health_policy:nil, exclude_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the health of the specified Service Fabric partition, by using the specified health policy.

Gets the health information of the specified partition. If the application health policy is specified, the health evaluation uses it to get the aggregated health state. If the policy is not specified, the health evaluation uses the application health policy defined in the application manifest, or the default health policy, if no policy is defined in the manifest. Use EventsHealthStateFilter to filter the collection of health events reported on the partition based on the health state. Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState objects on the partition. Use ApplicationHealthPolicy in the POST body to override the health policies used to evaluate the health. If you specify a partition that does not exist in the health store, this request returns an error.

@param partition_id The identity of the partition. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param replicas_health_state_filter [Integer] Allows filtering the collection of ReplicaHealthState objects on the partition. The value can be obtained from members or bitwise operations on members of HealthStateFilter. Only replicas that match the filter will be returned. All replicas will be used to evaluate the aggregated health state. If not specified, all entries will be returned.The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) will be returned. The possible values for this parameter include integer value of one of the following health states.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param application_health_policy [ApplicationHealthPolicy] Describes the health policies used to evaluate the health of an application or one of its children. If not present, the health evaluation uses the health policy from application manifest or the default health policy. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 12845
def get_partition_health_using_policy_async(partition_id, events_health_state_filter:0, replicas_health_state_filter:0, application_health_policy:nil, exclude_health_statistics:false, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ApplicationHealthPolicy.mapper()
  request_content = self.serialize(request_mapper,  application_health_policy)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Partitions/{partitionId}/$/GetHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'EventsHealthStateFilter' => events_health_state_filter,'ReplicasHealthStateFilter' => replicas_health_state_filter,'ExcludeHealthStatistics' => exclude_health_statistics,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PartitionHealth.mapper()
        result.body = self.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
get_partition_health_using_policy_with_http_info(partition_id, events_health_state_filter:0, replicas_health_state_filter:0, application_health_policy:nil, exclude_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the health of the specified Service Fabric partition, by using the specified health policy.

Gets the health information of the specified partition. If the application health policy is specified, the health evaluation uses it to get the aggregated health state. If the policy is not specified, the health evaluation uses the application health policy defined in the application manifest, or the default health policy, if no policy is defined in the manifest. Use EventsHealthStateFilter to filter the collection of health events reported on the partition based on the health state. Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState objects on the partition. Use ApplicationHealthPolicy in the POST body to override the health policies used to evaluate the health. If you specify a partition that does not exist in the health store, this request returns an error.

@param partition_id The identity of the partition. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param replicas_health_state_filter [Integer] Allows filtering the collection of ReplicaHealthState objects on the partition. The value can be obtained from members or bitwise operations on members of HealthStateFilter. Only replicas that match the filter will be returned. All replicas will be used to evaluate the aggregated health state. If not specified, all entries will be returned.The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) will be returned. The possible values for this parameter include integer value of one of the following health states.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param application_health_policy [ApplicationHealthPolicy] Describes the health policies used to evaluate the health of an application or one of its children. If not present, the health evaluation uses the health policy from application manifest or the default health policy. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 12762
def get_partition_health_using_policy_with_http_info(partition_id, events_health_state_filter:0, replicas_health_state_filter:0, application_health_policy:nil, exclude_health_statistics:false, timeout:60, custom_headers:nil)
  get_partition_health_using_policy_async(partition_id, events_health_state_filter:events_health_state_filter, replicas_health_state_filter:replicas_health_state_filter, application_health_policy:application_health_policy, exclude_health_statistics:exclude_health_statistics, timeout:timeout, custom_headers:custom_headers).value!
end
get_partition_health_with_http_info(partition_id, events_health_state_filter:0, replicas_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the health of the specified Service Fabric partition.

Gets the health information of the specified partition. Use EventsHealthStateFilter to filter the collection of health events reported on the service based on the health state. Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState objects on the partition. If you specify a partition that does not exist in the health store, this request returns an error.

@param partition_id The identity of the partition. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param replicas_health_state_filter [Integer] Allows filtering the collection of ReplicaHealthState objects on the partition. The value can be obtained from members or bitwise operations on members of HealthStateFilter. Only replicas that match the filter will be returned. All replicas will be used to evaluate the aggregated health state. If not specified, all entries will be returned.The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) will be returned. The possible values for this parameter include integer value of one of the following health states.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 12473
def get_partition_health_with_http_info(partition_id, events_health_state_filter:0, replicas_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil)
  get_partition_health_async(partition_id, events_health_state_filter:events_health_state_filter, replicas_health_state_filter:replicas_health_state_filter, exclude_health_statistics:exclude_health_statistics, timeout:timeout, custom_headers:custom_headers).value!
end
get_partition_info(partition_id, timeout:60, custom_headers:nil) click to toggle source

Gets the information about a Service Fabric partition.

Gets the information about the specified partition. The response includes the partition ID, partitioning scheme information, keys supported by the partition, status, health, and other details about the partition.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ServicePartitionInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 12124
def get_partition_info(partition_id, timeout:60, custom_headers:nil)
  response = get_partition_info_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_partition_info_async(partition_id, timeout:60, custom_headers:nil) click to toggle source

Gets the information about a Service Fabric partition.

Gets the information about the specified partition. The response includes the partition ID, partitioning scheme information, keys supported by the partition, status, health, and other details about the partition.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 12167
def get_partition_info_async(partition_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Partitions/{partitionId}'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ServicePartitionInfo.mapper()
        result.body = self.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
get_partition_info_list(service_id, continuation_token:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the list of partitions of a Service Fabric service.

Gets the list of partitions of a Service Fabric service. The response includes the partition ID, partitioning scheme information, keys supported by the partition, status, health, and other details about the partition.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PagedServicePartitionInfoList] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 11982
def get_partition_info_list(service_id, continuation_token:nil, timeout:60, custom_headers:nil)
  response = get_partition_info_list_async(service_id, continuation_token:continuation_token, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_partition_info_list_async(service_id, continuation_token:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the list of partitions of a Service Fabric service.

Gets the list of partitions of a Service Fabric service. The response includes the partition ID, partitioning scheme information, keys supported by the partition, status, health, and other details about the partition.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 12051
def get_partition_info_list_async(service_id, continuation_token:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Services/{serviceId}/$/GetPartitions'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      skip_encoding_query_params: {'ContinuationToken' => continuation_token},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PagedServicePartitionInfoList.mapper()
        result.body = self.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
get_partition_info_list_with_http_info(service_id, continuation_token:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the list of partitions of a Service Fabric service.

Gets the list of partitions of a Service Fabric service. The response includes the partition ID, partitioning scheme information, keys supported by the partition, status, health, and other details about the partition.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 12017
def get_partition_info_list_with_http_info(service_id, continuation_token:nil, timeout:60, custom_headers:nil)
  get_partition_info_list_async(service_id, continuation_token:continuation_token, timeout:timeout, custom_headers:custom_headers).value!
end
get_partition_info_with_http_info(partition_id, timeout:60, custom_headers:nil) click to toggle source

Gets the information about a Service Fabric partition.

Gets the information about the specified partition. The response includes the partition ID, partitioning scheme information, keys supported by the partition, status, health, and other details about the partition.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 12146
def get_partition_info_with_http_info(partition_id, timeout:60, custom_headers:nil)
  get_partition_info_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_partition_load_information(partition_id, timeout:60, custom_headers:nil) click to toggle source

Gets the load information of the specified Service Fabric partition.

Returns information about the load of a specified partition. The response includes a list of load reports for a Service Fabric partition. Each report includes the load metric name, value, and last reported time in UTC.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PartitionLoadInformation] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13127
def get_partition_load_information(partition_id, timeout:60, custom_headers:nil)
  response = get_partition_load_information_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_partition_load_information_async(partition_id, timeout:60, custom_headers:nil) click to toggle source

Gets the load information of the specified Service Fabric partition.

Returns information about the load of a specified partition. The response includes a list of load reports for a Service Fabric partition. Each report includes the load metric name, value, and last reported time in UTC.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13172
def get_partition_load_information_async(partition_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Partitions/{partitionId}/$/GetLoadInformation'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PartitionLoadInformation.mapper()
        result.body = self.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
get_partition_load_information_with_http_info(partition_id, timeout:60, custom_headers:nil) click to toggle source

Gets the load information of the specified Service Fabric partition.

Returns information about the load of a specified partition. The response includes a list of load reports for a Service Fabric partition. Each report includes the load metric name, value, and last reported time in UTC.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13150
def get_partition_load_information_with_http_info(partition_id, timeout:60, custom_headers:nil)
  get_partition_load_information_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_partition_replica_event_list(partition_id, replica_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets a Partition Replica-related events.

The response is list of ReplicaEvent objects.

@param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 29240
def get_partition_replica_event_list(partition_id, replica_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  response = get_partition_replica_event_list_async(partition_id, replica_id, start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_partition_replica_event_list_async(partition_id, replica_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets a Partition Replica-related events.

The response is list of ReplicaEvent objects.

@param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 29307
def get_partition_replica_event_list_async(partition_id, replica_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  api_version = '6.2-preview'
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, 'replica_id is nil' if replica_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1
  fail ArgumentError, 'start_time_utc is nil' if start_time_utc.nil?
  fail ArgumentError, 'end_time_utc is nil' if end_time_utc.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'] = accept_language unless accept_language.nil?
  path_template = 'EventsStore/Partitions/{partitionId}/$/Replicas/{replicaId}/$/Events'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id,'replicaId' => replica_id},
      query_params: {'api-version' => api_version,'timeout' => timeout,'StartTimeUtc' => start_time_utc,'EndTimeUtc' => end_time_utc,'EventsTypesFilter' => events_types_filter,'ExcludeAnalysisEvents' => exclude_analysis_events,'SkipCorrelationLookup' => skip_correlation_lookup},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ReplicaEventElementType',
                type: {
                  name: 'Composite',
                  class_name: 'ReplicaEvent'
                }
            }
          }
        }
        result.body = self.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
get_partition_replica_event_list_with_http_info(partition_id, replica_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets a Partition Replica-related events.

The response is list of ReplicaEvent objects.

@param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 29274
def get_partition_replica_event_list_with_http_info(partition_id, replica_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  get_partition_replica_event_list_async(partition_id, replica_id, start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
end
get_partition_replicas_event_list(partition_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets all Replicas-related events for a Partition.

The response is list of ReplicaEvent objects.

@param partition_id The identity of the partition. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 29409
def get_partition_replicas_event_list(partition_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  response = get_partition_replicas_event_list_async(partition_id, start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_partition_replicas_event_list_async(partition_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets all Replicas-related events for a Partition.

The response is list of ReplicaEvent objects.

@param partition_id The identity of the partition. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 29474
def get_partition_replicas_event_list_async(partition_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  api_version = '6.2-preview'
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1
  fail ArgumentError, 'start_time_utc is nil' if start_time_utc.nil?
  fail ArgumentError, 'end_time_utc is nil' if end_time_utc.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'] = accept_language unless accept_language.nil?
  path_template = 'EventsStore/Partitions/{partitionId}/$/Replicas/Events'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'timeout' => timeout,'StartTimeUtc' => start_time_utc,'EndTimeUtc' => end_time_utc,'EventsTypesFilter' => events_types_filter,'ExcludeAnalysisEvents' => exclude_analysis_events,'SkipCorrelationLookup' => skip_correlation_lookup},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ReplicaEventElementType',
                type: {
                  name: 'Composite',
                  class_name: 'ReplicaEvent'
                }
            }
          }
        }
        result.body = self.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
get_partition_replicas_event_list_with_http_info(partition_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets all Replicas-related events for a Partition.

The response is list of ReplicaEvent objects.

@param partition_id The identity of the partition. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 29442
def get_partition_replicas_event_list_with_http_info(partition_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  get_partition_replicas_event_list_async(partition_id, start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
end
get_partition_restart_progress(service_id, partition_id, operation_id, timeout:60, custom_headers:nil) click to toggle source

Gets the progress of a PartitionRestart operation started using StartPartitionRestart.

Gets the progress of a PartitionRestart started with StartPartitionRestart using the provided OperationId.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PartitionRestartProgress] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 21745
def get_partition_restart_progress(service_id, partition_id, operation_id, timeout:60, custom_headers:nil)
  response = get_partition_restart_progress_async(service_id, partition_id, operation_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_partition_restart_progress_async(service_id, partition_id, operation_id, timeout:60, custom_headers:nil) click to toggle source

Gets the progress of a PartitionRestart operation started using StartPartitionRestart.

Gets the progress of a PartitionRestart started with StartPartitionRestart using the provided OperationId.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 21806
def get_partition_restart_progress_async(service_id, partition_id, operation_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, 'operation_id is nil' if operation_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetRestartProgress'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id,'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'OperationId' => operation_id,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PartitionRestartProgress.mapper()
        result.body = self.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
get_partition_restart_progress_with_http_info(service_id, partition_id, operation_id, timeout:60, custom_headers:nil) click to toggle source

Gets the progress of a PartitionRestart operation started using StartPartitionRestart.

Gets the progress of a PartitionRestart started with StartPartitionRestart using the provided OperationId.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 21776
def get_partition_restart_progress_with_http_info(service_id, partition_id, operation_id, timeout:60, custom_headers:nil)
  get_partition_restart_progress_async(service_id, partition_id, operation_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_partition_restore_progress(partition_id, timeout:60, custom_headers:nil) click to toggle source

Gets details for the latest restore operation triggered for this partition.

Returns information about the state of the latest restore operation along with details or failure reason in case of completion.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [RestoreProgressInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26184
def get_partition_restore_progress(partition_id, timeout:60, custom_headers:nil)
  response = get_partition_restore_progress_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_partition_restore_progress_async(partition_id, timeout:60, custom_headers:nil) click to toggle source

Gets details for the latest restore operation triggered for this partition.

Returns information about the state of the latest restore operation along with details or failure reason in case of completion.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26225
def get_partition_restore_progress_async(partition_id, timeout:60, custom_headers:nil)
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Partitions/{partitionId}/$/GetRestoreProgress'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::RestoreProgressInfo.mapper()
        result.body = self.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
get_partition_restore_progress_with_http_info(partition_id, timeout:60, custom_headers:nil) click to toggle source

Gets details for the latest restore operation triggered for this partition.

Returns information about the state of the latest restore operation along with details or failure reason in case of completion.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26205
def get_partition_restore_progress_with_http_info(partition_id, timeout:60, custom_headers:nil)
  get_partition_restore_progress_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_partitions_event_list(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets all Partitions-related events.

The response is list of PartitionEvent objects.

@param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 29077
def get_partitions_event_list(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  response = get_partitions_event_list_async(start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_partitions_event_list_async(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets all Partitions-related events.

The response is list of PartitionEvent objects.

@param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 29140
def get_partitions_event_list_async(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1
  fail ArgumentError, 'start_time_utc is nil' if start_time_utc.nil?
  fail ArgumentError, 'end_time_utc is nil' if end_time_utc.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'] = accept_language unless accept_language.nil?
  path_template = 'EventsStore/Partitions/Events'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout,'StartTimeUtc' => start_time_utc,'EndTimeUtc' => end_time_utc,'EventsTypesFilter' => events_types_filter,'ExcludeAnalysisEvents' => exclude_analysis_events,'SkipCorrelationLookup' => skip_correlation_lookup},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'PartitionEventElementType',
                type: {
                  name: 'Composite',
                  class_name: 'PartitionEvent'
                }
            }
          }
        }
        result.body = self.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
get_partitions_event_list_with_http_info(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets all Partitions-related events.

The response is list of PartitionEvent objects.

@param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 29109
def get_partitions_event_list_with_http_info(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  get_partitions_event_list_async(start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
end
get_property_info(name_id, property_name, timeout:60, custom_headers:nil) click to toggle source

Gets the specified Service Fabric property.

Gets the specified Service Fabric property under a given name. This will always return both value and metadata.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param property_name [String] Specifies the name of the property to get. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PropertyInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27200
def get_property_info(name_id, property_name, timeout:60, custom_headers:nil)
  response = get_property_info_async(name_id, property_name, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_property_info_async(name_id, property_name, timeout:60, custom_headers:nil) click to toggle source

Gets the specified Service Fabric property.

Gets the specified Service Fabric property under a given name. This will always return both value and metadata.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param property_name [String] Specifies the name of the property to get. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27245
def get_property_info_async(name_id, property_name, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'name_id is nil' if name_id.nil?
  fail ArgumentError, 'property_name is nil' if property_name.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Names/{nameId}/$/GetProperty'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nameId' => name_id},
      query_params: {'api-version' => api_version,'PropertyName' => property_name,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PropertyInfo.mapper()
        result.body = self.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
get_property_info_list(name_id, include_values:false, continuation_token:nil, timeout:60, custom_headers:nil) click to toggle source

Gets information on all Service Fabric properties under a given name.

A Service Fabric name can have one or more named properties that stores custom information. This operation gets the information about these properties in a paged list. The information include name, value and metadata about each of the properties.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param include_values [Boolean] Allows specifying whether to include the values of the properties returned. True if values should be returned with the metadata; False to return only property metadata. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PagedPropertyInfoList] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26944
def get_property_info_list(name_id, include_values:false, continuation_token:nil, timeout:60, custom_headers:nil)
  response = get_property_info_list_async(name_id, include_values:include_values, continuation_token:continuation_token, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_property_info_list_async(name_id, include_values:false, continuation_token:nil, timeout:60, custom_headers:nil) click to toggle source

Gets information on all Service Fabric properties under a given name.

A Service Fabric name can have one or more named properties that stores custom information. This operation gets the information about these properties in a paged list. The information include name, value and metadata about each of the properties.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param include_values [Boolean] Allows specifying whether to include the values of the properties returned. True if values should be returned with the metadata; False to return only property metadata. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27011
def get_property_info_list_async(name_id, include_values:false, continuation_token:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'name_id is nil' if name_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Names/{nameId}/$/GetProperties'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nameId' => name_id},
      query_params: {'api-version' => api_version,'IncludeValues' => include_values,'timeout' => timeout},
      skip_encoding_query_params: {'ContinuationToken' => continuation_token},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PagedPropertyInfoList.mapper()
        result.body = self.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
get_property_info_list_with_http_info(name_id, include_values:false, continuation_token:nil, timeout:60, custom_headers:nil) click to toggle source

Gets information on all Service Fabric properties under a given name.

A Service Fabric name can have one or more named properties that stores custom information. This operation gets the information about these properties in a paged list. The information include name, value and metadata about each of the properties.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param include_values [Boolean] Allows specifying whether to include the values of the properties returned. True if values should be returned with the metadata; False to return only property metadata. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26978
def get_property_info_list_with_http_info(name_id, include_values:false, continuation_token:nil, timeout:60, custom_headers:nil)
  get_property_info_list_async(name_id, include_values:include_values, continuation_token:continuation_token, timeout:timeout, custom_headers:custom_headers).value!
end
get_property_info_with_http_info(name_id, property_name, timeout:60, custom_headers:nil) click to toggle source

Gets the specified Service Fabric property.

Gets the specified Service Fabric property under a given name. This will always return both value and metadata.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param property_name [String] Specifies the name of the property to get. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27223
def get_property_info_with_http_info(name_id, property_name, timeout:60, custom_headers:nil)
  get_property_info_async(name_id, property_name, timeout:timeout, custom_headers:custom_headers).value!
end
get_provisioned_fabric_code_version_info_list(code_version:nil, timeout:60, custom_headers:nil) click to toggle source

Gets a list of fabric code versions that are provisioned in a Service Fabric cluster.

Gets a list of information about fabric code versions that are provisioned in the cluster. The parameter CodeVersion can be used to optionally filter the output to only that particular version.

@param code_version [String] The product version of Service Fabric. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 1557
def get_provisioned_fabric_code_version_info_list(code_version:nil, timeout:60, custom_headers:nil)
  response = get_provisioned_fabric_code_version_info_list_async(code_version:code_version, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_provisioned_fabric_code_version_info_list_async(code_version:nil, timeout:60, custom_headers:nil) click to toggle source

Gets a list of fabric code versions that are provisioned in a Service Fabric cluster.

Gets a list of information about fabric code versions that are provisioned in the cluster. The parameter CodeVersion can be used to optionally filter the output to only that particular version.

@param code_version [String] The product version of Service Fabric. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 1602
def get_provisioned_fabric_code_version_info_list_async(code_version:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = '$/GetProvisionedCodeVersions'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'CodeVersion' => code_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'FabricCodeVersionInfoElementType',
                type: {
                  name: 'Composite',
                  class_name: 'FabricCodeVersionInfo'
                }
            }
          }
        }
        result.body = self.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
get_provisioned_fabric_code_version_info_list_with_http_info(code_version:nil, timeout:60, custom_headers:nil) click to toggle source

Gets a list of fabric code versions that are provisioned in a Service Fabric cluster.

Gets a list of information about fabric code versions that are provisioned in the cluster. The parameter CodeVersion can be used to optionally filter the output to only that particular version.

@param code_version [String] The product version of Service Fabric. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 1580
def get_provisioned_fabric_code_version_info_list_with_http_info(code_version:nil, timeout:60, custom_headers:nil)
  get_provisioned_fabric_code_version_info_list_async(code_version:code_version, timeout:timeout, custom_headers:custom_headers).value!
end
get_provisioned_fabric_config_version_info_list(config_version:nil, timeout:60, custom_headers:nil) click to toggle source

Gets a list of fabric config versions that are provisioned in a Service Fabric cluster.

Gets a list of information about fabric config versions that are provisioned in the cluster. The parameter ConfigVersion can be used to optionally filter the output to only that particular version.

@param config_version [String] The config version of Service Fabric. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 1689
def get_provisioned_fabric_config_version_info_list(config_version:nil, timeout:60, custom_headers:nil)
  response = get_provisioned_fabric_config_version_info_list_async(config_version:config_version, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_provisioned_fabric_config_version_info_list_async(config_version:nil, timeout:60, custom_headers:nil) click to toggle source

Gets a list of fabric config versions that are provisioned in a Service Fabric cluster.

Gets a list of information about fabric config versions that are provisioned in the cluster. The parameter ConfigVersion can be used to optionally filter the output to only that particular version.

@param config_version [String] The config version of Service Fabric. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 1734
def get_provisioned_fabric_config_version_info_list_async(config_version:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = '$/GetProvisionedConfigVersions'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'ConfigVersion' => config_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'FabricConfigVersionInfoElementType',
                type: {
                  name: 'Composite',
                  class_name: 'FabricConfigVersionInfo'
                }
            }
          }
        }
        result.body = self.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
get_provisioned_fabric_config_version_info_list_with_http_info(config_version:nil, timeout:60, custom_headers:nil) click to toggle source

Gets a list of fabric config versions that are provisioned in a Service Fabric cluster.

Gets a list of information about fabric config versions that are provisioned in the cluster. The parameter ConfigVersion can be used to optionally filter the output to only that particular version.

@param config_version [String] The config version of Service Fabric. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 1712
def get_provisioned_fabric_config_version_info_list_with_http_info(config_version:nil, timeout:60, custom_headers:nil)
  get_provisioned_fabric_config_version_info_list_async(config_version:config_version, timeout:timeout, custom_headers:custom_headers).value!
end
get_quorum_loss_progress(service_id, partition_id, operation_id, timeout:60, custom_headers:nil) click to toggle source

Gets the progress of a quorum loss operation on a partition started using the StartQuorumLoss API.

Gets the progress of a quorum loss operation started with StartQuorumLoss, using the provided OperationId.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PartitionQuorumLossProgress] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 21443
def get_quorum_loss_progress(service_id, partition_id, operation_id, timeout:60, custom_headers:nil)
  response = get_quorum_loss_progress_async(service_id, partition_id, operation_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_quorum_loss_progress_async(service_id, partition_id, operation_id, timeout:60, custom_headers:nil) click to toggle source

Gets the progress of a quorum loss operation on a partition started using the StartQuorumLoss API.

Gets the progress of a quorum loss operation started with StartQuorumLoss, using the provided OperationId.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 21504
def get_quorum_loss_progress_async(service_id, partition_id, operation_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, 'operation_id is nil' if operation_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetQuorumLossProgress'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id,'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'OperationId' => operation_id,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PartitionQuorumLossProgress.mapper()
        result.body = self.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
get_quorum_loss_progress_with_http_info(service_id, partition_id, operation_id, timeout:60, custom_headers:nil) click to toggle source

Gets the progress of a quorum loss operation on a partition started using the StartQuorumLoss API.

Gets the progress of a quorum loss operation started with StartQuorumLoss, using the provided OperationId.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 21474
def get_quorum_loss_progress_with_http_info(service_id, partition_id, operation_id, timeout:60, custom_headers:nil)
  get_quorum_loss_progress_async(service_id, partition_id, operation_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_repair_task_list(task_id_filter:nil, state_filter:nil, executor_filter:nil, custom_headers:nil) click to toggle source

Gets a list of repair tasks matching the given filters.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param task_id_filter [String] The repair task ID prefix to be matched. @param state_filter [Integer] A bitwise-OR of the following values, specifying which task states should be included in the result list.

  • 1 - Created

  • 2 - Claimed

  • 4 - Preparing

  • 8 - Approved

  • 16 - Executing

  • 32 - Restoring

  • 64 - Completed

@param executor_filter [String] The name of the repair executor whose claimed tasks should be included in the list. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14157
def get_repair_task_list(task_id_filter:nil, state_filter:nil, executor_filter:nil, custom_headers:nil)
  response = get_repair_task_list_async(task_id_filter:task_id_filter, state_filter:state_filter, executor_filter:executor_filter, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_repair_task_list_async(task_id_filter:nil, state_filter:nil, executor_filter:nil, custom_headers:nil) click to toggle source

Gets a list of repair tasks matching the given filters.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param task_id_filter [String] The repair task ID prefix to be matched. @param state_filter [Integer] A bitwise-OR of the following values, specifying which task states should be included in the result list.

  • 1 - Created

  • 2 - Claimed

  • 4 - Preparing

  • 8 - Approved

  • 16 - Executing

  • 32 - Restoring

  • 64 - Completed

@param executor_filter [String] The name of the repair executor whose claimed tasks should be included in the list. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14212
def get_repair_task_list_async(task_id_filter:nil, state_filter:nil, executor_filter:nil, custom_headers:nil)
  api_version = '6.0'


  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'] = accept_language unless accept_language.nil?
  path_template = '$/GetRepairTaskList'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'TaskIdFilter' => task_id_filter,'StateFilter' => state_filter,'ExecutorFilter' => executor_filter},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'RepairTaskElementType',
                type: {
                  name: 'Composite',
                  class_name: 'RepairTask'
                }
            }
          }
        }
        result.body = self.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
get_repair_task_list_with_http_info(task_id_filter:nil, state_filter:nil, executor_filter:nil, custom_headers:nil) click to toggle source

Gets a list of repair tasks matching the given filters.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param task_id_filter [String] The repair task ID prefix to be matched. @param state_filter [Integer] A bitwise-OR of the following values, specifying which task states should be included in the result list.

  • 1 - Created

  • 2 - Claimed

  • 4 - Preparing

  • 8 - Approved

  • 16 - Executing

  • 32 - Restoring

  • 64 - Completed

@param executor_filter [String] The name of the repair executor whose claimed tasks should be included in the list. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14185
def get_repair_task_list_with_http_info(task_id_filter:nil, state_filter:nil, executor_filter:nil, custom_headers:nil)
  get_repair_task_list_async(task_id_filter:task_id_filter, state_filter:state_filter, executor_filter:executor_filter, custom_headers:custom_headers).value!
end
get_replica_health(partition_id, replica_id, events_health_state_filter:0, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric stateful service replica or stateless service instance.

Gets the health of a Service Fabric replica. Use EventsHealthStateFilter to filter the collection of health events reported on the replica based on the health state.

@param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ReplicaHealth] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14896
def get_replica_health(partition_id, replica_id, events_health_state_filter:0, timeout:60, custom_headers:nil)
  response = get_replica_health_async(partition_id, replica_id, events_health_state_filter:events_health_state_filter, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_replica_health_async(partition_id, replica_id, events_health_state_filter:0, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric stateful service replica or stateless service instance.

Gets the health of a Service Fabric replica. Use EventsHealthStateFilter to filter the collection of health events reported on the replica based on the health state.

@param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14985
def get_replica_health_async(partition_id, replica_id, events_health_state_filter:0, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, 'replica_id is nil' if replica_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id,'replicaId' => replica_id},
      query_params: {'api-version' => api_version,'EventsHealthStateFilter' => events_health_state_filter,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ReplicaHealth.mapper()
        result.body = self.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
get_replica_health_using_policy(partition_id, replica_id, events_health_state_filter:0, application_health_policy:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric stateful service replica or stateless service instance using the specified policy.

Gets the health of a Service Fabric stateful service replica or stateless service instance. Use EventsHealthStateFilter to filter the collection of health events reported on the cluster based on the health state. Use ApplicationHealthPolicy to optionally override the health policies used to evaluate the health. This API only uses 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the replica.

@param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param application_health_policy [ApplicationHealthPolicy] Describes the health policies used to evaluate the health of an application or one of its children. If not present, the health evaluation uses the health policy from application manifest or the default health policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ReplicaHealth] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 15091
def get_replica_health_using_policy(partition_id, replica_id, events_health_state_filter:0, application_health_policy:nil, timeout:60, custom_headers:nil)
  response = get_replica_health_using_policy_async(partition_id, replica_id, events_health_state_filter:events_health_state_filter, application_health_policy:application_health_policy, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_replica_health_using_policy_async(partition_id, replica_id, events_health_state_filter:0, application_health_policy:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric stateful service replica or stateless service instance using the specified policy.

Gets the health of a Service Fabric stateful service replica or stateless service instance. Use EventsHealthStateFilter to filter the collection of health events reported on the cluster based on the health state. Use ApplicationHealthPolicy to optionally override the health policies used to evaluate the health. This API only uses 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the replica.

@param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param application_health_policy [ApplicationHealthPolicy] Describes the health policies used to evaluate the health of an application or one of its children. If not present, the health evaluation uses the health policy from application manifest or the default health policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 15200
def get_replica_health_using_policy_async(partition_id, replica_id, events_health_state_filter:0, application_health_policy:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, 'replica_id is nil' if replica_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ApplicationHealthPolicy.mapper()
  request_content = self.serialize(request_mapper,  application_health_policy)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id,'replicaId' => replica_id},
      query_params: {'api-version' => api_version,'EventsHealthStateFilter' => events_health_state_filter,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ReplicaHealth.mapper()
        result.body = self.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
get_replica_health_using_policy_with_http_info(partition_id, replica_id, events_health_state_filter:0, application_health_policy:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric stateful service replica or stateless service instance using the specified policy.

Gets the health of a Service Fabric stateful service replica or stateless service instance. Use EventsHealthStateFilter to filter the collection of health events reported on the cluster based on the health state. Use ApplicationHealthPolicy to optionally override the health policies used to evaluate the health. This API only uses 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the replica.

@param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param application_health_policy [ApplicationHealthPolicy] Describes the health policies used to evaluate the health of an application or one of its children. If not present, the health evaluation uses the health policy from application manifest or the default health policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 15146
def get_replica_health_using_policy_with_http_info(partition_id, replica_id, events_health_state_filter:0, application_health_policy:nil, timeout:60, custom_headers:nil)
  get_replica_health_using_policy_async(partition_id, replica_id, events_health_state_filter:events_health_state_filter, application_health_policy:application_health_policy, timeout:timeout, custom_headers:custom_headers).value!
end
get_replica_health_with_http_info(partition_id, replica_id, events_health_state_filter:0, timeout:60, custom_headers:nil) click to toggle source

Gets the health of a Service Fabric stateful service replica or stateless service instance.

Gets the health of a Service Fabric replica. Use EventsHealthStateFilter to filter the collection of health events reported on the replica based on the health state.

@param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14941
def get_replica_health_with_http_info(partition_id, replica_id, events_health_state_filter:0, timeout:60, custom_headers:nil)
  get_replica_health_async(partition_id, replica_id, events_health_state_filter:events_health_state_filter, timeout:timeout, custom_headers:custom_headers).value!
end
get_replica_info(partition_id, replica_id, timeout:60, custom_headers:nil) click to toggle source

Gets the information about a replica of a Service Fabric partition.

The response includes the id, role, status, health, node name, uptime, and other details about the replica.

@param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ReplicaInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14757
def get_replica_info(partition_id, replica_id, timeout:60, custom_headers:nil)
  response = get_replica_info_async(partition_id, replica_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_replica_info_async(partition_id, replica_id, timeout:60, custom_headers:nil) click to toggle source

Gets the information about a replica of a Service Fabric partition.

The response includes the id, role, status, health, node name, uptime, and other details about the replica.

@param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14800
def get_replica_info_async(partition_id, replica_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, 'replica_id is nil' if replica_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Partitions/{partitionId}/$/GetReplicas/{replicaId}'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id,'replicaId' => replica_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ReplicaInfo.mapper()
        result.body = self.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
get_replica_info_list(partition_id, continuation_token:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the information about replicas of a Service Fabric service partition.

The GetReplicas endpoint returns information about the replicas of the specified partition. The response includes the id, role, status, health, node name, uptime, and other details about the replica.

@param partition_id The identity of the partition. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PagedReplicaInfoList] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14627
def get_replica_info_list(partition_id, continuation_token:nil, timeout:60, custom_headers:nil)
  response = get_replica_info_list_async(partition_id, continuation_token:continuation_token, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_replica_info_list_async(partition_id, continuation_token:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the information about replicas of a Service Fabric service partition.

The GetReplicas endpoint returns information about the replicas of the specified partition. The response includes the id, role, status, health, node name, uptime, and other details about the replica.

@param partition_id The identity of the partition. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14684
def get_replica_info_list_async(partition_id, continuation_token:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Partitions/{partitionId}/$/GetReplicas'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      skip_encoding_query_params: {'ContinuationToken' => continuation_token},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PagedReplicaInfoList.mapper()
        result.body = self.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
get_replica_info_list_with_http_info(partition_id, continuation_token:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the information about replicas of a Service Fabric service partition.

The GetReplicas endpoint returns information about the replicas of the specified partition. The response includes the id, role, status, health, node name, uptime, and other details about the replica.

@param partition_id The identity of the partition. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14656
def get_replica_info_list_with_http_info(partition_id, continuation_token:nil, timeout:60, custom_headers:nil)
  get_replica_info_list_async(partition_id, continuation_token:continuation_token, timeout:timeout, custom_headers:custom_headers).value!
end
get_replica_info_with_http_info(partition_id, replica_id, timeout:60, custom_headers:nil) click to toggle source

Gets the information about a replica of a Service Fabric partition.

The response includes the id, role, status, health, node name, uptime, and other details about the replica.

@param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14779
def get_replica_info_with_http_info(partition_id, replica_id, timeout:60, custom_headers:nil)
  get_replica_info_async(partition_id, replica_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_service_backup_configuration_info(service_id, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the Service Fabric service backup configuration information.

Gets the Service Fabric backup configuration information for the service and the partitions under this service.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PagedBackupConfigurationInfoList] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 24434
def get_service_backup_configuration_info(service_id, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  response = get_service_backup_configuration_info_async(service_id, continuation_token:continuation_token, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_service_backup_configuration_info_async(service_id, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the Service Fabric service backup configuration information.

Gets the Service Fabric backup configuration information for the service and the partitions under this service.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 24515
def get_service_backup_configuration_info_async(service_id, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'max_results' should satisfy the constraint - 'InclusiveMinimum': '0'" if !max_results.nil? && max_results < 0
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Services/{serviceId}/$/GetBackupConfigurationInfo'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id},
      query_params: {'api-version' => api_version,'MaxResults' => max_results,'timeout' => timeout},
      skip_encoding_query_params: {'ContinuationToken' => continuation_token},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PagedBackupConfigurationInfoList.mapper()
        result.body = self.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
get_service_backup_configuration_info_with_http_info(service_id, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil) click to toggle source

Gets the Service Fabric service backup configuration information.

Gets the Service Fabric backup configuration information for the service and the partitions under this service.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 24475
def get_service_backup_configuration_info_with_http_info(service_id, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
  get_service_backup_configuration_info_async(service_id, continuation_token:continuation_token, max_results:max_results, timeout:timeout, custom_headers:custom_headers).value!
end
get_service_backup_list(service_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, continuation_token:nil, max_results:0, custom_headers:nil) click to toggle source

Gets the list of backups available for every partition in this service.

Returns a list of backups available for every partition in this Service Fabric service. The server enumerates all the backups available in the backup store configured in the backup policy. It also allows filtering of the result based on start and end datetime or just fetching the latest available backup for every partition.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param latest [Boolean] Specifies whether to get only the most recent backup available for a partition for the specified time range. @param start_date_time_filter [DateTime] Specify the start date time from which to enumerate backups, in datetime format. The date time must be specified in ISO8601 format. This is an optional parameter. If not specified, all backups from the beginning are enumerated. @param end_date_time_filter [DateTime] Specify the end date time till which to enumerate backups, in datetime format. The date time must be specified in ISO8601 format. This is an optional parameter. If not specified, enumeration is done till the most recent backup. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PagedBackupInfoList] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 24621
def get_service_backup_list(service_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, continuation_token:nil, max_results:0, custom_headers:nil)
  response = get_service_backup_list_async(service_id, timeout:timeout, latest:latest, start_date_time_filter:start_date_time_filter, end_date_time_filter:end_date_time_filter, continuation_token:continuation_token, max_results:max_results, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_service_backup_list_async(service_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, continuation_token:nil, max_results:0, custom_headers:nil) click to toggle source

Gets the list of backups available for every partition in this service.

Returns a list of backups available for every partition in this Service Fabric service. The server enumerates all the backups available in the backup store configured in the backup policy. It also allows filtering of the result based on start and end datetime or just fetching the latest available backup for every partition.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param latest [Boolean] Specifies whether to get only the most recent backup available for a partition for the specified time range. @param start_date_time_filter [DateTime] Specify the start date time from which to enumerate backups, in datetime format. The date time must be specified in ISO8601 format. This is an optional parameter. If not specified, all backups from the beginning are enumerated. @param end_date_time_filter [DateTime] Specify the end date time till which to enumerate backups, in datetime format. The date time must be specified in ISO8601 format. This is an optional parameter. If not specified, enumeration is done till the most recent backup. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 24728
def get_service_backup_list_async(service_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, continuation_token:nil, max_results:0, custom_headers:nil)
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1
  fail ArgumentError, "'max_results' should satisfy the constraint - 'InclusiveMinimum': '0'" if !max_results.nil? && max_results < 0


  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'] = accept_language unless accept_language.nil?
  path_template = 'Services/{serviceId}/$/GetBackups'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id},
      query_params: {'api-version' => api_version,'timeout' => timeout,'Latest' => latest,'StartDateTimeFilter' => start_date_time_filter,'EndDateTimeFilter' => end_date_time_filter,'MaxResults' => max_results},
      skip_encoding_query_params: {'ContinuationToken' => continuation_token},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PagedBackupInfoList.mapper()
        result.body = self.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
get_service_backup_list_with_http_info(service_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, continuation_token:nil, max_results:0, custom_headers:nil) click to toggle source

Gets the list of backups available for every partition in this service.

Returns a list of backups available for every partition in this Service Fabric service. The server enumerates all the backups available in the backup store configured in the backup policy. It also allows filtering of the result based on start and end datetime or just fetching the latest available backup for every partition.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param latest [Boolean] Specifies whether to get only the most recent backup available for a partition for the specified time range. @param start_date_time_filter [DateTime] Specify the start date time from which to enumerate backups, in datetime format. The date time must be specified in ISO8601 format. This is an optional parameter. If not specified, all backups from the beginning are enumerated. @param end_date_time_filter [DateTime] Specify the end date time till which to enumerate backups, in datetime format. The date time must be specified in ISO8601 format. This is an optional parameter. If not specified, enumeration is done till the most recent backup. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 24675
def get_service_backup_list_with_http_info(service_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, continuation_token:nil, max_results:0, custom_headers:nil)
  get_service_backup_list_async(service_id, timeout:timeout, latest:latest, start_date_time_filter:start_date_time_filter, end_date_time_filter:end_date_time_filter, continuation_token:continuation_token, max_results:max_results, custom_headers:custom_headers).value!
end
get_service_description(service_id, timeout:60, custom_headers:nil) click to toggle source

Gets the description of an existing Service Fabric service.

Gets the description of an existing Service Fabric service. A service must be created before its description can be obtained.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ServiceDescription] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 10824
def get_service_description(service_id, timeout:60, custom_headers:nil)
  response = get_service_description_async(service_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_service_description_async(service_id, timeout:60, custom_headers:nil) click to toggle source

Gets the description of an existing Service Fabric service.

Gets the description of an existing Service Fabric service. A service must be created before its description can be obtained.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 10877
def get_service_description_async(service_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Services/{serviceId}/$/GetDescription'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ServiceDescription.mapper()
        result.body = self.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
get_service_description_with_http_info(service_id, timeout:60, custom_headers:nil) click to toggle source

Gets the description of an existing Service Fabric service.

Gets the description of an existing Service Fabric service. A service must be created before its description can be obtained.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 10851
def get_service_description_with_http_info(service_id, timeout:60, custom_headers:nil)
  get_service_description_async(service_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_service_event_list(service_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets a Service-related events.

The response is list of ServiceEvent objects.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 28573
def get_service_event_list(service_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  response = get_service_event_list_async(service_id, start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_service_event_list_async(service_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets a Service-related events.

The response is list of ServiceEvent objects.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 28650
def get_service_event_list_async(service_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  api_version = '6.2-preview'
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1
  fail ArgumentError, 'start_time_utc is nil' if start_time_utc.nil?
  fail ArgumentError, 'end_time_utc is nil' if end_time_utc.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'] = accept_language unless accept_language.nil?
  path_template = 'EventsStore/Services/{serviceId}/$/Events'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id},
      query_params: {'api-version' => api_version,'timeout' => timeout,'StartTimeUtc' => start_time_utc,'EndTimeUtc' => end_time_utc,'EventsTypesFilter' => events_types_filter,'ExcludeAnalysisEvents' => exclude_analysis_events,'SkipCorrelationLookup' => skip_correlation_lookup},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ServiceEventElementType',
                type: {
                  name: 'Composite',
                  class_name: 'ServiceEvent'
                }
            }
          }
        }
        result.body = self.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
get_service_event_list_with_http_info(service_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets a Service-related events.

The response is list of ServiceEvent objects.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 28612
def get_service_event_list_with_http_info(service_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  get_service_event_list_async(service_id, start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
end
get_service_health(service_id, events_health_state_filter:0, partitions_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the health of the specified Service Fabric service.

Gets the health information of the specified service. Use EventsHealthStateFilter to filter the collection of health events reported on the service based on the health state. Use PartitionsHealthStateFilter to filter the collection of partitions returned. If you specify a service that does not exist in the health store, this request returns an error.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param partitions_health_state_filter [Integer] Allows filtering of the partitions health state objects returned in the result of service health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only partitions that match the filter are returned. All partitions are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of partitions with HealthState value of OK (2) and Warning (4) will be returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ServiceHealth] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 11007
def get_service_health(service_id, events_health_state_filter:0, partitions_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil)
  response = get_service_health_async(service_id, events_health_state_filter:events_health_state_filter, partitions_health_state_filter:partitions_health_state_filter, exclude_health_statistics:exclude_health_statistics, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_service_health_async(service_id, events_health_state_filter:0, partitions_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the health of the specified Service Fabric service.

Gets the health information of the specified service. Use EventsHealthStateFilter to filter the collection of health events reported on the service based on the health state. Use PartitionsHealthStateFilter to filter the collection of partitions returned. If you specify a service that does not exist in the health store, this request returns an error.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param partitions_health_state_filter [Integer] Allows filtering of the partitions health state objects returned in the result of service health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only partitions that match the filter are returned. All partitions are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of partitions with HealthState value of OK (2) and Warning (4) will be returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 11166
def get_service_health_async(service_id, events_health_state_filter:0, partitions_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Services/{serviceId}/$/GetHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id},
      query_params: {'api-version' => api_version,'EventsHealthStateFilter' => events_health_state_filter,'PartitionsHealthStateFilter' => partitions_health_state_filter,'ExcludeHealthStatistics' => exclude_health_statistics,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ServiceHealth.mapper()
        result.body = self.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
get_service_health_using_policy(service_id, events_health_state_filter:0, partitions_health_state_filter:0, application_health_policy:nil, exclude_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the health of the specified Service Fabric service, by using the specified health policy.

Gets the health information of the specified service. If the application health policy is specified, the health evaluation uses it to get the aggregated health state. If the policy is not specified, the health evaluation uses the application health policy defined in the application manifest, or the default health policy, if no policy is defined in the manifest. Use EventsHealthStateFilter to filter the collection of health events reported on the service based on the health state. Use PartitionsHealthStateFilter to filter the collection of partitions returned. If you specify a service that does not exist in the health store, this request returns an error.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param partitions_health_state_filter [Integer] Allows filtering of the partitions health state objects returned in the result of service health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only partitions that match the filter are returned. All partitions are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of partitions with HealthState value of OK (2) and Warning (4) will be returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param application_health_policy [ApplicationHealthPolicy] Describes the health policies used to evaluate the health of an application or one of its children. If not present, the health evaluation uses the health policy from application manifest or the default health policy. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ServiceHealth] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 11307
def get_service_health_using_policy(service_id, events_health_state_filter:0, partitions_health_state_filter:0, application_health_policy:nil, exclude_health_statistics:false, timeout:60, custom_headers:nil)
  response = get_service_health_using_policy_async(service_id, events_health_state_filter:events_health_state_filter, partitions_health_state_filter:partitions_health_state_filter, application_health_policy:application_health_policy, exclude_health_statistics:exclude_health_statistics, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_service_health_using_policy_async(service_id, events_health_state_filter:0, partitions_health_state_filter:0, application_health_policy:nil, exclude_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the health of the specified Service Fabric service, by using the specified health policy.

Gets the health information of the specified service. If the application health policy is specified, the health evaluation uses it to get the aggregated health state. If the policy is not specified, the health evaluation uses the application health policy defined in the application manifest, or the default health policy, if no policy is defined in the manifest. Use EventsHealthStateFilter to filter the collection of health events reported on the service based on the health state. Use PartitionsHealthStateFilter to filter the collection of partitions returned. If you specify a service that does not exist in the health store, this request returns an error.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param partitions_health_state_filter [Integer] Allows filtering of the partitions health state objects returned in the result of service health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only partitions that match the filter are returned. All partitions are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of partitions with HealthState value of OK (2) and Warning (4) will be returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param application_health_policy [ApplicationHealthPolicy] Describes the health policies used to evaluate the health of an application or one of its children. If not present, the health evaluation uses the health policy from application manifest or the default health policy. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 11488
def get_service_health_using_policy_async(service_id, events_health_state_filter:0, partitions_health_state_filter:0, application_health_policy:nil, exclude_health_statistics:false, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ApplicationHealthPolicy.mapper()
  request_content = self.serialize(request_mapper,  application_health_policy)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Services/{serviceId}/$/GetHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id},
      query_params: {'api-version' => api_version,'EventsHealthStateFilter' => events_health_state_filter,'PartitionsHealthStateFilter' => partitions_health_state_filter,'ExcludeHealthStatistics' => exclude_health_statistics,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ServiceHealth.mapper()
        result.body = self.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
get_service_health_using_policy_with_http_info(service_id, events_health_state_filter:0, partitions_health_state_filter:0, application_health_policy:nil, exclude_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the health of the specified Service Fabric service, by using the specified health policy.

Gets the health information of the specified service. If the application health policy is specified, the health evaluation uses it to get the aggregated health state. If the policy is not specified, the health evaluation uses the application health policy defined in the application manifest, or the default health policy, if no policy is defined in the manifest. Use EventsHealthStateFilter to filter the collection of health events reported on the service based on the health state. Use PartitionsHealthStateFilter to filter the collection of partitions returned. If you specify a service that does not exist in the health store, this request returns an error.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param partitions_health_state_filter [Integer] Allows filtering of the partitions health state objects returned in the result of service health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only partitions that match the filter are returned. All partitions are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of partitions with HealthState value of OK (2) and Warning (4) will be returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param application_health_policy [ApplicationHealthPolicy] Describes the health policies used to evaluate the health of an application or one of its children. If not present, the health evaluation uses the health policy from application manifest or the default health policy. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 11398
def get_service_health_using_policy_with_http_info(service_id, events_health_state_filter:0, partitions_health_state_filter:0, application_health_policy:nil, exclude_health_statistics:false, timeout:60, custom_headers:nil)
  get_service_health_using_policy_async(service_id, events_health_state_filter:events_health_state_filter, partitions_health_state_filter:partitions_health_state_filter, application_health_policy:application_health_policy, exclude_health_statistics:exclude_health_statistics, timeout:timeout, custom_headers:custom_headers).value!
end
get_service_health_with_http_info(service_id, events_health_state_filter:0, partitions_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil) click to toggle source

Gets the health of the specified Service Fabric service.

Gets the health information of the specified service. Use EventsHealthStateFilter to filter the collection of health events reported on the service based on the health state. Use PartitionsHealthStateFilter to filter the collection of partitions returned. If you specify a service that does not exist in the health store, this request returns an error.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param partitions_health_state_filter [Integer] Allows filtering of the partitions health state objects returned in the result of service health query based on their health state. The possible values for this parameter include integer value of one of the following health states. Only partitions that match the filter are returned. All partitions are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of partitions with HealthState value of OK (2) and Warning (4) will be returned.

  • Default - Default value. Matches any HealthState. The value is zero.

  • None - Filter that doesn't match any HealthState value. Used in order to

return no results on a given collection of states. The value is 1.

  • Ok - Filter that matches input with HealthState value Ok. The value is 2.

  • Warning - Filter that matches input with HealthState value Warning. The

value is 4.

  • Error - Filter that matches input with HealthState value Error. The value

is 8.

  • All - Filter that matches input with any HealthState value. The value is

65535. @param exclude_health_statistics [Boolean] Indicates whether the health statistics should be returned as part of the query result. False by default. The statistics show the number of children entities in health state Ok, Warning, and Error. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 11087
def get_service_health_with_http_info(service_id, events_health_state_filter:0, partitions_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil)
  get_service_health_async(service_id, events_health_state_filter:events_health_state_filter, partitions_health_state_filter:partitions_health_state_filter, exclude_health_statistics:exclude_health_statistics, timeout:timeout, custom_headers:custom_headers).value!
end
get_service_info(application_id, service_id, timeout:60, custom_headers:nil) click to toggle source

Gets the information about the specific service belonging to the Service Fabric application.

Returns the information about the specified service belonging to the specified Service Fabric application.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ServiceInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 9965
def get_service_info(application_id, service_id, timeout:60, custom_headers:nil)
  response = get_service_info_async(application_id, service_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_service_info_async(application_id, service_id, timeout:60, custom_headers:nil) click to toggle source

Gets the information about the specific service belonging to the Service Fabric application.

Returns the information about the specified service belonging to the specified Service Fabric application.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 10032
def get_service_info_async(application_id, service_id, timeout:60, custom_headers:nil)
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Applications/{applicationId}/$/GetServices/{serviceId}'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id,'serviceId' => service_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ServiceInfo.mapper()
        result.body = self.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
get_service_info_list(application_id, service_type_name:nil, continuation_token:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the information about all services belonging to the application specified by the application id.

Returns the information about all services belonging to the application specified by the application id.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_type_name [String] The service type name used to filter the services to query for. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PagedServiceInfoList] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 9809
def get_service_info_list(application_id, service_type_name:nil, continuation_token:nil, timeout:60, custom_headers:nil)
  response = get_service_info_list_async(application_id, service_type_name:service_type_name, continuation_token:continuation_token, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_service_info_list_async(application_id, service_type_name:nil, continuation_token:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the information about all services belonging to the application specified by the application id.

Returns the information about all services belonging to the application specified by the application id.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_type_name [String] The service type name used to filter the services to query for. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 9880
def get_service_info_list_async(application_id, service_type_name:nil, continuation_token:nil, timeout:60, custom_headers:nil)
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Applications/{applicationId}/$/GetServices'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'ServiceTypeName' => service_type_name,'api-version' => api_version,'timeout' => timeout},
      skip_encoding_query_params: {'ContinuationToken' => continuation_token},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PagedServiceInfoList.mapper()
        result.body = self.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
get_service_info_list_with_http_info(application_id, service_type_name:nil, continuation_token:nil, timeout:60, custom_headers:nil) click to toggle source

Gets the information about all services belonging to the application specified by the application id.

Returns the information about all services belonging to the application specified by the application id.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_type_name [String] The service type name used to filter the services to query for. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 9845
def get_service_info_list_with_http_info(application_id, service_type_name:nil, continuation_token:nil, timeout:60, custom_headers:nil)
  get_service_info_list_async(application_id, service_type_name:service_type_name, continuation_token:continuation_token, timeout:timeout, custom_headers:custom_headers).value!
end
get_service_info_with_http_info(application_id, service_id, timeout:60, custom_headers:nil) click to toggle source

Gets the information about the specific service belonging to the Service Fabric application.

Returns the information about the specified service belonging to the specified Service Fabric application.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 9999
def get_service_info_with_http_info(application_id, service_id, timeout:60, custom_headers:nil)
  get_service_info_async(application_id, service_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_service_manifest(application_type_name, application_type_version, service_manifest_name, timeout:60, custom_headers:nil) click to toggle source

Gets the manifest describing a service type.

Gets the manifest describing a service type. The response contains the service manifest XML as a string.

@param application_type_name [String] The name of the application type. @param application_type_version [String] The version of the application type. @param service_manifest_name [String] The name of a service manifest registered as part of an application type in a Service Fabric cluster. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ServiceTypeManifest] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 5673
def get_service_manifest(application_type_name, application_type_version, service_manifest_name, timeout:60, custom_headers:nil)
  response = get_service_manifest_async(application_type_name, application_type_version, service_manifest_name, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_service_manifest_async(application_type_name, application_type_version, service_manifest_name, timeout:60, custom_headers:nil) click to toggle source

Gets the manifest describing a service type.

Gets the manifest describing a service type. The response contains the service manifest XML as a string.

@param application_type_name [String] The name of the application type. @param application_type_version [String] The version of the application type. @param service_manifest_name [String] The name of a service manifest registered as part of an application type in a Service Fabric cluster. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 5720
def get_service_manifest_async(application_type_name, application_type_version, service_manifest_name, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'application_type_name is nil' if application_type_name.nil?
  fail ArgumentError, 'application_type_version is nil' if application_type_version.nil?
  fail ArgumentError, 'service_manifest_name is nil' if service_manifest_name.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'ApplicationTypes/{applicationTypeName}/$/GetServiceManifest'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'applicationTypeName' => application_type_name},
      query_params: {'api-version' => api_version,'ApplicationTypeVersion' => application_type_version,'ServiceManifestName' => service_manifest_name,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ServiceTypeManifest.mapper()
        result.body = self.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
get_service_manifest_with_http_info(application_type_name, application_type_version, service_manifest_name, timeout:60, custom_headers:nil) click to toggle source

Gets the manifest describing a service type.

Gets the manifest describing a service type. The response contains the service manifest XML as a string.

@param application_type_name [String] The name of the application type. @param application_type_version [String] The version of the application type. @param service_manifest_name [String] The name of a service manifest registered as part of an application type in a Service Fabric cluster. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 5697
def get_service_manifest_with_http_info(application_type_name, application_type_version, service_manifest_name, timeout:60, custom_headers:nil)
  get_service_manifest_async(application_type_name, application_type_version, service_manifest_name, timeout:timeout, custom_headers:custom_headers).value!
end
get_service_name_info(partition_id, timeout:60, custom_headers:nil) click to toggle source

Gets the name of the Service Fabric service for a partition.

Gets name of the service for the specified partition. A 404 error is returned if the partition ID does not exist in the cluster.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ServiceNameInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 12238
def get_service_name_info(partition_id, timeout:60, custom_headers:nil)
  response = get_service_name_info_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_service_name_info_async(partition_id, timeout:60, custom_headers:nil) click to toggle source

Gets the name of the Service Fabric service for a partition.

Gets name of the service for the specified partition. A 404 error is returned if the partition ID does not exist in the cluster.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 12279
def get_service_name_info_async(partition_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Partitions/{partitionId}/$/GetServiceName'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ServiceNameInfo.mapper()
        result.body = self.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
get_service_name_info_with_http_info(partition_id, timeout:60, custom_headers:nil) click to toggle source

Gets the name of the Service Fabric service for a partition.

Gets name of the service for the specified partition. A 404 error is returned if the partition ID does not exist in the cluster.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 12259
def get_service_name_info_with_http_info(partition_id, timeout:60, custom_headers:nil)
  get_service_name_info_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
end
get_service_type_info_by_name(application_type_name, application_type_version, service_type_name, timeout:60, custom_headers:nil) click to toggle source

Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster.

Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specified service type is not found in the cluster.

@param application_type_name [String] The name of the application type. @param application_type_version [String] The version of the application type. @param service_type_name [String] Specifies the name of a Service Fabric service type. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ServiceTypeInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 5541
def get_service_type_info_by_name(application_type_name, application_type_version, service_type_name, timeout:60, custom_headers:nil)
  response = get_service_type_info_by_name_async(application_type_name, application_type_version, service_type_name, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_service_type_info_by_name_async(application_type_name, application_type_version, service_type_name, timeout:60, custom_headers:nil) click to toggle source

Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster.

Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specified service type is not found in the cluster.

@param application_type_name [String] The name of the application type. @param application_type_version [String] The version of the application type. @param service_type_name [String] Specifies the name of a Service Fabric service type. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 5596
def get_service_type_info_by_name_async(application_type_name, application_type_version, service_type_name, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'application_type_name is nil' if application_type_name.nil?
  fail ArgumentError, 'application_type_version is nil' if application_type_version.nil?
  fail ArgumentError, 'service_type_name is nil' if service_type_name.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'ApplicationTypes/{applicationTypeName}/$/GetServiceTypes/{serviceTypeName}'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'applicationTypeName' => application_type_name},
      skip_encoding_path_params: {'serviceTypeName' => service_type_name},
      query_params: {'api-version' => api_version,'ApplicationTypeVersion' => application_type_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ServiceTypeInfo.mapper()
        result.body = self.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
get_service_type_info_by_name_with_http_info(application_type_name, application_type_version, service_type_name, timeout:60, custom_headers:nil) click to toggle source

Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster.

Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specified service type is not found in the cluster.

@param application_type_name [String] The name of the application type. @param application_type_version [String] The version of the application type. @param service_type_name [String] Specifies the name of a Service Fabric service type. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 5569
def get_service_type_info_by_name_with_http_info(application_type_name, application_type_version, service_type_name, timeout:60, custom_headers:nil)
  get_service_type_info_by_name_async(application_type_name, application_type_version, service_type_name, timeout:timeout, custom_headers:custom_headers).value!
end
get_service_type_info_list(application_type_name, application_type_version, timeout:60, custom_headers:nil) click to toggle source

Gets the list containing the information about service types that are supported by a provisioned application type in a Service Fabric cluster.

Gets the list containing the information about service types that are supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned.

@param application_type_name [String] The name of the application type. @param application_type_version [String] The version of the application type. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 5399
def get_service_type_info_list(application_type_name, application_type_version, timeout:60, custom_headers:nil)
  response = get_service_type_info_list_async(application_type_name, application_type_version, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_service_type_info_list_async(application_type_name, application_type_version, timeout:60, custom_headers:nil) click to toggle source

Gets the list containing the information about service types that are supported by a provisioned application type in a Service Fabric cluster.

Gets the list containing the information about service types that are supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned.

@param application_type_name [String] The name of the application type. @param application_type_version [String] The version of the application type. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 5446
def get_service_type_info_list_async(application_type_name, application_type_version, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'application_type_name is nil' if application_type_name.nil?
  fail ArgumentError, 'application_type_version is nil' if application_type_version.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'ApplicationTypes/{applicationTypeName}/$/GetServiceTypes'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'applicationTypeName' => application_type_name},
      query_params: {'api-version' => api_version,'ApplicationTypeVersion' => application_type_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ServiceTypeInfoElementType',
                type: {
                  name: 'Composite',
                  class_name: 'ServiceTypeInfo'
                }
            }
          }
        }
        result.body = self.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
get_service_type_info_list_with_http_info(application_type_name, application_type_version, timeout:60, custom_headers:nil) click to toggle source

Gets the list containing the information about service types that are supported by a provisioned application type in a Service Fabric cluster.

Gets the list containing the information about service types that are supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned.

@param application_type_name [String] The name of the application type. @param application_type_version [String] The version of the application type. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 5423
def get_service_type_info_list_with_http_info(application_type_name, application_type_version, timeout:60, custom_headers:nil)
  get_service_type_info_list_async(application_type_name, application_type_version, timeout:timeout, custom_headers:custom_headers).value!
end
get_services_event_list(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets all Services-related events.

The response is list of ServiceEvent objects.

@param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 28750
def get_services_event_list(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  response = get_services_event_list_async(start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_services_event_list_async(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets all Services-related events.

The response is list of ServiceEvent objects.

@param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 28813
def get_services_event_list_async(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1
  fail ArgumentError, 'start_time_utc is nil' if start_time_utc.nil?
  fail ArgumentError, 'end_time_utc is nil' if end_time_utc.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'] = accept_language unless accept_language.nil?
  path_template = 'EventsStore/Services/Events'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout,'StartTimeUtc' => start_time_utc,'EndTimeUtc' => end_time_utc,'EventsTypesFilter' => events_types_filter,'ExcludeAnalysisEvents' => exclude_analysis_events,'SkipCorrelationLookup' => skip_correlation_lookup},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ServiceEventElementType',
                type: {
                  name: 'Composite',
                  class_name: 'ServiceEvent'
                }
            }
          }
        }
        result.body = self.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
get_services_event_list_with_http_info(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil) click to toggle source

Gets all Services-related events.

The response is list of ServiceEvent objects.

@param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 28782
def get_services_event_list_with_http_info(start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
  get_services_event_list_async(start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_filter, exclude_analysis_events:exclude_analysis_events, skip_correlation_lookup:skip_correlation_lookup, custom_headers:custom_headers).value!
end
get_sub_name_info_list(name_id, recursive:false, continuation_token:nil, timeout:60, custom_headers:nil) click to toggle source

Enumerates all the Service Fabric names under a given name.

Enumerates all the Service Fabric names under a given name. If the subnames do not fit in a page, one page of results is returned as well as a continuation token which can be used to get the next page. Querying a name that doesn't exist will fail.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param recursive [Boolean] Allows specifying that the search performed should be recursive. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PagedSubNameInfoList] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26794
def get_sub_name_info_list(name_id, recursive:false, continuation_token:nil, timeout:60, custom_headers:nil)
  response = get_sub_name_info_list_async(name_id, recursive:recursive, continuation_token:continuation_token, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_sub_name_info_list_async(name_id, recursive:false, continuation_token:nil, timeout:60, custom_headers:nil) click to toggle source

Enumerates all the Service Fabric names under a given name.

Enumerates all the Service Fabric names under a given name. If the subnames do not fit in a page, one page of results is returned as well as a continuation token which can be used to get the next page. Querying a name that doesn't exist will fail.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param recursive [Boolean] Allows specifying that the search performed should be recursive. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26859
def get_sub_name_info_list_async(name_id, recursive:false, continuation_token:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'name_id is nil' if name_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Names/{nameId}/$/GetSubNames'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nameId' => name_id},
      query_params: {'api-version' => api_version,'Recursive' => recursive,'timeout' => timeout},
      skip_encoding_query_params: {'ContinuationToken' => continuation_token},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::PagedSubNameInfoList.mapper()
        result.body = self.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
get_sub_name_info_list_with_http_info(name_id, recursive:false, continuation_token:nil, timeout:60, custom_headers:nil) click to toggle source

Enumerates all the Service Fabric names under a given name.

Enumerates all the Service Fabric names under a given name. If the subnames do not fit in a page, one page of results is returned as well as a continuation token which can be used to get the next page. Querying a name that doesn't exist will fail.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param recursive [Boolean] Allows specifying that the search performed should be recursive. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26827
def get_sub_name_info_list_with_http_info(name_id, recursive:false, continuation_token:nil, timeout:60, custom_headers:nil)
  get_sub_name_info_list_async(name_id, recursive:recursive, continuation_token:continuation_token, timeout:timeout, custom_headers:custom_headers).value!
end
get_upgrade_orchestration_service_state(timeout:60, custom_headers:nil) click to toggle source

Get the service state of Service Fabric Upgrade Orchestration Service.

Get the service state of Service Fabric Upgrade Orchestration Service. This API is internally used for support purposes.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [UpgradeOrchestrationServiceState] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2155
def get_upgrade_orchestration_service_state(timeout:60, custom_headers:nil)
  response = get_upgrade_orchestration_service_state_async(timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_upgrade_orchestration_service_state_async(timeout:60, custom_headers:nil) click to toggle source

Get the service state of Service Fabric Upgrade Orchestration Service.

Get the service state of Service Fabric Upgrade Orchestration Service. This API is internally used for support purposes.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2194
def get_upgrade_orchestration_service_state_async(timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = '$/GetUpgradeOrchestrationServiceState'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::UpgradeOrchestrationServiceState.mapper()
        result.body = self.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
get_upgrade_orchestration_service_state_with_http_info(timeout:60, custom_headers:nil) click to toggle source

Get the service state of Service Fabric Upgrade Orchestration Service.

Get the service state of Service Fabric Upgrade Orchestration Service. This API is internally used for support purposes.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2175
def get_upgrade_orchestration_service_state_with_http_info(timeout:60, custom_headers:nil)
  get_upgrade_orchestration_service_state_async(timeout:timeout, custom_headers:custom_headers).value!
end
invoke_container_api(node_name, application_id, service_manifest_name, code_package_name, code_package_instance_id, container_api_request_body, timeout:60, custom_headers:nil) click to toggle source

Invoke container API on a container deployed on a Service Fabric node.

Invoke container API on a container deployed on a Service Fabric node for the given code package.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_manifest_name [String] The name of a service manifest registered as part of an application type in a Service Fabric cluster. @param code_package_name [String] The name of code package specified in service manifest registered as part of an application type in a Service Fabric cluster. @param code_package_instance_id [String] ID that uniquely identifies a code package instance deployed on a service fabric node. @param container_api_request_body [ContainerApiRequestBody] Parameters for making container API call @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ContainerApiResponse] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 17773
def invoke_container_api(node_name, application_id, service_manifest_name, code_package_name, code_package_instance_id, container_api_request_body, timeout:60, custom_headers:nil)
  response = invoke_container_api_async(node_name, application_id, service_manifest_name, code_package_name, code_package_instance_id, container_api_request_body, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
invoke_container_api_async(node_name, application_id, service_manifest_name, code_package_name, code_package_instance_id, container_api_request_body, timeout:60, custom_headers:nil) click to toggle source

Invoke container API on a container deployed on a Service Fabric node.

Invoke container API on a container deployed on a Service Fabric node for the given code package.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_manifest_name [String] The name of a service manifest registered as part of an application type in a Service Fabric cluster. @param code_package_name [String] The name of code package specified in service manifest registered as part of an application type in a Service Fabric cluster. @param code_package_instance_id [String] ID that uniquely identifies a code package instance deployed on a service fabric node. @param container_api_request_body [ContainerApiRequestBody] Parameters for making container API call @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 17844
def invoke_container_api_async(node_name, application_id, service_manifest_name, code_package_name, code_package_instance_id, container_api_request_body, timeout:60, custom_headers:nil)
  api_version = '6.2'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, 'service_manifest_name is nil' if service_manifest_name.nil?
  fail ArgumentError, 'code_package_name is nil' if code_package_name.nil?
  fail ArgumentError, 'code_package_instance_id is nil' if code_package_instance_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1
  fail ArgumentError, 'container_api_request_body is nil' if container_api_request_body.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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ContainerApiRequestBody.mapper()
  request_content = self.serialize(request_mapper,  container_api_request_body)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerApi'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'ServiceManifestName' => service_manifest_name,'CodePackageName' => code_package_name,'CodePackageInstanceId' => code_package_instance_id,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ContainerApiResponse.mapper()
        result.body = self.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
invoke_container_api_with_http_info(node_name, application_id, service_manifest_name, code_package_name, code_package_instance_id, container_api_request_body, timeout:60, custom_headers:nil) click to toggle source

Invoke container API on a container deployed on a Service Fabric node.

Invoke container API on a container deployed on a Service Fabric node for the given code package.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_manifest_name [String] The name of a service manifest registered as part of an application type in a Service Fabric cluster. @param code_package_name [String] The name of code package specified in service manifest registered as part of an application type in a Service Fabric cluster. @param code_package_instance_id [String] ID that uniquely identifies a code package instance deployed on a service fabric node. @param container_api_request_body [ContainerApiRequestBody] Parameters for making container API call @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 17809
def invoke_container_api_with_http_info(node_name, application_id, service_manifest_name, code_package_name, code_package_instance_id, container_api_request_body, timeout:60, custom_headers:nil)
  invoke_container_api_async(node_name, application_id, service_manifest_name, code_package_name, code_package_instance_id, container_api_request_body, timeout:timeout, custom_headers:custom_headers).value!
end
invoke_infrastructure_command(command, service_id:nil, timeout:60, custom_headers:nil) click to toggle source

Invokes an administrative command on the given Infrastructure Service instance.

For clusters that have one or more instances of the Infrastructure Service configured, this API provides a way to send infrastructure-specific commands to a particular instance of the Infrastructure Service.

Available commands and their corresponding response formats vary depending upon the infrastructure on which the cluster is running.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param command [String] The text of the command to be invoked. The content of the command is infrastructure-specific. @param service_id [String] The identity of the infrastructure service. This is the full name of the infrastructure service without the 'fabric:' URI scheme. This parameter required only for the cluster that have more than one instance of infrastructure service running. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [String] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 20611
def invoke_infrastructure_command(command, service_id:nil, timeout:60, custom_headers:nil)
  response = invoke_infrastructure_command_async(command, service_id:service_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
invoke_infrastructure_command_async(command, service_id:nil, timeout:60, custom_headers:nil) click to toggle source

Invokes an administrative command on the given Infrastructure Service instance.

For clusters that have one or more instances of the Infrastructure Service configured, this API provides a way to send infrastructure-specific commands to a particular instance of the Infrastructure Service.

Available commands and their corresponding response formats vary depending upon the infrastructure on which the cluster is running.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param command [String] The text of the command to be invoked. The content of the command is infrastructure-specific. @param service_id [String] The identity of the infrastructure service. This is the full name of the infrastructure service without the 'fabric:' URI scheme. This parameter required only for the cluster that have more than one instance of infrastructure service running. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 20684
def invoke_infrastructure_command_async(command, service_id:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'command is nil' if command.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = '$/InvokeInfrastructureCommand'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'Command' => command,'ServiceId' => service_id,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'String'
          }
        }
        result.body = self.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
invoke_infrastructure_command_with_http_info(command, service_id:nil, timeout:60, custom_headers:nil) click to toggle source

Invokes an administrative command on the given Infrastructure Service instance.

For clusters that have one or more instances of the Infrastructure Service configured, this API provides a way to send infrastructure-specific commands to a particular instance of the Infrastructure Service.

Available commands and their corresponding response formats vary depending upon the infrastructure on which the cluster is running.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param command [String] The text of the command to be invoked. The content of the command is infrastructure-specific. @param service_id [String] The identity of the infrastructure service. This is the full name of the infrastructure service without the 'fabric:' URI scheme. This parameter required only for the cluster that have more than one instance of infrastructure service running. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 20648
def invoke_infrastructure_command_with_http_info(command, service_id:nil, timeout:60, custom_headers:nil)
  invoke_infrastructure_command_async(command, service_id:service_id, timeout:timeout, custom_headers:custom_headers).value!
end
invoke_infrastructure_query(command, service_id:nil, timeout:60, custom_headers:nil) click to toggle source

Invokes a read-only query on the given infrastructure service instance.

For clusters that have one or more instances of the Infrastructure Service configured, this API provides a way to send infrastructure-specific queries to a particular instance of the Infrastructure Service.

Available commands and their corresponding response formats vary depending upon the infrastructure on which the cluster is running.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param command [String] The text of the command to be invoked. The content of the command is infrastructure-specific. @param service_id [String] The identity of the infrastructure service. This is the full name of the infrastructure service without the 'fabric:' URI scheme. This parameter required only for the cluster that have more than one instance of infrastructure service running. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [String] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 20776
def invoke_infrastructure_query(command, service_id:nil, timeout:60, custom_headers:nil)
  response = invoke_infrastructure_query_async(command, service_id:service_id, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
invoke_infrastructure_query_async(command, service_id:nil, timeout:60, custom_headers:nil) click to toggle source

Invokes a read-only query on the given infrastructure service instance.

For clusters that have one or more instances of the Infrastructure Service configured, this API provides a way to send infrastructure-specific queries to a particular instance of the Infrastructure Service.

Available commands and their corresponding response formats vary depending upon the infrastructure on which the cluster is running.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param command [String] The text of the command to be invoked. The content of the command is infrastructure-specific. @param service_id [String] The identity of the infrastructure service. This is the full name of the infrastructure service without the 'fabric:' URI scheme. This parameter required only for the cluster that have more than one instance of infrastructure service running. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 20847
def invoke_infrastructure_query_async(command, service_id:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'command is nil' if command.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = '$/InvokeInfrastructureQuery'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'Command' => command,'ServiceId' => service_id,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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: 'String'
          }
        }
        result.body = self.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
invoke_infrastructure_query_with_http_info(command, service_id:nil, timeout:60, custom_headers:nil) click to toggle source

Invokes a read-only query on the given infrastructure service instance.

For clusters that have one or more instances of the Infrastructure Service configured, this API provides a way to send infrastructure-specific queries to a particular instance of the Infrastructure Service.

Available commands and their corresponding response formats vary depending upon the infrastructure on which the cluster is running.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param command [String] The text of the command to be invoked. The content of the command is infrastructure-specific. @param service_id [String] The identity of the infrastructure service. This is the full name of the infrastructure service without the 'fabric:' URI scheme. This parameter required only for the cluster that have more than one instance of infrastructure service running. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 20812
def invoke_infrastructure_query_with_http_info(command, service_id:nil, timeout:60, custom_headers:nil)
  invoke_infrastructure_query_async(command, service_id:service_id, timeout:timeout, custom_headers:custom_headers).value!
end
make_request(method, path, options = {}) click to toggle source

Makes a request and returns the body of the response. @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete. @param path [String] the path, relative to {base_url}. @param options [Hash{String=>String}] specifying any request options like :body. @return [Hash{String=>String}] containing the body of the response. Example:

request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
path = "/path"
options = {
  body: request_content,
  query_params: {'api-version' => '2016-02-01'}
}
result = @client.make_request(:put, path, options)
# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 67
def make_request(method, path, options = {})
  result = make_request_with_http_info(method, path, options)
  result.body unless result.nil?
end
make_request_async(method, path, options = {}) click to toggle source

Makes a request asynchronously. @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete. @param path [String] the path, relative to {base_url}. @param options [Hash{String=>String}] specifying any request options like :body. @return [Concurrent::Promise] Promise object which holds the HTTP response.

Calls superclass method
# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 92
def make_request_async(method, path, options = {})
  fail ArgumentError, 'method is nil' if method.nil?
  fail ArgumentError, 'path is nil' if path.nil?

  request_url = options[:base_url] || @base_url
  if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
    @request_headers['Content-Type'] = options[:headers]['Content-Type']
  end

  request_headers = @request_headers
  request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
  options.merge!({headers: request_headers.merge(options[:headers] || {})})
  options.merge!({credentials: @credentials}) unless @credentials.nil?

  super(request_url, method, path, options)
end
make_request_with_http_info(method, path, options = {}) click to toggle source

Makes a request and returns the operation response. @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete. @param path [String] the path, relative to {base_url}. @param options [Hash{String=>String}] specifying any request options like :body. @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 79
def make_request_with_http_info(method, path, options = {})
  result = make_request_async(method, path, options).value!
  result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
  result
end
post_chaos_schedule(chaos_schedule, custom_headers:nil) click to toggle source

Set the schedule used by Chaos.

Set the Chaos Schedule currently in use by Chaos. Chaos will automatically schedule runs based on the Chaos Schedule. The version in the provided input schedule must match the version of the Chaos Schedule on the server. If the version provided does not match the version on the server, the Chaos Schedule is not updated. If the version provided matches the version on the server, then the Chaos Schedule is updated and the version of the Chaos Schedule on the server is incremented up by one and wraps back to 0 after 2,147,483,647. If Chaos is running when this call is made, the call will fail.

@param chaos_schedule [ChaosScheduleDescription] Describes the schedule used by Chaos. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19301
def post_chaos_schedule(chaos_schedule, custom_headers:nil)
  response = post_chaos_schedule_async(chaos_schedule, custom_headers:custom_headers).value!
  nil
end
post_chaos_schedule_async(chaos_schedule, custom_headers:nil) click to toggle source

Set the schedule used by Chaos.

Set the Chaos Schedule currently in use by Chaos. Chaos will automatically schedule runs based on the Chaos Schedule. The version in the provided input schedule must match the version of the Chaos Schedule on the server. If the version provided does not match the version on the server, the Chaos Schedule is not updated. If the version provided matches the version on the server, then the Chaos Schedule is updated and the version of the Chaos Schedule on the server is incremented up by one and wraps back to 0 after 2,147,483,647. If Chaos is running when this call is made, the call will fail.

@param chaos_schedule [ChaosScheduleDescription] Describes the schedule used by Chaos. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19352
def post_chaos_schedule_async(chaos_schedule, custom_headers:nil)
  api_version = '6.2'
  fail ArgumentError, 'chaos_schedule is nil' if chaos_schedule.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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ChaosScheduleDescription.mapper()
  request_content = self.serialize(request_mapper,  chaos_schedule)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Tools/Chaos/Schedule'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
post_chaos_schedule_with_http_info(chaos_schedule, custom_headers:nil) click to toggle source

Set the schedule used by Chaos.

Set the Chaos Schedule currently in use by Chaos. Chaos will automatically schedule runs based on the Chaos Schedule. The version in the provided input schedule must match the version of the Chaos Schedule on the server. If the version provided does not match the version on the server, the Chaos Schedule is not updated. If the version provided matches the version on the server, then the Chaos Schedule is updated and the version of the Chaos Schedule on the server is incremented up by one and wraps back to 0 after 2,147,483,647. If Chaos is running when this call is made, the call will fail.

@param chaos_schedule [ChaosScheduleDescription] Describes the schedule used by Chaos. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19327
def post_chaos_schedule_with_http_info(chaos_schedule, custom_headers:nil)
  post_chaos_schedule_async(chaos_schedule, custom_headers:custom_headers).value!
end
provision_application_type(provision_application_type_description_base_required_body_param, timeout:60, custom_headers:nil) click to toggle source

Provisions or registers a Service Fabric application type with the cluster using the '.sfpkg' package in the external store or using the application package in the image store.

Provisions a Service Fabric application type with the cluster. The provision is required before any new applications can be instantiated. The provision operation can be performed either on the application package specified by the relativePathInImageStore, or by using the URI of the external '.sfpkg'.

@param provision_application_type_description_base_required_body_param

ProvisionApplicationTypeDescriptionBase

The base type of provision

application type description which supports either image store-based provision or external store-based provision. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 5142
def provision_application_type(provision_application_type_description_base_required_body_param, timeout:60, custom_headers:nil)
  response = provision_application_type_async(provision_application_type_description_base_required_body_param, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
provision_application_type_async(provision_application_type_description_base_required_body_param, timeout:60, custom_headers:nil) click to toggle source

Provisions or registers a Service Fabric application type with the cluster using the '.sfpkg' package in the external store or using the application package in the image store.

Provisions a Service Fabric application type with the cluster. The provision is required before any new applications can be instantiated. The provision operation can be performed either on the application package specified by the relativePathInImageStore, or by using the URI of the external '.sfpkg'.

@param provision_application_type_description_base_required_body_param

ProvisionApplicationTypeDescriptionBase

The base type of provision

application type description which supports either image store-based provision or external store-based provision. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 5199
def provision_application_type_async(provision_application_type_description_base_required_body_param, timeout:60, custom_headers:nil)
  api_version = '6.2'
  fail ArgumentError, 'provision_application_type_description_base_required_body_param is nil' if provision_application_type_description_base_required_body_param.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ProvisionApplicationTypeDescriptionBase.mapper()
  request_content = self.serialize(request_mapper,  provision_application_type_description_base_required_body_param)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'ApplicationTypes/$/Provision'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
provision_application_type_with_http_info(provision_application_type_description_base_required_body_param, timeout:60, custom_headers:nil) click to toggle source

Provisions or registers a Service Fabric application type with the cluster using the '.sfpkg' package in the external store or using the application package in the image store.

Provisions a Service Fabric application type with the cluster. The provision is required before any new applications can be instantiated. The provision operation can be performed either on the application package specified by the relativePathInImageStore, or by using the URI of the external '.sfpkg'.

@param provision_application_type_description_base_required_body_param

ProvisionApplicationTypeDescriptionBase

The base type of provision

application type description which supports either image store-based provision or external store-based provision. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 5171
def provision_application_type_with_http_info(provision_application_type_description_base_required_body_param, timeout:60, custom_headers:nil)
  provision_application_type_async(provision_application_type_description_base_required_body_param, timeout:timeout, custom_headers:custom_headers).value!
end
provision_cluster(provision_fabric_description, timeout:60, custom_headers:nil) click to toggle source

Provision the code or configuration packages of a Service Fabric cluster.

Validate and provision the code or configuration packages of a Service Fabric cluster.

@param provision_fabric_description [ProvisionFabricDescription] Describes the parameters for provisioning a cluster. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2384
def provision_cluster(provision_fabric_description, timeout:60, custom_headers:nil)
  response = provision_cluster_async(provision_fabric_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
provision_cluster_async(provision_fabric_description, timeout:60, custom_headers:nil) click to toggle source

Provision the code or configuration packages of a Service Fabric cluster.

Validate and provision the code or configuration packages of a Service Fabric cluster.

@param provision_fabric_description [ProvisionFabricDescription] Describes the parameters for provisioning a cluster. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2427
def provision_cluster_async(provision_fabric_description, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'provision_fabric_description is nil' if provision_fabric_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ProvisionFabricDescription.mapper()
  request_content = self.serialize(request_mapper,  provision_fabric_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '$/Provision'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
provision_cluster_with_http_info(provision_fabric_description, timeout:60, custom_headers:nil) click to toggle source

Provision the code or configuration packages of a Service Fabric cluster.

Validate and provision the code or configuration packages of a Service Fabric cluster.

@param provision_fabric_description [ProvisionFabricDescription] Describes the parameters for provisioning a cluster. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2406
def provision_cluster_with_http_info(provision_fabric_description, timeout:60, custom_headers:nil)
  provision_cluster_async(provision_fabric_description, timeout:timeout, custom_headers:custom_headers).value!
end
put_property(name_id, property_description, timeout:60, custom_headers:nil) click to toggle source

Creates or updates a Service Fabric property.

Creates or updates the specified Service Fabric property under a given name.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param property_description [PropertyDescription] Describes the Service Fabric property to be created. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27084
def put_property(name_id, property_description, timeout:60, custom_headers:nil)
  response = put_property_async(name_id, property_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
put_property_async(name_id, property_description, timeout:60, custom_headers:nil) click to toggle source

Creates or updates a Service Fabric property.

Creates or updates the specified Service Fabric property under a given name.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param property_description [PropertyDescription] Describes the Service Fabric property to be created. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27129
def put_property_async(name_id, property_description, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'name_id is nil' if name_id.nil?
  fail ArgumentError, 'property_description is nil' if property_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::PropertyDescription.mapper()
  request_content = self.serialize(request_mapper,  property_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Names/{nameId}/$/GetProperty'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nameId' => name_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.make_request_async(:put, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
put_property_with_http_info(name_id, property_description, timeout:60, custom_headers:nil) click to toggle source

Creates or updates a Service Fabric property.

Creates or updates the specified Service Fabric property under a given name.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param property_description [PropertyDescription] Describes the Service Fabric property to be created. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27107
def put_property_with_http_info(name_id, property_description, timeout:60, custom_headers:nil)
  put_property_async(name_id, property_description, timeout:timeout, custom_headers:custom_headers).value!
end
recover_all_partitions(timeout:60, custom_headers:nil) click to toggle source

Indicates to the Service Fabric cluster that it should attempt to recover any services (including system services) which are currently stuck in quorum loss.

Indicates to the Service Fabric cluster that it should attempt to recover any services (including system services) which are currently stuck in quorum loss. This operation should only be performed if it is known that the replicas that are down cannot be recovered. Incorrect use of this API can cause potential data loss.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13690
def recover_all_partitions(timeout:60, custom_headers:nil)
  response = recover_all_partitions_async(timeout:timeout, custom_headers:custom_headers).value!
  nil
end
recover_all_partitions_async(timeout:60, custom_headers:nil) click to toggle source

Indicates to the Service Fabric cluster that it should attempt to recover any services (including system services) which are currently stuck in quorum loss.

Indicates to the Service Fabric cluster that it should attempt to recover any services (including system services) which are currently stuck in quorum loss. This operation should only be performed if it is known that the replicas that are down cannot be recovered. Incorrect use of this API can cause potential data loss.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13739
def recover_all_partitions_async(timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = '$/RecoverAllPartitions'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
recover_all_partitions_with_http_info(timeout:60, custom_headers:nil) click to toggle source

Indicates to the Service Fabric cluster that it should attempt to recover any services (including system services) which are currently stuck in quorum loss.

Indicates to the Service Fabric cluster that it should attempt to recover any services (including system services) which are currently stuck in quorum loss. This operation should only be performed if it is known that the replicas that are down cannot be recovered. Incorrect use of this API can cause potential data loss.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13715
def recover_all_partitions_with_http_info(timeout:60, custom_headers:nil)
  recover_all_partitions_async(timeout:timeout, custom_headers:custom_headers).value!
end
recover_partition(partition_id, timeout:60, custom_headers:nil) click to toggle source

Indicates to the Service Fabric cluster that it should attempt to recover a specific partition which is currently stuck in quorum loss.

Indicates to the Service Fabric cluster that it should attempt to recover a specific partition which is currently stuck in quorum loss. This operation should only be performed if it is known that the replicas that are down cannot be recovered. Incorrect use of this API can cause potential data loss.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13346
def recover_partition(partition_id, timeout:60, custom_headers:nil)
  response = recover_partition_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
recover_partition_async(partition_id, timeout:60, custom_headers:nil) click to toggle source

Indicates to the Service Fabric cluster that it should attempt to recover a specific partition which is currently stuck in quorum loss.

Indicates to the Service Fabric cluster that it should attempt to recover a specific partition which is currently stuck in quorum loss. This operation should only be performed if it is known that the replicas that are down cannot be recovered. Incorrect use of this API can cause potential data loss.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13393
def recover_partition_async(partition_id, timeout:60, custom_headers:nil)
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Partitions/{partitionId}/$/Recover'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
recover_partition_with_http_info(partition_id, timeout:60, custom_headers:nil) click to toggle source

Indicates to the Service Fabric cluster that it should attempt to recover a specific partition which is currently stuck in quorum loss.

Indicates to the Service Fabric cluster that it should attempt to recover a specific partition which is currently stuck in quorum loss. This operation should only be performed if it is known that the replicas that are down cannot be recovered. Incorrect use of this API can cause potential data loss.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13370
def recover_partition_with_http_info(partition_id, timeout:60, custom_headers:nil)
  recover_partition_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
end
recover_service_partitions(service_id, timeout:60, custom_headers:nil) click to toggle source

Indicates to the Service Fabric cluster that it should attempt to recover the specified service which is currently stuck in quorum loss.

Indicates to the Service Fabric cluster that it should attempt to recover the specified service which is currently stuck in quorum loss. This operation should only be performed if it is known that the replicas that are down cannot be recovered. Incorrect use of this API can cause potential data loss.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13462
def recover_service_partitions(service_id, timeout:60, custom_headers:nil)
  response = recover_service_partitions_async(service_id, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
recover_service_partitions_async(service_id, timeout:60, custom_headers:nil) click to toggle source

Indicates to the Service Fabric cluster that it should attempt to recover the specified service which is currently stuck in quorum loss.

Indicates to the Service Fabric cluster that it should attempt to recover the specified service which is currently stuck in quorum loss. This operation should only be performed if it is known that the replicas that are down cannot be recovered. Incorrect use of this API can cause potential data loss.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13521
def recover_service_partitions_async(service_id, timeout:60, custom_headers:nil)
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Services/$/{serviceId}/$/GetPartitions/$/Recover'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
recover_service_partitions_with_http_info(service_id, timeout:60, custom_headers:nil) click to toggle source

Indicates to the Service Fabric cluster that it should attempt to recover the specified service which is currently stuck in quorum loss.

Indicates to the Service Fabric cluster that it should attempt to recover the specified service which is currently stuck in quorum loss. This operation should only be performed if it is known that the replicas that are down cannot be recovered. Incorrect use of this API can cause potential data loss.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13492
def recover_service_partitions_with_http_info(service_id, timeout:60, custom_headers:nil)
  recover_service_partitions_async(service_id, timeout:timeout, custom_headers:custom_headers).value!
end
recover_system_partitions(timeout:60, custom_headers:nil) click to toggle source

Indicates to the Service Fabric cluster that it should attempt to recover the system services which are currently stuck in quorum loss.

Indicates to the Service Fabric cluster that it should attempt to recover the system services which are currently stuck in quorum loss. This operation should only be performed if it is known that the replicas that are down cannot be recovered. Incorrect use of this API can cause potential data loss.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13583
def recover_system_partitions(timeout:60, custom_headers:nil)
  response = recover_system_partitions_async(timeout:timeout, custom_headers:custom_headers).value!
  nil
end
recover_system_partitions_async(timeout:60, custom_headers:nil) click to toggle source

Indicates to the Service Fabric cluster that it should attempt to recover the system services which are currently stuck in quorum loss.

Indicates to the Service Fabric cluster that it should attempt to recover the system services which are currently stuck in quorum loss. This operation should only be performed if it is known that the replicas that are down cannot be recovered. Incorrect use of this API can cause potential data loss.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13628
def recover_system_partitions_async(timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = '$/RecoverSystemPartitions'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
recover_system_partitions_with_http_info(timeout:60, custom_headers:nil) click to toggle source

Indicates to the Service Fabric cluster that it should attempt to recover the system services which are currently stuck in quorum loss.

Indicates to the Service Fabric cluster that it should attempt to recover the system services which are currently stuck in quorum loss. This operation should only be performed if it is known that the replicas that are down cannot be recovered. Incorrect use of this API can cause potential data loss.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13606
def recover_system_partitions_with_http_info(timeout:60, custom_headers:nil)
  recover_system_partitions_async(timeout:timeout, custom_headers:custom_headers).value!
end
remove_compose_deployment(deployment_name, timeout:60, custom_headers:nil) click to toggle source

Deletes an existing Service Fabric compose deployment from cluster.

Deletes an existing Service Fabric compose deployment.

@param deployment_name [String] The identity of the deployment. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18438
def remove_compose_deployment(deployment_name, timeout:60, custom_headers:nil)
  response = remove_compose_deployment_async(deployment_name, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
remove_compose_deployment_async(deployment_name, timeout:60, custom_headers:nil) click to toggle source

Deletes an existing Service Fabric compose deployment from cluster.

Deletes an existing Service Fabric compose deployment.

@param deployment_name [String] The identity of the deployment. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18477
def remove_compose_deployment_async(deployment_name, timeout:60, custom_headers:nil)
  api_version = '6.0-preview'
  fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'ComposeDeployments/{deploymentName}/$/Delete'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'deploymentName' => deployment_name},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
remove_compose_deployment_with_http_info(deployment_name, timeout:60, custom_headers:nil) click to toggle source

Deletes an existing Service Fabric compose deployment from cluster.

Deletes an existing Service Fabric compose deployment.

@param deployment_name [String] The identity of the deployment. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18458
def remove_compose_deployment_with_http_info(deployment_name, timeout:60, custom_headers:nil)
  remove_compose_deployment_async(deployment_name, timeout:timeout, custom_headers:custom_headers).value!
end
remove_node_state(node_name, timeout:60, custom_headers:nil) click to toggle source

Notifies Service Fabric that the persisted state on a node has been permanently removed or lost.

Notifies Service Fabric that the persisted state on a node has been permanently removed or lost. This implies that it is not possible to recover the persisted state of that node. This generally happens if a hard disk has been wiped clean, or if a hard disk crashes. The node has to be down for this operation to be successful. This operation lets Service Fabric know that the replicas on that node no longer exist, and that Service Fabric should stop waiting for those replicas to come back up. Do not run this cmdlet if the state on the node has not been removed and the node can comes back up with its state intact.

@param node_name [String] The name of the node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 4472
def remove_node_state(node_name, timeout:60, custom_headers:nil)
  response = remove_node_state_async(node_name, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
remove_node_state_async(node_name, timeout:60, custom_headers:nil) click to toggle source

Notifies Service Fabric that the persisted state on a node has been permanently removed or lost.

Notifies Service Fabric that the persisted state on a node has been permanently removed or lost. This implies that it is not possible to recover the persisted state of that node. This generally happens if a hard disk has been wiped clean, or if a hard disk crashes. The node has to be down for this operation to be successful. This operation lets Service Fabric know that the replicas on that node no longer exist, and that Service Fabric should stop waiting for those replicas to come back up. Do not run this cmdlet if the state on the node has not been removed and the node can comes back up with its state intact.

@param node_name [String] The name of the node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 4529
def remove_node_state_async(node_name, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Nodes/{nodeName}/$/RemoveNodeState'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
remove_node_state_with_http_info(node_name, timeout:60, custom_headers:nil) click to toggle source

Notifies Service Fabric that the persisted state on a node has been permanently removed or lost.

Notifies Service Fabric that the persisted state on a node has been permanently removed or lost. This implies that it is not possible to recover the persisted state of that node. This generally happens if a hard disk has been wiped clean, or if a hard disk crashes. The node has to be down for this operation to be successful. This operation lets Service Fabric know that the replicas on that node no longer exist, and that Service Fabric should stop waiting for those replicas to come back up. Do not run this cmdlet if the state on the node has not been removed and the node can comes back up with its state intact.

@param node_name [String] The name of the node. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 4501
def remove_node_state_with_http_info(node_name, timeout:60, custom_headers:nil)
  remove_node_state_async(node_name, timeout:timeout, custom_headers:custom_headers).value!
end
remove_replica(node_name, partition_id, replica_id, force_remove:nil, timeout:60, custom_headers:nil) click to toggle source

Removes a service replica running on a node.

This API simulates a Service Fabric replica failure by removing a replica from a Service Fabric cluster. The removal closes the replica, transitions the replica to the role None, and then removes all of the state information of the replica from the cluster. This API tests the replica state removal path, and simulates the report fault permanent path through client APIs. Warning - There are no safety checks performed when this API is used. Incorrect use of this API can lead to data loss for stateful services.In addition, the forceRemove flag impacts all other replicas hosted in the same process.

@param node_name [String] The name of the node. @param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param force_remove [Boolean] Remove a Service Fabric application or service forcefully without going through the graceful shutdown sequence. This parameter can be used to forcefully delete an application or service for which delete is timing out due to issues in the service code that prevents graceful close of replicas. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 16045
def remove_replica(node_name, partition_id, replica_id, force_remove:nil, timeout:60, custom_headers:nil)
  response = remove_replica_async(node_name, partition_id, replica_id, force_remove:force_remove, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
remove_replica_async(node_name, partition_id, replica_id, force_remove:nil, timeout:60, custom_headers:nil) click to toggle source

Removes a service replica running on a node.

This API simulates a Service Fabric replica failure by removing a replica from a Service Fabric cluster. The removal closes the replica, transitions the replica to the role None, and then removes all of the state information of the replica from the cluster. This API tests the replica state removal path, and simulates the report fault permanent path through client APIs. Warning - There are no safety checks performed when this API is used. Incorrect use of this API can lead to data loss for stateful services.In addition, the forceRemove flag impacts all other replicas hosted in the same process.

@param node_name [String] The name of the node. @param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param force_remove [Boolean] Remove a Service Fabric application or service forcefully without going through the graceful shutdown sequence. This parameter can be used to forcefully delete an application or service for which delete is timing out due to issues in the service code that prevents graceful close of replicas. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 16114
def remove_replica_async(node_name, partition_id, replica_id, force_remove:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, 'replica_id is nil' if replica_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Delete'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      skip_encoding_path_params: {'partitionId' => partition_id,'replicaId' => replica_id},
      query_params: {'api-version' => api_version,'ForceRemove' => force_remove,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
remove_replica_with_http_info(node_name, partition_id, replica_id, force_remove:nil, timeout:60, custom_headers:nil) click to toggle source

Removes a service replica running on a node.

This API simulates a Service Fabric replica failure by removing a replica from a Service Fabric cluster. The removal closes the replica, transitions the replica to the role None, and then removes all of the state information of the replica from the cluster. This API tests the replica state removal path, and simulates the report fault permanent path through client APIs. Warning - There are no safety checks performed when this API is used. Incorrect use of this API can lead to data loss for stateful services.In addition, the forceRemove flag impacts all other replicas hosted in the same process.

@param node_name [String] The name of the node. @param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param force_remove [Boolean] Remove a Service Fabric application or service forcefully without going through the graceful shutdown sequence. This parameter can be used to forcefully delete an application or service for which delete is timing out due to issues in the service code that prevents graceful close of replicas. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 16080
def remove_replica_with_http_info(node_name, partition_id, replica_id, force_remove:nil, timeout:60, custom_headers:nil)
  remove_replica_async(node_name, partition_id, replica_id, force_remove:force_remove, timeout:timeout, custom_headers:custom_headers).value!
end
report_application_health(application_id, health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric application.

Reports health state of the specified Service Fabric application. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Application, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, get application health and check that the report appears in the HealthEvents section.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 7640
def report_application_health(application_id, health_information, immediate:false, timeout:60, custom_headers:nil)
  response = report_application_health_async(application_id, health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
report_application_health_async(application_id, health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric application.

Reports health state of the specified Service Fabric application. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Application, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, get application health and check that the report appears in the HealthEvents section.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 7751
def report_application_health_async(application_id, health_information, immediate:false, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, 'health_information is nil' if health_information.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::HealthInformation.mapper()
  request_content = self.serialize(request_mapper,  health_information)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Applications/{applicationId}/$/ReportHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'Immediate' => immediate,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
report_application_health_with_http_info(application_id, health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric application.

Reports health state of the specified Service Fabric application. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Application, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, get application health and check that the report appears in the HealthEvents section.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 7696
def report_application_health_with_http_info(application_id, health_information, immediate:false, timeout:60, custom_headers:nil)
  report_application_health_async(application_id, health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
end
report_cluster_health(health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric cluster.

Sends a health report on a Service Fabric cluster. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway node, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, run GetClusterHealth and check that the report appears in the HealthEvents section.

@param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 1387
def report_cluster_health(health_information, immediate:false, timeout:60, custom_headers:nil)
  response = report_cluster_health_async(health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
report_cluster_health_async(health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric cluster.

Sends a health report on a Service Fabric cluster. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway node, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, run GetClusterHealth and check that the report appears in the HealthEvents section.

@param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 1488
def report_cluster_health_async(health_information, immediate:false, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'health_information is nil' if health_information.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::HealthInformation.mapper()
  request_content = self.serialize(request_mapper,  health_information)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '$/ReportClusterHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'Immediate' => immediate,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
report_cluster_health_with_http_info(health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric cluster.

Sends a health report on a Service Fabric cluster. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway node, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, run GetClusterHealth and check that the report appears in the HealthEvents section.

@param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 1438
def report_cluster_health_with_http_info(health_information, immediate:false, timeout:60, custom_headers:nil)
  report_cluster_health_async(health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
end
report_deployed_application_health(node_name, application_id, health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric application deployed on a Service Fabric node.

Reports health state of the application deployed on a Service Fabric node. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Service, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, get deployed application health and check that the report appears in the HealthEvents section.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 9490
def report_deployed_application_health(node_name, application_id, health_information, immediate:false, timeout:60, custom_headers:nil)
  response = report_deployed_application_health_async(node_name, application_id, health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
report_deployed_application_health_async(node_name, application_id, health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric application deployed on a Service Fabric node.

Reports health state of the application deployed on a Service Fabric node. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Service, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, get deployed application health and check that the report appears in the HealthEvents section.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 9607
def report_deployed_application_health_async(node_name, application_id, health_information, immediate:false, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, 'health_information is nil' if health_information.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::HealthInformation.mapper()
  request_content = self.serialize(request_mapper,  health_information)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Nodes/{nodeName}/$/GetApplications/{applicationId}/$/ReportHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'Immediate' => immediate,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
report_deployed_application_health_with_http_info(node_name, application_id, health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric application deployed on a Service Fabric node.

Reports health state of the application deployed on a Service Fabric node. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Service, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, get deployed application health and check that the report appears in the HealthEvents section.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 9549
def report_deployed_application_health_with_http_info(node_name, application_id, health_information, immediate:false, timeout:60, custom_headers:nil)
  report_deployed_application_health_async(node_name, application_id, health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
end
report_deployed_service_package_health(node_name, application_id, service_package_name, health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric deployed service package.

Reports health state of the service package of the application deployed on a Service Fabric node. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Service, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, get deployed service package health and check that the report appears in the HealthEvents section.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_package_name [String] The name of the service package. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 16971
def report_deployed_service_package_health(node_name, application_id, service_package_name, health_information, immediate:false, timeout:60, custom_headers:nil)
  response = report_deployed_service_package_health_async(node_name, application_id, service_package_name, health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
report_deployed_service_package_health_async(node_name, application_id, service_package_name, health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric deployed service package.

Reports health state of the service package of the application deployed on a Service Fabric node. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Service, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, get deployed service package health and check that the report appears in the HealthEvents section.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_package_name [String] The name of the service package. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 17088
def report_deployed_service_package_health_async(node_name, application_id, service_package_name, health_information, immediate:false, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, 'service_package_name is nil' if service_package_name.nil?
  fail ArgumentError, 'health_information is nil' if health_information.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::HealthInformation.mapper()
  request_content = self.serialize(request_mapper,  health_information)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/ReportHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      skip_encoding_path_params: {'applicationId' => application_id,'servicePackageName' => service_package_name},
      query_params: {'api-version' => api_version,'Immediate' => immediate,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
report_deployed_service_package_health_with_http_info(node_name, application_id, service_package_name, health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric deployed service package.

Reports health state of the service package of the application deployed on a Service Fabric node. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Service, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, get deployed service package health and check that the report appears in the HealthEvents section.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param service_package_name [String] The name of the service package. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 17030
def report_deployed_service_package_health_with_http_info(node_name, application_id, service_package_name, health_information, immediate:false, timeout:60, custom_headers:nil)
  report_deployed_service_package_health_async(node_name, application_id, service_package_name, health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
end
report_node_health(node_name, health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric node.

Reports health state of the specified Service Fabric node. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway node, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, run GetNodeHealth and check that the report appears in the HealthEvents section.

@param node_name [String] The name of the node. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 3937
def report_node_health(node_name, health_information, immediate:false, timeout:60, custom_headers:nil)
  response = report_node_health_async(node_name, health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
report_node_health_async(node_name, health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric node.

Reports health state of the specified Service Fabric node. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway node, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, run GetNodeHealth and check that the report appears in the HealthEvents section.

@param node_name [String] The name of the node. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 4038
def report_node_health_async(node_name, health_information, immediate:false, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'health_information is nil' if health_information.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::HealthInformation.mapper()
  request_content = self.serialize(request_mapper,  health_information)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Nodes/{nodeName}/$/ReportHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      query_params: {'api-version' => api_version,'Immediate' => immediate,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
report_node_health_with_http_info(node_name, health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric node.

Reports health state of the specified Service Fabric node. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway node, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, run GetNodeHealth and check that the report appears in the HealthEvents section.

@param node_name [String] The name of the node. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 3988
def report_node_health_with_http_info(node_name, health_information, immediate:false, timeout:60, custom_headers:nil)
  report_node_health_async(node_name, health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
end
report_partition_health(partition_id, health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric partition.

Reports health state of the specified Service Fabric partition. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Partition, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, run GetPartitionHealth and check that the report appears in the HealthEvents section.

@param partition_id The identity of the partition. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 12953
def report_partition_health(partition_id, health_information, immediate:false, timeout:60, custom_headers:nil)
  response = report_partition_health_async(partition_id, health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
report_partition_health_async(partition_id, health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric partition.

Reports health state of the specified Service Fabric partition. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Partition, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, run GetPartitionHealth and check that the report appears in the HealthEvents section.

@param partition_id The identity of the partition. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13056
def report_partition_health_async(partition_id, health_information, immediate:false, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, 'health_information is nil' if health_information.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::HealthInformation.mapper()
  request_content = self.serialize(request_mapper,  health_information)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Partitions/{partitionId}/$/ReportHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'Immediate' => immediate,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
report_partition_health_with_http_info(partition_id, health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric partition.

Reports health state of the specified Service Fabric partition. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Partition, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, run GetPartitionHealth and check that the report appears in the HealthEvents section.

@param partition_id The identity of the partition. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13005
def report_partition_health_with_http_info(partition_id, health_information, immediate:false, timeout:60, custom_headers:nil)
  report_partition_health_async(partition_id, health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
end
report_replica_health(partition_id, replica_id, replica_health_report_service_kind, health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric replica.

Reports health state of the specified Service Fabric replica. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Replica, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, run GetReplicaHealth and check that the report appears in the HealthEvents section.

@param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param replica_health_report_service_kind [ReplicaHealthReportServiceKind] The kind of service replica (Stateless or Stateful) for which the health is being reported. Following are the possible values. Possible values include: 'Stateless', 'Stateful' @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 15314
def report_replica_health(partition_id, replica_id, replica_health_report_service_kind, health_information, immediate:false, timeout:60, custom_headers:nil)
  response = report_replica_health_async(partition_id, replica_id, replica_health_report_service_kind, health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
report_replica_health_async(partition_id, replica_id, replica_health_report_service_kind, health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric replica.

Reports health state of the specified Service Fabric replica. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Replica, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, run GetReplicaHealth and check that the report appears in the HealthEvents section.

@param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param replica_health_report_service_kind [ReplicaHealthReportServiceKind] The kind of service replica (Stateless or Stateful) for which the health is being reported. Following are the possible values. Possible values include: 'Stateless', 'Stateful' @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 15427
def report_replica_health_async(partition_id, replica_id, replica_health_report_service_kind, health_information, immediate:false, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, 'replica_id is nil' if replica_id.nil?
  fail ArgumentError, 'replica_health_report_service_kind is nil' if replica_health_report_service_kind.nil?
  fail ArgumentError, 'health_information is nil' if health_information.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::HealthInformation.mapper()
  request_content = self.serialize(request_mapper,  health_information)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/ReportHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id,'replicaId' => replica_id},
      query_params: {'api-version' => api_version,'ReplicaHealthReportServiceKind' => replica_health_report_service_kind,'Immediate' => immediate,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
report_replica_health_with_http_info(partition_id, replica_id, replica_health_report_service_kind, health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric replica.

Reports health state of the specified Service Fabric replica. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Replica, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, run GetReplicaHealth and check that the report appears in the HealthEvents section.

@param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param replica_health_report_service_kind [ReplicaHealthReportServiceKind] The kind of service replica (Stateless or Stateful) for which the health is being reported. Following are the possible values. Possible values include: 'Stateless', 'Stateful' @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 15371
def report_replica_health_with_http_info(partition_id, replica_id, replica_health_report_service_kind, health_information, immediate:false, timeout:60, custom_headers:nil)
  report_replica_health_async(partition_id, replica_id, replica_health_report_service_kind, health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
end
report_service_health(service_id, health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric service.

Reports health state of the specified Service Fabric service. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Service, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, run GetServiceHealth and check that the report appears in the HealthEvents section.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 11602
def report_service_health(service_id, health_information, immediate:false, timeout:60, custom_headers:nil)
  response = report_service_health_async(service_id, health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
report_service_health_async(service_id, health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric service.

Reports health state of the specified Service Fabric service. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Service, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, run GetServiceHealth and check that the report appears in the HealthEvents section.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 11717
def report_service_health_async(service_id, health_information, immediate:false, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  fail ArgumentError, 'health_information is nil' if health_information.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::HealthInformation.mapper()
  request_content = self.serialize(request_mapper,  health_information)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Services/{serviceId}/$/ReportHealth'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id},
      query_params: {'api-version' => api_version,'Immediate' => immediate,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
report_service_health_with_http_info(service_id, health_information, immediate:false, timeout:60, custom_headers:nil) click to toggle source

Sends a health report on the Service Fabric service.

Reports health state of the specified Service Fabric service. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Service, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, run GetServiceHealth and check that the report appears in the HealthEvents section.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 11660
def report_service_health_with_http_info(service_id, health_information, immediate:false, timeout:60, custom_headers:nil)
  report_service_health_async(service_id, health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
end
reset_partition_load(partition_id, timeout:60, custom_headers:nil) click to toggle source

Resets the current load of a Service Fabric partition.

Resets the current load of a Service Fabric partition to the default load for the service.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13242
def reset_partition_load(partition_id, timeout:60, custom_headers:nil)
  response = reset_partition_load_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
reset_partition_load_async(partition_id, timeout:60, custom_headers:nil) click to toggle source

Resets the current load of a Service Fabric partition.

Resets the current load of a Service Fabric partition to the default load for the service.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13283
def reset_partition_load_async(partition_id, timeout:60, custom_headers:nil)
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Partitions/{partitionId}/$/ResetLoad'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
reset_partition_load_with_http_info(partition_id, timeout:60, custom_headers:nil) click to toggle source

Resets the current load of a Service Fabric partition.

Resets the current load of a Service Fabric partition to the default load for the service.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 13263
def reset_partition_load_with_http_info(partition_id, timeout:60, custom_headers:nil)
  reset_partition_load_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
end
resolve_service(service_id, partition_key_type:nil, partition_key_value:nil, previous_rsp_version:nil, timeout:60, custom_headers:nil) click to toggle source

Resolve a Service Fabric partition.

Resolve a Service Fabric service partition to get the endpoints of the service replicas.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param partition_key_type [Integer] Key type for the partition. This parameter is required if the partition scheme for the service is Int64Range or Named. The possible values are following.

  • None (1) - Indicates that the PartitionKeyValue parameter is not specified.

This is valid for the partitions with partitioning scheme as Singleton. This is the default value. The value is 1.

  • Int64Range (2) - Indicates that the PartitionKeyValue parameter is an int64

partition key. This is valid for the partitions with partitioning scheme as Int64Range. The value is 2.

  • Named (3) - Indicates that the PartitionKeyValue parameter is a name of the

partition. This is valid for the partitions with partitioning scheme as Named. The value is 3. @param partition_key_value [String] Partition key. This is required if the partition scheme for the service is Int64Range or Named. @param previous_rsp_version [String] The value in the Version field of the response that was received previously. This is required if the user knows that the result that was got previously is stale. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ResolvedServicePartition] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 11809
def resolve_service(service_id, partition_key_type:nil, partition_key_value:nil, previous_rsp_version:nil, timeout:60, custom_headers:nil)
  response = resolve_service_async(service_id, partition_key_type:partition_key_type, partition_key_value:partition_key_value, previous_rsp_version:previous_rsp_version, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
resolve_service_async(service_id, partition_key_type:nil, partition_key_value:nil, previous_rsp_version:nil, timeout:60, custom_headers:nil) click to toggle source

Resolve a Service Fabric partition.

Resolve a Service Fabric service partition to get the endpoints of the service replicas.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param partition_key_type [Integer] Key type for the partition. This parameter is required if the partition scheme for the service is Int64Range or Named. The possible values are following.

  • None (1) - Indicates that the PartitionKeyValue parameter is not specified.

This is valid for the partitions with partitioning scheme as Singleton. This is the default value. The value is 1.

  • Int64Range (2) - Indicates that the PartitionKeyValue parameter is an int64

partition key. This is valid for the partitions with partitioning scheme as Int64Range. The value is 2.

  • Named (3) - Indicates that the PartitionKeyValue parameter is a name of the

partition. This is valid for the partitions with partitioning scheme as Named. The value is 3. @param partition_key_value [String] Partition key. This is required if the partition scheme for the service is Int64Range or Named. @param previous_rsp_version [String] The value in the Version field of the response that was received previously. This is required if the user knows that the result that was got previously is stale. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 11896
def resolve_service_async(service_id, partition_key_type:nil, partition_key_value:nil, previous_rsp_version:nil, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Services/{serviceId}/$/ResolvePartition'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id},
      query_params: {'api-version' => api_version,'PartitionKeyType' => partition_key_type,'timeout' => timeout},
      skip_encoding_query_params: {'PartitionKeyValue' => partition_key_value,'PreviousRspVersion' => previous_rsp_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::ResolvedServicePartition.mapper()
        result.body = self.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
resolve_service_with_http_info(service_id, partition_key_type:nil, partition_key_value:nil, previous_rsp_version:nil, timeout:60, custom_headers:nil) click to toggle source

Resolve a Service Fabric partition.

Resolve a Service Fabric service partition to get the endpoints of the service replicas.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param partition_key_type [Integer] Key type for the partition. This parameter is required if the partition scheme for the service is Int64Range or Named. The possible values are following.

  • None (1) - Indicates that the PartitionKeyValue parameter is not specified.

This is valid for the partitions with partitioning scheme as Singleton. This is the default value. The value is 1.

  • Int64Range (2) - Indicates that the PartitionKeyValue parameter is an int64

partition key. This is valid for the partitions with partitioning scheme as Int64Range. The value is 2.

  • Named (3) - Indicates that the PartitionKeyValue parameter is a name of the

partition. This is valid for the partitions with partitioning scheme as Named. The value is 3. @param partition_key_value [String] Partition key. This is required if the partition scheme for the service is Int64Range or Named. @param previous_rsp_version [String] The value in the Version field of the response that was received previously. This is required if the user knows that the result that was got previously is stale. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 11853
def resolve_service_with_http_info(service_id, partition_key_type:nil, partition_key_value:nil, previous_rsp_version:nil, timeout:60, custom_headers:nil)
  resolve_service_async(service_id, partition_key_type:partition_key_type, partition_key_value:partition_key_value, previous_rsp_version:previous_rsp_version, timeout:timeout, custom_headers:custom_headers).value!
end
restart_deployed_code_package(node_name, application_id, restart_deployed_code_package_description, timeout:60, custom_headers:nil) click to toggle source

Restarts a code package deployed on a Service Fabric node in a cluster.

Restarts a code package deployed on a Service Fabric node in a cluster. This aborts the code package process, which will restart all the user service replicas hosted in that process.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param restart_deployed_code_package_description

RestartDeployedCodePackageDescription

Describes the deployed code package

on Service Fabric node to restart. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 17465
def restart_deployed_code_package(node_name, application_id, restart_deployed_code_package_description, timeout:60, custom_headers:nil)
  response = restart_deployed_code_package_async(node_name, application_id, restart_deployed_code_package_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
restart_deployed_code_package_async(node_name, application_id, restart_deployed_code_package_description, timeout:60, custom_headers:nil) click to toggle source

Restarts a code package deployed on a Service Fabric node in a cluster.

Restarts a code package deployed on a Service Fabric node in a cluster. This aborts the code package process, which will restart all the user service replicas hosted in that process.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param restart_deployed_code_package_description

RestartDeployedCodePackageDescription

Describes the deployed code package

on Service Fabric node to restart. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 17526
def restart_deployed_code_package_async(node_name, application_id, restart_deployed_code_package_description, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, 'restart_deployed_code_package_description is nil' if restart_deployed_code_package_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::RestartDeployedCodePackageDescription.mapper()
  request_content = self.serialize(request_mapper,  restart_deployed_code_package_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/Restart'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
restart_deployed_code_package_with_http_info(node_name, application_id, restart_deployed_code_package_description, timeout:60, custom_headers:nil) click to toggle source

Restarts a code package deployed on a Service Fabric node in a cluster.

Restarts a code package deployed on a Service Fabric node in a cluster. This aborts the code package process, which will restart all the user service replicas hosted in that process.

@param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param restart_deployed_code_package_description

RestartDeployedCodePackageDescription

Describes the deployed code package

on Service Fabric node to restart. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 17496
def restart_deployed_code_package_with_http_info(node_name, application_id, restart_deployed_code_package_description, timeout:60, custom_headers:nil)
  restart_deployed_code_package_async(node_name, application_id, restart_deployed_code_package_description, timeout:timeout, custom_headers:custom_headers).value!
end
restart_node(node_name, restart_node_description, timeout:60, custom_headers:nil) click to toggle source

Restarts a Service Fabric cluster node.

Restarts a Service Fabric cluster node that is already started.

@param node_name [String] The name of the node. @param restart_node_description [RestartNodeDescription] The instance of the node to be restarted and a flag indicating the need to take dump of the fabric process. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 4591
def restart_node(node_name, restart_node_description, timeout:60, custom_headers:nil)
  response = restart_node_async(node_name, restart_node_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
restart_node_async(node_name, restart_node_description, timeout:60, custom_headers:nil) click to toggle source

Restarts a Service Fabric cluster node.

Restarts a Service Fabric cluster node that is already started.

@param node_name [String] The name of the node. @param restart_node_description [RestartNodeDescription] The instance of the node to be restarted and a flag indicating the need to take dump of the fabric process. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 4636
def restart_node_async(node_name, restart_node_description, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'restart_node_description is nil' if restart_node_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::RestartNodeDescription.mapper()
  request_content = self.serialize(request_mapper,  restart_node_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Nodes/{nodeName}/$/Restart'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
restart_node_with_http_info(node_name, restart_node_description, timeout:60, custom_headers:nil) click to toggle source

Restarts a Service Fabric cluster node.

Restarts a Service Fabric cluster node that is already started.

@param node_name [String] The name of the node. @param restart_node_description [RestartNodeDescription] The instance of the node to be restarted and a flag indicating the need to take dump of the fabric process. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 4614
def restart_node_with_http_info(node_name, restart_node_description, timeout:60, custom_headers:nil)
  restart_node_async(node_name, restart_node_description, timeout:timeout, custom_headers:custom_headers).value!
end
restart_replica(node_name, partition_id, replica_id, timeout:60, custom_headers:nil) click to toggle source

Restarts a service replica of a persisted service running on a node.

Restarts a service replica of a persisted service running on a node. Warning

  • There are no safety checks performed when this API is used. Incorrect use

of this API can lead to availability loss for stateful services.

@param node_name [String] The name of the node. @param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 15921
def restart_replica(node_name, partition_id, replica_id, timeout:60, custom_headers:nil)
  response = restart_replica_async(node_name, partition_id, replica_id, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
restart_replica_async(node_name, partition_id, replica_id, timeout:60, custom_headers:nil) click to toggle source

Restarts a service replica of a persisted service running on a node.

Restarts a service replica of a persisted service running on a node. Warning

  • There are no safety checks performed when this API is used. Incorrect use

of this API can lead to availability loss for stateful services.

@param node_name [String] The name of the node. @param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 15968
def restart_replica_async(node_name, partition_id, replica_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, 'replica_id is nil' if replica_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Restart'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      skip_encoding_path_params: {'partitionId' => partition_id,'replicaId' => replica_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
restart_replica_with_http_info(node_name, partition_id, replica_id, timeout:60, custom_headers:nil) click to toggle source

Restarts a service replica of a persisted service running on a node.

Restarts a service replica of a persisted service running on a node. Warning

  • There are no safety checks performed when this API is used. Incorrect use

of this API can lead to availability loss for stateful services.

@param node_name [String] The name of the node. @param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 15945
def restart_replica_with_http_info(node_name, partition_id, replica_id, timeout:60, custom_headers:nil)
  restart_replica_async(node_name, partition_id, replica_id, timeout:timeout, custom_headers:custom_headers).value!
end
restore_partition(partition_id, restore_partition_description, restore_timeout:10, timeout:60, custom_headers:nil) click to toggle source

Triggers restore of the state of the partition using the specified restore partition description.

Restores the state of a of the stateful persisted partition using the specified backup point. In case the partition is already being periodically backed up, then by default the backup point is looked for in the storage specified in backup policy. One can also override the same by specifying the backup storage details as part of the restore partition description in body. Once the restore is initiated, its progress can be tracked using the GetRestoreProgress operation. In case, the operation times out, specify a greater restore timeout value in the query parameter.

@param partition_id The identity of the partition. @param restore_partition_description [RestorePartitionDescription] Describes the parameters to restore the partition. @param restore_timeout [Integer] Specifies the maximum amount of time to wait, in minutes, for the restore operation to complete. Post that, the operation returns back with timeout error. However, in certain corner cases it could be that the restore operation goes through even though it completes with timeout. In case of timeout error, its recommended to invoke this operation again with a greater timeout value. the default value for the same is 10 minutes. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26040
def restore_partition(partition_id, restore_partition_description, restore_timeout:10, timeout:60, custom_headers:nil)
  response = restore_partition_async(partition_id, restore_partition_description, restore_timeout:restore_timeout, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
restore_partition_async(partition_id, restore_partition_description, restore_timeout:10, timeout:60, custom_headers:nil) click to toggle source

Triggers restore of the state of the partition using the specified restore partition description.

Restores the state of a of the stateful persisted partition using the specified backup point. In case the partition is already being periodically backed up, then by default the backup point is looked for in the storage specified in backup policy. One can also override the same by specifying the backup storage details as part of the restore partition description in body. Once the restore is initiated, its progress can be tracked using the GetRestoreProgress operation. In case, the operation times out, specify a greater restore timeout value in the query parameter.

@param partition_id The identity of the partition. @param restore_partition_description [RestorePartitionDescription] Describes the parameters to restore the partition. @param restore_timeout [Integer] Specifies the maximum amount of time to wait, in minutes, for the restore operation to complete. Post that, the operation returns back with timeout error. However, in certain corner cases it could be that the restore operation goes through even though it completes with timeout. In case of timeout error, its recommended to invoke this operation again with a greater timeout value. the default value for the same is 10 minutes. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26115
def restore_partition_async(partition_id, restore_partition_description, restore_timeout:10, timeout:60, custom_headers:nil)
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, 'restore_partition_description is nil' if restore_partition_description.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::RestorePartitionDescription.mapper()
  request_content = self.serialize(request_mapper,  restore_partition_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Partitions/{partitionId}/$/Restore'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'RestoreTimeout' => restore_timeout,'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
restore_partition_with_http_info(partition_id, restore_partition_description, restore_timeout:10, timeout:60, custom_headers:nil) click to toggle source

Triggers restore of the state of the partition using the specified restore partition description.

Restores the state of a of the stateful persisted partition using the specified backup point. In case the partition is already being periodically backed up, then by default the backup point is looked for in the storage specified in backup policy. One can also override the same by specifying the backup storage details as part of the restore partition description in body. Once the restore is initiated, its progress can be tracked using the GetRestoreProgress operation. In case, the operation times out, specify a greater restore timeout value in the query parameter.

@param partition_id The identity of the partition. @param restore_partition_description [RestorePartitionDescription] Describes the parameters to restore the partition. @param restore_timeout [Integer] Specifies the maximum amount of time to wait, in minutes, for the restore operation to complete. Post that, the operation returns back with timeout error. However, in certain corner cases it could be that the restore operation goes through even though it completes with timeout. In case of timeout error, its recommended to invoke this operation again with a greater timeout value. the default value for the same is 10 minutes. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 26078
def restore_partition_with_http_info(partition_id, restore_partition_description, restore_timeout:10, timeout:60, custom_headers:nil)
  restore_partition_async(partition_id, restore_partition_description, restore_timeout:restore_timeout, timeout:timeout, custom_headers:custom_headers).value!
end
resume_application_backup(application_id, timeout:60, custom_headers:nil) click to toggle source

Resumes periodic backup of a Service Fabric application which was previously suspended.

The previously suspended Service Fabric application resumes taking periodic backup as per the backup policy currently configured for the same.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 24015
def resume_application_backup(application_id, timeout:60, custom_headers:nil)
  response = resume_application_backup_async(application_id, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
resume_application_backup_async(application_id, timeout:60, custom_headers:nil) click to toggle source

Resumes periodic backup of a Service Fabric application which was previously suspended.

The previously suspended Service Fabric application resumes taking periodic backup as per the backup policy currently configured for the same.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 24068
def resume_application_backup_async(application_id, timeout:60, custom_headers:nil)
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Applications/{applicationId}/$/ResumeBackup'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
resume_application_backup_with_http_info(application_id, timeout:60, custom_headers:nil) click to toggle source

Resumes periodic backup of a Service Fabric application which was previously suspended.

The previously suspended Service Fabric application resumes taking periodic backup as per the backup policy currently configured for the same.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 24042
def resume_application_backup_with_http_info(application_id, timeout:60, custom_headers:nil)
  resume_application_backup_async(application_id, timeout:timeout, custom_headers:custom_headers).value!
end
resume_application_upgrade(application_id, resume_application_upgrade_description, timeout:60, custom_headers:nil) click to toggle source

Resumes upgrading an application in the Service Fabric cluster.

Resumes an unmonitored manual Service Fabric application upgrade. Service Fabric upgrades one upgrade domain at a time. For unmonitored manual upgrades, after Service Fabric finishes an upgrade domain, it waits for you to call this API before proceeding to the next upgrade domain.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param resume_application_upgrade_description

ResumeApplicationUpgradeDescription

Describes the parameters for resuming

an application upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 8225
def resume_application_upgrade(application_id, resume_application_upgrade_description, timeout:60, custom_headers:nil)
  response = resume_application_upgrade_async(application_id, resume_application_upgrade_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
resume_application_upgrade_async(application_id, resume_application_upgrade_description, timeout:60, custom_headers:nil) click to toggle source

Resumes upgrading an application in the Service Fabric cluster.

Resumes an unmonitored manual Service Fabric application upgrade. Service Fabric upgrades one upgrade domain at a time. For unmonitored manual upgrades, after Service Fabric finishes an upgrade domain, it waits for you to call this API before proceeding to the next upgrade domain.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param resume_application_upgrade_description

ResumeApplicationUpgradeDescription

Describes the parameters for resuming

an application upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 8286
def resume_application_upgrade_async(application_id, resume_application_upgrade_description, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, 'resume_application_upgrade_description is nil' if resume_application_upgrade_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ResumeApplicationUpgradeDescription.mapper()
  request_content = self.serialize(request_mapper,  resume_application_upgrade_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Applications/{applicationId}/$/MoveToNextUpgradeDomain'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
resume_application_upgrade_with_http_info(application_id, resume_application_upgrade_description, timeout:60, custom_headers:nil) click to toggle source

Resumes upgrading an application in the Service Fabric cluster.

Resumes an unmonitored manual Service Fabric application upgrade. Service Fabric upgrades one upgrade domain at a time. For unmonitored manual upgrades, after Service Fabric finishes an upgrade domain, it waits for you to call this API before proceeding to the next upgrade domain.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param resume_application_upgrade_description

ResumeApplicationUpgradeDescription

Describes the parameters for resuming

an application upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 8256
def resume_application_upgrade_with_http_info(application_id, resume_application_upgrade_description, timeout:60, custom_headers:nil)
  resume_application_upgrade_async(application_id, resume_application_upgrade_description, timeout:timeout, custom_headers:custom_headers).value!
end
resume_cluster_upgrade(resume_cluster_upgrade_description, timeout:60, custom_headers:nil) click to toggle source

Make the cluster upgrade move on to the next upgrade domain.

Make the cluster code or configuration upgrade move on to the next upgrade domain if appropriate.

@param resume_cluster_upgrade_description [ResumeClusterUpgradeDescription] Describes the parameters for resuming a cluster upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2697
def resume_cluster_upgrade(resume_cluster_upgrade_description, timeout:60, custom_headers:nil)
  response = resume_cluster_upgrade_async(resume_cluster_upgrade_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
resume_cluster_upgrade_async(resume_cluster_upgrade_description, timeout:60, custom_headers:nil) click to toggle source

Make the cluster upgrade move on to the next upgrade domain.

Make the cluster code or configuration upgrade move on to the next upgrade domain if appropriate.

@param resume_cluster_upgrade_description [ResumeClusterUpgradeDescription] Describes the parameters for resuming a cluster upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2740
def resume_cluster_upgrade_async(resume_cluster_upgrade_description, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'resume_cluster_upgrade_description is nil' if resume_cluster_upgrade_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ResumeClusterUpgradeDescription.mapper()
  request_content = self.serialize(request_mapper,  resume_cluster_upgrade_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '$/MoveToNextUpgradeDomain'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
resume_cluster_upgrade_with_http_info(resume_cluster_upgrade_description, timeout:60, custom_headers:nil) click to toggle source

Make the cluster upgrade move on to the next upgrade domain.

Make the cluster code or configuration upgrade move on to the next upgrade domain if appropriate.

@param resume_cluster_upgrade_description [ResumeClusterUpgradeDescription] Describes the parameters for resuming a cluster upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2719
def resume_cluster_upgrade_with_http_info(resume_cluster_upgrade_description, timeout:60, custom_headers:nil)
  resume_cluster_upgrade_async(resume_cluster_upgrade_description, timeout:timeout, custom_headers:custom_headers).value!
end
resume_partition_backup(partition_id, timeout:60, custom_headers:nil) click to toggle source

Resumes periodic backup of partition which was previously suspended.

The previously suspended partition resumes taking periodic backup as per the backup policy currently configured for the same.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25651
def resume_partition_backup(partition_id, timeout:60, custom_headers:nil)
  response = resume_partition_backup_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
resume_partition_backup_async(partition_id, timeout:60, custom_headers:nil) click to toggle source

Resumes periodic backup of partition which was previously suspended.

The previously suspended partition resumes taking periodic backup as per the backup policy currently configured for the same.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25692
def resume_partition_backup_async(partition_id, timeout:60, custom_headers:nil)
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Partitions/{partitionId}/$/ResumeBackup'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
resume_partition_backup_with_http_info(partition_id, timeout:60, custom_headers:nil) click to toggle source

Resumes periodic backup of partition which was previously suspended.

The previously suspended partition resumes taking periodic backup as per the backup policy currently configured for the same.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25672
def resume_partition_backup_with_http_info(partition_id, timeout:60, custom_headers:nil)
  resume_partition_backup_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
end
resume_service_backup(service_id, timeout:60, custom_headers:nil) click to toggle source

Resumes periodic backup of a Service Fabric service which was previously suspended.

The previously suspended Service Fabric service resumes taking periodic backup as per the backup policy currently configured for the same.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 24932
def resume_service_backup(service_id, timeout:60, custom_headers:nil)
  response = resume_service_backup_async(service_id, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
resume_service_backup_async(service_id, timeout:60, custom_headers:nil) click to toggle source

Resumes periodic backup of a Service Fabric service which was previously suspended.

The previously suspended Service Fabric service resumes taking periodic backup as per the backup policy currently configured for the same.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 24987
def resume_service_backup_async(service_id, timeout:60, custom_headers:nil)
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Services/{serviceId}/$/ResumeBackup'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
resume_service_backup_with_http_info(service_id, timeout:60, custom_headers:nil) click to toggle source

Resumes periodic backup of a Service Fabric service which was previously suspended.

The previously suspended Service Fabric service resumes taking periodic backup as per the backup policy currently configured for the same.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 24960
def resume_service_backup_with_http_info(service_id, timeout:60, custom_headers:nil)
  resume_service_backup_async(service_id, timeout:timeout, custom_headers:custom_headers).value!
end
rollback_application_upgrade(application_id, timeout:60, custom_headers:nil) click to toggle source

Starts rolling back the currently on-going upgrade of an application in the Service Fabric cluster.

Starts rolling back the current application upgrade to the previous version. This API can only be used to rollback the current in-progress upgrade that is rolling forward to new version. If the application is not currently being upgraded use StartApplicationUpgrade API to upgrade it to desired version, including rolling back to a previous version.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 8363
def rollback_application_upgrade(application_id, timeout:60, custom_headers:nil)
  response = rollback_application_upgrade_async(application_id, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
rollback_application_upgrade_async(application_id, timeout:60, custom_headers:nil) click to toggle source

Starts rolling back the currently on-going upgrade of an application in the Service Fabric cluster.

Starts rolling back the current application upgrade to the previous version. This API can only be used to rollback the current in-progress upgrade that is rolling forward to new version. If the application is not currently being upgraded use StartApplicationUpgrade API to upgrade it to desired version, including rolling back to a previous version.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 8422
def rollback_application_upgrade_async(application_id, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Applications/{applicationId}/$/RollbackUpgrade'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
rollback_application_upgrade_with_http_info(application_id, timeout:60, custom_headers:nil) click to toggle source

Starts rolling back the currently on-going upgrade of an application in the Service Fabric cluster.

Starts rolling back the current application upgrade to the previous version. This API can only be used to rollback the current in-progress upgrade that is rolling forward to new version. If the application is not currently being upgraded use StartApplicationUpgrade API to upgrade it to desired version, including rolling back to a previous version.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 8393
def rollback_application_upgrade_with_http_info(application_id, timeout:60, custom_headers:nil)
  rollback_application_upgrade_async(application_id, timeout:timeout, custom_headers:custom_headers).value!
end
rollback_cluster_upgrade(timeout:60, custom_headers:nil) click to toggle source

Rollback the upgrade of a Service Fabric cluster.

Rollback the code or configuration upgrade of a Service Fabric cluster.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2601
def rollback_cluster_upgrade(timeout:60, custom_headers:nil)
  response = rollback_cluster_upgrade_async(timeout:timeout, custom_headers:custom_headers).value!
  nil
end
rollback_cluster_upgrade_async(timeout:60, custom_headers:nil) click to toggle source

Rollback the upgrade of a Service Fabric cluster.

Rollback the code or configuration upgrade of a Service Fabric cluster.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2638
def rollback_cluster_upgrade_async(timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = '$/RollbackUpgrade'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
rollback_cluster_upgrade_with_http_info(timeout:60, custom_headers:nil) click to toggle source

Rollback the upgrade of a Service Fabric cluster.

Rollback the code or configuration upgrade of a Service Fabric cluster.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2620
def rollback_cluster_upgrade_with_http_info(timeout:60, custom_headers:nil)
  rollback_cluster_upgrade_async(timeout:timeout, custom_headers:custom_headers).value!
end
set_upgrade_orchestration_service_state(upgrade_orchestration_service_state, timeout:60, custom_headers:nil) click to toggle source

Update the service state of Service Fabric Upgrade Orchestration Service.

Update the service state of Service Fabric Upgrade Orchestration Service. This API is internally used for support purposes.

@param upgrade_orchestration_service_state [UpgradeOrchestrationServiceState] Service state of Service Fabric Upgrade Orchestration Service. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [UpgradeOrchestrationServiceStateSummary] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2264
def set_upgrade_orchestration_service_state(upgrade_orchestration_service_state, timeout:60, custom_headers:nil)
  response = set_upgrade_orchestration_service_state_async(upgrade_orchestration_service_state, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
set_upgrade_orchestration_service_state_async(upgrade_orchestration_service_state, timeout:60, custom_headers:nil) click to toggle source

Update the service state of Service Fabric Upgrade Orchestration Service.

Update the service state of Service Fabric Upgrade Orchestration Service. This API is internally used for support purposes.

@param upgrade_orchestration_service_state [UpgradeOrchestrationServiceState] Service state of Service Fabric Upgrade Orchestration Service. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2307
def set_upgrade_orchestration_service_state_async(upgrade_orchestration_service_state, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'upgrade_orchestration_service_state is nil' if upgrade_orchestration_service_state.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::UpgradeOrchestrationServiceState.mapper()
  request_content = self.serialize(request_mapper,  upgrade_orchestration_service_state)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '$/SetUpgradeOrchestrationServiceState'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::UpgradeOrchestrationServiceStateSummary.mapper()
        result.body = self.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
set_upgrade_orchestration_service_state_with_http_info(upgrade_orchestration_service_state, timeout:60, custom_headers:nil) click to toggle source

Update the service state of Service Fabric Upgrade Orchestration Service.

Update the service state of Service Fabric Upgrade Orchestration Service. This API is internally used for support purposes.

@param upgrade_orchestration_service_state [UpgradeOrchestrationServiceState] Service state of Service Fabric Upgrade Orchestration Service. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2286
def set_upgrade_orchestration_service_state_with_http_info(upgrade_orchestration_service_state, timeout:60, custom_headers:nil)
  set_upgrade_orchestration_service_state_async(upgrade_orchestration_service_state, timeout:timeout, custom_headers:custom_headers).value!
end
start_application_upgrade(application_id, application_upgrade_description, timeout:60, custom_headers:nil) click to toggle source

Starts upgrading an application in the Service Fabric cluster.

Validates the supplied application upgrade parameters and starts upgrading the application if the parameters are valid.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param application_upgrade_description [ApplicationUpgradeDescription] Parameters for an application upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 7826
def start_application_upgrade(application_id, application_upgrade_description, timeout:60, custom_headers:nil)
  response = start_application_upgrade_async(application_id, application_upgrade_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
start_application_upgrade_async(application_id, application_upgrade_description, timeout:60, custom_headers:nil) click to toggle source

Starts upgrading an application in the Service Fabric cluster.

Validates the supplied application upgrade parameters and starts upgrading the application if the parameters are valid.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param application_upgrade_description [ApplicationUpgradeDescription] Parameters for an application upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 7881
def start_application_upgrade_async(application_id, application_upgrade_description, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, 'application_upgrade_description is nil' if application_upgrade_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ApplicationUpgradeDescription.mapper()
  request_content = self.serialize(request_mapper,  application_upgrade_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Applications/{applicationId}/$/Upgrade'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
start_application_upgrade_with_http_info(application_id, application_upgrade_description, timeout:60, custom_headers:nil) click to toggle source

Starts upgrading an application in the Service Fabric cluster.

Validates the supplied application upgrade parameters and starts upgrading the application if the parameters are valid.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param application_upgrade_description [ApplicationUpgradeDescription] Parameters for an application upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 7854
def start_application_upgrade_with_http_info(application_id, application_upgrade_description, timeout:60, custom_headers:nil)
  start_application_upgrade_async(application_id, application_upgrade_description, timeout:timeout, custom_headers:custom_headers).value!
end
start_chaos(chaos_parameters, timeout:60, custom_headers:nil) click to toggle source

Starts Chaos in the cluster.

If Chaos is not already running in the cluster, it starts Chaos with the passed in Chaos parameters. If Chaos is already running when this call is made, the call fails with the error code FABRIC_E_CHAOS_ALREADY_RUNNING. Please refer to the article [Induce controlled Chaos in Service Fabric clusters](docs.microsoft.com/en-us/azure/service-fabric/service-fabric-controlled-chaos) for more details.

@param chaos_parameters [ChaosParameters] Describes all the parameters to configure a Chaos run. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18768
def start_chaos(chaos_parameters, timeout:60, custom_headers:nil)
  response = start_chaos_async(chaos_parameters, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
start_chaos_async(chaos_parameters, timeout:60, custom_headers:nil) click to toggle source

Starts Chaos in the cluster.

If Chaos is not already running in the cluster, it starts Chaos with the passed in Chaos parameters. If Chaos is already running when this call is made, the call fails with the error code FABRIC_E_CHAOS_ALREADY_RUNNING. Please refer to the article [Induce controlled Chaos in Service Fabric clusters](docs.microsoft.com/en-us/azure/service-fabric/service-fabric-controlled-chaos) for more details.

@param chaos_parameters [ChaosParameters] Describes all the parameters to configure a Chaos run. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18821
def start_chaos_async(chaos_parameters, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'chaos_parameters is nil' if chaos_parameters.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ChaosParameters.mapper()
  request_content = self.serialize(request_mapper,  chaos_parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Tools/Chaos/$/Start'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
start_chaos_with_http_info(chaos_parameters, timeout:60, custom_headers:nil) click to toggle source

Starts Chaos in the cluster.

If Chaos is not already running in the cluster, it starts Chaos with the passed in Chaos parameters. If Chaos is already running when this call is made, the call fails with the error code FABRIC_E_CHAOS_ALREADY_RUNNING. Please refer to the article [Induce controlled Chaos in Service Fabric clusters](docs.microsoft.com/en-us/azure/service-fabric/service-fabric-controlled-chaos) for more details.

@param chaos_parameters [ChaosParameters] Describes all the parameters to configure a Chaos run. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18795
def start_chaos_with_http_info(chaos_parameters, timeout:60, custom_headers:nil)
  start_chaos_async(chaos_parameters, timeout:timeout, custom_headers:custom_headers).value!
end
start_cluster_configuration_upgrade(cluster_configuration_upgrade_description, timeout:60, custom_headers:nil) click to toggle source

Start upgrading the configuration of a Service Fabric standalone cluster.

Validate the supplied configuration upgrade parameters and start upgrading the cluster configuration if the parameters are valid.

@param cluster_configuration_upgrade_description

ClusterConfigurationUpgradeDescription

Parameters for a standalone cluster

configuration upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2924
def start_cluster_configuration_upgrade(cluster_configuration_upgrade_description, timeout:60, custom_headers:nil)
  response = start_cluster_configuration_upgrade_async(cluster_configuration_upgrade_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
start_cluster_configuration_upgrade_async(cluster_configuration_upgrade_description, timeout:60, custom_headers:nil) click to toggle source

Start upgrading the configuration of a Service Fabric standalone cluster.

Validate the supplied configuration upgrade parameters and start upgrading the cluster configuration if the parameters are valid.

@param cluster_configuration_upgrade_description

ClusterConfigurationUpgradeDescription

Parameters for a standalone cluster

configuration upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2969
def start_cluster_configuration_upgrade_async(cluster_configuration_upgrade_description, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'cluster_configuration_upgrade_description is nil' if cluster_configuration_upgrade_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ClusterConfigurationUpgradeDescription.mapper()
  request_content = self.serialize(request_mapper,  cluster_configuration_upgrade_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '$/StartClusterConfigurationUpgrade'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
start_cluster_configuration_upgrade_with_http_info(cluster_configuration_upgrade_description, timeout:60, custom_headers:nil) click to toggle source

Start upgrading the configuration of a Service Fabric standalone cluster.

Validate the supplied configuration upgrade parameters and start upgrading the cluster configuration if the parameters are valid.

@param cluster_configuration_upgrade_description

ClusterConfigurationUpgradeDescription

Parameters for a standalone cluster

configuration upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2947
def start_cluster_configuration_upgrade_with_http_info(cluster_configuration_upgrade_description, timeout:60, custom_headers:nil)
  start_cluster_configuration_upgrade_async(cluster_configuration_upgrade_description, timeout:timeout, custom_headers:custom_headers).value!
end
start_cluster_upgrade(start_cluster_upgrade_description, timeout:60, custom_headers:nil) click to toggle source

Start upgrading the code or configuration version of a Service Fabric cluster.

Validate the supplied upgrade parameters and start upgrading the code or configuration version of a Service Fabric cluster if the parameters are valid.

@param start_cluster_upgrade_description [StartClusterUpgradeDescription] Describes the parameters for starting a cluster upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2809
def start_cluster_upgrade(start_cluster_upgrade_description, timeout:60, custom_headers:nil)
  response = start_cluster_upgrade_async(start_cluster_upgrade_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
start_cluster_upgrade_async(start_cluster_upgrade_description, timeout:60, custom_headers:nil) click to toggle source

Start upgrading the code or configuration version of a Service Fabric cluster.

Validate the supplied upgrade parameters and start upgrading the code or configuration version of a Service Fabric cluster if the parameters are valid.

@param start_cluster_upgrade_description [StartClusterUpgradeDescription] Describes the parameters for starting a cluster upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2856
def start_cluster_upgrade_async(start_cluster_upgrade_description, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'start_cluster_upgrade_description is nil' if start_cluster_upgrade_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::StartClusterUpgradeDescription.mapper()
  request_content = self.serialize(request_mapper,  start_cluster_upgrade_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '$/Upgrade'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
start_cluster_upgrade_with_http_info(start_cluster_upgrade_description, timeout:60, custom_headers:nil) click to toggle source

Start upgrading the code or configuration version of a Service Fabric cluster.

Validate the supplied upgrade parameters and start upgrading the code or configuration version of a Service Fabric cluster if the parameters are valid.

@param start_cluster_upgrade_description [StartClusterUpgradeDescription] Describes the parameters for starting a cluster upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2833
def start_cluster_upgrade_with_http_info(start_cluster_upgrade_description, timeout:60, custom_headers:nil)
  start_cluster_upgrade_async(start_cluster_upgrade_description, timeout:timeout, custom_headers:custom_headers).value!
end
start_compose_deployment_upgrade(deployment_name, compose_deployment_upgrade_description, timeout:60, custom_headers:nil) click to toggle source

Starts upgrading a compose deployment in the Service Fabric cluster.

Validates the supplied upgrade parameters and starts upgrading the deployment if the parameters are valid.

@param deployment_name [String] The identity of the deployment. @param compose_deployment_upgrade_description

ComposeDeploymentUpgradeDescription

Parameters for upgrading compose

deployment. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18540
def start_compose_deployment_upgrade(deployment_name, compose_deployment_upgrade_description, timeout:60, custom_headers:nil)
  response = start_compose_deployment_upgrade_async(deployment_name, compose_deployment_upgrade_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
start_compose_deployment_upgrade_async(deployment_name, compose_deployment_upgrade_description, timeout:60, custom_headers:nil) click to toggle source

Starts upgrading a compose deployment in the Service Fabric cluster.

Validates the supplied upgrade parameters and starts upgrading the deployment if the parameters are valid.

@param deployment_name [String] The identity of the deployment. @param compose_deployment_upgrade_description

ComposeDeploymentUpgradeDescription

Parameters for upgrading compose

deployment. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18587
def start_compose_deployment_upgrade_async(deployment_name, compose_deployment_upgrade_description, timeout:60, custom_headers:nil)
  api_version = '6.0-preview'
  fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
  fail ArgumentError, 'compose_deployment_upgrade_description is nil' if compose_deployment_upgrade_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ComposeDeploymentUpgradeDescription.mapper()
  request_content = self.serialize(request_mapper,  compose_deployment_upgrade_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'ComposeDeployments/{deploymentName}/$/Upgrade'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'deploymentName' => deployment_name},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
start_compose_deployment_upgrade_with_http_info(deployment_name, compose_deployment_upgrade_description, timeout:60, custom_headers:nil) click to toggle source

Starts upgrading a compose deployment in the Service Fabric cluster.

Validates the supplied upgrade parameters and starts upgrading the deployment if the parameters are valid.

@param deployment_name [String] The identity of the deployment. @param compose_deployment_upgrade_description

ComposeDeploymentUpgradeDescription

Parameters for upgrading compose

deployment. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18564
def start_compose_deployment_upgrade_with_http_info(deployment_name, compose_deployment_upgrade_description, timeout:60, custom_headers:nil)
  start_compose_deployment_upgrade_async(deployment_name, compose_deployment_upgrade_description, timeout:timeout, custom_headers:custom_headers).value!
end
start_data_loss(service_id, partition_id, operation_id, data_loss_mode, timeout:60, custom_headers:nil) click to toggle source

This API will induce data loss for the specified partition. It will trigger a call to the OnDataLossAsync API of the partition.

This API will induce data loss for the specified partition. It will trigger a call to the OnDataLoss API of the partition. Actual data loss will depend on the specified DataLossMode PartialDataLoss - Only a quorum of replicas are removed and OnDataLoss is triggered for the partition but actual data loss depends on the presence of in-flight replication. FullDataLoss - All replicas are removed hence all data is lost and OnDataLoss is triggered.

This API should only be called with a stateful service as the target.

Calling this API with a system service as the target is not advised.

Note: Once this API has been called, it cannot be reversed. Calling CancelOperation will only stop execution and clean up internal system state. It will not restore data if the command has progressed far enough to cause data loss.

Call the GetDataLossProgress API with the same OperationId to return information on the operation started with this API.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param data_loss_mode [DataLossMode] This enum is passed to the StartDataLoss API to indicate what type of data loss to induce. Possible values include: 'Invalid', 'PartialDataLoss', 'FullDataLoss' @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 20954
def start_data_loss(service_id, partition_id, operation_id, data_loss_mode, timeout:60, custom_headers:nil)
  response = start_data_loss_async(service_id, partition_id, operation_id, data_loss_mode, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
start_data_loss_async(service_id, partition_id, operation_id, data_loss_mode, timeout:60, custom_headers:nil) click to toggle source

This API will induce data loss for the specified partition. It will trigger a call to the OnDataLossAsync API of the partition.

This API will induce data loss for the specified partition. It will trigger a call to the OnDataLoss API of the partition. Actual data loss will depend on the specified DataLossMode PartialDataLoss - Only a quorum of replicas are removed and OnDataLoss is triggered for the partition but actual data loss depends on the presence of in-flight replication. FullDataLoss - All replicas are removed hence all data is lost and OnDataLoss is triggered.

This API should only be called with a stateful service as the target.

Calling this API with a system service as the target is not advised.

Note: Once this API has been called, it cannot be reversed. Calling CancelOperation will only stop execution and clean up internal system state. It will not restore data if the command has progressed far enough to cause data loss.

Call the GetDataLossProgress API with the same OperationId to return information on the operation started with this API.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param data_loss_mode [DataLossMode] This enum is passed to the StartDataLoss API to indicate what type of data loss to induce. Possible values include: 'Invalid', 'PartialDataLoss', 'FullDataLoss' @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 21057
def start_data_loss_async(service_id, partition_id, operation_id, data_loss_mode, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, 'operation_id is nil' if operation_id.nil?
  fail ArgumentError, 'data_loss_mode is nil' if data_loss_mode.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartDataLoss'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id,'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'OperationId' => operation_id,'DataLossMode' => data_loss_mode,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
start_data_loss_with_http_info(service_id, partition_id, operation_id, data_loss_mode, timeout:60, custom_headers:nil) click to toggle source

This API will induce data loss for the specified partition. It will trigger a call to the OnDataLossAsync API of the partition.

This API will induce data loss for the specified partition. It will trigger a call to the OnDataLoss API of the partition. Actual data loss will depend on the specified DataLossMode PartialDataLoss - Only a quorum of replicas are removed and OnDataLoss is triggered for the partition but actual data loss depends on the presence of in-flight replication. FullDataLoss - All replicas are removed hence all data is lost and OnDataLoss is triggered.

This API should only be called with a stateful service as the target.

Calling this API with a system service as the target is not advised.

Note: Once this API has been called, it cannot be reversed. Calling CancelOperation will only stop execution and clean up internal system state. It will not restore data if the command has progressed far enough to cause data loss.

Call the GetDataLossProgress API with the same OperationId to return information on the operation started with this API.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param data_loss_mode [DataLossMode] This enum is passed to the StartDataLoss API to indicate what type of data loss to induce. Possible values include: 'Invalid', 'PartialDataLoss', 'FullDataLoss' @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 21006
def start_data_loss_with_http_info(service_id, partition_id, operation_id, data_loss_mode, timeout:60, custom_headers:nil)
  start_data_loss_async(service_id, partition_id, operation_id, data_loss_mode, timeout:timeout, custom_headers:custom_headers).value!
end
start_node_transition(node_name, operation_id, node_transition_type, node_instance_id, stop_duration_in_seconds, timeout:60, custom_headers:nil) click to toggle source

Starts or stops a cluster node.

Starts or stops a cluster node. A cluster node is a process, not the OS instance itself. To start a node, pass in “Start” for the NodeTransitionType parameter. To stop a node, pass in “Stop” for the NodeTransitionType parameter. This API starts the operation - when the API returns the node may not have finished transitioning yet. Call GetNodeTransitionProgress with the same OperationId to get the progress of the operation.

@param node_name [String] The name of the node. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param node_transition_type [NodeTransitionType] Indicates the type of transition to perform. NodeTransitionType.Start will start a stopped node. NodeTransitionType.Stop will stop a node that is up. Possible values include: 'Invalid', 'Start', 'Stop' @param node_instance_id [String] The node instance ID of the target node. This can be determined through GetNodeInfo API. @param stop_duration_in_seconds [Integer] The duration, in seconds, to keep the node stopped. The minimum value is 600, the maximum is 14400. After this time expires, the node will automatically come back up. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 21895
def start_node_transition(node_name, operation_id, node_transition_type, node_instance_id, stop_duration_in_seconds, timeout:60, custom_headers:nil)
  response = start_node_transition_async(node_name, operation_id, node_transition_type, node_instance_id, stop_duration_in_seconds, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
start_node_transition_async(node_name, operation_id, node_transition_type, node_instance_id, stop_duration_in_seconds, timeout:60, custom_headers:nil) click to toggle source

Starts or stops a cluster node.

Starts or stops a cluster node. A cluster node is a process, not the OS instance itself. To start a node, pass in “Start” for the NodeTransitionType parameter. To stop a node, pass in “Stop” for the NodeTransitionType parameter. This API starts the operation - when the API returns the node may not have finished transitioning yet. Call GetNodeTransitionProgress with the same OperationId to get the progress of the operation.

@param node_name [String] The name of the node. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param node_transition_type [NodeTransitionType] Indicates the type of transition to perform. NodeTransitionType.Start will start a stopped node. NodeTransitionType.Stop will stop a node that is up. Possible values include: 'Invalid', 'Start', 'Stop' @param node_instance_id [String] The node instance ID of the target node. This can be determined through GetNodeInfo API. @param stop_duration_in_seconds [Integer] The duration, in seconds, to keep the node stopped. The minimum value is 600, the maximum is 14400. After this time expires, the node will automatically come back up. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 21970
def start_node_transition_async(node_name, operation_id, node_transition_type, node_instance_id, stop_duration_in_seconds, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'node_name is nil' if node_name.nil?
  fail ArgumentError, 'operation_id is nil' if operation_id.nil?
  fail ArgumentError, 'node_transition_type is nil' if node_transition_type.nil?
  fail ArgumentError, 'node_instance_id is nil' if node_instance_id.nil?
  fail ArgumentError, 'stop_duration_in_seconds is nil' if stop_duration_in_seconds.nil?
  fail ArgumentError, "'stop_duration_in_seconds' should satisfy the constraint - 'InclusiveMinimum': '0'" if !stop_duration_in_seconds.nil? && stop_duration_in_seconds < 0
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Faults/Nodes/{nodeName}/$/StartTransition/'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'nodeName' => node_name},
      query_params: {'api-version' => api_version,'OperationId' => operation_id,'NodeTransitionType' => node_transition_type,'NodeInstanceId' => node_instance_id,'StopDurationInSeconds' => stop_duration_in_seconds,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
start_node_transition_with_http_info(node_name, operation_id, node_transition_type, node_instance_id, stop_duration_in_seconds, timeout:60, custom_headers:nil) click to toggle source

Starts or stops a cluster node.

Starts or stops a cluster node. A cluster node is a process, not the OS instance itself. To start a node, pass in “Start” for the NodeTransitionType parameter. To stop a node, pass in “Stop” for the NodeTransitionType parameter. This API starts the operation - when the API returns the node may not have finished transitioning yet. Call GetNodeTransitionProgress with the same OperationId to get the progress of the operation.

@param node_name [String] The name of the node. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param node_transition_type [NodeTransitionType] Indicates the type of transition to perform. NodeTransitionType.Start will start a stopped node. NodeTransitionType.Stop will stop a node that is up. Possible values include: 'Invalid', 'Start', 'Stop' @param node_instance_id [String] The node instance ID of the target node. This can be determined through GetNodeInfo API. @param stop_duration_in_seconds [Integer] The duration, in seconds, to keep the node stopped. The minimum value is 600, the maximum is 14400. After this time expires, the node will automatically come back up. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 21933
def start_node_transition_with_http_info(node_name, operation_id, node_transition_type, node_instance_id, stop_duration_in_seconds, timeout:60, custom_headers:nil)
  start_node_transition_async(node_name, operation_id, node_transition_type, node_instance_id, stop_duration_in_seconds, timeout:timeout, custom_headers:custom_headers).value!
end
start_partition_restart(service_id, partition_id, operation_id, restart_partition_mode, timeout:60, custom_headers:nil) click to toggle source

This API will restart some or all replicas or instances of the specified partition.

This API is useful for testing failover.

If used to target a stateless service partition, RestartPartitionMode must be AllReplicasOrInstances.

Call the GetPartitionRestartProgress API using the same OperationId to get the progress.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param restart_partition_mode [RestartPartitionMode] Describe which partitions to restart. Possible values include: 'Invalid', 'AllReplicasOrInstances', 'OnlyActiveSecondaries' @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 21594
def start_partition_restart(service_id, partition_id, operation_id, restart_partition_mode, timeout:60, custom_headers:nil)
  response = start_partition_restart_async(service_id, partition_id, operation_id, restart_partition_mode, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
start_partition_restart_async(service_id, partition_id, operation_id, restart_partition_mode, timeout:60, custom_headers:nil) click to toggle source

This API will restart some or all replicas or instances of the specified partition.

This API is useful for testing failover.

If used to target a stateless service partition, RestartPartitionMode must be AllReplicasOrInstances.

Call the GetPartitionRestartProgress API using the same OperationId to get the progress.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param restart_partition_mode [RestartPartitionMode] Describe which partitions to restart. Possible values include: 'Invalid', 'AllReplicasOrInstances', 'OnlyActiveSecondaries' @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 21671
def start_partition_restart_async(service_id, partition_id, operation_id, restart_partition_mode, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, 'operation_id is nil' if operation_id.nil?
  fail ArgumentError, 'restart_partition_mode is nil' if restart_partition_mode.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartRestart'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id,'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'OperationId' => operation_id,'RestartPartitionMode' => restart_partition_mode,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
start_partition_restart_with_http_info(service_id, partition_id, operation_id, restart_partition_mode, timeout:60, custom_headers:nil) click to toggle source

This API will restart some or all replicas or instances of the specified partition.

This API is useful for testing failover.

If used to target a stateless service partition, RestartPartitionMode must be AllReplicasOrInstances.

Call the GetPartitionRestartProgress API using the same OperationId to get the progress.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param restart_partition_mode [RestartPartitionMode] Describe which partitions to restart. Possible values include: 'Invalid', 'AllReplicasOrInstances', 'OnlyActiveSecondaries' @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 21633
def start_partition_restart_with_http_info(service_id, partition_id, operation_id, restart_partition_mode, timeout:60, custom_headers:nil)
  start_partition_restart_async(service_id, partition_id, operation_id, restart_partition_mode, timeout:timeout, custom_headers:custom_headers).value!
end
start_quorum_loss(service_id, partition_id, operation_id, quorum_loss_mode, quorum_loss_duration, timeout:60, custom_headers:nil) click to toggle source

Induces quorum loss for a given stateful service partition.

Induces quorum loss for a given stateful service partition. This API is useful for a temporary quorum loss situation on your service.

Call the GetQuorumLossProgress API with the same OperationId to return information on the operation started with this API.

This can only be called on stateful persisted (HasPersistedState==true) services. Do not use this API on stateless services or stateful in-memory only services.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param quorum_loss_mode [QuorumLossMode] This enum is passed to the StartQuorumLoss API to indicate what type of quorum loss to induce. Possible values include: 'Invalid', 'QuorumReplicas', 'AllReplicas' @param quorum_loss_duration [Integer] The amount of time for which the partition will be kept in quorum loss. This must be specified in seconds. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 21285
def start_quorum_loss(service_id, partition_id, operation_id, quorum_loss_mode, quorum_loss_duration, timeout:60, custom_headers:nil)
  response = start_quorum_loss_async(service_id, partition_id, operation_id, quorum_loss_mode, quorum_loss_duration, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
start_quorum_loss_async(service_id, partition_id, operation_id, quorum_loss_mode, quorum_loss_duration, timeout:60, custom_headers:nil) click to toggle source

Induces quorum loss for a given stateful service partition.

Induces quorum loss for a given stateful service partition. This API is useful for a temporary quorum loss situation on your service.

Call the GetQuorumLossProgress API with the same OperationId to return information on the operation started with this API.

This can only be called on stateful persisted (HasPersistedState==true) services. Do not use this API on stateless services or stateful in-memory only services.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param quorum_loss_mode [QuorumLossMode] This enum is passed to the StartQuorumLoss API to indicate what type of quorum loss to induce. Possible values include: 'Invalid', 'QuorumReplicas', 'AllReplicas' @param quorum_loss_duration [Integer] The amount of time for which the partition will be kept in quorum loss. This must be specified in seconds. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 21368
def start_quorum_loss_async(service_id, partition_id, operation_id, quorum_loss_mode, quorum_loss_duration, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  fail ArgumentError, 'operation_id is nil' if operation_id.nil?
  fail ArgumentError, 'quorum_loss_mode is nil' if quorum_loss_mode.nil?
  fail ArgumentError, 'quorum_loss_duration is nil' if quorum_loss_duration.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartQuorumLoss'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id,'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'OperationId' => operation_id,'QuorumLossMode' => quorum_loss_mode,'QuorumLossDuration' => quorum_loss_duration,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
start_quorum_loss_with_http_info(service_id, partition_id, operation_id, quorum_loss_mode, quorum_loss_duration, timeout:60, custom_headers:nil) click to toggle source

Induces quorum loss for a given stateful service partition.

Induces quorum loss for a given stateful service partition. This API is useful for a temporary quorum loss situation on your service.

Call the GetQuorumLossProgress API with the same OperationId to return information on the operation started with this API.

This can only be called on stateful persisted (HasPersistedState==true) services. Do not use this API on stateless services or stateful in-memory only services.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param quorum_loss_mode [QuorumLossMode] This enum is passed to the StartQuorumLoss API to indicate what type of quorum loss to induce. Possible values include: 'Invalid', 'QuorumReplicas', 'AllReplicas' @param quorum_loss_duration [Integer] The amount of time for which the partition will be kept in quorum loss. This must be specified in seconds. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 21327
def start_quorum_loss_with_http_info(service_id, partition_id, operation_id, quorum_loss_mode, quorum_loss_duration, timeout:60, custom_headers:nil)
  start_quorum_loss_async(service_id, partition_id, operation_id, quorum_loss_mode, quorum_loss_duration, timeout:timeout, custom_headers:custom_headers).value!
end
stop_chaos(timeout:60, custom_headers:nil) click to toggle source

Stops Chaos if it is running in the cluster and put the Chaos Schedule in a stopped state.

Stops Chaos from executing new faults. In-flight faults will continue to execute until they are complete. The current Chaos Schedule is put into a stopped state. Once a schedule is stopped it will stay in the stopped state and not be used to Chaos Schedule new runs of Chaos. A new Chaos Schedule must be set in order to resume scheduling.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18891
def stop_chaos(timeout:60, custom_headers:nil)
  response = stop_chaos_async(timeout:timeout, custom_headers:custom_headers).value!
  nil
end
stop_chaos_async(timeout:60, custom_headers:nil) click to toggle source

Stops Chaos if it is running in the cluster and put the Chaos Schedule in a stopped state.

Stops Chaos from executing new faults. In-flight faults will continue to execute until they are complete. The current Chaos Schedule is put into a stopped state. Once a schedule is stopped it will stay in the stopped state and not be used to Chaos Schedule new runs of Chaos. A new Chaos Schedule must be set in order to resume scheduling.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18940
def stop_chaos_async(timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Tools/Chaos/$/Stop'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
stop_chaos_with_http_info(timeout:60, custom_headers:nil) click to toggle source

Stops Chaos if it is running in the cluster and put the Chaos Schedule in a stopped state.

Stops Chaos from executing new faults. In-flight faults will continue to execute until they are complete. The current Chaos Schedule is put into a stopped state. Once a schedule is stopped it will stay in the stopped state and not be used to Chaos Schedule new runs of Chaos. A new Chaos Schedule must be set in order to resume scheduling.

@param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 18916
def stop_chaos_with_http_info(timeout:60, custom_headers:nil)
  stop_chaos_async(timeout:timeout, custom_headers:custom_headers).value!
end
submit_property_batch(name_id, property_batch_description_list, timeout:60, custom_headers:nil) click to toggle source

Submits a property batch.

Submits a batch of property operations. Either all or none of the operations will be committed.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param property_batch_description_list [PropertyBatchDescriptionList] Describes the property batch operations to be submitted. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PropertyBatchInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27428
def submit_property_batch(name_id, property_batch_description_list, timeout:60, custom_headers:nil)
  response = submit_property_batch_async(name_id, property_batch_description_list, timeout:timeout, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
submit_property_batch_async(name_id, property_batch_description_list, timeout:60, custom_headers:nil) click to toggle source

Submits a property batch.

Submits a batch of property operations. Either all or none of the operations will be committed.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param property_batch_description_list [PropertyBatchDescriptionList] Describes the property batch operations to be submitted. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27475
def submit_property_batch_async(name_id, property_batch_description_list, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'name_id is nil' if name_id.nil?
  fail ArgumentError, 'property_batch_description_list is nil' if property_batch_description_list.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::PropertyBatchDescriptionList.mapper()
  request_content = self.serialize(request_mapper,  property_batch_description_list)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Names/{nameId}/$/GetProperties/$/SubmitBatch'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nameId' => name_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 || status_code == 409
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::SuccessfulPropertyBatchInfo.mapper()
        result.body = self.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
    # Deserialize Response
    if status_code == 409
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::ServiceFabric::V6_2_0_9::Models::FailedPropertyBatchInfo.mapper()
        result.body = self.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
submit_property_batch_with_http_info(name_id, property_batch_description_list, timeout:60, custom_headers:nil) click to toggle source

Submits a property batch.

Submits a batch of property operations. Either all or none of the operations will be committed.

@param name_id [String] The Service Fabric name, without the 'fabric:' URI scheme. @param property_batch_description_list [PropertyBatchDescriptionList] Describes the property batch operations to be submitted. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 27452
def submit_property_batch_with_http_info(name_id, property_batch_description_list, timeout:60, custom_headers:nil)
  submit_property_batch_async(name_id, property_batch_description_list, timeout:timeout, custom_headers:custom_headers).value!
end
suspend_application_backup(application_id, timeout:60, custom_headers:nil) click to toggle source

Suspends periodic backup for the specified Service Fabric application.

The application which is configured to take periodic backups, is suspended for taking further backups till it is resumed again. This operation applies to the entire application's hierarchy. It means all the services and partitions under this application are now suspended for backup.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 23894
def suspend_application_backup(application_id, timeout:60, custom_headers:nil)
  response = suspend_application_backup_async(application_id, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
suspend_application_backup_async(application_id, timeout:60, custom_headers:nil) click to toggle source

Suspends periodic backup for the specified Service Fabric application.

The application which is configured to take periodic backups, is suspended for taking further backups till it is resumed again. This operation applies to the entire application's hierarchy. It means all the services and partitions under this application are now suspended for backup.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 23949
def suspend_application_backup_async(application_id, timeout:60, custom_headers:nil)
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Applications/{applicationId}/$/SuspendBackup'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
suspend_application_backup_with_http_info(application_id, timeout:60, custom_headers:nil) click to toggle source

Suspends periodic backup for the specified Service Fabric application.

The application which is configured to take periodic backups, is suspended for taking further backups till it is resumed again. This operation applies to the entire application's hierarchy. It means all the services and partitions under this application are now suspended for backup.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 23922
def suspend_application_backup_with_http_info(application_id, timeout:60, custom_headers:nil)
  suspend_application_backup_async(application_id, timeout:timeout, custom_headers:custom_headers).value!
end
suspend_partition_backup(partition_id, timeout:60, custom_headers:nil) click to toggle source

Suspends periodic backup for the specified partition.

The partition which is configured to take periodic backups, is suspended for taking further backups till it is resumed again.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25550
def suspend_partition_backup(partition_id, timeout:60, custom_headers:nil)
  response = suspend_partition_backup_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
suspend_partition_backup_async(partition_id, timeout:60, custom_headers:nil) click to toggle source

Suspends periodic backup for the specified partition.

The partition which is configured to take periodic backups, is suspended for taking further backups till it is resumed again.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25591
def suspend_partition_backup_async(partition_id, timeout:60, custom_headers:nil)
  fail ArgumentError, 'partition_id is nil' if partition_id.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Partitions/{partitionId}/$/SuspendBackup'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'partitionId' => partition_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
suspend_partition_backup_with_http_info(partition_id, timeout:60, custom_headers:nil) click to toggle source

Suspends periodic backup for the specified partition.

The partition which is configured to take periodic backups, is suspended for taking further backups till it is resumed again.

@param partition_id The identity of the partition. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 25571
def suspend_partition_backup_with_http_info(partition_id, timeout:60, custom_headers:nil)
  suspend_partition_backup_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
end
suspend_service_backup(service_id, timeout:60, custom_headers:nil) click to toggle source

Suspends periodic backup for the specified Service Fabric service.

The service which is configured to take periodic backups, is suspended for taking further backups till it is resumed again. This operation applies to the entire service's hierarchy. It means all the partitions under this service are now suspended for backup.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 24808
def suspend_service_backup(service_id, timeout:60, custom_headers:nil)
  response = suspend_service_backup_async(service_id, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
suspend_service_backup_async(service_id, timeout:60, custom_headers:nil) click to toggle source

Suspends periodic backup for the specified Service Fabric service.

The service which is configured to take periodic backups, is suspended for taking further backups till it is resumed again. This operation applies to the entire service's hierarchy. It means all the partitions under this service are now suspended for backup.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 24865
def suspend_service_backup_async(service_id, timeout:60, custom_headers:nil)
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'Services/{serviceId}/$/SuspendBackup'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
suspend_service_backup_with_http_info(service_id, timeout:60, custom_headers:nil) click to toggle source

Suspends periodic backup for the specified Service Fabric service.

The service which is configured to take periodic backups, is suspended for taking further backups till it is resumed again. This operation applies to the entire service's hierarchy. It means all the partitions under this service are now suspended for backup.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 24837
def suspend_service_backup_with_http_info(service_id, timeout:60, custom_headers:nil)
  suspend_service_backup_async(service_id, timeout:timeout, custom_headers:custom_headers).value!
end
unprovision_application_type(application_type_name, unprovision_application_type_description_info, timeout:60, custom_headers:nil) click to toggle source

Removes or unregisters a Service Fabric application type from the cluster.

Removes or unregisters a Service Fabric application type from the cluster. This operation can only be performed if all application instances of the application type has been deleted. Once the application type is unregistered, no new application instances can be created for this particular application type.

@param application_type_name [String] The name of the application type. @param unprovision_application_type_description_info

UnprovisionApplicationTypeDescriptionInfo

The relative path for the

application package in the image store specified during the prior copy operation. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 5272
def unprovision_application_type(application_type_name, unprovision_application_type_description_info, timeout:60, custom_headers:nil)
  response = unprovision_application_type_async(application_type_name, unprovision_application_type_description_info, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
unprovision_application_type_async(application_type_name, unprovision_application_type_description_info, timeout:60, custom_headers:nil) click to toggle source

Removes or unregisters a Service Fabric application type from the cluster.

Removes or unregisters a Service Fabric application type from the cluster. This operation can only be performed if all application instances of the application type has been deleted. Once the application type is unregistered, no new application instances can be created for this particular application type.

@param application_type_name [String] The name of the application type. @param unprovision_application_type_description_info

UnprovisionApplicationTypeDescriptionInfo

The relative path for the

application package in the image store specified during the prior copy operation. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 5327
def unprovision_application_type_async(application_type_name, unprovision_application_type_description_info, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'application_type_name is nil' if application_type_name.nil?
  fail ArgumentError, 'unprovision_application_type_description_info is nil' if unprovision_application_type_description_info.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::UnprovisionApplicationTypeDescriptionInfo.mapper()
  request_content = self.serialize(request_mapper,  unprovision_application_type_description_info)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'ApplicationTypes/{applicationTypeName}/$/Unprovision'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'applicationTypeName' => application_type_name},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
unprovision_application_type_with_http_info(application_type_name, unprovision_application_type_description_info, timeout:60, custom_headers:nil) click to toggle source

Removes or unregisters a Service Fabric application type from the cluster.

Removes or unregisters a Service Fabric application type from the cluster. This operation can only be performed if all application instances of the application type has been deleted. Once the application type is unregistered, no new application instances can be created for this particular application type.

@param application_type_name [String] The name of the application type. @param unprovision_application_type_description_info

UnprovisionApplicationTypeDescriptionInfo

The relative path for the

application package in the image store specified during the prior copy operation. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 5300
def unprovision_application_type_with_http_info(application_type_name, unprovision_application_type_description_info, timeout:60, custom_headers:nil)
  unprovision_application_type_async(application_type_name, unprovision_application_type_description_info, timeout:timeout, custom_headers:custom_headers).value!
end
unprovision_cluster(unprovision_fabric_description, timeout:60, custom_headers:nil) click to toggle source

Unprovision the code or configuration packages of a Service Fabric cluster.

Unprovision the code or configuration packages of a Service Fabric cluster. It is supported to unprovision code and configuration separately.

@param unprovision_fabric_description [UnprovisionFabricDescription] Describes the parameters for unprovisioning a cluster. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2494
def unprovision_cluster(unprovision_fabric_description, timeout:60, custom_headers:nil)
  response = unprovision_cluster_async(unprovision_fabric_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
unprovision_cluster_async(unprovision_fabric_description, timeout:60, custom_headers:nil) click to toggle source

Unprovision the code or configuration packages of a Service Fabric cluster.

Unprovision the code or configuration packages of a Service Fabric cluster. It is supported to unprovision code and configuration separately.

@param unprovision_fabric_description [UnprovisionFabricDescription] Describes the parameters for unprovisioning a cluster. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2537
def unprovision_cluster_async(unprovision_fabric_description, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'unprovision_fabric_description is nil' if unprovision_fabric_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::UnprovisionFabricDescription.mapper()
  request_content = self.serialize(request_mapper,  unprovision_fabric_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '$/Unprovision'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
unprovision_cluster_with_http_info(unprovision_fabric_description, timeout:60, custom_headers:nil) click to toggle source

Unprovision the code or configuration packages of a Service Fabric cluster.

Unprovision the code or configuration packages of a Service Fabric cluster. It is supported to unprovision code and configuration separately.

@param unprovision_fabric_description [UnprovisionFabricDescription] Describes the parameters for unprovisioning a cluster. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 2516
def unprovision_cluster_with_http_info(unprovision_fabric_description, timeout:60, custom_headers:nil)
  unprovision_cluster_async(unprovision_fabric_description, timeout:timeout, custom_headers:custom_headers).value!
end
update_application_upgrade(application_id, application_upgrade_update_description, timeout:60, custom_headers:nil) click to toggle source

Updates an ongoing application upgrade in the Service Fabric cluster.

Updates the parameters of an ongoing application upgrade from the ones specified at the time of starting the application upgrade. This may be required to mitigate stuck application upgrades due to incorrect parameters or issues in the application to make progress.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param application_upgrade_update_description

ApplicationUpgradeUpdateDescription

Parameters for updating an existing

application upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 8086
def update_application_upgrade(application_id, application_upgrade_update_description, timeout:60, custom_headers:nil)
  response = update_application_upgrade_async(application_id, application_upgrade_update_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
update_application_upgrade_async(application_id, application_upgrade_update_description, timeout:60, custom_headers:nil) click to toggle source

Updates an ongoing application upgrade in the Service Fabric cluster.

Updates the parameters of an ongoing application upgrade from the ones specified at the time of starting the application upgrade. This may be required to mitigate stuck application upgrades due to incorrect parameters or issues in the application to make progress.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param application_upgrade_update_description

ApplicationUpgradeUpdateDescription

Parameters for updating an existing

application upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 8147
def update_application_upgrade_async(application_id, application_upgrade_update_description, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'application_id is nil' if application_id.nil?
  fail ArgumentError, 'application_upgrade_update_description is nil' if application_upgrade_update_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ApplicationUpgradeUpdateDescription.mapper()
  request_content = self.serialize(request_mapper,  application_upgrade_update_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Applications/{applicationId}/$/UpdateUpgrade'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'applicationId' => application_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
update_application_upgrade_with_http_info(application_id, application_upgrade_update_description, timeout:60, custom_headers:nil) click to toggle source

Updates an ongoing application upgrade in the Service Fabric cluster.

Updates the parameters of an ongoing application upgrade from the ones specified at the time of starting the application upgrade. This may be required to mitigate stuck application upgrades due to incorrect parameters or issues in the application to make progress.

@param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the application name is “fabric:/myapp/app1”, the application identity would be “myapp~app1” in 6.0+ and “myapp/app1” in previous versions. @param application_upgrade_update_description

ApplicationUpgradeUpdateDescription

Parameters for updating an existing

application upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 8117
def update_application_upgrade_with_http_info(application_id, application_upgrade_update_description, timeout:60, custom_headers:nil)
  update_application_upgrade_async(application_id, application_upgrade_update_description, timeout:timeout, custom_headers:custom_headers).value!
end
update_backup_policy(backup_policy_description, backup_policy_name, timeout:60, custom_headers:nil) click to toggle source

Updates the backup policy.

Updates the backup policy identified by {backupPolicyName}

@param backup_policy_description [BackupPolicyDescription] Describes the backup policy. @param backup_policy_name [String] The name of the backup policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 23137
def update_backup_policy(backup_policy_description, backup_policy_name, timeout:60, custom_headers:nil)
  response = update_backup_policy_async(backup_policy_description, backup_policy_name, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
update_backup_policy_async(backup_policy_description, backup_policy_name, timeout:60, custom_headers:nil) click to toggle source

Updates the backup policy.

Updates the backup policy identified by {backupPolicyName}

@param backup_policy_description [BackupPolicyDescription] Describes the backup policy. @param backup_policy_name [String] The name of the backup policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 23180
def update_backup_policy_async(backup_policy_description, backup_policy_name, timeout:60, custom_headers:nil)
  fail ArgumentError, 'backup_policy_description is nil' if backup_policy_description.nil?
  fail ArgumentError, 'backup_policy_name is nil' if backup_policy_name.nil?
  api_version = '6.2-preview'
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::BackupPolicyDescription.mapper()
  request_content = self.serialize(request_mapper,  backup_policy_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'BackupRestore/BackupPolicies/{backupPolicyName}/$/Update'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'backupPolicyName' => backup_policy_name},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
update_backup_policy_with_http_info(backup_policy_description, backup_policy_name, timeout:60, custom_headers:nil) click to toggle source

Updates the backup policy.

Updates the backup policy identified by {backupPolicyName}

@param backup_policy_description [BackupPolicyDescription] Describes the backup policy. @param backup_policy_name [String] The name of the backup policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 23159
def update_backup_policy_with_http_info(backup_policy_description, backup_policy_name, timeout:60, custom_headers:nil)
  update_backup_policy_async(backup_policy_description, backup_policy_name, timeout:timeout, custom_headers:custom_headers).value!
end
update_cluster_upgrade(update_cluster_upgrade_description, timeout:60, custom_headers:nil) click to toggle source

Update the upgrade parameters of a Service Fabric cluster upgrade.

Update the upgrade parameters used during a Service Fabric cluster upgrade.

@param update_cluster_upgrade_description [UpdateClusterUpgradeDescription] Parameters for updating a cluster upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 3035
def update_cluster_upgrade(update_cluster_upgrade_description, timeout:60, custom_headers:nil)
  response = update_cluster_upgrade_async(update_cluster_upgrade_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
update_cluster_upgrade_async(update_cluster_upgrade_description, timeout:60, custom_headers:nil) click to toggle source

Update the upgrade parameters of a Service Fabric cluster upgrade.

Update the upgrade parameters used during a Service Fabric cluster upgrade.

@param update_cluster_upgrade_description [UpdateClusterUpgradeDescription] Parameters for updating a cluster upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 3076
def update_cluster_upgrade_async(update_cluster_upgrade_description, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'update_cluster_upgrade_description is nil' if update_cluster_upgrade_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::UpdateClusterUpgradeDescription.mapper()
  request_content = self.serialize(request_mapper,  update_cluster_upgrade_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '$/UpdateUpgrade'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
update_cluster_upgrade_with_http_info(update_cluster_upgrade_description, timeout:60, custom_headers:nil) click to toggle source

Update the upgrade parameters of a Service Fabric cluster upgrade.

Update the upgrade parameters used during a Service Fabric cluster upgrade.

@param update_cluster_upgrade_description [UpdateClusterUpgradeDescription] Parameters for updating a cluster upgrade. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 3056
def update_cluster_upgrade_with_http_info(update_cluster_upgrade_description, timeout:60, custom_headers:nil)
  update_cluster_upgrade_async(update_cluster_upgrade_description, timeout:timeout, custom_headers:custom_headers).value!
end
update_repair_execution_state(repair_task, custom_headers:nil) click to toggle source

Updates the execution state of a repair task.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param repair_task [RepairTask] Describes the repair task to be created or updated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [RepairTaskUpdateInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14509
def update_repair_execution_state(repair_task, custom_headers:nil)
  response = update_repair_execution_state_async(repair_task, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
update_repair_execution_state_async(repair_task, custom_headers:nil) click to toggle source

Updates the execution state of a repair task.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param repair_task [RepairTask] Describes the repair task to be created or updated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14544
def update_repair_execution_state_async(repair_task, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'repair_task is nil' if repair_task.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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::RepairTask.mapper()
  request_content = self.serialize(request_mapper,  repair_task)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '$/UpdateRepairExecutionState'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::RepairTaskUpdateInfo.mapper()
        result.body = self.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
update_repair_execution_state_with_http_info(repair_task, custom_headers:nil) click to toggle source

Updates the execution state of a repair task.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param repair_task [RepairTask] Describes the repair task to be created or updated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14527
def update_repair_execution_state_with_http_info(repair_task, custom_headers:nil)
  update_repair_execution_state_async(repair_task, custom_headers:custom_headers).value!
end
update_repair_task_health_policy(repair_task_update_health_policy_description, custom_headers:nil) click to toggle source

Updates the health policy of the given repair task.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param repair_task_update_health_policy_description

RepairTaskUpdateHealthPolicyDescription

Describes the repair task healthy

policy to be updated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [RepairTaskUpdateInfo] operation results.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14400
def update_repair_task_health_policy(repair_task_update_health_policy_description, custom_headers:nil)
  response = update_repair_task_health_policy_async(repair_task_update_health_policy_description, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
update_repair_task_health_policy_async(repair_task_update_health_policy_description, custom_headers:nil) click to toggle source

Updates the health policy of the given repair task.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param repair_task_update_health_policy_description

RepairTaskUpdateHealthPolicyDescription

Describes the repair task healthy

policy to be updated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14437
def update_repair_task_health_policy_async(repair_task_update_health_policy_description, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'repair_task_update_health_policy_description is nil' if repair_task_update_health_policy_description.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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::RepairTaskUpdateHealthPolicyDescription.mapper()
  request_content = self.serialize(request_mapper,  repair_task_update_health_policy_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '$/UpdateRepairTaskHealthPolicy'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'api-version' => api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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::ServiceFabric::V6_2_0_9::Models::RepairTaskUpdateInfo.mapper()
        result.body = self.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
update_repair_task_health_policy_with_http_info(repair_task_update_health_policy_description, custom_headers:nil) click to toggle source

Updates the health policy of the given repair task.

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

@param repair_task_update_health_policy_description

RepairTaskUpdateHealthPolicyDescription

Describes the repair task healthy

policy to be updated. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 14419
def update_repair_task_health_policy_with_http_info(repair_task_update_health_policy_description, custom_headers:nil)
  update_repair_task_health_policy_async(repair_task_update_health_policy_description, custom_headers:custom_headers).value!
end
update_service(service_id, service_update_description, timeout:60, custom_headers:nil) click to toggle source

Updates a Service Fabric service using the specified update description.

This API allows updating properties of a running Service Fabric service. The set of properties that can be updated are a subset of the properties that were specified at the time of creating the service. The current set of properties can be obtained using `GetServiceDescription` API. Please note that updating the properties of a running service is different than upgrading your application using `StartApplicationUpgrade` API. The upgrade is a long running background operation that involves moving the application from one version to another, one upgrade domain at a time, whereas update applies the new properties immediately to the service.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param service_update_description [ServiceUpdateDescription] The information necessary to update a service. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 10678
def update_service(service_id, service_update_description, timeout:60, custom_headers:nil)
  response = update_service_async(service_id, service_update_description, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
update_service_async(service_id, service_update_description, timeout:60, custom_headers:nil) click to toggle source

Updates a Service Fabric service using the specified update description.

This API allows updating properties of a running Service Fabric service. The set of properties that can be updated are a subset of the properties that were specified at the time of creating the service. The current set of properties can be obtained using `GetServiceDescription` API. Please note that updating the properties of a running service is different than upgrading your application using `StartApplicationUpgrade` API. The upgrade is a long running background operation that involves moving the application from one version to another, one upgrade domain at a time, whereas update applies the new properties immediately to the service.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param service_update_description [ServiceUpdateDescription] The information necessary to update a service. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 10749
def update_service_async(service_id, service_update_description, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'service_id is nil' if service_id.nil?
  fail ArgumentError, 'service_update_description is nil' if service_update_description.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_2_0_9::Models::ServiceUpdateDescription.mapper()
  request_content = self.serialize(request_mapper,  service_update_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Services/{serviceId}/$/Update'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'serviceId' => service_id},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.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 MsRest::HttpOperationError.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
update_service_with_http_info(service_id, service_update_description, timeout:60, custom_headers:nil) click to toggle source

Updates a Service Fabric service using the specified update description.

This API allows updating properties of a running Service Fabric service. The set of properties that can be updated are a subset of the properties that were specified at the time of creating the service. The current set of properties can be obtained using `GetServiceDescription` API. Please note that updating the properties of a running service is different than upgrading your application using `StartApplicationUpgrade` API. The upgrade is a long running background operation that involves moving the application from one version to another, one upgrade domain at a time, whereas update applies the new properties immediately to the service.

@param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the “~” character. For example, if the service name is “fabric:/myapp/app1/svc1”, the service identity would be “myapp~app1~svc1” in 6.0+ and “myapp/app1/svc1” in previous versions. @param service_update_description [ServiceUpdateDescription] The information necessary to update a service. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 10714
def update_service_with_http_info(service_id, service_update_description, timeout:60, custom_headers:nil)
  update_service_async(service_id, service_update_description, timeout:timeout, custom_headers:custom_headers).value!
end
upload_file(content_path, timeout:60, custom_headers:nil) click to toggle source

Uploads contents of the file to the image store.

Uploads contents of the file to the image store. Use this API if the file is small enough to upload again if the connection fails. The file's data needs to be added to the request body. The contents will be uploaded to the specified path. Image store service uses a mark file to indicate the availability of the folder. The mark file is an empty file named “_.dir”. The mark file is generated by the image store service when all files in a folder are uploaded. When using File-by-File approach to upload application package in REST, the image store service isn't aware of the file hierarchy of the application package; you need to create a mark file per folder and upload it last, to let the image store service know that the folder is complete.

@param content_path [String] Relative path to file or folder in the image store from its root. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19425
def upload_file(content_path, timeout:60, custom_headers:nil)
  response = upload_file_async(content_path, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
upload_file_async(content_path, timeout:60, custom_headers:nil) click to toggle source

Uploads contents of the file to the image store.

Uploads contents of the file to the image store. Use this API if the file is small enough to upload again if the connection fails. The file's data needs to be added to the request body. The contents will be uploaded to the specified path. Image store service uses a mark file to indicate the availability of the folder. The mark file is an empty file named “_.dir”. The mark file is generated by the image store service when all files in a folder are uploaded. When using File-by-File approach to upload application package in REST, the image store service isn't aware of the file hierarchy of the application package; you need to create a mark file per folder and upload it last, to let the image store service know that the folder is complete.

@param content_path [String] Relative path to file or folder in the image store from its root. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19484
def upload_file_async(content_path, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'content_path is nil' if content_path.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  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'] = accept_language unless accept_language.nil?
  path_template = 'ImageStore/{contentPath}'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'contentPath' => content_path},
      query_params: {'api-version' => api_version,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.make_request_async(:put, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
upload_file_chunk(content_path, session_id, content_range, timeout:60, custom_headers:nil) click to toggle source

Uploads a file chunk to the image store relative path.

Uploads a file chunk to the image store with the specified upload session ID and image store relative path. This API allows user to resume the file upload operation. user doesn't have to restart the file upload from scratch whenever there is a network interruption. Use this option if the file size is large.

To perform a resumable file upload, user need to break the file into multiple chunks and upload these chunks to the image store one-by-one. Chunks don't have to be uploaded in order. If the file represented by the image store relative path already exists, it will be overwritten when the upload session commits.

@param content_path [String] Relative path to file or folder in the image store from its root. @param session_id A GUID generated by the user for a file uploading. It identifies an image store upload session which keeps track of all file chunks until it is committed. @param content_range [String] When uploading file chunks to the image store, the Content-Range header field need to be configured and sent with a request. The format should looks like “bytes {First-Byte-Position}-{Last-Byte-Position}/{File-Length}”. For example, Content-Range:bytes 300-5000/20000 indicates that user is sending bytes 300 through 5,000 and the total file length is 20,000 bytes. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 20454
def upload_file_chunk(content_path, session_id, content_range, timeout:60, custom_headers:nil)
  response = upload_file_chunk_async(content_path, session_id, content_range, timeout:timeout, custom_headers:custom_headers).value!
  nil
end
upload_file_chunk_async(content_path, session_id, content_range, timeout:60, custom_headers:nil) click to toggle source

Uploads a file chunk to the image store relative path.

Uploads a file chunk to the image store with the specified upload session ID and image store relative path. This API allows user to resume the file upload operation. user doesn't have to restart the file upload from scratch whenever there is a network interruption. Use this option if the file size is large.

To perform a resumable file upload, user need to break the file into multiple chunks and upload these chunks to the image store one-by-one. Chunks don't have to be uploaded in order. If the file represented by the image store relative path already exists, it will be overwritten when the upload session commits.

@param content_path [String] Relative path to file or folder in the image store from its root. @param session_id A GUID generated by the user for a file uploading. It identifies an image store upload session which keeps track of all file chunks until it is committed. @param content_range [String] When uploading file chunks to the image store, the Content-Range header field need to be configured and sent with a request. The format should looks like “bytes {First-Byte-Position}-{Last-Byte-Position}/{File-Length}”. For example, Content-Range:bytes 300-5000/20000 indicates that user is sending bytes 300 through 5,000 and the total file length is 20,000 bytes. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 20531
def upload_file_chunk_async(content_path, session_id, content_range, timeout:60, custom_headers:nil)
  api_version = '6.0'
  fail ArgumentError, 'content_path is nil' if content_path.nil?
  fail ArgumentError, 'session_id is nil' if session_id.nil?
  fail ArgumentError, 'content_range is nil' if content_range.nil?
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" if !timeout.nil? && timeout > 4294967295
  fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMinimum': '1'" if !timeout.nil? && timeout < 1


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['Content-Range'] = content_range unless content_range.nil?
  request_headers['accept-language'] = accept_language unless accept_language.nil?
  path_template = 'ImageStore/{contentPath}/$/UploadChunk'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'contentPath' => content_path},
      query_params: {'api-version' => api_version,'session-id' => session_id,'timeout' => timeout},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.make_request_async(:put, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.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
upload_file_chunk_with_http_info(content_path, session_id, content_range, timeout:60, custom_headers:nil) click to toggle source

Uploads a file chunk to the image store relative path.

Uploads a file chunk to the image store with the specified upload session ID and image store relative path. This API allows user to resume the file upload operation. user doesn't have to restart the file upload from scratch whenever there is a network interruption. Use this option if the file size is large.

To perform a resumable file upload, user need to break the file into multiple chunks and upload these chunks to the image store one-by-one. Chunks don't have to be uploaded in order. If the file represented by the image store relative path already exists, it will be overwritten when the upload session commits.

@param content_path [String] Relative path to file or folder in the image store from its root. @param session_id A GUID generated by the user for a file uploading. It identifies an image store upload session which keeps track of all file chunks until it is committed. @param content_range [String] When uploading file chunks to the image store, the Content-Range header field need to be configured and sent with a request. The format should looks like “bytes {First-Byte-Position}-{Last-Byte-Position}/{File-Length}”. For example, Content-Range:bytes 300-5000/20000 indicates that user is sending bytes 300 through 5,000 and the total file length is 20,000 bytes. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 20493
def upload_file_chunk_with_http_info(content_path, session_id, content_range, timeout:60, custom_headers:nil)
  upload_file_chunk_async(content_path, session_id, content_range, timeout:timeout, custom_headers:custom_headers).value!
end
upload_file_with_http_info(content_path, timeout:60, custom_headers:nil) click to toggle source

Uploads contents of the file to the image store.

Uploads contents of the file to the image store. Use this API if the file is small enough to upload again if the connection fails. The file's data needs to be added to the request body. The contents will be uploaded to the specified path. Image store service uses a mark file to indicate the availability of the folder. The mark file is an empty file named “_.dir”. The mark file is generated by the image store service when all files in a folder are uploaded. When using File-by-File approach to upload application package in REST, the image store service isn't aware of the file hierarchy of the application package; you need to create a mark file per folder and upload it last, to let the image store service know that the folder is complete.

@param content_path [String] Relative path to file or folder in the image store from its root. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @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/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 19455
def upload_file_with_http_info(content_path, timeout:60, custom_headers:nil)
  upload_file_async(content_path, timeout:timeout, custom_headers:custom_headers).value!
end

Private Instance Methods

add_telemetry() click to toggle source

Adds telemetry information.

# File lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb, line 29679
def add_telemetry
    sdk_information = 'azure_service_fabric'
    sdk_information = "#{sdk_information}/0.18.1"
    add_user_agent_information(sdk_information)
end