src/vsphere_cpi/lib/nsxt/nsxt_client/api/services_api.rb
# List All Firewall Sections
# List all firewall section in paginated form. A default page size is limited to 1000 firewall sections. By default list of section is filtered by LAYER3 type. 
# @param [Hash] opts the optional parameters
# @option opts [String] :applied_tos AppliedTo&#39;s referenced by this section or section&#39;s Distributed Service Rules .
# @option opts [String] :cursor Opaque cursor to be used for getting next page of records (supplied by current result page)
# @option opts [String] :destinations Destinations referenced by this section&#39;s Distributed Service Rules .
# @option opts [String] :enforced_on Type of attachment for logical port; for query only.
# @option opts [String] :exclude_applied_to_type Resource type valid for use as AppliedTo filter in section API
# @option opts [String] :filter_type Filter type
# @option opts [String] :include_applied_to_type Resource type valid for use as AppliedTo filter in section API
# @option opts [String] :included_fields Comma separated list of fields that should be included in query result
# @option opts [BOOLEAN] :locked Limit results to sections which are locked/unlocked
# @option opts [Integer] :page_size Maximum number of results to return in this page (server may return fewer)
# @option opts [BOOLEAN] :search_invalid_references Return invalid references in results.
# @option opts [String] :search_scope Limit result to sections of a specific enforcement point
# @option opts [String] :services NSService referenced by this section&#39;s Distributed Service Rules .
# @option opts [BOOLEAN] :sort_ascending 
# @option opts [String] :sort_by Field by which records are sorted
# @option opts [String] :sources Sources referenced by this section&#39;s Distributed Service Rules .
# @option opts [String] :type Section Type
# @return [Array<(FirewallSectionListResult, Fixnum, Hash)>] FirewallSectionListResult data, response status code and response headers
List All Firewall Sections
List all firewall section in paginated form. A default page size is limited to 1000 firewall sections. By default list of section is filtered by LAYER3 type.
List All Firewall Sections List all firewall section in paginated form . A default page size is limited to 1000 firewall sections . By default list of section is filtered by LAYER3 type .
def list_sections_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ServicesApi.list_sections ..."
      end
      if @api_client.config.client_side_validation && opts[:'enforced_on'] && !['VIF', 'LOGICALROUTER', 'BRIDGEENDPOINT', 'DHCP_SERVICE', 'METADATA_PROXY', 'L2VPN_SESSION', 'NONE'].include?(opts[:'enforced_on'])
        fail ArgumentError, 'invalid value for "enforced_on", must be one of VIF, LOGICALROUTER, BRIDGEENDPOINT, DHCP_SERVICE, METADATA_PROXY, L2VPN_SESSION, NONE'
      end
      if @api_client.config.client_side_validation && opts[:'exclude_applied_to_type'] && !['NSGroup', 'LogicalSwitch', 'LogicalRouter', 'LogicalPort'].include?(opts[:'exclude_applied_to_type'])
        fail ArgumentError, 'invalid value for "exclude_applied_to_type", must be one of NSGroup, LogicalSwitch, LogicalRouter, LogicalPort'
      end
      if @api_client.config.client_side_validation && opts[:'filter_type'] && !['FILTER', 'SEARCH'].include?(opts[:'filter_type'])
        fail ArgumentError, 'invalid value for "filter_type", must be one of FILTER, SEARCH'
      end
      if @api_client.config.client_side_validation && opts[:'include_applied_to_type'] && !['NSGroup', 'LogicalSwitch', 'LogicalRouter', 'LogicalPort'].include?(opts[:'include_applied_to_type'])
        fail ArgumentError, 'invalid value for "include_applied_to_type", must be one of NSGroup, LogicalSwitch, LogicalRouter, LogicalPort'
      end
      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ServicesApi.list_sections, must be smaller than or equal to 1000.'
      end
      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 0
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ServicesApi.list_sections, must be greater than or equal to 0.'
      end
      if @api_client.config.client_side_validation && opts[:'type'] && !['LAYER2', 'LAYER3'].include?(opts[:'type'])
        fail ArgumentError, 'invalid value for "type", must be one of LAYER2, LAYER3'
      end
      local_var_path = "/firewall/sections"
      query_params = {}
      query_params[:'applied_tos'] = opts[:'applied_tos'] if !opts[:'applied_tos'].nil?
      query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
      query_params[:'destinations'] = opts[:'destinations'] if !opts[:'destinations'].nil?
      query_params[:'enforced_on'] = opts[:'enforced_on'] if !opts[:'enforced_on'].nil?
      query_params[:'exclude_applied_to_type'] = opts[:'exclude_applied_to_type'] if !opts[:'exclude_applied_to_type'].nil?
      query_params[:'filter_type'] = opts[:'filter_type'] if !opts[:'filter_type'].nil?
      query_params[:'include_applied_to_type'] = opts[:'include_applied_to_type'] if !opts[:'include_applied_to_type'].nil?
      query_params[:'included_fields'] = opts[:'included_fields'] if !opts[:'included_fields'].nil?
      query_params[:'locked'] = opts[:'locked'] if !opts[:'locked'].nil?
      query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
      query_params[:'search_invalid_references'] = opts[:'search_invalid_references'] if !opts[:'search_invalid_references'].nil?
      query_params[:'search_scope'] = opts[:'search_scope'] if !opts[:'search_scope'].nil?
      query_params[:'services'] = opts[:'services'] if !opts[:'services'].nil?
      query_params[:'sort_ascending'] = opts[:'sort_ascending'] if !opts[:'sort_ascending'].nil?
      query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
      query_params[:'sources'] = opts[:'sources'] if !opts[:'sources'].nil?
      query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
      header_params = {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
      form_params = {}
      post_body = nil
      auth_names = ['BasicAuth']
      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 => 'FirewallSectionListResult')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ServicesApi#list_sections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def list_sections_with_http_info ( opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug "Calling API: ServicesApi.list_sections ..." end if @api_client . config . client_side_validation && opts [ :' enforced_on ' ] && ! [ 'VIF' , 'LOGICALROUTER' , 'BRIDGEENDPOINT' , 'DHCP_SERVICE' , 'METADATA_PROXY' , 'L2VPN_SESSION' , 'NONE' ] . include? ( opts [ :' enforced_on ' ] ) fail ArgumentError , 'invalid value for "enforced_on", must be one of VIF, LOGICALROUTER, BRIDGEENDPOINT, DHCP_SERVICE, METADATA_PROXY, L2VPN_SESSION, NONE' end if @api_client . config . client_side_validation && opts [ :' exclude_applied_to_type ' ] && ! [ 'NSGroup' , 'LogicalSwitch' , 'LogicalRouter' , 'LogicalPort' ] . include? ( opts [ :' exclude_applied_to_type ' ] ) fail ArgumentError , 'invalid value for "exclude_applied_to_type", must be one of NSGroup, LogicalSwitch, LogicalRouter, LogicalPort' end if @api_client . config . client_side_validation && opts [ :' filter_type ' ] && ! [ 'FILTER' , 'SEARCH' ] . include? ( opts [ :' filter_type ' ] ) fail ArgumentError , 'invalid value for "filter_type", must be one of FILTER, SEARCH' end if @api_client . config . client_side_validation && opts [ :' include_applied_to_type ' ] && ! [ 'NSGroup' , 'LogicalSwitch' , 'LogicalRouter' , 'LogicalPort' ] . include? ( opts [ :' include_applied_to_type ' ] ) fail ArgumentError , 'invalid value for "include_applied_to_type", must be one of NSGroup, LogicalSwitch, LogicalRouter, LogicalPort' end if @api_client . config . client_side_validation && ! opts [ :' page_size ' ] . nil? && opts [ :' page_size ' ] > 1000 fail ArgumentError , 'invalid value for "opts[:"page_size"]" when calling ServicesApi.list_sections, must be smaller than or equal to 1000.' end if @api_client . config . client_side_validation && ! opts [ :' page_size ' ] . nil? && opts [ :' page_size ' ] < 0 fail ArgumentError , 'invalid value for "opts[:"page_size"]" when calling ServicesApi.list_sections, must be greater than or equal to 0.' end if @api_client . config . client_side_validation && opts [ :' type ' ] && ! [ 'LAYER2' , 'LAYER3' ] . include? ( opts [ :' type ' ] ) fail ArgumentError , 'invalid value for "type", must be one of LAYER2, LAYER3' end local_var_path = "/firewall/sections" query_params = { } query_params [ :' applied_tos ' ] = opts [ :' applied_tos ' ] if ! opts [ :' applied_tos ' ] . nil? query_params [ :' cursor ' ] = opts [ :' cursor ' ] if ! opts [ :' cursor ' ] . nil? query_params [ :' destinations ' ] = opts [ :' destinations ' ] if ! opts [ :' destinations ' ] . nil? query_params [ :' enforced_on ' ] = opts [ :' enforced_on ' ] if ! opts [ :' enforced_on ' ] . nil? query_params [ :' exclude_applied_to_type ' ] = opts [ :' exclude_applied_to_type ' ] if ! opts [ :' exclude_applied_to_type ' ] . nil? query_params [ :' filter_type ' ] = opts [ :' filter_type ' ] if ! opts [ :' filter_type ' ] . nil? query_params [ :' include_applied_to_type ' ] = opts [ :' include_applied_to_type ' ] if ! opts [ :' include_applied_to_type ' ] . nil? query_params [ :' included_fields ' ] = opts [ :' included_fields ' ] if ! opts [ :' included_fields ' ] . nil? query_params [ :' locked ' ] = opts [ :' locked ' ] if ! opts [ :' locked ' ] . nil? query_params [ :' page_size ' ] = opts [ :' page_size ' ] if ! opts [ :' page_size ' ] . nil? query_params [ :' search_invalid_references ' ] = opts [ :' search_invalid_references ' ] if ! opts [ :' search_invalid_references ' ] . nil? query_params [ :' search_scope ' ] = opts [ :' search_scope ' ] if ! opts [ :' search_scope ' ] . nil? query_params [ :' services ' ] = opts [ :' services ' ] if ! opts [ :' services ' ] . nil? query_params [ :' sort_ascending ' ] = opts [ :' sort_ascending ' ] if ! opts [ :' sort_ascending ' ] . nil? query_params [ :' sort_by ' ] = opts [ :' sort_by ' ] if ! opts [ :' sort_by ' ] . nil? query_params [ :' sources ' ] = opts [ :' sources ' ] if ! opts [ :' sources ' ] . nil? query_params [ :' type ' ] = opts [ :' type ' ] if ! opts [ :' type ' ] . nil? header_params = { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) header_params [ 'Content-Type' ] = @api_client . select_header_content_type ( [ 'application/json' ] ) form_params = { } post_body = nil auth_names = [ 'BasicAuth' ] 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 => 'FirewallSectionListResult' ) if @api_client . config . debugging @api_client . config . logger . debug "API called: ServicesApi#list_sections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
List All Firewall Sections
List all firewall section in paginated form.
List All Firewall Sections List all firewall section in paginated form .
# resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # HTTP header 'Content-Type' # form parameters # http body (model)
FirewallSectionListResult data, response status code and response headers
FirewallSectionListResult data response status code and response headers
Array<(FirewallSectionListResult, Fixnum, Hash)>
opts
:type Section Type
: type Section Type
opts the optional parameters
opts the optional parameters