Module: Elasticsearch::API::ConnectorSyncJob::Actions

Included in:
ConnectorSyncJobClient
Defined in:
lib/elasticsearch/api/namespace/connector_sync_job.rb,
lib/elasticsearch/api/actions/connector_sync_job/get.rb,
lib/elasticsearch/api/actions/connector_sync_job/list.rb,
lib/elasticsearch/api/actions/connector_sync_job/post.rb,
lib/elasticsearch/api/actions/connector_sync_job/error.rb,
lib/elasticsearch/api/actions/connector_sync_job/cancel.rb,
lib/elasticsearch/api/actions/connector_sync_job/delete.rb,
lib/elasticsearch/api/actions/connector_sync_job/check_in.rb,
lib/elasticsearch/api/actions/connector_sync_job/update_stats.rb

Instance Method Summary collapse

Instance Method Details

#cancel(arguments = {}) ⇒ Object

Cancels a connector sync job. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :connector_sync_job_id (String)

    The unique identifier of the connector sync job to be canceled

  • :headers (Hash)

    Custom HTTP headers

See Also:



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/elasticsearch/api/actions/connector_sync_job/cancel.rb', line 36

def cancel(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.cancel' }

  defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  unless arguments[:connector_sync_job_id]
    raise ArgumentError,
          "Required argument 'connector_sync_job_id' missing"
  end

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _connector_sync_job_id = arguments.delete(:connector_sync_job_id)

  method = Elasticsearch::API::HTTP_PUT
  path   = "_connector/_sync_job/#{Utils.__listify(_connector_sync_job_id)}/_cancel"
  params = {}

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#check_in(arguments = {}) ⇒ Object

Checks in a connector sync job (refreshes ‘last_seen’). This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :connector_sync_job_id (String)

    The unique identifier of the connector sync job to be checked in

  • :headers (Hash)

    Custom HTTP headers

See Also:



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/elasticsearch/api/actions/connector_sync_job/check_in.rb', line 36

def check_in(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.check_in' }

  defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  unless arguments[:connector_sync_job_id]
    raise ArgumentError,
          "Required argument 'connector_sync_job_id' missing"
  end

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _connector_sync_job_id = arguments.delete(:connector_sync_job_id)

  method = Elasticsearch::API::HTTP_PUT
  path   = "_connector/_sync_job/#{Utils.__listify(_connector_sync_job_id)}/_check_in"
  params = {}

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#delete(arguments = {}) ⇒ Object

Deletes a connector sync job. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :connector_sync_job_id (String)

    The unique identifier of the connector sync job to be deleted.

  • :headers (Hash)

    Custom HTTP headers

See Also:



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/elasticsearch/api/actions/connector_sync_job/delete.rb', line 36

def delete(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.delete' }

  defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  unless arguments[:connector_sync_job_id]
    raise ArgumentError,
          "Required argument 'connector_sync_job_id' missing"
  end

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _connector_sync_job_id = arguments.delete(:connector_sync_job_id)

  method = Elasticsearch::API::HTTP_DELETE
  path   = "_connector/_sync_job/#{Utils.__listify(_connector_sync_job_id)}"
  params = {}

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#error(arguments = {}) ⇒ Object

Sets an error for a connector sync job. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :connector_sync_job_id (String)

    The unique identifier of the connector sync job to set an error for.

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    The error to set in the connector sync job. (Required)

Raises:

  • (ArgumentError)

See Also:



37
38
39
40
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
# File 'lib/elasticsearch/api/actions/connector_sync_job/error.rb', line 37

def error(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.error' }

  defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  unless arguments[:connector_sync_job_id]
    raise ArgumentError,
          "Required argument 'connector_sync_job_id' missing"
  end

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = arguments.delete(:body)

  _connector_sync_job_id = arguments.delete(:connector_sync_job_id)

  method = Elasticsearch::API::HTTP_PUT
  path   = "_connector/_sync_job/#{Utils.__listify(_connector_sync_job_id)}/_error"
  params = {}

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#get(arguments = {}) ⇒ Object

Returns the details about a connector sync job. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :connector_sync_job_id (String)

    The unique identifier of the connector sync job to be returned.

  • :headers (Hash)

    Custom HTTP headers

See Also:



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/elasticsearch/api/actions/connector_sync_job/get.rb', line 36

def get(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.get' }

  defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  unless arguments[:connector_sync_job_id]
    raise ArgumentError,
          "Required argument 'connector_sync_job_id' missing"
  end

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _connector_sync_job_id = arguments.delete(:connector_sync_job_id)

  method = Elasticsearch::API::HTTP_GET
  path   = "_connector/_sync_job/#{Utils.__listify(_connector_sync_job_id)}"
  params = {}

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#list(arguments = {}) ⇒ Object

Lists all connector sync jobs. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :from (Integer)

    Starting offset (default: 0)

  • :size (Integer)

    specifies a max number of results to get (default: 100)

  • :status (String)

    Sync job status, which sync jobs are fetched for

  • :connector_id (String)

    Id of the connector to fetch the sync jobs for

  • :job_type (List)

    A comma-separated list of job types

  • :headers (Hash)

    Custom HTTP headers

See Also:



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/elasticsearch/api/actions/connector_sync_job/list.rb', line 40

def list(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.list' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_connector/_sync_job'
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#post(arguments = {}) ⇒ Object

Creates a connector sync job. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    The connector sync job data. (Required)

Raises:

  • (ArgumentError)

See Also:



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/elasticsearch/api/actions/connector_sync_job/post.rb', line 36

def post(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.post' }

  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = arguments.delete(:body)

  method = Elasticsearch::API::HTTP_POST
  path   = '_connector/_sync_job'
  params = {}

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#update_stats(arguments = {}) ⇒ Object

Updates the stats fields in the connector sync job document. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :connector_sync_job_id (String)

    The unique identifier of the connector sync job to be updated.

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    The stats to update for the connector sync job. (Required)

Raises:

  • (ArgumentError)

See Also:



37
38
39
40
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
# File 'lib/elasticsearch/api/actions/connector_sync_job/update_stats.rb', line 37

def update_stats(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.update_stats' }

  defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  unless arguments[:connector_sync_job_id]
    raise ArgumentError,
          "Required argument 'connector_sync_job_id' missing"
  end

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = arguments.delete(:body)

  _connector_sync_job_id = arguments.delete(:connector_sync_job_id)

  method = Elasticsearch::API::HTTP_PUT
  path   = "_connector/_sync_job/#{Utils.__listify(_connector_sync_job_id)}/_stats"
  params = {}

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end