Class EsqlLicenseChecker
java.lang.Object
org.elasticsearch.xpack.esql.session.EsqlLicenseChecker
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ElasticsearchStatusExceptioninvalidLicenseForCcsException(XPackLicenseState licenseState) static booleanisCcsAllowed(XPackLicenseState licenseState) Only call this method once you know the user is doing a cross-cluster query, as it will update the license_usage timestamp for the esql-ccs feature if the license is Enterprise (or Trial).
-
Field Details
-
CCS_FEATURE
-
-
Constructor Details
-
EsqlLicenseChecker
public EsqlLicenseChecker()
-
-
Method Details
-
isCcsAllowed
Only call this method once you know the user is doing a cross-cluster query, as it will update the license_usage timestamp for the esql-ccs feature if the license is Enterprise (or Trial).- Parameters:
licenseState-- Returns:
- true if the user has a license that allows ESQL CCS.
-
invalidLicenseForCcsException
public static ElasticsearchStatusException invalidLicenseForCcsException(XPackLicenseState licenseState) - Parameters:
licenseState- existing license state. Need to extract info on the current installed license.- Returns:
- ElasticsearchStatusException with an error message informing the caller what license is needed to run ES|QL cross-cluster searches and what license (if any) was found.
-