Class: Ovh::Api::Api::OvhCloudConnect::Diagnostic

Inherits:
Object
  • Object
show all
Defined in:
lib/ovh-api/api/ovh_cloud_connect/diagnostic.rb

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ Diagnostic

Returns a new instance of Diagnostic.



6
7
8
# File 'lib/ovh-api/api/ovh_cloud_connect/diagnostic.rb', line 6

def initialize(connection)
  @connection = connection
end

Instance Method Details

#create(service_name:, ovhcloudconnect_diagnostic_configuration:) ⇒ Object

Raises:

  • (ArgumentError)


10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/ovh-api/api/ovh_cloud_connect/diagnostic.rb', line 10

def create(service_name:, ovhcloudconnect_diagnostic_configuration:)
  raise ArgumentError, 'service_name is required' if service_name.nil?
  raise ArgumentError, 'ovhcloudconnect_diagnostic_configuration is required' if ovhcloudconnect_diagnostic_configuration.nil?

  @connection.call(
    :POST,
    '/ovhCloudConnect/{serviceName}/diagnostic'
      .gsub('{serviceName}', ERB::Util.url_encode(service_name.to_s)),
    type: nil,
    auth: [],
    body: ovhcloudconnect_diagnostic_configuration
  )
end

#get(id:, service_name:) ⇒ Object

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/ovh-api/api/ovh_cloud_connect/diagnostic.rb', line 24

def get(id:, service_name:)
  raise ArgumentError, 'id is required' if id.nil?
  raise ArgumentError, 'service_name is required' if service_name.nil?

  @connection.call(
    :GET,
    '/ovhCloudConnect/{serviceName}/diagnostic/{id}'
      .gsub('{id}', ERB::Util.url_encode(id.to_s))
      .gsub('{serviceName}', ERB::Util.url_encode(service_name.to_s)),
    type: nil,
    auth: []
  )
end

#list(service_name:) ⇒ Object

Raises:

  • (ArgumentError)


38
39
40
41
42
43
44
45
46
47
48
# File 'lib/ovh-api/api/ovh_cloud_connect/diagnostic.rb', line 38

def list(service_name:)
  raise ArgumentError, 'service_name is required' if service_name.nil?

  @connection.call(
    :GET,
    '/ovhCloudConnect/{serviceName}/diagnostic'
      .gsub('{serviceName}', ERB::Util.url_encode(service_name.to_s)),
    type: nil,
    auth: []
  )
end