NAME

OpenSearch::Client::Core::3_0::Direct::Security

VERSION

version 3.007009

SYNOPSIS

use OpenSearch::Client;

my $client = OpenSearch::Client->new( ... );

my $response = $client->security-><methodname>(
  valone => $value1,
  valtwo => $value2
);

DESCRIPTION

Security in OpenSearch

Manage access control and authentication tokens.

See OpenSearch documentation for security.

METHODS

authinfo

Returns or updates authentication information for the currently authenticated user.

Paths served by this method:

GET /_plugins/_security/authinfo
POST /_plugins/_security/authinfo

Method added in OpenSearch version 1.0

$resp = $client->security->authinfo(
    
     # Endpoint specific query string parameters
    
    'auth_type'    =>  $qval1,     # string
    'verbose'      =>  $qval2,     # boolean
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval3,     # boolean
    'filter_path'  =>  $qval4,     # list
    'human'        =>  $qval5,     # boolean
    'pretty'       =>  $qval6,     # boolean
    'source'       =>  $qval7,     # string
);

OpenSearch documentation for security->authinfo

authtoken

Returns the authorization token for the current user.

Paths served by this method:

POST /_plugins/_security/api/authtoken

Method added in OpenSearch version 1.0

$resp = $client->security->authtoken(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->authtoken

change_password

Changes the password for the current user.

Paths served by this method:

PUT /_plugins/_security/api/account

Method added in OpenSearch version 1.0

$resp = $client->security->change_password(
    
    'body'         =>  $body,      # optional
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->change_password

config_upgrade_check

Checks whether or not an upgrade can be performed and which security resources can be updated.

Paths served by this method:

GET /_plugins/_security/api/_upgrade_check

Method added in OpenSearch version 2.14

$resp = $client->security->config_upgrade_check(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->config_upgrade_check

config_upgrade_perform

Assists the cluster operator with upgrading missing default values and stale default definitions.

Paths served by this method:

POST /_plugins/_security/api/_upgrade_perform

Method added in OpenSearch version 2.14

$resp = $client->security->config_upgrade_perform(
    
    'body'         =>  $body,      # optional
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->config_upgrade_perform

create_action_group

Creates or replaces the specified action group.

Paths served by this method:

PUT /_plugins/_security/api/actiongroups/{action_group}

Method added in OpenSearch version 1.0

$resp = $client->security->create_action_group(
    
    'body'          =>  $body,      # optional
    
     # path parameters
    
    'action_group'  =>  $action_group,  # required
    
     # Common API query string parameters
    
    'error_trace'   =>  $qval1,     # boolean
    'filter_path'   =>  $qval2,     # list
    'human'         =>  $qval3,     # boolean
    'pretty'        =>  $qval4,     # boolean
    'source'        =>  $qval5,     # string
);

OpenSearch documentation for security->create_action_group

create_allowlist

Creates or replaces APIs permitted for users on the allow list. Requires a super admin certificate or REST API permissions.

Paths served by this method:

PUT /_plugins/_security/api/allowlist

Method added in OpenSearch version 2.1

$resp = $client->security->create_allowlist(
    
    'body'         =>  $body,      # optional
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->create_allowlist

create_role

Creates or replaces the specified role.

Paths served by this method:

PUT /_plugins/_security/api/roles/{role}

Method added in OpenSearch version 1.0

$resp = $client->security->create_role(
    
    'body'         =>  $body,      # optional
    
     # path parameters
    
    'role'         =>  $role,      # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->create_role

create_role_mapping

Creates or replaces the specified role mapping.

Paths served by this method:

PUT /_plugins/_security/api/rolesmapping/{role}

Method added in OpenSearch version 1.0

$resp = $client->security->create_role_mapping(
    
    'body'         =>  $body,      # optional
    
     # path parameters
    
    'role'         =>  $role,      # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->create_role_mapping

create_tenant

Creates or replaces the specified tenant.

Paths served by this method:

PUT /_plugins/_security/api/tenants/{tenant}

Method added in OpenSearch version 1.0

$resp = $client->security->create_tenant(
    
    'body'         =>  $body,      # optional
    
     # path parameters
    
    'tenant'       =>  $tenant,    # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->create_tenant

create_update_tenancy_config

Creates or replaces the multi-tenancy configuration. Requires super admin or REST API permissions.

Paths served by this method:

PUT /_plugins/_security/api/tenancy/config

Method added in OpenSearch version 2.7

$resp = $client->security->create_update_tenancy_config(
    
    'body'         =>  $body,      # optional
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->create_update_tenancy_config

create_user

Creates or replaces the specified user.

Paths served by this method:

PUT /_plugins/_security/api/internalusers/{username}

Method added in OpenSearch version 1.0

$resp = $client->security->create_user(
    
    'body'         =>  $body,      # optional
    
     # path parameters
    
    'username'     =>  $username,  # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->create_user

create_user_legacy

Creates or replaces the specified user. Legacy API.

Paths served by this method:

PUT /_plugins/_security/api/user/{username}

Method added in OpenSearch version 1.0

$resp = $client->security->create_user_legacy(
    
    'body'         =>  $body,      # optional
    
     # path parameters
    
    'username'     =>  $username,  # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->create_user_legacy

delete_action_group

Deletes the specified action group.

Paths served by this method:

DELETE /_plugins/_security/api/actiongroups/{action_group}

Method added in OpenSearch version 1.0

$resp = $client->security->delete_action_group(
    
     # path parameters
    
    'action_group'  =>  $action_group,  # required
    
     # Common API query string parameters
    
    'error_trace'   =>  $qval1,     # boolean
    'filter_path'   =>  $qval2,     # list
    'human'         =>  $qval3,     # boolean
    'pretty'        =>  $qval4,     # boolean
    'source'        =>  $qval5,     # string
);

OpenSearch documentation for security->delete_action_group

delete_distinguished_name

Deletes all distinguished names in the specified cluster or node allowlist. Requires super admin or REST API permissions.

Paths served by this method:

DELETE /_plugins/_security/api/nodesdn/{cluster_name}

Method added in OpenSearch version 1.0

$resp = $client->security->delete_distinguished_name(
    
     # path parameters
    
    'cluster_name'  =>  $cluster_name,  # required
    
     # Common API query string parameters
    
    'error_trace'   =>  $qval1,     # boolean
    'filter_path'   =>  $qval2,     # list
    'human'         =>  $qval3,     # boolean
    'pretty'        =>  $qval4,     # boolean
    'source'        =>  $qval5,     # string
);

OpenSearch documentation for security->delete_distinguished_name

delete_role

Deletes the specified role.

Paths served by this method:

DELETE /_plugins/_security/api/roles/{role}

Method added in OpenSearch version 1.0

$resp = $client->security->delete_role(
    
     # path parameters
    
    'role'         =>  $role,      # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->delete_role

delete_role_mapping

Deletes the specified role mapping.

Paths served by this method:

DELETE /_plugins/_security/api/rolesmapping/{role}

Method added in OpenSearch version 1.0

$resp = $client->security->delete_role_mapping(
    
     # path parameters
    
    'role'         =>  $role,      # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->delete_role_mapping

delete_tenant

Deletes the specified tenant.

Paths served by this method:

DELETE /_plugins/_security/api/tenants/{tenant}

Method added in OpenSearch version 1.0

$resp = $client->security->delete_tenant(
    
     # path parameters
    
    'tenant'       =>  $tenant,    # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->delete_tenant

delete_user

Deletes the specified internal user.

Paths served by this method:

DELETE /_plugins/_security/api/internalusers/{username}

Method added in OpenSearch version 1.0

$resp = $client->security->delete_user(
    
     # path parameters
    
    'username'     =>  $username,  # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->delete_user

delete_user_legacy

Delete the specified user. Legacy API.

Paths served by this method:

DELETE /_plugins/_security/api/user/{username}

Method added in OpenSearch version 1.0

$resp = $client->security->delete_user_legacy(
    
     # path parameters
    
    'username'     =>  $username,  # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->delete_user_legacy

flush_cache

Flushes the Security plugin's user, authentication, and authorization cache.

Paths served by this method:

DELETE /_plugins/_security/api/cache

Method added in OpenSearch version 1.0

$resp = $client->security->flush_cache(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->flush_cache

generate_obo_token

Generates a `On-Behalf-Of` token for the current user.

Paths served by this method:

POST /_plugins/_security/api/generateonbehalfoftoken

Method added in OpenSearch version 2.12

$resp = $client->security->generate_obo_token(
    
    'body'         =>  $body,      # optional
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->generate_obo_token

generate_user_token

Generates an authorization token for the specified user.

Paths served by this method:

POST /_plugins/_security/api/internalusers/{username}/authtoken

Method added in OpenSearch version 2.7

$resp = $client->security->generate_user_token(
    
     # path parameters
    
    'username'     =>  $username,  # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->generate_user_token

generate_user_token_legacy

Generates authorization token for the given user. Legacy API. Not Implemented.

Paths served by this method:

POST /_plugins/_security/api/user/{username}/authtoken

Method added in OpenSearch version 2.7

$resp = $client->security->generate_user_token_legacy(
    
     # path parameters
    
    'username'     =>  $username,  # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->generate_user_token_legacy

get_account_details

Returns account information for the current user.

Paths served by this method:

GET /_plugins/_security/api/account

Method added in OpenSearch version 1.0

$resp = $client->security->get_account_details(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->get_account_details

get_action_group

Retrieves one action group.

Paths served by this method:

GET /_plugins/_security/api/actiongroups/{action_group}

Method added in OpenSearch version 1.0

$resp = $client->security->get_action_group(
    
     # path parameters
    
    'action_group'  =>  $action_group,  # required
    
     # Common API query string parameters
    
    'error_trace'   =>  $qval1,     # boolean
    'filter_path'   =>  $qval2,     # list
    'human'         =>  $qval3,     # boolean
    'pretty'        =>  $qval4,     # boolean
    'source'        =>  $qval5,     # string
);

OpenSearch documentation for security->get_action_group

get_action_groups

Retrieves all action groups.

Paths served by this method:

GET /_plugins/_security/api/actiongroups

Method added in OpenSearch version 1.0

$resp = $client->security->get_action_groups(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->get_action_groups

get_all_certificates

Retrieves the cluster security certificates.

Paths served by this method:

GET /_plugins/_security/api/certificates

Method added in OpenSearch version 2.15

$resp = $client->security->get_all_certificates(
    
     # Endpoint specific query string parameters
    
    'cert_type'    =>  $qval1,     # string
    'timeout'      =>  $qval2,     # string
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval3,     # boolean
    'filter_path'  =>  $qval4,     # list
    'human'        =>  $qval5,     # boolean
    'pretty'       =>  $qval6,     # boolean
    'source'       =>  $qval7,     # string
);

OpenSearch documentation for security->get_all_certificates

get_allowlist

Retrieves the current list of allowed APIs accessible to a normal user.

Paths served by this method:

GET /_plugins/_security/api/allowlist

Method added in OpenSearch version 2.1

$resp = $client->security->get_allowlist(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->get_allowlist

get_audit_configuration

Retrieves the audit configuration.

Paths served by this method:

GET /_plugins/_security/api/audit

Method added in OpenSearch version 1.0

$resp = $client->security->get_audit_configuration(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->get_audit_configuration

get_certificates

Retrieves the cluster security certificates.

Paths served by this method:

GET /_plugins/_security/api/ssl/certs

Method added in OpenSearch version 2.0

$resp = $client->security->get_certificates(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->get_certificates

get_configuration

Returns the current Security plugin configuration in a JSON format.

Paths served by this method:

GET /_plugins/_security/api/securityconfig

Method added in OpenSearch version 2.10

$resp = $client->security->get_configuration(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->get_configuration

get_dashboards_info

Retrieves the current values for dynamic security settings for OpenSearch Dashboards.

Paths served by this method:

GET /_plugins/_security/dashboardsinfo

Method added in OpenSearch version 1.0

$resp = $client->security->get_dashboards_info(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->get_dashboards_info

get_distinguished_name

Retrieves all node distinguished names. Requires super admin or REST API permissions.

Paths served by this method:

GET /_plugins/_security/api/nodesdn/{cluster_name}

Method added in OpenSearch version 1.0

$resp = $client->security->get_distinguished_name(
    
     # path parameters
    
    'cluster_name'  =>  $cluster_name,  # required
    
     # Endpoint specific query string parameters
    
    'show_all'      =>  $qval1,     # boolean
    
     # Common API query string parameters
    
    'error_trace'   =>  $qval2,     # boolean
    'filter_path'   =>  $qval3,     # list
    'human'         =>  $qval4,     # boolean
    'pretty'        =>  $qval5,     # boolean
    'source'        =>  $qval6,     # string
);

OpenSearch documentation for security->get_distinguished_name

get_distinguished_names

Retrieves all node distinguished names. Requires super admin or REST API permissions.

Paths served by this method:

GET /_plugins/_security/api/nodesdn

Method added in OpenSearch version 1.0

$resp = $client->security->get_distinguished_names(
    
     # Endpoint specific query string parameters
    
    'show_all'     =>  $qval1,     # boolean
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval2,     # boolean
    'filter_path'  =>  $qval3,     # list
    'human'        =>  $qval4,     # boolean
    'pretty'       =>  $qval5,     # boolean
    'source'       =>  $qval6,     # string
);

OpenSearch documentation for security->get_distinguished_names

get_node_certificates

Retrieves the specified node's security certificates.

Paths served by this method:

GET /_plugins/_security/api/certificates/{node_id}

Method added in OpenSearch version 2.15

$resp = $client->security->get_node_certificates(
    
     # path parameters
    
    'node_id'      =>  $node_id,   # required
    
     # Endpoint specific query string parameters
    
    'cert_type'    =>  $qval1,     # string
    'timeout'      =>  $qval2,     # string
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval3,     # boolean
    'filter_path'  =>  $qval4,     # list
    'human'        =>  $qval5,     # boolean
    'pretty'       =>  $qval6,     # boolean
    'source'       =>  $qval7,     # string
);

OpenSearch documentation for security->get_node_certificates

get_permissions_info

Retrieves the evaluated REST API permissions for the currently logged in user.

Paths served by this method:

GET /_plugins/_security/api/permissionsinfo

Method added in OpenSearch version 1.0

$resp = $client->security->get_permissions_info(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->get_permissions_info

get_role

Retrieves one role.

Paths served by this method:

GET /_plugins/_security/api/roles/{role}

Method added in OpenSearch version 1.0

$resp = $client->security->get_role(
    
     # path parameters
    
    'role'         =>  $role,      # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->get_role

get_role_mapping

Retrieves the specified role mapping.

Paths served by this method:

GET /_plugins/_security/api/rolesmapping/{role}

Method added in OpenSearch version 1.0

$resp = $client->security->get_role_mapping(
    
     # path parameters
    
    'role'         =>  $role,      # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->get_role_mapping

get_role_mappings

Retrieves all role mappings.

Paths served by this method:

GET /_plugins/_security/api/rolesmapping

Method added in OpenSearch version 1.0

$resp = $client->security->get_role_mappings(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->get_role_mappings

get_roles

Retrieves all roles.

Paths served by this method:

GET /_plugins/_security/api/roles

Method added in OpenSearch version 1.0

$resp = $client->security->get_roles(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->get_roles

get_sslinfo

Retrieves information about the SSL configuration.

Paths served by this method:

GET /_opendistro/_security/sslinfo

Method added in OpenSearch version 1.0

$resp = $client->security->get_sslinfo(
    
     # Endpoint specific query string parameters
    
    'show_dn'      =>  $qval1,     # boolean
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval2,     # boolean
    'filter_path'  =>  $qval3,     # list
    'human'        =>  $qval4,     # boolean
    'pretty'       =>  $qval5,     # boolean
    'source'       =>  $qval6,     # string
);

OpenSearch documentation for security->get_sslinfo

get_tenancy_config

Retrieves the multi-tenancy configuration. Requires super admin or REST API permissions.

Paths served by this method:

GET /_plugins/_security/api/tenancy/config

Method added in OpenSearch version 2.7

$resp = $client->security->get_tenancy_config(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->get_tenancy_config

get_tenant

Retrieves the specified tenant.

Paths served by this method:

GET /_plugins/_security/api/tenants/{tenant}

Method added in OpenSearch version 1.0

$resp = $client->security->get_tenant(
    
     # path parameters
    
    'tenant'       =>  $tenant,    # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->get_tenant

get_tenants

Retrieves all tenants.

Paths served by this method:

GET /_plugins/_security/api/tenants

Method added in OpenSearch version 1.0

$resp = $client->security->get_tenants(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->get_tenants

get_user

Retrieve information about the specified internal user.

Paths served by this method:

GET /_plugins/_security/api/internalusers/{username}

Method added in OpenSearch version 1.0

$resp = $client->security->get_user(
    
     # path parameters
    
    'username'     =>  $username,  # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->get_user

get_user_legacy

Retrieve one user. Legacy API.

Paths served by this method:

GET /_plugins/_security/api/user/{username}

Method added in OpenSearch version 1.0

$resp = $client->security->get_user_legacy(
    
     # path parameters
    
    'username'     =>  $username,  # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->get_user_legacy

get_users

Retrieve all internal users.

Paths served by this method:

GET /_plugins/_security/api/internalusers

Method added in OpenSearch version 1.0

$resp = $client->security->get_users(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->get_users

get_users_legacy

Retrieve all internal users. Legacy API.

Paths served by this method:

GET /_plugins/_security/api/user

Method added in OpenSearch version 1.0

$resp = $client->security->get_users_legacy(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->get_users_legacy

health

Checks to see if the Security plugin is running.

Paths served by this method:

GET /_plugins/_security/health
POST /_plugins/_security/health

Method added in OpenSearch version 1.0

$resp = $client->security->health(
    
     # Endpoint specific query string parameters
    
    'mode'         =>  $qval1,     # string
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval2,     # boolean
    'filter_path'  =>  $qval3,     # list
    'human'        =>  $qval4,     # boolean
    'pretty'       =>  $qval5,     # boolean
    'source'       =>  $qval6,     # string
);

OpenSearch documentation for security->health

migrate

Migrates the security configuration from v6 to v7.

Paths served by this method:

POST /_plugins/_security/api/migrate

Method added in OpenSearch version 1.0

$resp = $client->security->migrate(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->migrate

patch_action_group

Updates the individual attributes of an action group.

Paths served by this method:

PATCH /_plugins/_security/api/actiongroups/{action_group}

Method added in OpenSearch version 1.0

$resp = $client->security->patch_action_group(
    
    'body'          =>  $body,      # optional
    
     # path parameters
    
    'action_group'  =>  $action_group,  # required
    
     # Common API query string parameters
    
    'error_trace'   =>  $qval1,     # boolean
    'filter_path'   =>  $qval2,     # list
    'human'         =>  $qval3,     # boolean
    'pretty'        =>  $qval4,     # boolean
    'source'        =>  $qval5,     # string
);

OpenSearch documentation for security->patch_action_group

patch_action_groups

Creates, updates, or deletes multiple action groups in a single request.

Paths served by this method:

PATCH /_plugins/_security/api/actiongroups

Method added in OpenSearch version 1.0

$resp = $client->security->patch_action_groups(
    
    'body'         =>  $body,      # optional
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->patch_action_groups

patch_allowlist

Updates the current list of APIs accessible for users on the allow list.

Paths served by this method:

PATCH /_plugins/_security/api/allowlist

Method added in OpenSearch version 2.1

$resp = $client->security->patch_allowlist(
    
    'body'         =>  $body,      # optional
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->patch_allowlist

patch_audit_configuration

Updates the specified fields in the audit configuration.

Paths served by this method:

PATCH /_plugins/_security/api/audit

Method added in OpenSearch version 1.0

$resp = $client->security->patch_audit_configuration(
    
    'body'         =>  $body,      # optional
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->patch_audit_configuration

patch_configuration

Updates the existing security configuration using the REST API. Requires super admin or REST API permissions.

Paths served by this method:

PATCH /_plugins/_security/api/securityconfig

Method added in OpenSearch version 2.10

$resp = $client->security->patch_configuration(
    
    'body'         =>  $body,      # optional
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->patch_configuration

patch_distinguished_name

Updates the distinguished cluster name for the specified cluster. Requires super admin or REST API permissions.

Paths served by this method:

PATCH /_plugins/_security/api/nodesdn/{cluster_name}

Method added in OpenSearch version 1.0

$resp = $client->security->patch_distinguished_name(
    
    'body'          =>  $body,      # optional
    
     # path parameters
    
    'cluster_name'  =>  $cluster_name,  # required
    
     # Common API query string parameters
    
    'error_trace'   =>  $qval1,     # boolean
    'filter_path'   =>  $qval2,     # list
    'human'         =>  $qval3,     # boolean
    'pretty'        =>  $qval4,     # boolean
    'source'        =>  $qval5,     # string
);

OpenSearch documentation for security->patch_distinguished_name

patch_distinguished_names

Bulk updates specified node distinguished names. Requires super admin or REST API permissions.

Paths served by this method:

PATCH /_plugins/_security/api/nodesdn

Method added in OpenSearch version 1.0

$resp = $client->security->patch_distinguished_names(
    
    'body'         =>  $body,      # optional
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->patch_distinguished_names

patch_role

Updates the individual attributes of a role.

Paths served by this method:

PATCH /_plugins/_security/api/roles/{role}

Method added in OpenSearch version 1.0

$resp = $client->security->patch_role(
    
    'body'         =>  $body,      # optional
    
     # path parameters
    
    'role'         =>  $role,      # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->patch_role

patch_role_mapping

Updates the individual attributes of a role mapping.

Paths served by this method:

PATCH /_plugins/_security/api/rolesmapping/{role}

Method added in OpenSearch version 1.0

$resp = $client->security->patch_role_mapping(
    
    'body'         =>  $body,      # optional
    
     # path parameters
    
    'role'         =>  $role,      # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->patch_role_mapping

patch_role_mappings

Creates or updates multiple role mappings in a single request.

Paths served by this method:

PATCH /_plugins/_security/api/rolesmapping

Method added in OpenSearch version 1.0

$resp = $client->security->patch_role_mappings(
    
    'body'         =>  $body,      # optional
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->patch_role_mappings

patch_roles

Creates, updates, or deletes multiple roles in a single call.

Paths served by this method:

PATCH /_plugins/_security/api/roles

Method added in OpenSearch version 1.0

$resp = $client->security->patch_roles(
    
    'body'         =>  $body,      # optional
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->patch_roles

patch_tenant

Adds, deletes, or modifies a single tenant.

Paths served by this method:

PATCH /_plugins/_security/api/tenants/{tenant}

Method added in OpenSearch version 1.0

$resp = $client->security->patch_tenant(
    
    'body'         =>  $body,      # optional
    
     # path parameters
    
    'tenant'       =>  $tenant,    # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->patch_tenant

patch_tenants

Adds, deletes, or modifies multiple tenants in a single request.

Paths served by this method:

PATCH /_plugins/_security/api/tenants

Method added in OpenSearch version 1.0

$resp = $client->security->patch_tenants(
    
    'body'         =>  $body,      # optional
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->patch_tenants

patch_user

Updates individual attributes for an internal user.

Paths served by this method:

PATCH /_plugins/_security/api/internalusers/{username}

Method added in OpenSearch version 1.0

$resp = $client->security->patch_user(
    
    'body'         =>  $body,      # optional
    
     # path parameters
    
    'username'     =>  $username,  # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->patch_user

patch_users

Creates, updates, or deletes multiple internal users in a single request.

Paths served by this method:

PATCH /_plugins/_security/api/internalusers

Method added in OpenSearch version 1.0

$resp = $client->security->patch_users(
    
    'body'         =>  $body,      # optional
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->patch_users

post_dashboards_info

Retrieves the current values for dynamic security settings for OpenSearch Dashboards.

Paths served by this method:

POST /_plugins/_security/dashboardsinfo

Method added in OpenSearch version 1.0

$resp = $client->security->post_dashboards_info(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->post_dashboards_info

reload_http_certificates

Reloads the HTTP communication certificates.

Paths served by this method:

PUT /_plugins/_security/api/ssl/http/reloadcerts

Method added in OpenSearch version 2.8

$resp = $client->security->reload_http_certificates(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->reload_http_certificates

reload_transport_certificates

Reloads the transport communication certificates.

Paths served by this method:

PUT /_plugins/_security/api/ssl/transport/reloadcerts

Method added in OpenSearch version 2.8

$resp = $client->security->reload_transport_certificates(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->reload_transport_certificates

tenant_info

Retrieves the names of current tenants. Requires super admin or `kibanaserver` permissions.

Paths served by this method:

GET /_plugins/_security/tenantinfo
POST /_plugins/_security/tenantinfo

Method added in OpenSearch version 1.0

$resp = $client->security->tenant_info(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->tenant_info

update_audit_configuration

Updates the audit configuration.

Paths served by this method:

PUT /_plugins/_security/api/audit/config

Method added in OpenSearch version 1.0

$resp = $client->security->update_audit_configuration(
    
    'body'         =>  $body,      # optional
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->update_audit_configuration

update_configuration

Updates the settings for an existing security configuration. Requires super admin or REST API permissions.

Paths served by this method:

PUT /_plugins/_security/api/securityconfig/config

Method added in OpenSearch version 2.10

$resp = $client->security->update_configuration(
    
    'body'         =>  $body,      # optional
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->update_configuration

update_distinguished_name

Adds or updates the specified distinguished names in the cluster or node allowlist. Requires super admin or REST API permissions.

Paths served by this method:

PUT /_plugins/_security/api/nodesdn/{cluster_name}

Method added in OpenSearch version 1.0

$resp = $client->security->update_distinguished_name(
    
    'body'          =>  $body,      # optional
    
     # path parameters
    
    'cluster_name'  =>  $cluster_name,  # required
    
     # Common API query string parameters
    
    'error_trace'   =>  $qval1,     # boolean
    'filter_path'   =>  $qval2,     # list
    'human'         =>  $qval3,     # boolean
    'pretty'        =>  $qval4,     # boolean
    'source'        =>  $qval5,     # string
);

OpenSearch documentation for security->update_distinguished_name

validate

Checks whether the v6 security configuration is valid and ready to be migrated to v7.

Paths served by this method:

GET /_plugins/_security/api/validate

Method added in OpenSearch version 1.0

$resp = $client->security->validate(
    
     # Endpoint specific query string parameters
    
    'accept_invalid'  =>  $qval1,     # boolean
    
     # Common API query string parameters
    
    'error_trace'     =>  $qval2,     # boolean
    'filter_path'     =>  $qval3,     # list
    'human'           =>  $qval4,     # boolean
    'pretty'          =>  $qval5,     # boolean
    'source'          =>  $qval6,     # string
);

OpenSearch documentation for security->validate

who_am_i

Gets the identity information for the user currently logged in.

Paths served by this method:

GET /_plugins/_security/whoami
POST /_plugins/_security/whoami

Method added in OpenSearch version 2.0

$resp = $client->security->who_am_i(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->who_am_i

who_am_i_protected

Gets the identity information for the user currently logged in. To use this operation, you must have access to this endpoint when authorization at REST layer is enabled.

Paths served by this method:

GET /_plugins/_security/whoamiprotected

Method added in OpenSearch version 2.11

$resp = $client->security->who_am_i_protected(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for security->who_am_i_protected

method_supported_in_version

Return whether a method in this module namespace is supported for an OpenSearch server version

my $boolean = $os->security->method_supported_in_version(
    method  => 'authinfo',
    version => '2.4.0'
);

Both method and version are required.

See also global_method_supported_in_version

MANUAL

Documentation index OpenSearch::Client::Manual

HISTORY

This distribution is derived from Search::Elasticsearch version 7.714. All subsequent changes are unique to this distribution.

AUTHOR

Mark Dootson <mdootson@cpan.org> ( current maintainer )

CREDITS

OpenSearch::Client is based on Search::Elasticsearch version 7.714 by Enrico Zimuel <enrico.zimuel@elastic.co>.

COPYRIGHT AND LICENSE

Copyright (C) 2026 by Mark Dootson ( this distribution )

Copyright (C) 2021 by Elasticsearch BV ( original distribution )

This is free software, licensed under:

The Apache License, Version 2.0, January 2004