Index Management Plugin

class opensearchpy.plugins.index_management.IndexManagementClient(client)[source]

Bases: NamespacedClient

Parameters:

client (Any) –

add_policy(index, body=None, params=None, headers=None)[source]

Adds a policy to an index. This operation does not change the policy if the index already has one.

Parameters:
  • index (Any) – The name of the index to add policy on

  • index

  • body (Any) –

  • params (Any) –

  • headers (Any) –

Return type:

Any

change_policy(index, body=None, params=None, headers=None)[source]

Updates the managed index policy to a new policy (or to a new version of the policy).

Parameters:
  • index (Any) – The name of the index to change policy on

  • index

  • body (Any) –

  • params (Any) –

  • headers (Any) –

Return type:

Any

delete_policy(policy, params=None, headers=None)[source]

Deletes the policy by policy_id.

Parameters:
  • policy (Any) – The name of the policy to delete

  • policy

  • params (Any) –

  • headers (Any) –

Return type:

Any

explain_index(index, params=None, headers=None)[source]

Gets the current state of the index.

Parameters:
  • index (Any) – The name of the index to explain

  • index

  • params (Any) –

  • headers (Any) –

Return type:

Any

get_policy(policy=None, params=None, headers=None)[source]

Gets the policy by policy_id; returns all policies if no policy_id is provided.

Parameters:
  • policy (Any) – The name of the policy

  • policy

  • params (Any) –

  • headers (Any) –

Return type:

Any

put_policy(policy, body=None, params=None, headers=None)[source]

Creates, or updates, a policy.

Parameters:
  • policy (Any) – The name of the policy

  • policy

  • body (Any) –

  • params (Any) –

  • headers (Any) –

Return type:

Any

remove_policy_from_index(index, params=None, headers=None)[source]

Removes any ISM policy from the index.

Parameters:
  • index (Any) – The name of the index to remove policy on

  • index

  • params (Any) –

  • headers (Any) –

Return type:

Any

retry(index, body=None, params=None, headers=None)[source]

Retries the failed action for an index.

Parameters:
  • index (Any) – The name of the index whose is in a failed state

  • index

  • body (Any) –

  • params (Any) –

  • headers (Any) –

Return type:

Any