# License

class elasticsearch.client.LicenseClient

  To use this client, access `client.license` from an `Elasticsearch` client. For example:

      from elasticsearch import Elasticsearch

      # Create the client instance
      client = Elasticsearch(...)
      # Use the license client
      client.license.<method>(...)

  delete(*, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, timeout=None)

    Delete the license.

    When the license expires, your subscription level reverts to Basic.

    If the operator privileges feature is enabled, only operator users can use this API.

    https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-delete

    Parameters:

      - master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – The period to wait for a connection to the master node.

      - timeout (str | Literal[-1] | ~typing.Literal[0] | None) – The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

      - error_trace (bool | None)

      - filter_path (str | Sequence[str] | None)

      - human (bool | None)

      - pretty (bool | None)

    Return type:

      ObjectApiResponse[Any]

  get(*, accept_enterprise=None, error_trace=None, filter_path=None, human=None, local=None, pretty=None)

    Get license information.

    Get information about your Elastic license including its type, its status, when it was issued, and when it expires.

    > info If the master node is generating a new cluster state, the get license API may return a `404 Not Found` response. If you receive an unexpected 404 response after cluster startup, wait a short period and retry the request.

    https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-get

    Parameters:

      - accept_enterprise (bool | None) – If true, this parameter returns enterprise for Enterprise license types. If false, this parameter returns platinum for both platinum and enterprise license types. This behavior is maintained for backwards compatibility. This parameter is deprecated and will always be set to true in 8.x.

      - local (bool | None) – Specifies whether to retrieve local information. From 9.2 onwards the default value is true, which means the information is retrieved from the responding node. In earlier versions the default is false, which means the information is retrieved from the elected master node.

      - error_trace (bool | None)

      - filter_path (str | Sequence[str] | None)

      - human (bool | None)

      - pretty (bool | None)

    Return type:

      ObjectApiResponse[Any]

  get_basic_status(*, error_trace=None, filter_path=None, human=None, pretty=None)

    Get the basic license status.

    https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-get-basic-status

    Parameters:

      - error_trace (bool | None)

      - filter_path (str | Sequence[str] | None)

      - human (bool | None)

      - pretty (bool | None)

    Return type:

      ObjectApiResponse[Any]

  get_trial_status(*, error_trace=None, filter_path=None, human=None, pretty=None)

    Get the trial status.

    https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-get-trial-status

    Parameters:

      - error_trace (bool | None)

      - filter_path (str | Sequence[str] | None)

      - human (bool | None)

      - pretty (bool | None)

    Return type:

      ObjectApiResponse[Any]

  post(*, acknowledge=None, error_trace=None, filter_path=None, human=None, license=None, licenses=None, master_timeout=None, pretty=None, timeout=None, body=None)

    Update the license.

    You can update your license at runtime without shutting down your nodes. License updates take effect immediately. If the license you are installing does not support all of the features that were available with your previous license, however, you are notified in the response. You must then re-submit the API request with the acknowledge parameter set to true.

    NOTE: If Elasticsearch security features are enabled and you are installing a gold or higher license, you must enable TLS on the transport networking layer before you install the license. If the operator privileges feature is enabled, only operator users can use this API.

    https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-post

    Parameters:

      - acknowledge (bool | None) – To update a license, you must accept the acknowledge messages and set this parameter to true. In particular, if you are upgrading or downgrading a license, you must acknowlege the feature changes.

      - license (Mapping[str, Any] | None)

      - licenses (Sequence[Mapping[str, Any]] | None) – A sequence of one or more JSON documents containing the license information.

      - master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – The period to wait for a connection to the master node.

      - timeout (str | Literal[-1] | ~typing.Literal[0] | None) – The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

      - error_trace (bool | None)

      - filter_path (str | Sequence[str] | None)

      - human (bool | None)

      - pretty (bool | None)

      - body (Dict[str, Any] | None)

    Return type:

      ObjectApiResponse[Any]

  post_start_basic(*, acknowledge=None, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, timeout=None)

    Start a basic license.

    Start an indefinite basic license, which gives access to all the basic features.

    NOTE: In order to start a basic license, you must not currently have a basic license.

    If the basic license does not support all of the features that are available with your current license, however, you are notified in the response. You must then re-submit the API request with the `acknowledge` parameter set to `true`.

    To check the status of your basic license, use the get basic license API.

    https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-post-start-basic

    Parameters:

      - acknowledge (bool | None) – To start a basic license, you must accept the acknowledge messages and set this parameter to true.

      - master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Period to wait for a connection to the master node.

      - timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

      - error_trace (bool | None)

      - filter_path (str | Sequence[str] | None)

      - human (bool | None)

      - pretty (bool | None)

    Return type:

      ObjectApiResponse[Any]

  post_start_trial(*, acknowledge=None, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, type=None)

    Start a trial.

    Start a 30-day trial, which gives access to all subscription features.

    NOTE: You are allowed to start a trial only if your cluster has not already activated a trial for the current major product version. For example, if you have already activated a trial for v8.0, you cannot start a new trial until v9.0. You can, however, request an extended trial at https://www.elastic.co/trialextension.

    To check the status of your trial, use the get trial status API.

    https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-post-start-trial

    Parameters:

      - acknowledge (bool | None) – To start a trial, you must accept the acknowledge messages and set this parameter to true.

      - master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Period to wait for a connection to the master node.

      - type (str | None) – The type of trial license to generate

      - error_trace (bool | None)

      - filter_path (str | Sequence[str] | None)

      - human (bool | None)

      - pretty (bool | None)

    Return type:

      ObjectApiResponse[Any]