Class: Azure::BaseManagement::SqlManagementHttpRequest

Inherits:
ManagementHttpRequest show all
Defined in:
lib/azure/base_management/sql_management_http_request.rb

Overview

This class is used for communicating with the Management certificate authentication API endpoint

Instance Attribute Summary

Attributes inherited from ManagementHttpRequest

#warn

Instance Method Summary collapse

Methods inherited from ManagementHttpRequest

#apply_body_headers, #call, #check_completion, #http_setup, #rebuild_request, #redirected?, #wait_for_completion

Constructor Details

#initialize(method, path, options_or_body = {}) ⇒ SqlManagementHttpRequest

Creates the SqlManagementHttpRequest

Parameters:

  • method (Symbol)

    The HTTP method to use (:get, :post, :put, :del, etc…)

  • path (URI)

    The URI of the HTTP endpoint to query

  • options_or_body (Hash|IO|String) (defaults to: {})

    The request options including :body or raw body only



27
28
29
30
31
32
# File 'lib/azure/base_management/sql_management_http_request.rb', line 27

def initialize(method, path, options_or_body = {})
  path = '/services/sqlservers' + (path.start_with?('/') ? path : '/' + path)
  super(method, path, options_or_body)
  headers['x-ms-version'] = '2012-03-01'
  self.uri = URI.parse(Azure.config.sql_database_management_endpoint + Azure.config.subscription_id + path)
end