[[reference-shared-types-security]] //////// =========================================================================================================================== || || || || || || || ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ || || ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ || || ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ || || ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ || || ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ || || ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ || || || || || || This file is autogenerated, DO NOT send pull requests that changes this file directly. || || You should update the script that does the generation, which can be found in: || || https://github.com/elastic/elastic-client-generator-js || || || || You can run the script with the following command: || || npm run elasticsearch -- --version || || || || || || || =========================================================================================================================== //////// == Shared Security types [discrete] [[SecurityAccess]] === SecurityAccess [pass] ++++
++++
interface SecurityAccess {
  pass:[/**] @property replication A list of indices permission entries for cross-cluster replication. */
  replication?: <>[]
  pass:[/**] @property search A list of indices permission entries for cross-cluster search. */
  search?: <>[]
}
[pass]
++++
++++ [discrete] [[SecurityApiKey]] === SecurityApiKey [pass] ++++
++++
interface SecurityApiKey {
  pass:[/**] @property creation Creation time for the API key in milliseconds. */
  creation?: <>
  pass:[/**] @property expiration Expiration time for the API key in milliseconds. */
  expiration?: <>
  pass:[/**] @property id <> for the API key */
  id: <>
  pass:[/**] @property invalidated Invalidation status for the API key. If the key has been invalidated, it has a value of `true`. Otherwise, it is `false`. */
  invalidated?: boolean
  pass:[/**] @property name <> of the API key. */
  name: <>
  pass:[/**] @property realm Realm name of the principal for which this API key was created. */
  realm?: string
  pass:[/**] @property realm_type Realm type of the principal for which this API key was created */
  realm_type?: string
  pass:[/**] @property username Principal for which this API key was created */
  username?: <>
  pass:[/**] @property profile_uid The profile uid for the API key owner principal, if requested and if it exists */
  profile_uid?: string
  pass:[/**] @property metadata <> of the API key */
  metadata?: <>
  pass:[/**] @property role_descriptors The role descriptors assigned to this API key when it was created or last updated. An empty role descriptor means the API key inherits the owner user’s permissions. */
  role_descriptors?: Record>>
  pass:[/**] @property limited_by The owner user’s permissions associated with the API key. It is a point-in-time snapshot captured at creation and subsequent updates. An API key’s effective permissions are an intersection of its assigned privileges and the owner user’s permissions. */
  limited_by?: Record>>[]
  _sort?: <>
}
[pass]
++++
++++ [discrete] [[SecurityApplicationGlobalUserPrivileges]] === SecurityApplicationGlobalUserPrivileges [pass] ++++
++++
interface SecurityApplicationGlobalUserPrivileges {
  manage: <>
}
[pass]
++++
++++ [discrete] [[SecurityApplicationPrivileges]] === SecurityApplicationPrivileges [pass] ++++
++++
interface SecurityApplicationPrivileges {
  pass:[/**] @property application The name of the application to which this entry applies. */
  application: string
  pass:[/**] @property privileges A list of strings, where each element is the name of an application privilege or action. */
  privileges: string[]
  pass:[/**] @property resources A list resources to which the privileges are applied. */
  resources: string[]
}
[pass]
++++
++++ [discrete] [[SecurityBulkError]] === SecurityBulkError [pass] ++++
++++
interface SecurityBulkError {
  pass:[/**] @property count The number of errors */
  count: <>
  pass:[/**] @property details Details about the errors, keyed by role name */
  details: Record>>
}
[pass]
++++
++++ [discrete] [[SecurityClusterNode]] === SecurityClusterNode [pass] ++++
++++
interface SecurityClusterNode {
  name: <>
}
[pass]
++++
++++ [discrete] [[SecurityClusterPrivilege]] === SecurityClusterPrivilege [pass] ++++
++++
type SecurityClusterPrivilege = 'all' | 'cancel_task' | 'create_snapshot' | 'cross_cluster_replication' | 'cross_cluster_search' | 'delegate_pki' | 'grant_api_key' | 'manage' | 'manage_api_key' | 'manage_autoscaling' | 'manage_behavioral_analytics' | 'manage_ccr' | 'manage_data_frame_transforms' | 'manage_data_stream_global_retention' | 'manage_enrich' | 'manage_ilm' | 'manage_index_templates' | 'manage_inference' | 'manage_ingest_pipelines' | 'manage_logstash_pipelines' | 'manage_ml' | 'manage_oidc' | 'manage_own_api_key' | 'manage_pipeline' | 'manage_rollup' | 'manage_saml' | 'manage_search_application' | 'manage_search_query_rules' | 'manage_search_synonyms' | 'manage_security' | 'manage_service_account' | 'manage_slm' | 'manage_token' | 'manage_transform' | 'manage_user_profile' | 'manage_watcher' | 'monitor' | 'monitor_data_frame_transforms' | 'monitor_data_stream_global_retention' | 'monitor_enrich' | 'monitor_inference' | 'monitor_ml' | 'monitor_rollup' | 'monitor_snapshot' | 'monitor_text_structure' | 'monitor_transform' | 'monitor_watcher' | 'none' | 'post_behavioral_analytics_event' | 'read_ccr' | 'read_fleet_secrets' | 'read_ilm' | 'read_pipeline' | 'read_security' | 'read_slm' | 'transport_client' | 'write_connector_secrets' | 'write_fleet_secrets' | string
[pass]
++++
++++ [discrete] [[SecurityCreatedStatus]] === SecurityCreatedStatus [pass] ++++
++++
interface SecurityCreatedStatus {
  created: boolean
}
[pass]
++++
++++ [discrete] [[SecurityFieldRule]] === SecurityFieldRule [pass] ++++
++++
interface SecurityFieldRule {
  username?: <>
  dn?: <>
  groups?: <>
}
[pass]
++++
++++ [discrete] [[SecurityFieldSecurity]] === SecurityFieldSecurity [pass] ++++
++++
interface SecurityFieldSecurity {
  except?: <>
  grant?: <>
}
[pass]
++++
++++ [discrete] [[SecurityGlobalPrivilege]] === SecurityGlobalPrivilege [pass] ++++
++++
interface SecurityGlobalPrivilege {
  application: <>
}
[pass]
++++
++++ [discrete] [[SecurityGrantType]] === SecurityGrantType [pass] ++++
++++
type SecurityGrantType = 'password' | 'access_token'
[pass]
++++
++++ [discrete] [[SecurityIndexPrivilege]] === SecurityIndexPrivilege [pass] ++++
++++
type SecurityIndexPrivilege = 'all' | 'auto_configure' | 'create' | 'create_doc' | 'create_index' | 'cross_cluster_replication' | 'cross_cluster_replication_internal' | 'delete' | 'delete_index' | 'index' | 'maintenance' | 'manage' | 'manage_data_stream_lifecycle' | 'manage_follow_index' | 'manage_ilm' | 'manage_leader_index' | 'monitor' | 'none' | 'read' | 'read_cross_cluster' | 'view_index_metadata' | 'write' | string
[pass]
++++
++++ [discrete] [[SecurityIndicesPrivileges]] === SecurityIndicesPrivileges [pass] ++++
++++
interface SecurityIndicesPrivileges {
  pass:[/**] @property field_security The document fields that the owners of the role have read access to. */
  field_security?: <>
  pass:[/**] @property names A list of indices (or index name patterns) to which the permissions in this entry apply. */
  names: <>
  pass:[/**] @property privileges The index level privileges that owners of the role have on the specified indices. */
  privileges: <>[]
  pass:[/**] @property query A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role. */
  query?: <>
  pass:[/**] @property allow_restricted_indices Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`. */
  allow_restricted_indices?: boolean
}
[pass]
++++
++++ [discrete] [[SecurityIndicesPrivilegesQuery]] === SecurityIndicesPrivilegesQuery [pass] ++++
++++
type SecurityIndicesPrivilegesQuery = string | <> | <>
[pass]
++++
++++ [discrete] [[SecurityManageUserPrivileges]] === SecurityManageUserPrivileges [pass] ++++
++++
interface SecurityManageUserPrivileges {
  applications: string[]
}
[pass]
++++
++++ [discrete] [[SecurityRealmInfo]] === SecurityRealmInfo [pass] ++++
++++
interface SecurityRealmInfo {
  name: <>
  type: string
}
[pass]
++++
++++ [discrete] [[SecurityRemoteIndicesPrivileges]] === SecurityRemoteIndicesPrivileges [pass] ++++
++++
interface SecurityRemoteIndicesPrivileges {
  pass:[/**] @property clusters A list of cluster aliases to which the permissions in this entry apply. */
  clusters: <>
  pass:[/**] @property field_security The document fields that the owners of the role have read access to. */
  field_security?: <>
  pass:[/**] @property names A list of indices (or index name patterns) to which the permissions in this entry apply. */
  names: <>
  pass:[/**] @property privileges The index level privileges that owners of the role have on the specified indices. */
  privileges: <>[]
  pass:[/**] @property query A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role. */
  query?: <>
  pass:[/**] @property allow_restricted_indices Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`. */
  allow_restricted_indices?: boolean
}
[pass]
++++
++++ [discrete] [[SecurityReplicationAccess]] === SecurityReplicationAccess [pass] ++++
++++
interface SecurityReplicationAccess {
  pass:[/**] @property names A list of indices (or index name patterns) to which the permissions in this entry apply. */
  names: <>[]
}
[pass]
++++
++++ [discrete] [[SecurityRoleDescriptor]] === SecurityRoleDescriptor [pass] ++++
++++
interface SecurityRoleDescriptor {
  pass:[/**] @property cluster A list of cluster privileges. These privileges define the cluster level actions that API keys are able to execute. */
  cluster?: <>[]
  pass:[/**] @property indices A list of indices permissions entries. */
  indices?: <>[]
  pass:[/**] @property index A list of indices permissions entries. */
  index?: <>[]
  pass:[/**] @property global An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges. */
  global?: <>[] | <>
  pass:[/**] @property applications A list of application privilege entries */
  applications?: <>[]
  pass:[/**] @property metadata Optional meta-data. Within the metadata object, keys that begin with `_` are reserved for system usage. */
  metadata?: <>
  pass:[/**] @property run_as A list of users that the API keys can impersonate. *Note*: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty `run_as` field, but a non-empty list will be rejected. */
  run_as?: string[]
  pass:[/**] @property description Optional description of the role descriptor */
  description?: string
  transient_metadata?: Record
}
[pass]
++++
++++ [discrete] [[SecurityRoleDescriptorRead]] === SecurityRoleDescriptorRead [pass] ++++
++++
interface SecurityRoleDescriptorRead {
  pass:[/**] @property cluster A list of cluster privileges. These privileges define the cluster level actions that API keys are able to execute. */
  cluster: <>[]
  pass:[/**] @property indices A list of indices permissions entries. */
  indices: <>[]
  pass:[/**] @property index A list of indices permissions entries. */
  index: <>[]
  pass:[/**] @property global An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges. */
  global?: <>[] | <>
  pass:[/**] @property applications A list of application privilege entries */
  applications?: <>[]
  pass:[/**] @property metadata Optional meta-data. Within the metadata object, keys that begin with `_` are reserved for system usage. */
  metadata?: <>
  pass:[/**] @property run_as A list of users that the API keys can impersonate. */
  run_as?: string[]
  pass:[/**] @property description Optional description of the role descriptor */
  description?: string
  transient_metadata?: Record
}
[pass]
++++
++++ [discrete] [[SecurityRoleMapping]] === SecurityRoleMapping [pass] ++++
++++
interface SecurityRoleMapping {
  enabled: boolean
  metadata: <>
  roles?: string[]
  role_templates?: <>[]
  rules: <>
}
[pass]
++++
++++ [discrete] [[SecurityRoleMappingRule]] === SecurityRoleMappingRule [pass] ++++
++++
interface SecurityRoleMappingRule {
  any?: <>[]
  all?: <>[]
  field?: <>
  except?: <>
}
[pass]
++++
++++ [discrete] [[SecurityRoleTemplate]] === SecurityRoleTemplate [pass] ++++
++++
interface SecurityRoleTemplate {
  format?: <>
  template: <