api/generated/ruby/azure-iiot-opc-registry/generated/swagger/azure_opc_registry_client.rb
#
# Purge applications
#
# Purges all applications that have not been seen for a specified amount of
# time.
#
# @param not_seen_for [String] A duration in milliseconds
# @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.
#
Purge applications
Purges all applications that have not been seen for a specified amount of
time.
Purge applications Purges all applications that have not been seen for a specified amount of time .
def delete_all_disabled_applications_async(not_seen_for:nil, custom_headers:nil)
      request_headers = {}
      request_headers['Content-Type'] = 'application/json; charset=utf-8'
      path_template = 'v2/applications'
      request_url = @base_url || self.base_url
      options = {
          middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
          query_params: {'notSeenFor' => not_seen_for},
          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
      end
      promise.execute
    end
def delete_all_disabled_applications_async ( not_seen_for : nil , custom_headers : nil ) request_headers = { } request_headers [ 'Content-Type' ] = 'application/json; charset=utf-8' path_template = 'v2/applications' request_url = @base_url || self . base_url options = { middlewares : [ [ MsRest :: RetryPolicyMiddleware , times : 3 , retry : 0.02 ] , [ :cookie_jar ] ] , query_params : { 'notSeenFor' => not_seen_for } , 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 end promise . execute end
Purge applications
Purges all applications that have not been seen for a specified amount of
time.
Purge applications Purges all applications that have not been seen for a specified amount of time .
Promise object which holds the HTTP response.
Promise object which holds the HTTP response .
Concurrent::Promise
not_seen_for
A duration in milliseconds
A duration in milliseconds
custom_headers
<not_specific>
<not_specific>
A hash of custom headers that will be added to the HTTP request.
A hash of custom headers that will be added to the HTTP request .