class SwaggerClient::FirewallControllerApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/swagger_client/api/firewall_controller_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

all_by_account_using_get(account, opts = {}) click to toggle source

Retrieve a list of firewalls for a given account, grouped by region @param account account @param [Hash] opts the optional parameters @option opts [String] :provider provider (default to aws) @option opts [String] :region region @option opts [String] :x_rate_limit_app X-RateLimit-App @return [Object]

# File lib/swagger_client/api/firewall_controller_api.rb, line 29
def all_by_account_using_get(account, opts = {})
  data, _status_code, _headers = all_by_account_using_get_with_http_info(account, opts)
  data
end
all_by_account_using_get_with_http_info(account, opts = {}) click to toggle source

Retrieve a list of firewalls for a given account, grouped by region @param account account @param [Hash] opts the optional parameters @option opts [String] :provider provider @option opts [String] :region region @option opts [String] :x_rate_limit_app X-RateLimit-App @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/swagger_client/api/firewall_controller_api.rb, line 41
def all_by_account_using_get_with_http_info(account, 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 && account.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' + '}', 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 = {}) click to toggle source

Retrieve a list of firewalls, grouped by account, cloud provider, and region @param [Hash] opts the optional parameters @option opts [String] :id id @option opts [String] :x_rate_limit_app X-RateLimit-App @return [Object]

# 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 = {}) click to toggle source

Retrieve a list of firewalls, grouped by account, cloud provider, and region @param [Hash] opts the optional parameters @option opts [String] :id id @option opts [String] :x_rate_limit_app X-RateLimit-App @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# 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 = {}) click to toggle source

Retrieve a firewall's details @param account account @param region region @param name name @param [Hash] opts the optional parameters @option opts [String] :provider provider (default to aws) @option opts [String] :vpc_id vpcId @option opts [String] :x_rate_limit_app X-RateLimit-App @return [Object]

# File lib/swagger_client/api/firewall_controller_api.rb, line 144
def get_security_group_using_get(account, region, name, opts = {})
  data, _status_code, _headers = get_security_group_using_get_with_http_info(account, region, name, opts)
  data
end
get_security_group_using_get_with_http_info(account, region, name, opts = {}) click to toggle source

Retrieve a firewall&#39;s details @param account account @param region region @param name name @param [Hash] opts the optional parameters @option opts [String] :provider provider @option opts [String] :vpc_id vpcId @option opts [String] :x_rate_limit_app X-RateLimit-App @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/swagger_client/api/firewall_controller_api.rb, line 158
def get_security_group_using_get_with_http_info(account, 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 && account.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' + '}', 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