Security Client
- class opensearchpy.client.security.SecurityClient(client)[source]
Bases:
NamespacedClient
- Parameters:
client (Any) –
- change_password(body, params=None, headers=None)[source]
Changes the password for the current user.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
body (Any) –
params (Any) –
headers (Any) –
- Return type:
- create_action_group(action_group, body, params=None, headers=None)[source]
Creates or replaces the specified action group.
- Parameters:
action_group (Any) – The name of the action group to create or replace
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
action_group –
body (Any) –
params (Any) –
headers (Any) –
- Return type:
- create_role(role, body, params=None, headers=None)[source]
Creates or replaces the specified role.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
role (Any) –
body (Any) –
params (Any) –
headers (Any) –
- Return type:
- create_role_mapping(role, body, params=None, headers=None)[source]
Creates or replaces the specified role mapping.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
role (Any) –
body (Any) –
params (Any) –
headers (Any) –
- Return type:
- create_tenant(tenant, body, params=None, headers=None)[source]
Creates or replaces the specified tenant.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
tenant (Any) –
body (Any) –
params (Any) –
headers (Any) –
- Return type:
- create_user(username, body, params=None, headers=None)[source]
Creates or replaces the specified user.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
username (Any) –
body (Any) –
params (Any) –
headers (Any) –
- Return type:
- delete_action_group(action_group, params=None, headers=None)[source]
Delete a specified action group.
- Parameters:
action_group (Any) – Action group to delete.
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
action_group –
params (Any) –
headers (Any) –
- Return type:
- delete_distinguished_names(cluster_name, params=None, headers=None)[source]
Deletes all distinguished names in the specified cluster’s or node’s allow list.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
cluster_name (Any) –
params (Any) –
headers (Any) –
- Return type:
- delete_role(role, params=None, headers=None)[source]
Delete the specified role.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
role (Any) –
params (Any) –
headers (Any) –
- Return type:
- delete_role_mapping(role, params=None, headers=None)[source]
Deletes the specified role mapping.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
role (Any) –
params (Any) –
headers (Any) –
- Return type:
- delete_tenant(tenant, params=None, headers=None)[source]
Delete the specified tenant.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
tenant (Any) –
params (Any) –
headers (Any) –
- Return type:
- delete_user(username, params=None, headers=None)[source]
Delete the specified user.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
username (Any) –
params (Any) –
headers (Any) –
- Return type:
- flush_cache(params=None, headers=None)[source]
Flushes the Security plugin user, authentication, and authorization cache.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
params (Any) –
headers (Any) –
- Return type:
- get_account_details(params=None, headers=None)[source]
Returns account details for the current user.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
params (Any) –
headers (Any) –
- Return type:
- get_action_group(action_group, params=None, headers=None)[source]
Retrieves one action group.
- Parameters:
action_group (Any) – Action group to retrieve.
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
action_group –
params (Any) –
headers (Any) –
- Return type:
- get_action_groups(params=None, headers=None)[source]
Retrieves all action groups.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
params (Any) –
headers (Any) –
- Return type:
- get_audit_configuration(params=None, headers=None)[source]
Retrieves the audit configuration.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
params (Any) –
headers (Any) –
- Return type:
- get_certificates(params=None, headers=None)[source]
Retrieves the cluster’s security certificates.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
params (Any) –
headers (Any) –
- Return type:
- get_configuration(params=None, headers=None)[source]
Returns the current Security plugin configuration in JSON format.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
params (Any) –
headers (Any) –
- Return type:
- get_distinguished_names(cluster_name=None, params=None, headers=None)[source]
Retrieves distinguished names.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
cluster_name (Any) –
params (Any) –
headers (Any) –
- Return type:
- get_role(role, params=None, headers=None)[source]
Retrieves one role.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
role (Any) –
params (Any) –
headers (Any) –
- Return type:
- get_role_mapping(role, params=None, headers=None)[source]
Retrieves one role mapping.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
role (Any) –
params (Any) –
headers (Any) –
- Return type:
- get_role_mappings(params=None, headers=None)[source]
Retrieves all role mappings.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
params (Any) –
headers (Any) –
- Return type:
- get_roles(params=None, headers=None)[source]
Retrieves all roles.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
params (Any) –
headers (Any) –
- Return type:
- get_tenant(tenant, params=None, headers=None)[source]
Retrieves one tenant.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
tenant (Any) –
params (Any) –
headers (Any) –
- Return type:
- get_tenants(params=None, headers=None)[source]
Retrieves all tenants.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
params (Any) –
headers (Any) –
- Return type:
- get_user(username, params=None, headers=None)[source]
Retrieve one internal user.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
username (Any) –
params (Any) –
headers (Any) –
- Return type:
- get_users(params=None, headers=None)[source]
Retrieve all internal users.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
params (Any) –
headers (Any) –
- Return type:
- health(params=None, headers=None)[source]
Checks to see if the Security plugin is up and running.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
params (Any) –
headers (Any) –
- Return type:
- health_check(params=None, headers=None)
Checks to see if the Security plugin is up and running.
Warning
This API will be removed in a future version. Use ‘health’ API instead.
- patch_action_group(action_group, body, params=None, headers=None)[source]
Updates individual attributes of an action group.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
action_group (Any) –
body (Any) –
params (Any) –
headers (Any) –
- Return type:
- patch_action_groups(body, params=None, headers=None)[source]
Creates, updates, or deletes multiple action groups in a single call.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
body (Any) –
params (Any) –
headers (Any) –
- Return type:
- patch_audit_configuration(body, params=None, headers=None)[source]
A PATCH call is used to update specified fields in the audit configuration.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
body (Any) –
params (Any) –
headers (Any) –
- Return type:
- patch_configuration(body, params=None, headers=None)[source]
A PATCH call is used to update the existing configuration using the REST API.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
body (Any) –
params (Any) –
headers (Any) –
- Return type:
- patch_distinguished_names(body, params=None, headers=None)[source]
Bulk update of distinguished names.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
body (Any) –
params (Any) –
headers (Any) –
- Return type:
- patch_role(role, body, params=None, headers=None)[source]
Updates individual attributes of a role.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
role (Any) –
body (Any) –
params (Any) –
headers (Any) –
- Return type:
- patch_role_mapping(role, body, params=None, headers=None)[source]
Updates individual attributes of a role mapping.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
role (Any) –
body (Any) –
params (Any) –
headers (Any) –
- Return type:
- patch_role_mappings(body, params=None, headers=None)[source]
Creates or updates multiple role mappings in a single call.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
body (Any) –
params (Any) –
headers (Any) –
- Return type:
- patch_roles(body, params=None, headers=None)[source]
Creates, updates, or deletes multiple roles in a single call.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
body (Any) –
params (Any) –
headers (Any) –
- Return type:
- patch_tenant(tenant, body, params=None, headers=None)[source]
Add, delete, or modify a single tenant.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
tenant (Any) –
body (Any) –
params (Any) –
headers (Any) –
- Return type:
- patch_tenants(body, params=None, headers=None)[source]
Add, delete, or modify multiple tenants in a single call.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
body (Any) –
params (Any) –
headers (Any) –
- Return type:
- patch_user(username, body, params=None, headers=None)[source]
Updates individual attributes of an internal user.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
username (Any) –
body (Any) –
params (Any) –
headers (Any) –
- Return type:
- patch_users(body, params=None, headers=None)[source]
Creates, updates, or deletes multiple internal users in a single call.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
body (Any) –
params (Any) –
headers (Any) –
- Return type:
- reload_http_certificates(params=None, headers=None)[source]
Reload HTTP layer communication certificates.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
params (Any) –
headers (Any) –
- Return type:
- reload_transport_certificates(params=None, headers=None)[source]
Reload transport layer communication certificates.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
params (Any) –
headers (Any) –
- Return type:
- update_audit_config(body, params=None, headers=None)
A PUT call updates the audit configuration.
Warning
This API will be removed in a future version. Use ‘update_audit_configuration’ API instead.
- update_audit_configuration(body, params=None, headers=None)[source]
Updates the audit configuration.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
body (Any) –
params (Any) –
headers (Any) –
- Return type:
- update_configuration(body, params=None, headers=None)[source]
Adds or updates the existing configuration using the REST API.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
body (Any) –
params (Any) –
headers (Any) –
- Return type:
- update_distinguished_names(cluster_name, body=None, params=None, headers=None)[source]
Adds or updates the specified distinguished names in the cluster’s or node’s allow list.
- Parameters:
error_trace – Whether to include the stack trace of returned errors.
filter_path – Comma-separated list of filters used to reduce the response.
human – Whether to return human readable values for statistics.
pretty – Whether to pretty format the returned JSON response.
source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
cluster_name (Any) –
body (Any) –
params (Any) –
headers (Any) –
- Return type: