lib/fastly/api/healthcheck_api.rb in fastly-4.0.0.alpha4 vs lib/fastly/api/healthcheck_api.rb in fastly-4.0.0

- old
+ new

@@ -15,48 +15,50 @@ attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end - # Create a healthcheck - # Create a healthcheck for a particular service and version. + # Create a health check + # Create a health check for a particular service and version. # @option opts [String] :service_id Alphanumeric string identifying the service. (required) # @option opts [Integer] :version_id Integer identifying a service version. (required) - # @option opts [Integer] :check_interval How often to run the healthcheck in milliseconds. + # @option opts [Integer] :check_interval How often to run the health check in milliseconds. # @option opts [String] :comment A freeform descriptive note. # @option opts [Integer] :expected_response The status code expected from the host. + # @option opts [Array<String>] :headers Array of custom headers that will be added to the health check probes. # @option opts [String] :host Which host to check. # @option opts [String] :http_version Whether to use version 1.0 or 1.1 HTTP. # @option opts [Integer] :initial When loading a config, the initial number of probes to be seen as OK. # @option opts [String] :method Which HTTP method to use. - # @option opts [String] :name The name of the healthcheck. + # @option opts [String] :name The name of the health check. # @option opts [String] :path The path to check. - # @option opts [Integer] :threshold How many healthchecks must succeed to be considered healthy. + # @option opts [Integer] :threshold How many health checks must succeed to be considered healthy. # @option opts [Integer] :timeout Timeout in milliseconds. - # @option opts [Integer] :window The number of most recent healthcheck queries to keep for this healthcheck. + # @option opts [Integer] :window The number of most recent health check queries to keep for this health check. # @return [HealthcheckResponse] def create_healthcheck(opts = {}) data, _status_code, _headers = create_healthcheck_with_http_info(opts) data end - # Create a healthcheck - # Create a healthcheck for a particular service and version. + # Create a health check + # Create a health check for a particular service and version. # @option opts [String] :service_id Alphanumeric string identifying the service. (required) # @option opts [Integer] :version_id Integer identifying a service version. (required) - # @option opts [Integer] :check_interval How often to run the healthcheck in milliseconds. + # @option opts [Integer] :check_interval How often to run the health check in milliseconds. # @option opts [String] :comment A freeform descriptive note. # @option opts [Integer] :expected_response The status code expected from the host. + # @option opts [Array<String>] :headers Array of custom headers that will be added to the health check probes. # @option opts [String] :host Which host to check. # @option opts [String] :http_version Whether to use version 1.0 or 1.1 HTTP. # @option opts [Integer] :initial When loading a config, the initial number of probes to be seen as OK. # @option opts [String] :method Which HTTP method to use. - # @option opts [String] :name The name of the healthcheck. + # @option opts [String] :name The name of the health check. # @option opts [String] :path The path to check. - # @option opts [Integer] :threshold How many healthchecks must succeed to be considered healthy. + # @option opts [Integer] :threshold How many health checks must succeed to be considered healthy. # @option opts [Integer] :timeout Timeout in milliseconds. - # @option opts [Integer] :window The number of most recent healthcheck queries to keep for this healthcheck. + # @option opts [Integer] :window The number of most recent health check queries to keep for this health check. # @return [Array<(HealthcheckResponse, Integer, Hash)>] HealthcheckResponse data, response status code and response headers def create_healthcheck_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HealthcheckApi.create_healthcheck ...' end @@ -90,10 +92,11 @@ # form parameters form_params = opts[:form_params] || {} form_params['check_interval'] = opts[:'check_interval'] if !opts[:'check_interval'].nil? form_params['comment'] = opts[:'comment'] if !opts[:'comment'].nil? form_params['expected_response'] = opts[:'expected_response'] if !opts[:'expected_response'].nil? + form_params['headers'] = @api_client.build_collection_param(opts[:'headers'], :csv) if !opts[:'headers'].nil? form_params['host'] = opts[:'host'] if !opts[:'host'].nil? form_params['http_version'] = opts[:'http_version'] if !opts[:'http_version'].nil? form_params['initial'] = opts[:'initial'] if !opts[:'initial'].nil? form_params['method'] = opts[:'method'] if !opts[:'method'].nil? form_params['name'] = opts[:'name'] if !opts[:'name'].nil? @@ -126,26 +129,26 @@ @api_client.config.logger.debug "API called: HealthcheckApi#create_healthcheck\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete a healthcheck - # Delete the healthcheck for a particular service and version. + # Delete a health check + # Delete the health check for a particular service and version. # @option opts [String] :service_id Alphanumeric string identifying the service. (required) # @option opts [Integer] :version_id Integer identifying a service version. (required) - # @option opts [String] :healthcheck_name The name of the healthcheck. (required) + # @option opts [String] :healthcheck_name The name of the health check. (required) # @return [InlineResponse200] def delete_healthcheck(opts = {}) data, _status_code, _headers = delete_healthcheck_with_http_info(opts) data end - # Delete a healthcheck - # Delete the healthcheck for a particular service and version. + # Delete a health check + # Delete the health check for a particular service and version. # @option opts [String] :service_id Alphanumeric string identifying the service. (required) # @option opts [Integer] :version_id Integer identifying a service version. (required) - # @option opts [String] :healthcheck_name The name of the healthcheck. (required) + # @option opts [String] :healthcheck_name The name of the health check. (required) # @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers def delete_healthcheck_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HealthcheckApi.delete_healthcheck ...' end @@ -203,26 +206,26 @@ @api_client.config.logger.debug "API called: HealthcheckApi#delete_healthcheck\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get a healthcheck - # Get the healthcheck for a particular service and version. + # Get a health check + # Get the health check for a particular service and version. # @option opts [String] :service_id Alphanumeric string identifying the service. (required) # @option opts [Integer] :version_id Integer identifying a service version. (required) - # @option opts [String] :healthcheck_name The name of the healthcheck. (required) + # @option opts [String] :healthcheck_name The name of the health check. (required) # @return [HealthcheckResponse] def get_healthcheck(opts = {}) data, _status_code, _headers = get_healthcheck_with_http_info(opts) data end - # Get a healthcheck - # Get the healthcheck for a particular service and version. + # Get a health check + # Get the health check for a particular service and version. # @option opts [String] :service_id Alphanumeric string identifying the service. (required) # @option opts [Integer] :version_id Integer identifying a service version. (required) - # @option opts [String] :healthcheck_name The name of the healthcheck. (required) + # @option opts [String] :healthcheck_name The name of the health check. (required) # @return [Array<(HealthcheckResponse, Integer, Hash)>] HealthcheckResponse data, response status code and response headers def get_healthcheck_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HealthcheckApi.get_healthcheck ...' end @@ -280,22 +283,22 @@ @api_client.config.logger.debug "API called: HealthcheckApi#get_healthcheck\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List healthchecks - # List all of the healthchecks for a particular service and version. + # List health checks + # List all of the health checks for a particular service and version. # @option opts [String] :service_id Alphanumeric string identifying the service. (required) # @option opts [Integer] :version_id Integer identifying a service version. (required) # @return [Array<HealthcheckResponse>] def list_healthchecks(opts = {}) data, _status_code, _headers = list_healthchecks_with_http_info(opts) data end - # List healthchecks - # List all of the healthchecks for a particular service and version. + # List health checks + # List all of the health checks for a particular service and version. # @option opts [String] :service_id Alphanumeric string identifying the service. (required) # @option opts [Integer] :version_id Integer identifying a service version. (required) # @return [Array<(Array<HealthcheckResponse>, Integer, Hash)>] Array<HealthcheckResponse> data, response status code and response headers def list_healthchecks_with_http_info(opts = {}) if @api_client.config.debugging @@ -350,50 +353,52 @@ @api_client.config.logger.debug "API called: HealthcheckApi#list_healthchecks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update a healthcheck - # Update the healthcheck for a particular service and version. + # Update a health check + # Update the health check for a particular service and version. # @option opts [String] :service_id Alphanumeric string identifying the service. (required) # @option opts [Integer] :version_id Integer identifying a service version. (required) - # @option opts [String] :healthcheck_name The name of the healthcheck. (required) - # @option opts [Integer] :check_interval How often to run the healthcheck in milliseconds. + # @option opts [String] :healthcheck_name The name of the health check. (required) + # @option opts [Integer] :check_interval How often to run the health check in milliseconds. # @option opts [String] :comment A freeform descriptive note. # @option opts [Integer] :expected_response The status code expected from the host. + # @option opts [Array<String>] :headers Array of custom headers that will be added to the health check probes. # @option opts [String] :host Which host to check. # @option opts [String] :http_version Whether to use version 1.0 or 1.1 HTTP. # @option opts [Integer] :initial When loading a config, the initial number of probes to be seen as OK. # @option opts [String] :method Which HTTP method to use. - # @option opts [String] :name The name of the healthcheck. + # @option opts [String] :name The name of the health check. # @option opts [String] :path The path to check. - # @option opts [Integer] :threshold How many healthchecks must succeed to be considered healthy. + # @option opts [Integer] :threshold How many health checks must succeed to be considered healthy. # @option opts [Integer] :timeout Timeout in milliseconds. - # @option opts [Integer] :window The number of most recent healthcheck queries to keep for this healthcheck. + # @option opts [Integer] :window The number of most recent health check queries to keep for this health check. # @return [HealthcheckResponse] def update_healthcheck(opts = {}) data, _status_code, _headers = update_healthcheck_with_http_info(opts) data end - # Update a healthcheck - # Update the healthcheck for a particular service and version. + # Update a health check + # Update the health check for a particular service and version. # @option opts [String] :service_id Alphanumeric string identifying the service. (required) # @option opts [Integer] :version_id Integer identifying a service version. (required) - # @option opts [String] :healthcheck_name The name of the healthcheck. (required) - # @option opts [Integer] :check_interval How often to run the healthcheck in milliseconds. + # @option opts [String] :healthcheck_name The name of the health check. (required) + # @option opts [Integer] :check_interval How often to run the health check in milliseconds. # @option opts [String] :comment A freeform descriptive note. # @option opts [Integer] :expected_response The status code expected from the host. + # @option opts [Array<String>] :headers Array of custom headers that will be added to the health check probes. # @option opts [String] :host Which host to check. # @option opts [String] :http_version Whether to use version 1.0 or 1.1 HTTP. # @option opts [Integer] :initial When loading a config, the initial number of probes to be seen as OK. # @option opts [String] :method Which HTTP method to use. - # @option opts [String] :name The name of the healthcheck. + # @option opts [String] :name The name of the health check. # @option opts [String] :path The path to check. - # @option opts [Integer] :threshold How many healthchecks must succeed to be considered healthy. + # @option opts [Integer] :threshold How many health checks must succeed to be considered healthy. # @option opts [Integer] :timeout Timeout in milliseconds. - # @option opts [Integer] :window The number of most recent healthcheck queries to keep for this healthcheck. + # @option opts [Integer] :window The number of most recent health check queries to keep for this health check. # @return [Array<(HealthcheckResponse, Integer, Hash)>] HealthcheckResponse data, response status code and response headers def update_healthcheck_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HealthcheckApi.update_healthcheck ...' end @@ -432,9 +437,10 @@ # form parameters form_params = opts[:form_params] || {} form_params['check_interval'] = opts[:'check_interval'] if !opts[:'check_interval'].nil? form_params['comment'] = opts[:'comment'] if !opts[:'comment'].nil? form_params['expected_response'] = opts[:'expected_response'] if !opts[:'expected_response'].nil? + form_params['headers'] = @api_client.build_collection_param(opts[:'headers'], :csv) if !opts[:'headers'].nil? form_params['host'] = opts[:'host'] if !opts[:'host'].nil? form_params['http_version'] = opts[:'http_version'] if !opts[:'http_version'].nil? form_params['initial'] = opts[:'initial'] if !opts[:'initial'].nil? form_params['method'] = opts[:'method'] if !opts[:'method'].nil? form_params['name'] = opts[:'name'] if !opts[:'name'].nil?