Class: SwaggerClient::ServerGroupControllerApi

Inherits:
Object
  • Object
show all
Defined in:
lib/swagger_client/api/server_group_controller_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ServerGroupControllerApi

Returns a new instance of ServerGroupControllerApi.



19
20
21
# File 'lib/swagger_client/api/server_group_controller_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/swagger_client/api/server_group_controller_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_server_group_details_using_get(application_name, account, region, server_group_name, opts = {}) ⇒ Object

Retrieve a server group’s details

Parameters:

  • application_name

    applicationName

  • account

    account

  • region

    region

  • server_group_name

    serverGroupName

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :x_rate_limit_app (String)

    X-RateLimit-App

  • :include_details (String)

    includeDetails (default to true)

Returns:

  • (Object)


31
32
33
34
# File 'lib/swagger_client/api/server_group_controller_api.rb', line 31

def get_server_group_details_using_get(application_name, , region, server_group_name, opts = {})
  data, _status_code, _headers = get_server_group_details_using_get_with_http_info(application_name, , region, server_group_name, opts)
  data
end

#get_server_group_details_using_get_with_http_info(application_name, account, region, server_group_name, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Retrieve a server group&#39;s details

Parameters:

  • application_name

    applicationName

  • account

    account

  • region

    region

  • server_group_name

    serverGroupName

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :x_rate_limit_app (String)

    X-RateLimit-App

  • :include_details (String)

    includeDetails

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/swagger_client/api/server_group_controller_api.rb', line 45

def get_server_group_details_using_get_with_http_info(application_name, , region, server_group_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServerGroupControllerApi.get_server_group_details_using_get ...'
  end
  # verify the required parameter 'application_name' is set
  if @api_client.config.client_side_validation && application_name.nil?
    fail ArgumentError, "Missing the required parameter 'application_name' when calling ServerGroupControllerApi.get_server_group_details_using_get"
  end
  # verify the required parameter 'account' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account' when calling ServerGroupControllerApi.get_server_group_details_using_get"
  end
  # verify the required parameter 'region' is set
  if @api_client.config.client_side_validation && region.nil?
    fail ArgumentError, "Missing the required parameter 'region' when calling ServerGroupControllerApi.get_server_group_details_using_get"
  end
  # verify the required parameter 'server_group_name' is set
  if @api_client.config.client_side_validation && server_group_name.nil?
    fail ArgumentError, "Missing the required parameter 'server_group_name' when calling ServerGroupControllerApi.get_server_group_details_using_get"
  end
  # resource path
  local_var_path = '/applications/{applicationName}/serverGroups/{account}/{region}/{serverGroupName}'.sub('{' + 'applicationName' + '}', application_name.to_s).sub('{' + 'account' + '}', .to_s).sub('{' + 'region' + '}', region.to_s).sub('{' + 'serverGroupName' + '}', server_group_name.to_s)

  # query parameters
  query_params = {}
  query_params[:'includeDetails'] = opts[:'include_details'] if !opts[:'include_details'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'X-RateLimit-App'] = opts[:'x_rate_limit_app'] if !opts[:'x_rate_limit_app'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ServerGroupControllerApi#get_server_group_details_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_server_groups_for_application_using_get(application_name, opts = {}) ⇒ Array<Object>

Retrieve a list of server groups for a given application

Parameters:

  • application_name

    applicationName

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :expand (String)

    expand (default to false)

  • :cloud_provider (String)

    cloudProvider

  • :clusters (String)

    clusters

  • :x_rate_limit_app (String)

    X-RateLimit-App

Returns:

  • (Array<Object>)


106
107
108
109
# File 'lib/swagger_client/api/server_group_controller_api.rb', line 106

def get_server_groups_for_application_using_get(application_name, opts = {})
  data, _status_code, _headers = get_server_groups_for_application_using_get_with_http_info(application_name, opts)
  data
end

#get_server_groups_for_application_using_get_with_http_info(application_name, opts = {}) ⇒ Array<(Array<Object>, Fixnum, Hash)>

Retrieve a list of server groups for a given application

Parameters:

  • application_name

    applicationName

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :expand (String)

    expand

  • :cloud_provider (String)

    cloudProvider

  • :clusters (String)

    clusters

  • :x_rate_limit_app (String)

    X-RateLimit-App

Returns:

  • (Array<(Array<Object>, Fixnum, Hash)>)

    Array<Object> data, response status code and response headers



119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# File 'lib/swagger_client/api/server_group_controller_api.rb', line 119

def get_server_groups_for_application_using_get_with_http_info(application_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServerGroupControllerApi.get_server_groups_for_application_using_get ...'
  end
  # verify the required parameter 'application_name' is set
  if @api_client.config.client_side_validation && application_name.nil?
    fail ArgumentError, "Missing the required parameter 'application_name' when calling ServerGroupControllerApi.get_server_groups_for_application_using_get"
  end
  # resource path
  local_var_path = '/applications/{applicationName}/serverGroups'.sub('{' + 'applicationName' + '}', application_name.to_s)

  # query parameters
  query_params = {}
  query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
  query_params[:'cloudProvider'] = opts[:'cloud_provider'] if !opts[:'cloud_provider'].nil?
  query_params[:'clusters'] = opts[:'clusters'] if !opts[:'clusters'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'X-RateLimit-App'] = opts[:'x_rate_limit_app'] if !opts[:'x_rate_limit_app'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<Object>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ServerGroupControllerApi#get_server_groups_for_application_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end