FleetOutputsClient¶
Client for the Kibana Fleet outputs and connectivity API.
This client manages where Elastic Agents send their data and how they reach the Elastic Stack: outputs (Elasticsearch, remote Elasticsearch, Logstash, Kafka), Fleet Server hosts, Fleet proxies, agent binary download sources, remote synced integrations status, and cloud connectors (technical preview in Kibana 9.4).
All methods accept an optional space_id to target a specific Kibana
space.
- class kibana._sync.client.fleet_outputs.FleetOutputsClient(client, default_space_id=None, validate_spaces=True)[source]¶
Bases:
NamespaceClientClient for the Kibana Fleet outputs and connectivity API.
Manages where Elastic Agents send their data and how they reach the Elastic Stack:
Outputs (
/api/fleet/outputs): Elasticsearch, remote Elasticsearch, Logstash and Kafka destinations for agent data.Fleet Server hosts (
/api/fleet/fleet_server_hosts): the URLs agents use to contact Fleet Server.Proxies (
/api/fleet/proxies): Fleet proxies that sit between agents and outputs, Fleet Server or the agent binary source.Agent binary download sources (
/api/fleet/agent_download_sources): the locations agents download their binaries from.Remote synced integrations (
/api/fleet/remote_synced_integrations): status of integration syncing to remote Elasticsearch outputs.Cloud connectors (
/api/fleet/cloud_connectors): reusable cloud credentials (AWS/Azure/GCP) shared by agentless package policies.
Every method accepts an optional
space_idto target a specific Kibana space (Nonetargets the default space or the space the client is scoped to).Example
>>> from kibana import Kibana >>> client = Kibana("http://localhost:5601", api_key="...") >>> >>> # List outputs, then create and delete a Logstash output >>> outputs = client.fleet_outputs.get_outputs() >>> created = client.fleet_outputs.create_output( ... name="my-logstash", ... type="logstash", ... hosts=["logstash.example.com:5044"], ... ) >>> client.fleet_outputs.delete_output( ... output_id=created.body["item"]["id"] ... )
Managing Outputs
Outputs define the destinations agents send data to. Type-specific properties (Kafka authentication, remote Elasticsearch sync settings, …) are passed via
fields:from kibana import Kibana client = Kibana("http://localhost:5601", api_key="your_api_key") # List outputs (the default Elasticsearch output always exists) outputs = client.fleet_outputs.get_outputs() for output in outputs.body["items"]: print(output["id"], output["type"], output["is_default"]) # Create a Logstash output created = client.fleet_outputs.create_output( name="my-logstash", type="logstash", hosts=["logstash.example.com:5044"], ) output_id = created.body["item"]["id"] # Create a Kafka output with type-specific fields kafka = client.fleet_outputs.create_output( name="my-kafka", type="kafka", hosts=["kafka.example.com:9092"], fields={ "auth_type": "user_pass", "username": "fleet", "password": "secret", "topic": "agent-events", }, ) # Rename, check health, then delete client.fleet_outputs.update_output(output_id=output_id, name="renamed") health = client.fleet_outputs.get_output_health(output_id=output_id) print(health.body["state"]) client.fleet_outputs.delete_output(output_id=output_id)
Fleet Server Hosts and Proxies
# Create a proxy and a Fleet Server host that connects through it proxy = client.fleet_outputs.create_proxy( name="my-proxy", url="https://proxy.example.com:3128" ) host = client.fleet_outputs.create_fleet_server_host( name="my-fleet-server", host_urls=["https://fleet.example.com:8220"], proxy_id=proxy.body["item"]["id"], ) # List, update and delete hosts = client.fleet_outputs.get_fleet_server_hosts() client.fleet_outputs.update_fleet_server_host( item_id=host.body["item"]["id"], name="renamed-fleet-server" ) client.fleet_outputs.delete_fleet_server_host( item_id=host.body["item"]["id"] ) client.fleet_outputs.delete_proxy(item_id=proxy.body["item"]["id"])
Agent Binary Download Sources
# Point agents at a private artifacts mirror source = client.fleet_outputs.create_agent_download_source( name="my-mirror", host="https://artifacts.example.com/downloads/", ) source_id = source.body["item"]["id"] # name and host are required on every update client.fleet_outputs.update_agent_download_source( source_id=source_id, name="my-mirror-renamed", host="https://artifacts.example.com/downloads/", ) client.fleet_outputs.delete_agent_download_source(source_id=source_id)
Remote Synced Integrations
# Status of integrations synced to this cluster status = client.fleet_outputs.get_remote_synced_integrations_status() print(status.body["integrations"]) # Status reported by the remote cluster behind a # remote_elasticsearch output with sync_integrations enabled remote = client.fleet_outputs.get_remote_synced_integrations_remote_status( output_id="my-remote-output-id" )
Cloud Connectors (Technical Preview)
Cloud connectors hold reusable cloud credentials. For AWS, the
external_idvar must be a secret reference:created = client.fleet_outputs.create_cloud_connector( name="arn:aws:iam::123456789012:role/my-role", cloud_provider="aws", vars={ "role_arn": { "value": "arn:aws:iam::123456789012:role/my-role", "type": "text", }, "external_id": { "value": {"id": "AbCdEfGhIjKlMnOpQrSt", "isSecretRef": True}, "type": "password", }, }, ) connector_id = created.body["item"]["id"] usage = client.fleet_outputs.get_cloud_connector_usage( cloud_connector_id=connector_id ) client.fleet_outputs.delete_cloud_connector( cloud_connector_id=connector_id, force=True )
- __init__(client, default_space_id=None, validate_spaces=True)[source]¶
Initialize the FleetOutputsClient.
- Parameters:
Example
>>> fleet_outputs_client = FleetOutputsClient(kibana_client)
- get_outputs(*, space_id=None, validate_spaces=None)[source]¶
Get outputs.
Lists all Fleet outputs, including the default Elasticsearch output.
- Parameters:
- Returns:
ObjectApiResponse containing
items(list of outputs), pluspage,perPageandtotal.- Raises:
BadRequestError – If the request is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> outputs = client.fleet_outputs.get_outputs() >>> for output in outputs.body["items"]: ... print(output["id"], output["type"], output["is_default"])
- create_output(*, name, type, hosts, id=None, is_default=None, is_default_monitoring=None, is_internal=None, is_preconfigured=None, allow_edit=None, ca_sha256=None, ca_trusted_fingerprint=None, config_yaml=None, preset=None, proxy_id=None, secrets=None, shipper=None, ssl=None, fields=None, space_id=None, validate_spaces=None)[source]¶
Create output.
Creates a Fleet output of type
elasticsearch,remote_elasticsearch,logstashorkafka. Type-specific properties (for example Kafka authentication or remote Elasticsearch sync settings) are passed viafields.- Parameters:
name (str) – The output name.
type (str) – The output type:
elasticsearch,remote_elasticsearch,logstashorkafka.hosts (list[str]) – The output host URLs (for example
["https://es.example.com:9200"]or, for Kafka,["kafka.example.com:9092"]).id (str | None) – Optional fixed ID for the output.
is_default (bool | None) – Whether this output is the default for agent data.
is_default_monitoring (bool | None) – Whether this output is the default for agent monitoring data.
is_internal (bool | None) – Whether the output is internal (hidden in the UI).
is_preconfigured (bool | None) – Whether the output is preconfigured.
allow_edit (list[str] | None) – List of properties that remain editable when the output is preconfigured.
ca_sha256 (str | None) – SHA-256 of the CA certificate used by agents.
ca_trusted_fingerprint (str | None) – Trusted fingerprint of the CA certificate.
config_yaml (str | None) – Advanced YAML configuration for the output.
preset (str | None) – Performance preset for Elasticsearch-like outputs:
balanced,custom,throughput,scaleorlatency.proxy_id (str | None) – ID of the Fleet proxy to reach this output through.
secrets (dict[str, Any] | None) – Secret values (for example
{"ssl": {"key": "..."}}or, for remote Elasticsearch,{"service_token": "..."}).shipper (dict[str, Any] | None) – Shipper settings (disk queue, compression, …).
ssl (dict[str, Any] | None) – SSL settings:
certificate,certificate_authorities,keyandverification_mode.fields (dict[str, Any] | None) – Additional type-specific properties merged into the request body verbatim, for example Kafka settings (
{"auth_type": "user_pass", "username": "...", "password": "...", "topic": "..."}) or remote Elasticsearch settings ({"service_token": "...", "sync_integrations": True, "kibana_url": "..."}).space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse with the created output under
item.- Raises:
BadRequestError – If the output definition is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> created = client.fleet_outputs.create_output( ... name="my-kafka", ... type="kafka", ... hosts=["kafka.example.com:9092"], ... fields={ ... "auth_type": "user_pass", ... "username": "fleet", ... "password": "secret", ... "topic": "agent-events", ... }, ... ) >>> print(created.body["item"]["id"])
- get_output(*, output_id, space_id=None, validate_spaces=None)[source]¶
Get output.
Gets a single Fleet output by ID.
- Parameters:
- Returns:
ObjectApiResponse with the output under
item.- Raises:
NotFoundError – If the output does not exist.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> output = client.fleet_outputs.get_output( ... output_id="fleet-default-output" ... ) >>> print(output.body["item"]["type"]) elasticsearch
- update_output(*, output_id, name=None, type=None, hosts=None, is_default=None, is_default_monitoring=None, is_internal=None, is_preconfigured=None, allow_edit=None, ca_sha256=None, ca_trusted_fingerprint=None, config_yaml=None, preset=None, proxy_id=None, secrets=None, shipper=None, ssl=None, fields=None, space_id=None, validate_spaces=None)[source]¶
Update output.
Updates a Fleet output by ID. Only the provided properties are sent; omitted properties keep their current values. Note that Kafka outputs require
nameon update.- Parameters:
output_id (str) – The output ID.
name (str | None) – The output name.
type (str | None) – The output type (change requires type-specific fields).
is_default (bool | None) – Whether this output is the default for agent data.
is_default_monitoring (bool | None) – Whether this output is the default for agent monitoring data.
is_internal (bool | None) – Whether the output is internal (hidden in the UI).
is_preconfigured (bool | None) – Whether the output is preconfigured.
allow_edit (list[str] | None) – List of properties that remain editable when the output is preconfigured.
ca_sha256 (str | None) – SHA-256 of the CA certificate used by agents.
ca_trusted_fingerprint (str | None) – Trusted fingerprint of the CA certificate.
config_yaml (str | None) – Advanced YAML configuration for the output.
preset (str | None) – Performance preset for Elasticsearch-like outputs:
balanced,custom,throughput,scaleorlatency.proxy_id (str | None) – ID of the Fleet proxy to reach this output through.
secrets (dict[str, Any] | None) – Secret values (see
create_output()).shipper (dict[str, Any] | None) – Shipper settings (disk queue, compression, …).
ssl (dict[str, Any] | None) – SSL settings:
certificate,certificate_authorities,keyandverification_mode.fields (dict[str, Any] | None) – Additional type-specific properties merged into the request body verbatim (see
create_output()).space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse with the updated output under
item.- Raises:
NotFoundError – If the output does not exist.
BadRequestError – If the update is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> updated = client.fleet_outputs.update_output( ... output_id="my-output-id", ... name="renamed-output", ... ) >>> print(updated.body["item"]["name"]) renamed-output
- delete_output(*, output_id, space_id=None, validate_spaces=None)[source]¶
Delete output.
Deletes a Fleet output by ID. The default output cannot be deleted.
- Parameters:
- Returns:
ObjectApiResponse containing the deleted output’s
id.- Raises:
NotFoundError – If the output does not exist.
BadRequestError – If the output cannot be deleted (for example the default output).
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> client.fleet_outputs.delete_output(output_id="my-output-id")
- get_output_health(*, output_id, space_id=None, validate_spaces=None)[source]¶
Get the latest output health.
Gets the most recent health report for an output. Outputs that have not been health-checked yet report
state: "UNKNOWN".- Parameters:
- Returns:
ObjectApiResponse containing
state,messageandtimestamp.- Raises:
NotFoundError – If the output does not exist.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> health = client.fleet_outputs.get_output_health( ... output_id="my-output-id" ... ) >>> print(health.body["state"])
- get_fleet_server_hosts(*, space_id=None, validate_spaces=None)[source]¶
Get Fleet Server hosts.
Lists all Fleet Server host configurations.
- Parameters:
- Returns:
ObjectApiResponse containing
items(list of Fleet Server hosts), pluspage,perPageandtotal.- Raises:
BadRequestError – If the request is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> hosts = client.fleet_outputs.get_fleet_server_hosts() >>> for host in hosts.body["items"]: ... print(host["id"], host["host_urls"])
- create_fleet_server_host(*, name, host_urls, id=None, is_default=None, is_internal=None, is_preconfigured=None, proxy_id=None, secrets=None, ssl=None, space_id=None, validate_spaces=None)[source]¶
Create a Fleet Server host.
- Parameters:
name (str) – The Fleet Server host name.
host_urls (list[str]) – The Fleet Server URLs agents connect to (for example
["https://fleet.example.com:8220"]).id (str | None) – Optional fixed ID for the Fleet Server host.
is_default (bool | None) – Whether this is the default Fleet Server host.
is_internal (bool | None) – Whether the host is internal (hidden in the UI).
is_preconfigured (bool | None) – Whether the host is preconfigured.
proxy_id (str | None) – ID of the Fleet proxy used to reach Fleet Server.
secrets (dict[str, Any] | None) – Secret values, for example
{"ssl": {"key": "...", "es_key": "...", "agent_key": "..."}}.ssl (dict[str, Any] | None) – SSL settings:
certificate,certificate_authorities,key,client_authpluses_*andagent_*variants for the Elasticsearch and agent connections.space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse with the created Fleet Server host under
item.- Raises:
BadRequestError – If the host definition is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> created = client.fleet_outputs.create_fleet_server_host( ... name="my-fleet-server", ... host_urls=["https://fleet.example.com:8220"], ... ) >>> print(created.body["item"]["id"])
- get_fleet_server_host(*, item_id, space_id=None, validate_spaces=None)[source]¶
Get a Fleet Server host.
Gets a single Fleet Server host by ID.
- Parameters:
- Returns:
ObjectApiResponse with the Fleet Server host under
item.- Raises:
NotFoundError – If the Fleet Server host does not exist.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> host = client.fleet_outputs.get_fleet_server_host( ... item_id="my-host-id" ... ) >>> print(host.body["item"]["host_urls"])
- update_fleet_server_host(*, item_id, name=None, host_urls=None, is_default=None, is_internal=None, proxy_id=None, secrets=None, ssl=None, space_id=None, validate_spaces=None)[source]¶
Update a Fleet Server host.
Updates a Fleet Server host by ID. Only the provided properties are sent; omitted properties keep their current values.
- Parameters:
item_id (str) – The Fleet Server host ID.
name (str | None) – The Fleet Server host name.
host_urls (list[str] | None) – The Fleet Server URLs agents connect to.
is_default (bool | None) – Whether this is the default Fleet Server host.
is_internal (bool | None) – Whether the host is internal (hidden in the UI).
proxy_id (str | None) – ID of the Fleet proxy used to reach Fleet Server.
secrets (dict[str, Any] | None) – Secret values (see
create_fleet_server_host()).ssl (dict[str, Any] | None) – SSL settings (see
create_fleet_server_host()).space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse with the updated Fleet Server host under
item.- Raises:
NotFoundError – If the Fleet Server host does not exist.
BadRequestError – If the update is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> updated = client.fleet_outputs.update_fleet_server_host( ... item_id="my-host-id", ... name="renamed-fleet-server", ... ) >>> print(updated.body["item"]["name"]) renamed-fleet-server
- delete_fleet_server_host(*, item_id, space_id=None, validate_spaces=None)[source]¶
Delete a Fleet Server host.
Deletes a Fleet Server host by ID.
- Parameters:
- Returns:
ObjectApiResponse containing the deleted host’s
id.- Raises:
NotFoundError – If the Fleet Server host does not exist.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> client.fleet_outputs.delete_fleet_server_host( ... item_id="my-host-id" ... )
- get_proxies(*, space_id=None, validate_spaces=None)[source]¶
Get proxies.
Lists all Fleet proxies.
- Parameters:
- Returns:
ObjectApiResponse containing
items(list of proxies), pluspage,perPageandtotal.- Raises:
BadRequestError – If the request is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> proxies = client.fleet_outputs.get_proxies() >>> for proxy in proxies.body["items"]: ... print(proxy["id"], proxy["url"])
- create_proxy(*, name, url, id=None, certificate=None, certificate_authorities=None, certificate_key=None, is_preconfigured=None, proxy_headers=None, space_id=None, validate_spaces=None)[source]¶
Create a proxy.
Creates a Fleet proxy that agents can use to reach Fleet Server, outputs or the agent binary download source.
- Parameters:
name (str) – The proxy name.
url (str) – The proxy URL (for example
"https://proxy.example.com:3128").id (str | None) – Optional fixed ID for the proxy.
certificate (str | None) – Client certificate (PEM) used to connect to the proxy.
certificate_authorities (str | None) – CA certificates (PEM) used to verify the proxy.
certificate_key (str | None) – Client certificate key (PEM).
is_preconfigured (bool | None) – Whether the proxy is preconfigured.
proxy_headers (dict[str, Any] | None) – Extra headers sent to the proxy, as a mapping of header name to string/number/boolean value.
space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse with the created proxy under
item.- Raises:
BadRequestError – If the proxy definition is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> created = client.fleet_outputs.create_proxy( ... name="my-proxy", ... url="https://proxy.example.com:3128", ... ) >>> print(created.body["item"]["id"])
- get_proxy(*, item_id, space_id=None, validate_spaces=None)[source]¶
Get a proxy.
Gets a single Fleet proxy by ID.
- Parameters:
- Returns:
ObjectApiResponse with the proxy under
item.- Raises:
NotFoundError – If the proxy does not exist.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> proxy = client.fleet_outputs.get_proxy(item_id="my-proxy-id") >>> print(proxy.body["item"]["url"])
- update_proxy(*, item_id, name=None, url=None, certificate=None, certificate_authorities=None, certificate_key=None, proxy_headers=None, space_id=None, validate_spaces=None)[source]¶
Update a proxy.
Updates a Fleet proxy by ID. Only the provided properties are sent; omitted properties keep their current values.
- Parameters:
item_id (str) – The proxy ID.
name (str | None) – The proxy name.
url (str | None) – The proxy URL.
certificate (str | None) – Client certificate (PEM) used to connect to the proxy.
certificate_authorities (str | None) – CA certificates (PEM) used to verify the proxy.
certificate_key (str | None) – Client certificate key (PEM).
proxy_headers (dict[str, Any] | None) – Extra headers sent to the proxy.
space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse with the updated proxy under
item.- Raises:
NotFoundError – If the proxy does not exist.
BadRequestError – If the update is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> updated = client.fleet_outputs.update_proxy( ... item_id="my-proxy-id", ... name="renamed-proxy", ... ) >>> print(updated.body["item"]["name"]) renamed-proxy
- delete_proxy(*, item_id, space_id=None, validate_spaces=None)[source]¶
Delete a proxy.
Deletes a Fleet proxy by ID.
- Parameters:
- Returns:
ObjectApiResponse containing the deleted proxy’s
id.- Raises:
NotFoundError – If the proxy does not exist.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> client.fleet_outputs.delete_proxy(item_id="my-proxy-id")
- get_agent_download_sources(*, space_id=None, validate_spaces=None)[source]¶
Get agent binary download sources.
Lists all agent binary download sources, including the default Elastic artifacts source.
- Parameters:
- Returns:
ObjectApiResponse containing
items(list of download sources), pluspage,perPageandtotal.- Raises:
BadRequestError – If the request is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> sources = client.fleet_outputs.get_agent_download_sources() >>> for source in sources.body["items"]: ... print(source["id"], source["host"])
- create_agent_download_source(*, name, host, id=None, is_default=None, proxy_id=None, auth=None, secrets=None, ssl=None, space_id=None, validate_spaces=None)[source]¶
Create an agent binary download source.
- Parameters:
name (str) – The download source name.
host (str) – The base URL agents download binaries from (for example
"https://artifacts.example.com/downloads/").id (str | None) – Optional fixed ID for the download source.
is_default (bool | None) – Whether this is the default download source.
proxy_id (str | None) – ID of the Fleet proxy used to reach the source.
auth (dict[str, Any] | None) – Authentication settings:
username/password,api_keyand/orheaders(list of{"key", "value"}objects).secrets (dict[str, Any] | None) – Secret values, for example
{"auth": {"password": "..."}}or{"ssl": {"key": "..."}}.ssl (dict[str, Any] | None) – SSL settings:
certificate,certificate_authoritiesandkey.space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse with the created download source under
item.- Raises:
BadRequestError – If the download source definition is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> created = client.fleet_outputs.create_agent_download_source( ... name="my-artifacts-mirror", ... host="https://artifacts.example.com/downloads/", ... ) >>> print(created.body["item"]["id"])
- get_agent_download_source(*, source_id, space_id=None, validate_spaces=None)[source]¶
Get an agent binary download source.
Gets a single agent binary download source by ID.
- Parameters:
- Returns:
ObjectApiResponse with the download source under
item.- Raises:
NotFoundError – If the download source does not exist.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> source = client.fleet_outputs.get_agent_download_source( ... source_id="fleet-default-download-source" ... ) >>> print(source.body["item"]["host"])
- update_agent_download_source(*, source_id, name, host, is_default=None, proxy_id=None, auth=None, secrets=None, ssl=None, space_id=None, validate_spaces=None)[source]¶
Update an agent binary download source.
Updates an agent binary download source by ID.
nameandhostare required by the API on every update.- Parameters:
source_id (str) – The download source ID.
name (str) – The download source name.
host (str) – The base URL agents download binaries from.
is_default (bool | None) – Whether this is the default download source.
proxy_id (str | None) – ID of the Fleet proxy used to reach the source.
auth (dict[str, Any] | None) – Authentication settings (see
create_agent_download_source()).secrets (dict[str, Any] | None) – Secret values (see
create_agent_download_source()).ssl (dict[str, Any] | None) – SSL settings (see
create_agent_download_source()).space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse with the updated download source under
item.- Raises:
NotFoundError – If the download source does not exist.
BadRequestError – If the update is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> updated = client.fleet_outputs.update_agent_download_source( ... source_id="my-source-id", ... name="renamed-mirror", ... host="https://artifacts.example.com/downloads/", ... ) >>> print(updated.body["item"]["name"]) renamed-mirror
- delete_agent_download_source(*, source_id, space_id=None, validate_spaces=None)[source]¶
Delete an agent binary download source.
Deletes an agent binary download source by ID.
- Parameters:
- Returns:
ObjectApiResponse containing the deleted download source’s
id.- Raises:
NotFoundError – If the download source does not exist.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> client.fleet_outputs.delete_agent_download_source( ... source_id="my-source-id" ... )
- get_remote_synced_integrations_status(*, space_id=None, validate_spaces=None)[source]¶
Get remote synced integrations status.
Gets the status of integration syncing on this cluster, i.e. the integrations synced to this cluster by a remote Elasticsearch output with
sync_integrationsenabled. When syncing has never run, the response contains anerrorfield (for example"Follower index not found") and an emptyintegrationslist.- Parameters:
- Returns:
ObjectApiResponse containing
integrations(each withpackage_name,package_versionandsync_status) and optionallyerrorandcustom_assets.- Raises:
BadRequestError – If the request is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> status = ( ... client.fleet_outputs.get_remote_synced_integrations_status() ... ) >>> print(status.body["integrations"])
- get_remote_synced_integrations_remote_status(*, output_id, space_id=None, validate_spaces=None)[source]¶
Get remote synced integrations status by output ID.
Gets the syncing status reported by the remote cluster behind the given
remote_elasticsearchoutput. The output must be a remote Elasticsearch output withsync_integrationsenabled, otherwise the API responds with a 400 error.- Parameters:
- Returns:
ObjectApiResponse containing
integrations(each withpackage_name,package_versionandsync_status) and optionallyerrorandcustom_assets.- Raises:
BadRequestError – If the output is not a remote Elasticsearch output or syncing is not enabled.
NotFoundError – If the output does not exist.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> status = client.fleet_outputs.get_remote_synced_integrations_remote_status( ... output_id="my-remote-output-id" ... ) >>> print(status.body["integrations"])
- get_cloud_connectors(*, page=None, per_page=None, kuery=None, space_id=None, validate_spaces=None)[source]¶
Get cloud connectors.
Lists Fleet cloud connectors. Technical preview in 9.4.
- Parameters:
- Returns:
ObjectApiResponse containing
items(list of cloud connectors).- Raises:
BadRequestError – If the request is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> connectors = client.fleet_outputs.get_cloud_connectors() >>> for connector in connectors.body["items"]: ... print(connector["id"], connector["cloudProvider"])
- create_cloud_connector(*, name, cloud_provider, vars, account_type=None, space_id=None, validate_spaces=None)[source]¶
Create cloud connector.
Creates a Fleet cloud connector holding reusable cloud credentials. Technical preview in 9.4.
- Parameters:
name (str) – The connector name. For AWS connectors the role ARN is commonly used as the name, matching UI behavior.
cloud_provider (str) – The cloud provider:
aws,azureorgcp.vars (dict[str, Any]) – Connector variables. For AWS:
{"role_arn": {"value": "arn:aws:iam::...", "type": "text"}, "external_id": {"value": {"id": "<20-char-secret-id>", "isSecretRef": True}, "type": "password"}}. Theexternal_idmust be a secret reference; plain values are rejected.account_type (str | None) – The account type:
single-accountororganization-account.space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse with the created cloud connector under
item(includingverification_statusandpackagePolicyCount).- Raises:
BadRequestError – If the connector definition or its vars are invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> created = client.fleet_outputs.create_cloud_connector( ... name="arn:aws:iam::123456789012:role/my-role", ... cloud_provider="aws", ... vars={ ... "role_arn": { ... "value": "arn:aws:iam::123456789012:role/my-role", ... "type": "text", ... }, ... "external_id": { ... "value": {"id": "AbCdEfGhIjKlMnOpQrSt", "isSecretRef": True}, ... "type": "password", ... }, ... }, ... ) >>> print(created.body["item"]["id"])
- get_cloud_connector(*, cloud_connector_id, space_id=None, validate_spaces=None)[source]¶
Get cloud connector.
Gets a single Fleet cloud connector by ID. Technical preview in 9.4.
- Parameters:
- Returns:
ObjectApiResponse with the cloud connector under
item.- Raises:
BadRequestError – If the connector does not exist (the Fleet cloud connector API wraps not-found errors in a 400 response).
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> connector = client.fleet_outputs.get_cloud_connector( ... cloud_connector_id="my-connector-id" ... ) >>> print(connector.body["item"]["cloudProvider"])
- update_cloud_connector(*, cloud_connector_id, name=None, vars=None, account_type=None, space_id=None, validate_spaces=None)[source]¶
Update cloud connector.
Updates a Fleet cloud connector by ID. Only the provided properties are sent; omitted properties keep their current values. Technical preview in 9.4.
- Parameters:
cloud_connector_id (str) – The cloud connector ID.
name (str | None) – The connector name.
vars (dict[str, Any] | None) – Connector variables (see
create_cloud_connector()).account_type (str | None) – The account type:
single-accountororganization-account.space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse with the updated cloud connector under
item.- Raises:
BadRequestError – If the update is invalid or the connector does not exist (the Fleet cloud connector API wraps not-found errors in a 400 response).
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> updated = client.fleet_outputs.update_cloud_connector( ... cloud_connector_id="my-connector-id", ... name="arn:aws:iam::123456789012:role/my-renamed-role", ... ) >>> print(updated.body["item"]["name"])
- delete_cloud_connector(*, cloud_connector_id, force=None, space_id=None, validate_spaces=None)[source]¶
Delete cloud connector.
Deletes a Fleet cloud connector by ID. Technical preview in 9.4.
- Parameters:
- Returns:
ObjectApiResponse containing the deleted connector’s
id.- Raises:
BadRequestError – If the connector is in use (without
force) or does not exist (the Fleet cloud connector API wraps not-found errors in a 400 response).AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> client.fleet_outputs.delete_cloud_connector( ... cloud_connector_id="my-connector-id", ... force=True, ... )
- get_cloud_connector_usage(*, cloud_connector_id, page=None, per_page=None, space_id=None, validate_spaces=None)[source]¶
Get cloud connector usage.
Lists the package policies that use a cloud connector. Technical preview in 9.4.
- Parameters:
cloud_connector_id (str) – The cloud connector ID.
page (int | None) – Page number to return.
per_page (int | None) – Number of package policies per page.
space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse containing
items(package policies using the connector), pluspage,perPageandtotal.- Raises:
BadRequestError – If the connector does not exist (the Fleet cloud connector API wraps not-found errors in a 400 response).
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> usage = client.fleet_outputs.get_cloud_connector_usage( ... cloud_connector_id="my-connector-id" ... ) >>> print(usage.body["total"])
AsyncFleetOutputsClient¶
Asynchronous version of the FleetOutputsClient for use with async/await syntax.
- class kibana._async.client.fleet_outputs.AsyncFleetOutputsClient(client, default_space_id=None, validate_spaces=True)[source]¶
Bases:
AsyncNamespaceClientAsync client for the Kibana Fleet outputs and connectivity API.
Manages where Elastic Agents send their data and how they reach the Elastic Stack:
Outputs (
/api/fleet/outputs): Elasticsearch, remote Elasticsearch, Logstash and Kafka destinations for agent data.Fleet Server hosts (
/api/fleet/fleet_server_hosts): the URLs agents use to contact Fleet Server.Proxies (
/api/fleet/proxies): Fleet proxies that sit between agents and outputs, Fleet Server or the agent binary source.Agent binary download sources (
/api/fleet/agent_download_sources): the locations agents download their binaries from.Remote synced integrations (
/api/fleet/remote_synced_integrations): status of integration syncing to remote Elasticsearch outputs.Cloud connectors (
/api/fleet/cloud_connectors): reusable cloud credentials (AWS/Azure/GCP) shared by agentless package policies.
Every method accepts an optional
space_idto target a specific Kibana space (Nonetargets the default space or the space the client is scoped to).Example
>>> from kibana import AsyncKibana >>> client = AsyncKibana("http://localhost:5601", api_key="...") >>> >>> # List outputs, then create and delete a Logstash output >>> outputs = await client.fleet_outputs.get_outputs() >>> created = await client.fleet_outputs.create_output( ... name="my-logstash", ... type="logstash", ... hosts=["logstash.example.com:5044"], ... ) >>> await client.fleet_outputs.delete_output( ... output_id=created.body["item"]["id"] ... )
Usage
The AsyncFleetOutputsClient provides the same methods as FleetOutputsClient but all methods are async and must be awaited:
from kibana import AsyncKibana import asyncio async def main(): async with AsyncKibana("http://localhost:5601") as client: # Create an output (async) created = await client.fleet_outputs.create_output( name="async-logstash", type="logstash", hosts=["logstash.example.com:5044"], ) output_id = created.body["item"]["id"] # Inspect it (async) health = await client.fleet_outputs.get_output_health( output_id=output_id ) print(health.body["state"]) # Delete (async) await client.fleet_outputs.delete_output(output_id=output_id) asyncio.run(main())
- __init__(client, default_space_id=None, validate_spaces=True)[source]¶
Initialize the AsyncFleetOutputsClient.
- Parameters:
client (AsyncKibana) – The parent AsyncKibana client instance to delegate requests to.
default_space_id (str | None) – Optional default space ID for all operations.
validate_spaces (bool) – Whether to validate space existence before space-scoped operations (default: True).
Example
>>> fleet_outputs_client = AsyncFleetOutputsClient(kibana_client)
- async get_outputs(*, space_id=None, validate_spaces=None)[source]¶
Get outputs.
Lists all Fleet outputs, including the default Elasticsearch output.
- Parameters:
- Returns:
ObjectApiResponse containing
items(list of outputs), pluspage,perPageandtotal.- Raises:
BadRequestError – If the request is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> outputs = await client.fleet_outputs.get_outputs() >>> for output in outputs.body["items"]: ... print(output["id"], output["type"], output["is_default"])
- async create_output(*, name, type, hosts, id=None, is_default=None, is_default_monitoring=None, is_internal=None, is_preconfigured=None, allow_edit=None, ca_sha256=None, ca_trusted_fingerprint=None, config_yaml=None, preset=None, proxy_id=None, secrets=None, shipper=None, ssl=None, fields=None, space_id=None, validate_spaces=None)[source]¶
Create output.
Creates a Fleet output of type
elasticsearch,remote_elasticsearch,logstashorkafka. Type-specific properties (for example Kafka authentication or remote Elasticsearch sync settings) are passed viafields.- Parameters:
name (str) – The output name.
type (str) – The output type:
elasticsearch,remote_elasticsearch,logstashorkafka.hosts (list[str]) – The output host URLs (for example
["https://es.example.com:9200"]or, for Kafka,["kafka.example.com:9092"]).id (str | None) – Optional fixed ID for the output.
is_default (bool | None) – Whether this output is the default for agent data.
is_default_monitoring (bool | None) – Whether this output is the default for agent monitoring data.
is_internal (bool | None) – Whether the output is internal (hidden in the UI).
is_preconfigured (bool | None) – Whether the output is preconfigured.
allow_edit (list[str] | None) – List of properties that remain editable when the output is preconfigured.
ca_sha256 (str | None) – SHA-256 of the CA certificate used by agents.
ca_trusted_fingerprint (str | None) – Trusted fingerprint of the CA certificate.
config_yaml (str | None) – Advanced YAML configuration for the output.
preset (str | None) – Performance preset for Elasticsearch-like outputs:
balanced,custom,throughput,scaleorlatency.proxy_id (str | None) – ID of the Fleet proxy to reach this output through.
secrets (dict[str, Any] | None) – Secret values (for example
{"ssl": {"key": "..."}}or, for remote Elasticsearch,{"service_token": "..."}).shipper (dict[str, Any] | None) – Shipper settings (disk queue, compression, …).
ssl (dict[str, Any] | None) – SSL settings:
certificate,certificate_authorities,keyandverification_mode.fields (dict[str, Any] | None) – Additional type-specific properties merged into the request body verbatim, for example Kafka settings (
{"auth_type": "user_pass", "username": "...", "password": "...", "topic": "..."}) or remote Elasticsearch settings ({"service_token": "...", "sync_integrations": True, "kibana_url": "..."}).space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse with the created output under
item.- Raises:
BadRequestError – If the output definition is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> created = await client.fleet_outputs.create_output( ... name="my-kafka", ... type="kafka", ... hosts=["kafka.example.com:9092"], ... fields={ ... "auth_type": "user_pass", ... "username": "fleet", ... "password": "secret", ... "topic": "agent-events", ... }, ... ) >>> print(created.body["item"]["id"])
- async get_output(*, output_id, space_id=None, validate_spaces=None)[source]¶
Get output.
Gets a single Fleet output by ID.
- Parameters:
- Returns:
ObjectApiResponse with the output under
item.- Raises:
NotFoundError – If the output does not exist.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> output = await client.fleet_outputs.get_output( ... output_id="fleet-default-output" ... ) >>> print(output.body["item"]["type"]) elasticsearch
- async update_output(*, output_id, name=None, type=None, hosts=None, is_default=None, is_default_monitoring=None, is_internal=None, is_preconfigured=None, allow_edit=None, ca_sha256=None, ca_trusted_fingerprint=None, config_yaml=None, preset=None, proxy_id=None, secrets=None, shipper=None, ssl=None, fields=None, space_id=None, validate_spaces=None)[source]¶
Update output.
Updates a Fleet output by ID. Only the provided properties are sent; omitted properties keep their current values. Note that Kafka outputs require
nameon update.- Parameters:
output_id (str) – The output ID.
name (str | None) – The output name.
type (str | None) – The output type (change requires type-specific fields).
is_default (bool | None) – Whether this output is the default for agent data.
is_default_monitoring (bool | None) – Whether this output is the default for agent monitoring data.
is_internal (bool | None) – Whether the output is internal (hidden in the UI).
is_preconfigured (bool | None) – Whether the output is preconfigured.
allow_edit (list[str] | None) – List of properties that remain editable when the output is preconfigured.
ca_sha256 (str | None) – SHA-256 of the CA certificate used by agents.
ca_trusted_fingerprint (str | None) – Trusted fingerprint of the CA certificate.
config_yaml (str | None) – Advanced YAML configuration for the output.
preset (str | None) – Performance preset for Elasticsearch-like outputs:
balanced,custom,throughput,scaleorlatency.proxy_id (str | None) – ID of the Fleet proxy to reach this output through.
secrets (dict[str, Any] | None) – Secret values (see
create_output()).shipper (dict[str, Any] | None) – Shipper settings (disk queue, compression, …).
ssl (dict[str, Any] | None) – SSL settings:
certificate,certificate_authorities,keyandverification_mode.fields (dict[str, Any] | None) – Additional type-specific properties merged into the request body verbatim (see
create_output()).space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse with the updated output under
item.- Raises:
NotFoundError – If the output does not exist.
BadRequestError – If the update is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> updated = await client.fleet_outputs.update_output( ... output_id="my-output-id", ... name="renamed-output", ... ) >>> print(updated.body["item"]["name"]) renamed-output
- async delete_output(*, output_id, space_id=None, validate_spaces=None)[source]¶
Delete output.
Deletes a Fleet output by ID. The default output cannot be deleted.
- Parameters:
- Returns:
ObjectApiResponse containing the deleted output’s
id.- Raises:
NotFoundError – If the output does not exist.
BadRequestError – If the output cannot be deleted (for example the default output).
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> await client.fleet_outputs.delete_output(output_id="my-output-id")
- async get_output_health(*, output_id, space_id=None, validate_spaces=None)[source]¶
Get the latest output health.
Gets the most recent health report for an output. Outputs that have not been health-checked yet report
state: "UNKNOWN".- Parameters:
- Returns:
ObjectApiResponse containing
state,messageandtimestamp.- Raises:
NotFoundError – If the output does not exist.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> health = await client.fleet_outputs.get_output_health( ... output_id="my-output-id" ... ) >>> print(health.body["state"])
- async get_fleet_server_hosts(*, space_id=None, validate_spaces=None)[source]¶
Get Fleet Server hosts.
Lists all Fleet Server host configurations.
- Parameters:
- Returns:
ObjectApiResponse containing
items(list of Fleet Server hosts), pluspage,perPageandtotal.- Raises:
BadRequestError – If the request is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> hosts = await client.fleet_outputs.get_fleet_server_hosts() >>> for host in hosts.body["items"]: ... print(host["id"], host["host_urls"])
- async create_fleet_server_host(*, name, host_urls, id=None, is_default=None, is_internal=None, is_preconfigured=None, proxy_id=None, secrets=None, ssl=None, space_id=None, validate_spaces=None)[source]¶
Create a Fleet Server host.
- Parameters:
name (str) – The Fleet Server host name.
host_urls (list[str]) – The Fleet Server URLs agents connect to (for example
["https://fleet.example.com:8220"]).id (str | None) – Optional fixed ID for the Fleet Server host.
is_default (bool | None) – Whether this is the default Fleet Server host.
is_internal (bool | None) – Whether the host is internal (hidden in the UI).
is_preconfigured (bool | None) – Whether the host is preconfigured.
proxy_id (str | None) – ID of the Fleet proxy used to reach Fleet Server.
secrets (dict[str, Any] | None) – Secret values, for example
{"ssl": {"key": "...", "es_key": "...", "agent_key": "..."}}.ssl (dict[str, Any] | None) – SSL settings:
certificate,certificate_authorities,key,client_authpluses_*andagent_*variants for the Elasticsearch and agent connections.space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse with the created Fleet Server host under
item.- Raises:
BadRequestError – If the host definition is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> created = await client.fleet_outputs.create_fleet_server_host( ... name="my-fleet-server", ... host_urls=["https://fleet.example.com:8220"], ... ) >>> print(created.body["item"]["id"])
- async get_fleet_server_host(*, item_id, space_id=None, validate_spaces=None)[source]¶
Get a Fleet Server host.
Gets a single Fleet Server host by ID.
- Parameters:
- Returns:
ObjectApiResponse with the Fleet Server host under
item.- Raises:
NotFoundError – If the Fleet Server host does not exist.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> host = await client.fleet_outputs.get_fleet_server_host( ... item_id="my-host-id" ... ) >>> print(host.body["item"]["host_urls"])
- async update_fleet_server_host(*, item_id, name=None, host_urls=None, is_default=None, is_internal=None, proxy_id=None, secrets=None, ssl=None, space_id=None, validate_spaces=None)[source]¶
Update a Fleet Server host.
Updates a Fleet Server host by ID. Only the provided properties are sent; omitted properties keep their current values.
- Parameters:
item_id (str) – The Fleet Server host ID.
name (str | None) – The Fleet Server host name.
host_urls (list[str] | None) – The Fleet Server URLs agents connect to.
is_default (bool | None) – Whether this is the default Fleet Server host.
is_internal (bool | None) – Whether the host is internal (hidden in the UI).
proxy_id (str | None) – ID of the Fleet proxy used to reach Fleet Server.
secrets (dict[str, Any] | None) – Secret values (see
create_fleet_server_host()).ssl (dict[str, Any] | None) – SSL settings (see
create_fleet_server_host()).space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse with the updated Fleet Server host under
item.- Raises:
NotFoundError – If the Fleet Server host does not exist.
BadRequestError – If the update is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> updated = await client.fleet_outputs.update_fleet_server_host( ... item_id="my-host-id", ... name="renamed-fleet-server", ... ) >>> print(updated.body["item"]["name"]) renamed-fleet-server
- async delete_fleet_server_host(*, item_id, space_id=None, validate_spaces=None)[source]¶
Delete a Fleet Server host.
Deletes a Fleet Server host by ID.
- Parameters:
- Returns:
ObjectApiResponse containing the deleted host’s
id.- Raises:
NotFoundError – If the Fleet Server host does not exist.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> await client.fleet_outputs.delete_fleet_server_host( ... item_id="my-host-id" ... )
- async get_proxies(*, space_id=None, validate_spaces=None)[source]¶
Get proxies.
Lists all Fleet proxies.
- Parameters:
- Returns:
ObjectApiResponse containing
items(list of proxies), pluspage,perPageandtotal.- Raises:
BadRequestError – If the request is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> proxies = await client.fleet_outputs.get_proxies() >>> for proxy in proxies.body["items"]: ... print(proxy["id"], proxy["url"])
- async create_proxy(*, name, url, id=None, certificate=None, certificate_authorities=None, certificate_key=None, is_preconfigured=None, proxy_headers=None, space_id=None, validate_spaces=None)[source]¶
Create a proxy.
Creates a Fleet proxy that agents can use to reach Fleet Server, outputs or the agent binary download source.
- Parameters:
name (str) – The proxy name.
url (str) – The proxy URL (for example
"https://proxy.example.com:3128").id (str | None) – Optional fixed ID for the proxy.
certificate (str | None) – Client certificate (PEM) used to connect to the proxy.
certificate_authorities (str | None) – CA certificates (PEM) used to verify the proxy.
certificate_key (str | None) – Client certificate key (PEM).
is_preconfigured (bool | None) – Whether the proxy is preconfigured.
proxy_headers (dict[str, Any] | None) – Extra headers sent to the proxy, as a mapping of header name to string/number/boolean value.
space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse with the created proxy under
item.- Raises:
BadRequestError – If the proxy definition is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> created = await client.fleet_outputs.create_proxy( ... name="my-proxy", ... url="https://proxy.example.com:3128", ... ) >>> print(created.body["item"]["id"])
- async get_proxy(*, item_id, space_id=None, validate_spaces=None)[source]¶
Get a proxy.
Gets a single Fleet proxy by ID.
- Parameters:
- Returns:
ObjectApiResponse with the proxy under
item.- Raises:
NotFoundError – If the proxy does not exist.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> proxy = await client.fleet_outputs.get_proxy(item_id="my-proxy-id") >>> print(proxy.body["item"]["url"])
- async update_proxy(*, item_id, name=None, url=None, certificate=None, certificate_authorities=None, certificate_key=None, proxy_headers=None, space_id=None, validate_spaces=None)[source]¶
Update a proxy.
Updates a Fleet proxy by ID. Only the provided properties are sent; omitted properties keep their current values.
- Parameters:
item_id (str) – The proxy ID.
name (str | None) – The proxy name.
url (str | None) – The proxy URL.
certificate (str | None) – Client certificate (PEM) used to connect to the proxy.
certificate_authorities (str | None) – CA certificates (PEM) used to verify the proxy.
certificate_key (str | None) – Client certificate key (PEM).
proxy_headers (dict[str, Any] | None) – Extra headers sent to the proxy.
space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse with the updated proxy under
item.- Raises:
NotFoundError – If the proxy does not exist.
BadRequestError – If the update is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> updated = await client.fleet_outputs.update_proxy( ... item_id="my-proxy-id", ... name="renamed-proxy", ... ) >>> print(updated.body["item"]["name"]) renamed-proxy
- async delete_proxy(*, item_id, space_id=None, validate_spaces=None)[source]¶
Delete a proxy.
Deletes a Fleet proxy by ID.
- Parameters:
- Returns:
ObjectApiResponse containing the deleted proxy’s
id.- Raises:
NotFoundError – If the proxy does not exist.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> await client.fleet_outputs.delete_proxy(item_id="my-proxy-id")
- async get_agent_download_sources(*, space_id=None, validate_spaces=None)[source]¶
Get agent binary download sources.
Lists all agent binary download sources, including the default Elastic artifacts source.
- Parameters:
- Returns:
ObjectApiResponse containing
items(list of download sources), pluspage,perPageandtotal.- Raises:
BadRequestError – If the request is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> sources = await client.fleet_outputs.get_agent_download_sources() >>> for source in sources.body["items"]: ... print(source["id"], source["host"])
- async create_agent_download_source(*, name, host, id=None, is_default=None, proxy_id=None, auth=None, secrets=None, ssl=None, space_id=None, validate_spaces=None)[source]¶
Create an agent binary download source.
- Parameters:
name (str) – The download source name.
host (str) – The base URL agents download binaries from (for example
"https://artifacts.example.com/downloads/").id (str | None) – Optional fixed ID for the download source.
is_default (bool | None) – Whether this is the default download source.
proxy_id (str | None) – ID of the Fleet proxy used to reach the source.
auth (dict[str, Any] | None) – Authentication settings:
username/password,api_keyand/orheaders(list of{"key", "value"}objects).secrets (dict[str, Any] | None) – Secret values, for example
{"auth": {"password": "..."}}or{"ssl": {"key": "..."}}.ssl (dict[str, Any] | None) – SSL settings:
certificate,certificate_authoritiesandkey.space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse with the created download source under
item.- Raises:
BadRequestError – If the download source definition is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> created = await client.fleet_outputs.create_agent_download_source( ... name="my-artifacts-mirror", ... host="https://artifacts.example.com/downloads/", ... ) >>> print(created.body["item"]["id"])
- async get_agent_download_source(*, source_id, space_id=None, validate_spaces=None)[source]¶
Get an agent binary download source.
Gets a single agent binary download source by ID.
- Parameters:
- Returns:
ObjectApiResponse with the download source under
item.- Raises:
NotFoundError – If the download source does not exist.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> source = await client.fleet_outputs.get_agent_download_source( ... source_id="fleet-default-download-source" ... ) >>> print(source.body["item"]["host"])
- async update_agent_download_source(*, source_id, name, host, is_default=None, proxy_id=None, auth=None, secrets=None, ssl=None, space_id=None, validate_spaces=None)[source]¶
Update an agent binary download source.
Updates an agent binary download source by ID.
nameandhostare required by the API on every update.- Parameters:
source_id (str) – The download source ID.
name (str) – The download source name.
host (str) – The base URL agents download binaries from.
is_default (bool | None) – Whether this is the default download source.
proxy_id (str | None) – ID of the Fleet proxy used to reach the source.
auth (dict[str, Any] | None) – Authentication settings (see
create_agent_download_source()).secrets (dict[str, Any] | None) – Secret values (see
create_agent_download_source()).ssl (dict[str, Any] | None) – SSL settings (see
create_agent_download_source()).space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse with the updated download source under
item.- Raises:
NotFoundError – If the download source does not exist.
BadRequestError – If the update is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> updated = await client.fleet_outputs.update_agent_download_source( ... source_id="my-source-id", ... name="renamed-mirror", ... host="https://artifacts.example.com/downloads/", ... ) >>> print(updated.body["item"]["name"]) renamed-mirror
- async delete_agent_download_source(*, source_id, space_id=None, validate_spaces=None)[source]¶
Delete an agent binary download source.
Deletes an agent binary download source by ID.
- Parameters:
- Returns:
ObjectApiResponse containing the deleted download source’s
id.- Raises:
NotFoundError – If the download source does not exist.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> await client.fleet_outputs.delete_agent_download_source( ... source_id="my-source-id" ... )
- async get_remote_synced_integrations_status(*, space_id=None, validate_spaces=None)[source]¶
Get remote synced integrations status.
Gets the status of integration syncing on this cluster, i.e. the integrations synced to this cluster by a remote Elasticsearch output with
sync_integrationsenabled. When syncing has never run, the response contains anerrorfield (for example"Follower index not found") and an emptyintegrationslist.- Parameters:
- Returns:
ObjectApiResponse containing
integrations(each withpackage_name,package_versionandsync_status) and optionallyerrorandcustom_assets.- Raises:
BadRequestError – If the request is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> status = ( ... await client.fleet_outputs.get_remote_synced_integrations_status() ... ) >>> print(status.body["integrations"])
- async get_remote_synced_integrations_remote_status(*, output_id, space_id=None, validate_spaces=None)[source]¶
Get remote synced integrations status by output ID.
Gets the syncing status reported by the remote cluster behind the given
remote_elasticsearchoutput. The output must be a remote Elasticsearch output withsync_integrationsenabled, otherwise the API responds with a 400 error.- Parameters:
- Returns:
ObjectApiResponse containing
integrations(each withpackage_name,package_versionandsync_status) and optionallyerrorandcustom_assets.- Raises:
BadRequestError – If the output is not a remote Elasticsearch output or syncing is not enabled.
NotFoundError – If the output does not exist.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> status = await client.fleet_outputs.get_remote_synced_integrations_remote_status( ... output_id="my-remote-output-id" ... ) >>> print(status.body["integrations"])
- async get_cloud_connectors(*, page=None, per_page=None, kuery=None, space_id=None, validate_spaces=None)[source]¶
Get cloud connectors.
Lists Fleet cloud connectors. Technical preview in 9.4.
- Parameters:
- Returns:
ObjectApiResponse containing
items(list of cloud connectors).- Raises:
BadRequestError – If the request is invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> connectors = await client.fleet_outputs.get_cloud_connectors() >>> for connector in connectors.body["items"]: ... print(connector["id"], connector["cloudProvider"])
- async create_cloud_connector(*, name, cloud_provider, vars, account_type=None, space_id=None, validate_spaces=None)[source]¶
Create cloud connector.
Creates a Fleet cloud connector holding reusable cloud credentials. Technical preview in 9.4.
- Parameters:
name (str) – The connector name. For AWS connectors the role ARN is commonly used as the name, matching UI behavior.
cloud_provider (str) – The cloud provider:
aws,azureorgcp.vars (dict[str, Any]) – Connector variables. For AWS:
{"role_arn": {"value": "arn:aws:iam::...", "type": "text"}, "external_id": {"value": {"id": "<20-char-secret-id>", "isSecretRef": True}, "type": "password"}}. Theexternal_idmust be a secret reference; plain values are rejected.account_type (str | None) – The account type:
single-accountororganization-account.space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse with the created cloud connector under
item(includingverification_statusandpackagePolicyCount).- Raises:
BadRequestError – If the connector definition or its vars are invalid.
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> created = await client.fleet_outputs.create_cloud_connector( ... name="arn:aws:iam::123456789012:role/my-role", ... cloud_provider="aws", ... vars={ ... "role_arn": { ... "value": "arn:aws:iam::123456789012:role/my-role", ... "type": "text", ... }, ... "external_id": { ... "value": {"id": "AbCdEfGhIjKlMnOpQrSt", "isSecretRef": True}, ... "type": "password", ... }, ... }, ... ) >>> print(created.body["item"]["id"])
- async get_cloud_connector(*, cloud_connector_id, space_id=None, validate_spaces=None)[source]¶
Get cloud connector.
Gets a single Fleet cloud connector by ID. Technical preview in 9.4.
- Parameters:
- Returns:
ObjectApiResponse with the cloud connector under
item.- Raises:
BadRequestError – If the connector does not exist (the Fleet cloud connector API wraps not-found errors in a 400 response).
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> connector = await client.fleet_outputs.get_cloud_connector( ... cloud_connector_id="my-connector-id" ... ) >>> print(connector.body["item"]["cloudProvider"])
- async update_cloud_connector(*, cloud_connector_id, name=None, vars=None, account_type=None, space_id=None, validate_spaces=None)[source]¶
Update cloud connector.
Updates a Fleet cloud connector by ID. Only the provided properties are sent; omitted properties keep their current values. Technical preview in 9.4.
- Parameters:
cloud_connector_id (str) – The cloud connector ID.
name (str | None) – The connector name.
vars (dict[str, Any] | None) – Connector variables (see
create_cloud_connector()).account_type (str | None) – The account type:
single-accountororganization-account.space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse with the updated cloud connector under
item.- Raises:
BadRequestError – If the update is invalid or the connector does not exist (the Fleet cloud connector API wraps not-found errors in a 400 response).
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> updated = await client.fleet_outputs.update_cloud_connector( ... cloud_connector_id="my-connector-id", ... name="arn:aws:iam::123456789012:role/my-renamed-role", ... ) >>> print(updated.body["item"]["name"])
- async delete_cloud_connector(*, cloud_connector_id, force=None, space_id=None, validate_spaces=None)[source]¶
Delete cloud connector.
Deletes a Fleet cloud connector by ID. Technical preview in 9.4.
- Parameters:
- Returns:
ObjectApiResponse containing the deleted connector’s
id.- Raises:
BadRequestError – If the connector is in use (without
force) or does not exist (the Fleet cloud connector API wraps not-found errors in a 400 response).AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> await client.fleet_outputs.delete_cloud_connector( ... cloud_connector_id="my-connector-id", ... force=True, ... )
- async get_cloud_connector_usage(*, cloud_connector_id, page=None, per_page=None, space_id=None, validate_spaces=None)[source]¶
Get cloud connector usage.
Lists the package policies that use a cloud connector. Technical preview in 9.4.
- Parameters:
cloud_connector_id (str) – The cloud connector ID.
page (int | None) – Page number to return.
per_page (int | None) – Number of package policies per page.
space_id (str | None) – Optional space ID to scope the operation to.
validate_spaces (bool | None) – Override space validation setting for this operation.
- Returns:
ObjectApiResponse containing
items(package policies using the connector), pluspage,perPageandtotal.- Raises:
BadRequestError – If the connector does not exist (the Fleet cloud connector API wraps not-found errors in a 400 response).
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
SpaceNotFoundError – If the space doesn’t exist and validation is enabled.
- Return type:
Example
>>> usage = await client.fleet_outputs.get_cloud_connector_usage( ... cloud_connector_id="my-connector-id" ... ) >>> print(usage.body["total"])