class LaunchDarklyApi::RelayProxyConfigurationsApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

delete_relay_auto_config(id, opts = {}) click to toggle source

Delete Relay Proxy config by ID Delete a Relay Proxy config @param id [String] The relay auto config id @param [Hash] opts the optional parameters @return [nil]

# File lib/launchdarkly_api/api/relay_proxy_configurations_api.rb, line 27
def delete_relay_auto_config(id, opts = {})
  delete_relay_auto_config_with_http_info(id, opts)
  nil
end
delete_relay_auto_config_with_http_info(id, opts = {}) click to toggle source

Delete Relay Proxy config by ID Delete a Relay Proxy config @param id [String] The relay auto config id @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/launchdarkly_api/api/relay_proxy_configurations_api.rb, line 37
def delete_relay_auto_config_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RelayProxyConfigurationsApi.delete_relay_auto_config ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling RelayProxyConfigurationsApi.delete_relay_auto_config"
  end
  # resource path
  local_var_path = '/api/v2/account/relay-auto-configs/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"RelayProxyConfigurationsApi.delete_relay_auto_config",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RelayProxyConfigurationsApi#delete_relay_auto_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_relay_proxy_config(id, opts = {}) click to toggle source

Get Relay Proxy config Get a single Relay Proxy Auto Config by ID @param id [String] The relay auto config id @param [Hash] opts the optional parameters @return [RelayAutoConfigRep]

# File lib/launchdarkly_api/api/relay_proxy_configurations_api.rb, line 88
def get_relay_proxy_config(id, opts = {})
  data, _status_code, _headers = get_relay_proxy_config_with_http_info(id, opts)
  data
end
get_relay_proxy_config_with_http_info(id, opts = {}) click to toggle source

Get Relay Proxy config Get a single Relay Proxy Auto Config by ID @param id [String] The relay auto config id @param [Hash] opts the optional parameters @return [Array<(RelayAutoConfigRep, Integer, Hash)>] RelayAutoConfigRep data, response status code and response headers

# File lib/launchdarkly_api/api/relay_proxy_configurations_api.rb, line 98
def get_relay_proxy_config_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RelayProxyConfigurationsApi.get_relay_proxy_config ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling RelayProxyConfigurationsApi.get_relay_proxy_config"
  end
  # resource path
  local_var_path = '/api/v2/account/relay-auto-configs/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'RelayAutoConfigRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"RelayProxyConfigurationsApi.get_relay_proxy_config",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RelayProxyConfigurationsApi#get_relay_proxy_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_relay_proxy_configs(opts = {}) click to toggle source

List Relay Proxy configs Get a list of Relay Proxy configurations in the account. @param [Hash] opts the optional parameters @return [RelayAutoConfigCollectionRep]

# File lib/launchdarkly_api/api/relay_proxy_configurations_api.rb, line 150
def get_relay_proxy_configs(opts = {})
  data, _status_code, _headers = get_relay_proxy_configs_with_http_info(opts)
  data
end
get_relay_proxy_configs_with_http_info(opts = {}) click to toggle source

List Relay Proxy configs Get a list of Relay Proxy configurations in the account. @param [Hash] opts the optional parameters @return [Array<(RelayAutoConfigCollectionRep, Integer, Hash)>] RelayAutoConfigCollectionRep data, response status code and response headers

# File lib/launchdarkly_api/api/relay_proxy_configurations_api.rb, line 159
def get_relay_proxy_configs_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RelayProxyConfigurationsApi.get_relay_proxy_configs ...'
  end
  # resource path
  local_var_path = '/api/v2/account/relay-auto-configs'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'RelayAutoConfigCollectionRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"RelayProxyConfigurationsApi.get_relay_proxy_configs",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RelayProxyConfigurationsApi#get_relay_proxy_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
patch_relay_auto_config(id, patch_with_comment, opts = {}) click to toggle source

Update a Relay Proxy config Update a Relay Proxy config. @param id [String] The relay auto config id @param patch_with_comment [PatchWithComment] @param [Hash] opts the optional parameters @return [RelayAutoConfigRep]

# File lib/launchdarkly_api/api/relay_proxy_configurations_api.rb, line 209
def patch_relay_auto_config(id, patch_with_comment, opts = {})
  data, _status_code, _headers = patch_relay_auto_config_with_http_info(id, patch_with_comment, opts)
  data
end
patch_relay_auto_config_with_http_info(id, patch_with_comment, opts = {}) click to toggle source

Update a Relay Proxy config Update a Relay Proxy config. @param id [String] The relay auto config id @param patch_with_comment [PatchWithComment] @param [Hash] opts the optional parameters @return [Array<(RelayAutoConfigRep, Integer, Hash)>] RelayAutoConfigRep data, response status code and response headers

# File lib/launchdarkly_api/api/relay_proxy_configurations_api.rb, line 220
def patch_relay_auto_config_with_http_info(id, patch_with_comment, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RelayProxyConfigurationsApi.patch_relay_auto_config ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling RelayProxyConfigurationsApi.patch_relay_auto_config"
  end
  # verify the required parameter 'patch_with_comment' is set
  if @api_client.config.client_side_validation && patch_with_comment.nil?
    fail ArgumentError, "Missing the required parameter 'patch_with_comment' when calling RelayProxyConfigurationsApi.patch_relay_auto_config"
  end
  # resource path
  local_var_path = '/api/v2/account/relay-auto-configs/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_with_comment)

  # return_type
  return_type = opts[:debug_return_type] || 'RelayAutoConfigRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"RelayProxyConfigurationsApi.patch_relay_auto_config",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RelayProxyConfigurationsApi#patch_relay_auto_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_relay_auto_config(relay_auto_config_post, opts = {}) click to toggle source

Create a new Relay Proxy config Create a Relay Proxy config @param relay_auto_config_post [RelayAutoConfigPost] @param [Hash] opts the optional parameters @return [RelayAutoConfigRep]

# File lib/launchdarkly_api/api/relay_proxy_configurations_api.rb, line 279
def post_relay_auto_config(relay_auto_config_post, opts = {})
  data, _status_code, _headers = post_relay_auto_config_with_http_info(relay_auto_config_post, opts)
  data
end
post_relay_auto_config_with_http_info(relay_auto_config_post, opts = {}) click to toggle source

Create a new Relay Proxy config Create a Relay Proxy config @param relay_auto_config_post [RelayAutoConfigPost] @param [Hash] opts the optional parameters @return [Array<(RelayAutoConfigRep, Integer, Hash)>] RelayAutoConfigRep data, response status code and response headers

# File lib/launchdarkly_api/api/relay_proxy_configurations_api.rb, line 289
def post_relay_auto_config_with_http_info(relay_auto_config_post, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RelayProxyConfigurationsApi.post_relay_auto_config ...'
  end
  # verify the required parameter 'relay_auto_config_post' is set
  if @api_client.config.client_side_validation && relay_auto_config_post.nil?
    fail ArgumentError, "Missing the required parameter 'relay_auto_config_post' when calling RelayProxyConfigurationsApi.post_relay_auto_config"
  end
  # resource path
  local_var_path = '/api/v2/account/relay-auto-configs'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(relay_auto_config_post)

  # return_type
  return_type = opts[:debug_return_type] || 'RelayAutoConfigRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"RelayProxyConfigurationsApi.post_relay_auto_config",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RelayProxyConfigurationsApi#post_relay_auto_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
reset_relay_auto_config(id, opts = {}) click to toggle source

Reset Relay Proxy configuration key Reset a Relay Proxy configuration's secret key with an optional expiry time for the old key. @param id [String] The Relay Proxy configuration ID @param [Hash] opts the optional parameters @option opts [Integer] :expiry An expiration time for the old Relay Proxy configuration key, expressed as a Unix epoch time in milliseconds. By default, the Relay Proxy configuration will expire immediately. @return [RelayAutoConfigRep]

# File lib/launchdarkly_api/api/relay_proxy_configurations_api.rb, line 345
def reset_relay_auto_config(id, opts = {})
  data, _status_code, _headers = reset_relay_auto_config_with_http_info(id, opts)
  data
end
reset_relay_auto_config_with_http_info(id, opts = {}) click to toggle source

Reset Relay Proxy configuration key Reset a Relay Proxy configuration&#39;s secret key with an optional expiry time for the old key. @param id [String] The Relay Proxy configuration ID @param [Hash] opts the optional parameters @option opts [Integer] :expiry An expiration time for the old Relay Proxy configuration key, expressed as a Unix epoch time in milliseconds. By default, the Relay Proxy configuration will expire immediately. @return [Array<(RelayAutoConfigRep, Integer, Hash)>] RelayAutoConfigRep data, response status code and response headers

# File lib/launchdarkly_api/api/relay_proxy_configurations_api.rb, line 356
def reset_relay_auto_config_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RelayProxyConfigurationsApi.reset_relay_auto_config ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling RelayProxyConfigurationsApi.reset_relay_auto_config"
  end
  # resource path
  local_var_path = '/api/v2/account/relay-auto-configs/{id}/reset'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'RelayAutoConfigRep'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"RelayProxyConfigurationsApi.reset_relay_auto_config",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RelayProxyConfigurationsApi#reset_relay_auto_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end