Class: SwaggerClient::FirewallControllerApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ FirewallControllerApi

Returns a new instance of FirewallControllerApi.



19
20
21
# File 'lib/swagger_client/api/firewall_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/firewall_controller_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#all_by_account_using_get(account, opts = {}) ⇒ Object

Retrieve a list of firewalls for a given account, grouped by region

Parameters:

  • account

    account

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

    the optional parameters

Options Hash (opts):

  • :provider (String)

    provider (default to aws)

  • :region (String)

    region

  • :x_rate_limit_app (String)

    X-RateLimit-App

Returns:

  • (Object)


29
30
31
32
# File 'lib/swagger_client/api/firewall_controller_api.rb', line 29

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

#all_by_account_using_get_with_http_info(account, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Retrieve a list of firewalls for a given account, grouped by region

Parameters:

  • account

    account

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

    the optional parameters

Options Hash (opts):

  • :provider (String)

    provider

  • :region (String)

    region

  • :x_rate_limit_app (String)

    X-RateLimit-App

Returns:

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

    Object data, response status code and response headers



41
42
43
44
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
# File 'lib/swagger_client/api/firewall_controller_api.rb', line 41

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FirewallControllerApi.all_by_account_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 FirewallControllerApi.all_by_account_using_get"
  end
  # resource path
  local_var_path = '/firewalls/{account}'.sub('{' + 'account' + '}', .to_s)

  # query parameters
  query_params = {}
  query_params[:'provider'] = opts[:'provider'] if !opts[:'provider'].nil?
  query_params[:'region'] = opts[:'region'] if !opts[:'region'].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: FirewallControllerApi#all_by_account_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#all_using_get1(opts = {}) ⇒ Object

Retrieve a list of firewalls, grouped by account, cloud provider, and region

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    id

  • :x_rate_limit_app (String)

    X-RateLimit-App

Returns:

  • (Object)


88
89
90
91
# File 'lib/swagger_client/api/firewall_controller_api.rb', line 88

def all_using_get1(opts = {})
  data, _status_code, _headers = all_using_get1_with_http_info(opts)
  data
end

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

Retrieve a list of firewalls, grouped by account, cloud provider, and region

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    id

  • :x_rate_limit_app (String)

    X-RateLimit-App

Returns:

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

    Object data, response status code and response headers



98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/swagger_client/api/firewall_controller_api.rb', line 98

def all_using_get1_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FirewallControllerApi.all_using_get1 ...'
  end
  # resource path
  local_var_path = '/firewalls'

  # query parameters
  query_params = {}
  query_params[:'id'] = opts[:'id'] if !opts[:'id'].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: FirewallControllerApi#all_using_get1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_security_group_using_get(account, region, name, opts = {}) ⇒ Object

Retrieve a firewall’s details

Parameters:

  • account

    account

  • region

    region

  • name

    name

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

    the optional parameters

Options Hash (opts):

  • :provider (String)

    provider (default to aws)

  • :vpc_id (String)

    vpcId

  • :x_rate_limit_app (String)

    X-RateLimit-App

Returns:

  • (Object)


144
145
146
147
# File 'lib/swagger_client/api/firewall_controller_api.rb', line 144

def get_security_group_using_get(, region, name, opts = {})
  data, _status_code, _headers = get_security_group_using_get_with_http_info(, region, name, opts)
  data
end

#get_security_group_using_get_with_http_info(account, region, name, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Retrieve a firewall&#39;s details

Parameters:

  • account

    account

  • region

    region

  • name

    name

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

    the optional parameters

Options Hash (opts):

  • :provider (String)

    provider

  • :vpc_id (String)

    vpcId

  • :x_rate_limit_app (String)

    X-RateLimit-App

Returns:

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

    Object data, response status code and response headers



158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# File 'lib/swagger_client/api/firewall_controller_api.rb', line 158

def get_security_group_using_get_with_http_info(, region, name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FirewallControllerApi.get_security_group_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 FirewallControllerApi.get_security_group_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 FirewallControllerApi.get_security_group_using_get"
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling FirewallControllerApi.get_security_group_using_get"
  end
  # resource path
  local_var_path = '/firewalls/{account}/{region}/{name}'.sub('{' + 'account' + '}', .to_s).sub('{' + 'region' + '}', region.to_s).sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'provider'] = opts[:'provider'] if !opts[:'provider'].nil?
  query_params[:'vpcId'] = opts[:'vpc_id'] if !opts[:'vpc_id'].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: FirewallControllerApi#get_security_group_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end