api/generated/ruby/azure-iiot-opc-registry/generated/swagger/azure_opc_registry_client.rb
def activate_endpoint_async(endpoint_id, custom_headers:nil)
      fail ArgumentError, 'endpoint_id is nil' if endpoint_id.nil?


      request_headers = {}
      request_headers['Content-Type'] = 'application/json; charset=utf-8'
      path_template = 'v2/endpoints/{endpointId}/activate'

      request_url = @base_url || self.base_url

      options = {
          middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
          path_params: {'endpointId' => endpoint_id},
          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
      end

      promise.execute
    end
#
# Activate endpoint
#
# Activates an endpoint for subsequent use in twin service. All endpoints must
# be activated using this API or through a activation filter during application
# registration or discovery.
#
# @param endpoint_id [String] endpoint identifier
# @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.
#
Activate endpoint
Activates an endpoint for subsequent use in twin service. All endpoints must
be activated using this API or through a activation filter during application
registration or discovery.
Activate endpoint Activates an endpoint for subsequent use in twin service . All endpoints must be activated using this API or through a activation filter during application registration or discovery .
def activate_endpoint_async(endpoint_id, custom_headers:nil)
      fail ArgumentError, 'endpoint_id is nil' if endpoint_id.nil?
      request_headers = {}
      request_headers['Content-Type'] = 'application/json; charset=utf-8'
      path_template = 'v2/endpoints/{endpointId}/activate'
      request_url = @base_url || self.base_url
      options = {
          middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
          path_params: {'endpointId' => endpoint_id},
          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
      end
      promise.execute
    end
def activate_endpoint_async ( endpoint_id , custom_headers : nil ) fail ArgumentError , 'endpoint_id is nil' if endpoint_id . nil? request_headers = { } request_headers [ 'Content-Type' ] = 'application/json; charset=utf-8' path_template = 'v2/endpoints/{endpointId}/activate' request_url = @base_url || self . base_url options = { middlewares : [ [ MsRest :: RetryPolicyMiddleware , times : 3 , retry : 0.02 ] , [ :cookie_jar ] ] , path_params : { 'endpointId' => endpoint_id } , 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 end promise . execute end
Activate endpoint
Activates an endpoint for subsequent use in twin service.
Activate endpoint Activates an endpoint for subsequent use in twin service .
Promise object which holds the HTTP response.
Promise object which holds the HTTP response .
Concurrent::Promise
endpoint_id
None
custom_headers
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 .