stack es security create-cross-cluster-api-key cli command
Auth required
elastic stack es security create-cross-cluster-api-key \
--access <access> \
--name <name> \
[options]
Create a cross-cluster API key.
--accessstringrequired- The access to be granted to this API key. The access is composed of permissions for cross-cluster search and cross-cluster replication. At least one of them must be specified. NOTE: No explicit privileges should be specified for either search or replication access. The creation process automatically converts the access specification to a role descriptor which has relevant privileges assigned accordingly.
--namestringrequired- Specifies the name for this API key.
--expirationstring- Expiration time for the API key. By default, API keys never expire.
--metadatastring- Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with
_are reserved for system usage. --certificate-identitystring- The certificate identity to associate with this API key. This field is used to restrict the API key to connections authenticated by a specific TLS certificate. The value should match the certificate's distinguished name (DN) pattern.
--input-filestring- path to a JSON file to use as command input
-V--[no-]version- Print the Elastic CLI version
--config-filestring- path to a config file (default: ~/.elasticrc.yml)
--use-contextstring- override the active context from the config file
--command-profilestring- restrict available commands to a deployment profile (serverless, stack, default)
--[no-]json- output as JSON
--output-fieldsstring- comma-separated list of fields to include in output (dot-notation supported)
--output-templatestring- Mustache-like template for custom text output (e.g. "{{id}}: {{name}}")
--[no-]dry-run-
validate all inputs and exit without performing any action (preview changes without applying them)