1. Registry
  2. Packages
  3. Elasticstack Provider
  4. API Docs
  5. getFleetAgentPolicy
Viewing docs for elasticstack 0.17.0
published on Tuesday, Nov 10, 2026 by elastic
elasticstack
Viewing docs for elasticstack 0.17.0
published on Tuesday, Nov 10, 2026 by elastic

    Returns a Fleet agent policy looked up by policy_id or name. See https://www.elastic.co/guide/en/fleet/current/agent-policy.html

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as elasticstack from "@pulumi/elasticstack";
    
    const pernode = elasticstack.getFleetAgentPolicy({
        name: "k8s-metrics-pernode",
        spaceId: "default",
    });
    const pernodeGetFleetEnrollmentTokens = pernode.then(pernode => elasticstack.getFleetEnrollmentTokens({
        policyId: pernode.policyId,
    }));
    const byId = elasticstack.getFleetAgentPolicy({
        policyId: "223b1bf8-240f-463f-8466-5062670d0754",
    });
    
    import pulumi
    import pulumi_elasticstack as elasticstack
    
    pernode = elasticstack.get_fleet_agent_policy(name="k8s-metrics-pernode",
        space_id="default")
    pernode_get_fleet_enrollment_tokens = elasticstack.get_fleet_enrollment_tokens(policy_id=pernode.policy_id)
    by_id = elasticstack.get_fleet_agent_policy(policy_id="223b1bf8-240f-463f-8466-5062670d0754")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/elasticstack/elasticstack"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		pernode, err := elasticstack.LookupFleetAgentPolicy(ctx, &elasticstack.LookupFleetAgentPolicyArgs{
    			Name:    pulumi.StringRef("k8s-metrics-pernode"),
    			SpaceId: pulumi.StringRef("default"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = elasticstack.GetFleetEnrollmentTokens(ctx, &elasticstack.GetFleetEnrollmentTokensArgs{
    			PolicyId: pulumi.StringRef(pernode.PolicyId),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = elasticstack.LookupFleetAgentPolicy(ctx, &elasticstack.LookupFleetAgentPolicyArgs{
    			PolicyId: pulumi.StringRef("223b1bf8-240f-463f-8466-5062670d0754"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Elasticstack = Pulumi.Elasticstack;
    
    return await Deployment.RunAsync(() => 
    {
        var pernode = Elasticstack.GetFleetAgentPolicy.Invoke(new()
        {
            Name = "k8s-metrics-pernode",
            SpaceId = "default",
        });
    
        var pernodeGetFleetEnrollmentTokens = Elasticstack.GetFleetEnrollmentTokens.Invoke(new()
        {
            PolicyId = pernode.Apply(getFleetAgentPolicyResult => getFleetAgentPolicyResult.PolicyId),
        });
    
        var byId = Elasticstack.GetFleetAgentPolicy.Invoke(new()
        {
            PolicyId = "223b1bf8-240f-463f-8466-5062670d0754",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.elasticstack.ElasticstackFunctions;
    import com.pulumi.elasticstack.inputs.GetFleetAgentPolicyArgs;
    import com.pulumi.elasticstack.inputs.GetFleetEnrollmentTokensArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var pernode = ElasticstackFunctions.getFleetAgentPolicy(GetFleetAgentPolicyArgs.builder()
                .name("k8s-metrics-pernode")
                .spaceId("default")
                .build());
    
            final var pernodeGetFleetEnrollmentTokens = ElasticstackFunctions.getFleetEnrollmentTokens(GetFleetEnrollmentTokensArgs.builder()
                .policyId(pernode.policyId())
                .build());
    
            final var byId = ElasticstackFunctions.getFleetAgentPolicy(GetFleetAgentPolicyArgs.builder()
                .policyId("223b1bf8-240f-463f-8466-5062670d0754")
                .build());
    
        }
    }
    
    variables:
      pernode:
        fn::invoke:
          function: elasticstack:getFleetAgentPolicy
          arguments:
            name: k8s-metrics-pernode
            spaceId: default
      pernodeGetFleetEnrollmentTokens:
        fn::invoke:
          function: elasticstack:getFleetEnrollmentTokens
          arguments:
            policyId: ${pernode.policyId}
      byId:
        fn::invoke:
          function: elasticstack:getFleetAgentPolicy
          arguments:
            policyId: 223b1bf8-240f-463f-8466-5062670d0754
    
    Example coming soon!
    

    Using getFleetAgentPolicy

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getFleetAgentPolicy(args: GetFleetAgentPolicyArgs, opts?: InvokeOptions): Promise<GetFleetAgentPolicyResult>
    function getFleetAgentPolicyOutput(args: GetFleetAgentPolicyOutputArgs, opts?: InvokeOutputOptions): Output<GetFleetAgentPolicyResult>
    def get_fleet_agent_policy(kibana_connections: Optional[Sequence[GetFleetAgentPolicyKibanaConnection]] = None,
                               name: Optional[str] = None,
                               policy_id: Optional[str] = None,
                               space_id: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetFleetAgentPolicyResult
    def get_fleet_agent_policy_output(kibana_connections: pulumi.Input[Optional[Sequence[pulumi.Input[GetFleetAgentPolicyKibanaConnectionArgs]]]] = None,
                               name: pulumi.Input[Optional[str]] = None,
                               policy_id: pulumi.Input[Optional[str]] = None,
                               space_id: pulumi.Input[Optional[str]] = None,
                               opts: Optional[InvokeOutputOptions] = None) -> Output[GetFleetAgentPolicyResult]
    func LookupFleetAgentPolicy(ctx *Context, args *LookupFleetAgentPolicyArgs, opts ...InvokeOption) (*LookupFleetAgentPolicyResult, error)
    func LookupFleetAgentPolicyOutput(ctx *Context, args *LookupFleetAgentPolicyOutputArgs, opts ...InvokeOption) LookupFleetAgentPolicyResultOutput

    > Note: This function is named LookupFleetAgentPolicy in the Go SDK.

    public static class GetFleetAgentPolicy 
    {
        public static Task<GetFleetAgentPolicyResult> InvokeAsync(GetFleetAgentPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetFleetAgentPolicyResult> Invoke(GetFleetAgentPolicyInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetFleetAgentPolicyResult> Invoke(GetFleetAgentPolicyInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetFleetAgentPolicyResult> getFleetAgentPolicy(GetFleetAgentPolicyArgs args, InvokeOptions options)
    public static Output<GetFleetAgentPolicyResult> getFleetAgentPolicy(GetFleetAgentPolicyArgs args, InvokeOptions options)
    public static Output<GetFleetAgentPolicyResult> getFleetAgentPolicy(GetFleetAgentPolicyArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: elasticstack:index/getFleetAgentPolicy:getFleetAgentPolicy
      arguments:
        # arguments dictionary
    data "elasticstack_get_fleet_agent_policy" "name" {
        # arguments
    }

    The following arguments are supported:

    KibanaConnections List<GetFleetAgentPolicyKibanaConnection>
    Kibana connection configuration block.
    Name string
    The name of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    PolicyId string
    The identifier of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    SpaceId string
    An identifier for the space. If space_id is not provided, the default space is used.
    KibanaConnections []GetFleetAgentPolicyKibanaConnection
    Kibana connection configuration block.
    Name string
    The name of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    PolicyId string
    The identifier of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    SpaceId string
    An identifier for the space. If space_id is not provided, the default space is used.
    kibana_connections list(object)
    Kibana connection configuration block.
    name string
    The name of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    policy_id string
    The identifier of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    space_id string
    An identifier for the space. If space_id is not provided, the default space is used.
    kibanaConnections List<GetFleetAgentPolicyKibanaConnection>
    Kibana connection configuration block.
    name String
    The name of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    policyId String
    The identifier of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    spaceId String
    An identifier for the space. If space_id is not provided, the default space is used.
    kibanaConnections GetFleetAgentPolicyKibanaConnection[]
    Kibana connection configuration block.
    name string
    The name of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    policyId string
    The identifier of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    spaceId string
    An identifier for the space. If space_id is not provided, the default space is used.
    kibana_connections Sequence[GetFleetAgentPolicyKibanaConnection]
    Kibana connection configuration block.
    name str
    The name of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    policy_id str
    The identifier of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    space_id str
    An identifier for the space. If space_id is not provided, the default space is used.
    kibanaConnections List<Property Map>
    Kibana connection configuration block.
    name String
    The name of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    policyId String
    The identifier of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    spaceId String
    An identifier for the space. If space_id is not provided, the default space is used.

    getFleetAgentPolicy Result

    The following output properties are available:

    AdvancedMonitoringOptions GetFleetAgentPolicyAdvancedMonitoringOptions
    Advanced monitoring options for the agent policy, including the HTTP monitoring endpoint and diagnostic settings.
    AdvancedSettings GetFleetAgentPolicyAdvancedSettings
    Advanced agent settings for logging, resource limits, and downloads.
    DataOutputId string
    The identifier for the data output.
    Description string
    The description of the agent policy, as returned by the Fleet API.
    DownloadSourceId string
    The identifier for the Elastic Agent binary download server.
    FleetServerHostId string
    The identifier for the Fleet server host.
    GlobalDataTags Dictionary<string, GetFleetAgentPolicyGlobalDataTags>
    User-defined tags. Keyed by tag name; each entry has exactly one of string_value or number_value.
    HostNameFormat string
    Hostname format reported for agents in this policy. hostname is the short hostname; fqdn is the fully qualified domain name.
    Id string
    The ID of this agent policy.
    InactivityTimeout string
    Time an agent can be inactive before it is marked inactive. A duration string such as 30s, 2m, or 1h.
    IsProtected bool
    Whether tamper protection is enabled for this agent policy (Fleet API is_protected).
    MonitorLogs bool
    Whether collection of agent logs is enabled.
    MonitorMetrics bool
    Whether collection of agent metrics is enabled.
    MonitoringOutputId string
    The identifier for monitoring output.
    Name string
    The name of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    Namespace string
    The namespace of the agent policy.
    PolicyId string
    The identifier of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    RequiredVersions Dictionary<string, double>
    Map of agent versions to target percentages for automatic upgrade. The key is the target version and the value is the percentage of agents to upgrade to that version.
    SpaceId string
    An identifier for the space. If space_id is not provided, the default space is used.
    SpaceIds List<string>
    The Kibana space IDs that this agent policy is available in.
    SupportsAgentless bool
    Whether the agent policy supports agentless data collection.
    UnenrollmentTimeout string
    Time an agent can be inactive before it is automatically unenrolled. A duration string such as 30s, 2m, or 1h.
    KibanaConnections List<GetFleetAgentPolicyKibanaConnection>
    Kibana connection configuration block.
    AdvancedMonitoringOptions GetFleetAgentPolicyAdvancedMonitoringOptions
    Advanced monitoring options for the agent policy, including the HTTP monitoring endpoint and diagnostic settings.
    AdvancedSettings GetFleetAgentPolicyAdvancedSettings
    Advanced agent settings for logging, resource limits, and downloads.
    DataOutputId string
    The identifier for the data output.
    Description string
    The description of the agent policy, as returned by the Fleet API.
    DownloadSourceId string
    The identifier for the Elastic Agent binary download server.
    FleetServerHostId string
    The identifier for the Fleet server host.
    GlobalDataTags map[string]GetFleetAgentPolicyGlobalDataTags
    User-defined tags. Keyed by tag name; each entry has exactly one of string_value or number_value.
    HostNameFormat string
    Hostname format reported for agents in this policy. hostname is the short hostname; fqdn is the fully qualified domain name.
    Id string
    The ID of this agent policy.
    InactivityTimeout string
    Time an agent can be inactive before it is marked inactive. A duration string such as 30s, 2m, or 1h.
    IsProtected bool
    Whether tamper protection is enabled for this agent policy (Fleet API is_protected).
    MonitorLogs bool
    Whether collection of agent logs is enabled.
    MonitorMetrics bool
    Whether collection of agent metrics is enabled.
    MonitoringOutputId string
    The identifier for monitoring output.
    Name string
    The name of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    Namespace string
    The namespace of the agent policy.
    PolicyId string
    The identifier of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    RequiredVersions map[string]float64
    Map of agent versions to target percentages for automatic upgrade. The key is the target version and the value is the percentage of agents to upgrade to that version.
    SpaceId string
    An identifier for the space. If space_id is not provided, the default space is used.
    SpaceIds []string
    The Kibana space IDs that this agent policy is available in.
    SupportsAgentless bool
    Whether the agent policy supports agentless data collection.
    UnenrollmentTimeout string
    Time an agent can be inactive before it is automatically unenrolled. A duration string such as 30s, 2m, or 1h.
    KibanaConnections []GetFleetAgentPolicyKibanaConnection
    Kibana connection configuration block.
    advanced_monitoring_options object
    Advanced monitoring options for the agent policy, including the HTTP monitoring endpoint and diagnostic settings.
    advanced_settings object
    Advanced agent settings for logging, resource limits, and downloads.
    data_output_id string
    The identifier for the data output.
    description string
    The description of the agent policy, as returned by the Fleet API.
    download_source_id string
    The identifier for the Elastic Agent binary download server.
    fleet_server_host_id string
    The identifier for the Fleet server host.
    global_data_tags map(object)
    User-defined tags. Keyed by tag name; each entry has exactly one of string_value or number_value.
    host_name_format string
    Hostname format reported for agents in this policy. hostname is the short hostname; fqdn is the fully qualified domain name.
    id string
    The ID of this agent policy.
    inactivity_timeout string
    Time an agent can be inactive before it is marked inactive. A duration string such as 30s, 2m, or 1h.
    is_protected bool
    Whether tamper protection is enabled for this agent policy (Fleet API is_protected).
    monitor_logs bool
    Whether collection of agent logs is enabled.
    monitor_metrics bool
    Whether collection of agent metrics is enabled.
    monitoring_output_id string
    The identifier for monitoring output.
    name string
    The name of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    namespace string
    The namespace of the agent policy.
    policy_id string
    The identifier of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    required_versions map(number)
    Map of agent versions to target percentages for automatic upgrade. The key is the target version and the value is the percentage of agents to upgrade to that version.
    space_id string
    An identifier for the space. If space_id is not provided, the default space is used.
    space_ids list(string)
    The Kibana space IDs that this agent policy is available in.
    supports_agentless bool
    Whether the agent policy supports agentless data collection.
    unenrollment_timeout string
    Time an agent can be inactive before it is automatically unenrolled. A duration string such as 30s, 2m, or 1h.
    kibana_connections list(object)
    Kibana connection configuration block.
    advancedMonitoringOptions GetFleetAgentPolicyAdvancedMonitoringOptions
    Advanced monitoring options for the agent policy, including the HTTP monitoring endpoint and diagnostic settings.
    advancedSettings GetFleetAgentPolicyAdvancedSettings
    Advanced agent settings for logging, resource limits, and downloads.
    dataOutputId String
    The identifier for the data output.
    description String
    The description of the agent policy, as returned by the Fleet API.
    downloadSourceId String
    The identifier for the Elastic Agent binary download server.
    fleetServerHostId String
    The identifier for the Fleet server host.
    globalDataTags Map<String,GetFleetAgentPolicyGlobalDataTags>
    User-defined tags. Keyed by tag name; each entry has exactly one of string_value or number_value.
    hostNameFormat String
    Hostname format reported for agents in this policy. hostname is the short hostname; fqdn is the fully qualified domain name.
    id String
    The ID of this agent policy.
    inactivityTimeout String
    Time an agent can be inactive before it is marked inactive. A duration string such as 30s, 2m, or 1h.
    isProtected Boolean
    Whether tamper protection is enabled for this agent policy (Fleet API is_protected).
    monitorLogs Boolean
    Whether collection of agent logs is enabled.
    monitorMetrics Boolean
    Whether collection of agent metrics is enabled.
    monitoringOutputId String
    The identifier for monitoring output.
    name String
    The name of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    namespace String
    The namespace of the agent policy.
    policyId String
    The identifier of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    requiredVersions Map<String,Double>
    Map of agent versions to target percentages for automatic upgrade. The key is the target version and the value is the percentage of agents to upgrade to that version.
    spaceId String
    An identifier for the space. If space_id is not provided, the default space is used.
    spaceIds List<String>
    The Kibana space IDs that this agent policy is available in.
    supportsAgentless Boolean
    Whether the agent policy supports agentless data collection.
    unenrollmentTimeout String
    Time an agent can be inactive before it is automatically unenrolled. A duration string such as 30s, 2m, or 1h.
    kibanaConnections List<GetFleetAgentPolicyKibanaConnection>
    Kibana connection configuration block.
    advancedMonitoringOptions GetFleetAgentPolicyAdvancedMonitoringOptions
    Advanced monitoring options for the agent policy, including the HTTP monitoring endpoint and diagnostic settings.
    advancedSettings GetFleetAgentPolicyAdvancedSettings
    Advanced agent settings for logging, resource limits, and downloads.
    dataOutputId string
    The identifier for the data output.
    description string
    The description of the agent policy, as returned by the Fleet API.
    downloadSourceId string
    The identifier for the Elastic Agent binary download server.
    fleetServerHostId string
    The identifier for the Fleet server host.
    globalDataTags {[key: string]: GetFleetAgentPolicyGlobalDataTags}
    User-defined tags. Keyed by tag name; each entry has exactly one of string_value or number_value.
    hostNameFormat string
    Hostname format reported for agents in this policy. hostname is the short hostname; fqdn is the fully qualified domain name.
    id string
    The ID of this agent policy.
    inactivityTimeout string
    Time an agent can be inactive before it is marked inactive. A duration string such as 30s, 2m, or 1h.
    isProtected boolean
    Whether tamper protection is enabled for this agent policy (Fleet API is_protected).
    monitorLogs boolean
    Whether collection of agent logs is enabled.
    monitorMetrics boolean
    Whether collection of agent metrics is enabled.
    monitoringOutputId string
    The identifier for monitoring output.
    name string
    The name of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    namespace string
    The namespace of the agent policy.
    policyId string
    The identifier of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    requiredVersions {[key: string]: number}
    Map of agent versions to target percentages for automatic upgrade. The key is the target version and the value is the percentage of agents to upgrade to that version.
    spaceId string
    An identifier for the space. If space_id is not provided, the default space is used.
    spaceIds string[]
    The Kibana space IDs that this agent policy is available in.
    supportsAgentless boolean
    Whether the agent policy supports agentless data collection.
    unenrollmentTimeout string
    Time an agent can be inactive before it is automatically unenrolled. A duration string such as 30s, 2m, or 1h.
    kibanaConnections GetFleetAgentPolicyKibanaConnection[]
    Kibana connection configuration block.
    advanced_monitoring_options GetFleetAgentPolicyAdvancedMonitoringOptions
    Advanced monitoring options for the agent policy, including the HTTP monitoring endpoint and diagnostic settings.
    advanced_settings GetFleetAgentPolicyAdvancedSettings
    Advanced agent settings for logging, resource limits, and downloads.
    data_output_id str
    The identifier for the data output.
    description str
    The description of the agent policy, as returned by the Fleet API.
    download_source_id str
    The identifier for the Elastic Agent binary download server.
    fleet_server_host_id str
    The identifier for the Fleet server host.
    global_data_tags Mapping[str, GetFleetAgentPolicyGlobalDataTags]
    User-defined tags. Keyed by tag name; each entry has exactly one of string_value or number_value.
    host_name_format str
    Hostname format reported for agents in this policy. hostname is the short hostname; fqdn is the fully qualified domain name.
    id str
    The ID of this agent policy.
    inactivity_timeout str
    Time an agent can be inactive before it is marked inactive. A duration string such as 30s, 2m, or 1h.
    is_protected bool
    Whether tamper protection is enabled for this agent policy (Fleet API is_protected).
    monitor_logs bool
    Whether collection of agent logs is enabled.
    monitor_metrics bool
    Whether collection of agent metrics is enabled.
    monitoring_output_id str
    The identifier for monitoring output.
    name str
    The name of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    namespace str
    The namespace of the agent policy.
    policy_id str
    The identifier of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    required_versions Mapping[str, float]
    Map of agent versions to target percentages for automatic upgrade. The key is the target version and the value is the percentage of agents to upgrade to that version.
    space_id str
    An identifier for the space. If space_id is not provided, the default space is used.
    space_ids Sequence[str]
    The Kibana space IDs that this agent policy is available in.
    supports_agentless bool
    Whether the agent policy supports agentless data collection.
    unenrollment_timeout str
    Time an agent can be inactive before it is automatically unenrolled. A duration string such as 30s, 2m, or 1h.
    kibana_connections Sequence[GetFleetAgentPolicyKibanaConnection]
    Kibana connection configuration block.
    advancedMonitoringOptions Property Map
    Advanced monitoring options for the agent policy, including the HTTP monitoring endpoint and diagnostic settings.
    advancedSettings Property Map
    Advanced agent settings for logging, resource limits, and downloads.
    dataOutputId String
    The identifier for the data output.
    description String
    The description of the agent policy, as returned by the Fleet API.
    downloadSourceId String
    The identifier for the Elastic Agent binary download server.
    fleetServerHostId String
    The identifier for the Fleet server host.
    globalDataTags Map<Property Map>
    User-defined tags. Keyed by tag name; each entry has exactly one of string_value or number_value.
    hostNameFormat String
    Hostname format reported for agents in this policy. hostname is the short hostname; fqdn is the fully qualified domain name.
    id String
    The ID of this agent policy.
    inactivityTimeout String
    Time an agent can be inactive before it is marked inactive. A duration string such as 30s, 2m, or 1h.
    isProtected Boolean
    Whether tamper protection is enabled for this agent policy (Fleet API is_protected).
    monitorLogs Boolean
    Whether collection of agent logs is enabled.
    monitorMetrics Boolean
    Whether collection of agent metrics is enabled.
    monitoringOutputId String
    The identifier for monitoring output.
    name String
    The name of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    namespace String
    The namespace of the agent policy.
    policyId String
    The identifier of the agent policy. Set exactly one of policy_id or name; the other is populated from the API response.
    requiredVersions Map<Number>
    Map of agent versions to target percentages for automatic upgrade. The key is the target version and the value is the percentage of agents to upgrade to that version.
    spaceId String
    An identifier for the space. If space_id is not provided, the default space is used.
    spaceIds List<String>
    The Kibana space IDs that this agent policy is available in.
    supportsAgentless Boolean
    Whether the agent policy supports agentless data collection.
    unenrollmentTimeout String
    Time an agent can be inactive before it is automatically unenrolled. A duration string such as 30s, 2m, or 1h.
    kibanaConnections List<Property Map>
    Kibana connection configuration block.

    Supporting Types

    GetFleetAgentPolicyAdvancedMonitoringOptions

    Diagnostics GetFleetAgentPolicyAdvancedMonitoringOptionsDiagnostics
    Diagnostic settings for rate limiting and file upload behavior.
    HttpMonitoringEndpoint GetFleetAgentPolicyAdvancedMonitoringOptionsHttpMonitoringEndpoint
    HTTP monitoring endpoint configuration for agent health checks and liveness probes.
    Diagnostics GetFleetAgentPolicyAdvancedMonitoringOptionsDiagnostics
    Diagnostic settings for rate limiting and file upload behavior.
    HttpMonitoringEndpoint GetFleetAgentPolicyAdvancedMonitoringOptionsHttpMonitoringEndpoint
    HTTP monitoring endpoint configuration for agent health checks and liveness probes.
    diagnostics object
    Diagnostic settings for rate limiting and file upload behavior.
    http_monitoring_endpoint object
    HTTP monitoring endpoint configuration for agent health checks and liveness probes.
    diagnostics GetFleetAgentPolicyAdvancedMonitoringOptionsDiagnostics
    Diagnostic settings for rate limiting and file upload behavior.
    httpMonitoringEndpoint GetFleetAgentPolicyAdvancedMonitoringOptionsHttpMonitoringEndpoint
    HTTP monitoring endpoint configuration for agent health checks and liveness probes.
    diagnostics GetFleetAgentPolicyAdvancedMonitoringOptionsDiagnostics
    Diagnostic settings for rate limiting and file upload behavior.
    httpMonitoringEndpoint GetFleetAgentPolicyAdvancedMonitoringOptionsHttpMonitoringEndpoint
    HTTP monitoring endpoint configuration for agent health checks and liveness probes.
    diagnostics GetFleetAgentPolicyAdvancedMonitoringOptionsDiagnostics
    Diagnostic settings for rate limiting and file upload behavior.
    http_monitoring_endpoint GetFleetAgentPolicyAdvancedMonitoringOptionsHttpMonitoringEndpoint
    HTTP monitoring endpoint configuration for agent health checks and liveness probes.
    diagnostics Property Map
    Diagnostic settings for rate limiting and file upload behavior.
    httpMonitoringEndpoint Property Map
    HTTP monitoring endpoint configuration for agent health checks and liveness probes.

    GetFleetAgentPolicyAdvancedMonitoringOptionsDiagnostics

    FileUploader GetFleetAgentPolicyAdvancedMonitoringOptionsDiagnosticsFileUploader
    Diagnostic file upload retry configuration.
    RateLimits GetFleetAgentPolicyAdvancedMonitoringOptionsDiagnosticsRateLimits
    Rate limiting configuration for diagnostics requests from Fleet.
    FileUploader GetFleetAgentPolicyAdvancedMonitoringOptionsDiagnosticsFileUploader
    Diagnostic file upload retry configuration.
    RateLimits GetFleetAgentPolicyAdvancedMonitoringOptionsDiagnosticsRateLimits
    Rate limiting configuration for diagnostics requests from Fleet.
    file_uploader object
    Diagnostic file upload retry configuration.
    rate_limits object
    Rate limiting configuration for diagnostics requests from Fleet.
    fileUploader GetFleetAgentPolicyAdvancedMonitoringOptionsDiagnosticsFileUploader
    Diagnostic file upload retry configuration.
    rateLimits GetFleetAgentPolicyAdvancedMonitoringOptionsDiagnosticsRateLimits
    Rate limiting configuration for diagnostics requests from Fleet.
    fileUploader GetFleetAgentPolicyAdvancedMonitoringOptionsDiagnosticsFileUploader
    Diagnostic file upload retry configuration.
    rateLimits GetFleetAgentPolicyAdvancedMonitoringOptionsDiagnosticsRateLimits
    Rate limiting configuration for diagnostics requests from Fleet.
    file_uploader GetFleetAgentPolicyAdvancedMonitoringOptionsDiagnosticsFileUploader
    Diagnostic file upload retry configuration.
    rate_limits GetFleetAgentPolicyAdvancedMonitoringOptionsDiagnosticsRateLimits
    Rate limiting configuration for diagnostics requests from Fleet.
    fileUploader Property Map
    Diagnostic file upload retry configuration.
    rateLimits Property Map
    Rate limiting configuration for diagnostics requests from Fleet.

    GetFleetAgentPolicyAdvancedMonitoringOptionsDiagnosticsFileUploader

    BackoffDuration string
    Maximum backoff duration between retry attempts.
    InitDuration string
    Initial duration before the first retry attempt.
    MaxRetries double
    Maximum number of retry attempts for file uploads.
    BackoffDuration string
    Maximum backoff duration between retry attempts.
    InitDuration string
    Initial duration before the first retry attempt.
    MaxRetries float64
    Maximum number of retry attempts for file uploads.
    backoff_duration string
    Maximum backoff duration between retry attempts.
    init_duration string
    Initial duration before the first retry attempt.
    max_retries number
    Maximum number of retry attempts for file uploads.
    backoffDuration String
    Maximum backoff duration between retry attempts.
    initDuration String
    Initial duration before the first retry attempt.
    maxRetries Double
    Maximum number of retry attempts for file uploads.
    backoffDuration string
    Maximum backoff duration between retry attempts.
    initDuration string
    Initial duration before the first retry attempt.
    maxRetries number
    Maximum number of retry attempts for file uploads.
    backoff_duration str
    Maximum backoff duration between retry attempts.
    init_duration str
    Initial duration before the first retry attempt.
    max_retries float
    Maximum number of retry attempts for file uploads.
    backoffDuration String
    Maximum backoff duration between retry attempts.
    initDuration String
    Initial duration before the first retry attempt.
    maxRetries Number
    Maximum number of retry attempts for file uploads.

    GetFleetAgentPolicyAdvancedMonitoringOptionsDiagnosticsRateLimits

    Burst double
    Rate limiting burst count for diagnostics requests.
    Interval string
    Rate limiting interval for diagnostics requests.
    Burst float64
    Rate limiting burst count for diagnostics requests.
    Interval string
    Rate limiting interval for diagnostics requests.
    burst number
    Rate limiting burst count for diagnostics requests.
    interval string
    Rate limiting interval for diagnostics requests.
    burst Double
    Rate limiting burst count for diagnostics requests.
    interval String
    Rate limiting interval for diagnostics requests.
    burst number
    Rate limiting burst count for diagnostics requests.
    interval string
    Rate limiting interval for diagnostics requests.
    burst float
    Rate limiting burst count for diagnostics requests.
    interval str
    Rate limiting interval for diagnostics requests.
    burst Number
    Rate limiting burst count for diagnostics requests.
    interval String
    Rate limiting interval for diagnostics requests.

    GetFleetAgentPolicyAdvancedMonitoringOptionsHttpMonitoringEndpoint

    BufferEnabled bool
    Whether the monitoring buffer for the HTTP endpoint is enabled.
    Enabled bool
    Whether the HTTP monitoring endpoint is enabled.
    Host string
    Host for the HTTP monitoring endpoint.
    Port double
    Port for the HTTP monitoring endpoint.
    PprofEnabled bool
    Whether /debug/pprof profiling endpoints are enabled.
    BufferEnabled bool
    Whether the monitoring buffer for the HTTP endpoint is enabled.
    Enabled bool
    Whether the HTTP monitoring endpoint is enabled.
    Host string
    Host for the HTTP monitoring endpoint.
    Port float64
    Port for the HTTP monitoring endpoint.
    PprofEnabled bool
    Whether /debug/pprof profiling endpoints are enabled.
    buffer_enabled bool
    Whether the monitoring buffer for the HTTP endpoint is enabled.
    enabled bool
    Whether the HTTP monitoring endpoint is enabled.
    host string
    Host for the HTTP monitoring endpoint.
    port number
    Port for the HTTP monitoring endpoint.
    pprof_enabled bool
    Whether /debug/pprof profiling endpoints are enabled.
    bufferEnabled Boolean
    Whether the monitoring buffer for the HTTP endpoint is enabled.
    enabled Boolean
    Whether the HTTP monitoring endpoint is enabled.
    host String
    Host for the HTTP monitoring endpoint.
    port Double
    Port for the HTTP monitoring endpoint.
    pprofEnabled Boolean
    Whether /debug/pprof profiling endpoints are enabled.
    bufferEnabled boolean
    Whether the monitoring buffer for the HTTP endpoint is enabled.
    enabled boolean
    Whether the HTTP monitoring endpoint is enabled.
    host string
    Host for the HTTP monitoring endpoint.
    port number
    Port for the HTTP monitoring endpoint.
    pprofEnabled boolean
    Whether /debug/pprof profiling endpoints are enabled.
    buffer_enabled bool
    Whether the monitoring buffer for the HTTP endpoint is enabled.
    enabled bool
    Whether the HTTP monitoring endpoint is enabled.
    host str
    Host for the HTTP monitoring endpoint.
    port float
    Port for the HTTP monitoring endpoint.
    pprof_enabled bool
    Whether /debug/pprof profiling endpoints are enabled.
    bufferEnabled Boolean
    Whether the monitoring buffer for the HTTP endpoint is enabled.
    enabled Boolean
    Whether the HTTP monitoring endpoint is enabled.
    host String
    Host for the HTTP monitoring endpoint.
    port Number
    Port for the HTTP monitoring endpoint.
    pprofEnabled Boolean
    Whether /debug/pprof profiling endpoints are enabled.

    GetFleetAgentPolicyAdvancedSettings

    DownloadTargetDirectory string
    Target directory for downloading agent updates.
    DownloadTimeout string
    Timeout for downloading agent updates.
    FeaturesDisablePolicyChangeAcksEnabled bool
    Whether policy change acknowledgements from agents are disabled.
    FeaturesIncludeTagsInEventsEnabled bool
    Whether the agent's tags are included in events it sends.
    GoMaxProcs double
    Maximum number of CPUs that the agent can use (GOMAXPROCS).
    Internal string
    Advanced internal agent settings as free-form YAML.
    LoggingFilesInterval string
    Interval for log file rotation.
    LoggingFilesKeepfiles double
    Number of rotated log files to keep.
    LoggingFilesRotateeverybytes double
    Rotate log files when they reach this size in bytes.
    LoggingLevel string
    Logging level for the agent.
    LoggingMetricsPeriod string
    Period for logging agent metrics.
    LoggingToFiles bool
    Whether logging to files is enabled.
    MonitoringRuntimeExperimental string
    Experimental runtime monitoring mode.
    DownloadTargetDirectory string
    Target directory for downloading agent updates.
    DownloadTimeout string
    Timeout for downloading agent updates.
    FeaturesDisablePolicyChangeAcksEnabled bool
    Whether policy change acknowledgements from agents are disabled.
    FeaturesIncludeTagsInEventsEnabled bool
    Whether the agent's tags are included in events it sends.
    GoMaxProcs float64
    Maximum number of CPUs that the agent can use (GOMAXPROCS).
    Internal string
    Advanced internal agent settings as free-form YAML.
    LoggingFilesInterval string
    Interval for log file rotation.
    LoggingFilesKeepfiles float64
    Number of rotated log files to keep.
    LoggingFilesRotateeverybytes float64
    Rotate log files when they reach this size in bytes.
    LoggingLevel string
    Logging level for the agent.
    LoggingMetricsPeriod string
    Period for logging agent metrics.
    LoggingToFiles bool
    Whether logging to files is enabled.
    MonitoringRuntimeExperimental string
    Experimental runtime monitoring mode.
    download_target_directory string
    Target directory for downloading agent updates.
    download_timeout string
    Timeout for downloading agent updates.
    features_disable_policy_change_acks_enabled bool
    Whether policy change acknowledgements from agents are disabled.
    features_include_tags_in_events_enabled bool
    Whether the agent's tags are included in events it sends.
    go_max_procs number
    Maximum number of CPUs that the agent can use (GOMAXPROCS).
    internal string
    Advanced internal agent settings as free-form YAML.
    logging_files_interval string
    Interval for log file rotation.
    logging_files_keepfiles number
    Number of rotated log files to keep.
    logging_files_rotateeverybytes number
    Rotate log files when they reach this size in bytes.
    logging_level string
    Logging level for the agent.
    logging_metrics_period string
    Period for logging agent metrics.
    logging_to_files bool
    Whether logging to files is enabled.
    monitoring_runtime_experimental string
    Experimental runtime monitoring mode.
    downloadTargetDirectory String
    Target directory for downloading agent updates.
    downloadTimeout String
    Timeout for downloading agent updates.
    featuresDisablePolicyChangeAcksEnabled Boolean
    Whether policy change acknowledgements from agents are disabled.
    featuresIncludeTagsInEventsEnabled Boolean
    Whether the agent's tags are included in events it sends.
    goMaxProcs Double
    Maximum number of CPUs that the agent can use (GOMAXPROCS).
    internal String
    Advanced internal agent settings as free-form YAML.
    loggingFilesInterval String
    Interval for log file rotation.
    loggingFilesKeepfiles Double
    Number of rotated log files to keep.
    loggingFilesRotateeverybytes Double
    Rotate log files when they reach this size in bytes.
    loggingLevel String
    Logging level for the agent.
    loggingMetricsPeriod String
    Period for logging agent metrics.
    loggingToFiles Boolean
    Whether logging to files is enabled.
    monitoringRuntimeExperimental String
    Experimental runtime monitoring mode.
    downloadTargetDirectory string
    Target directory for downloading agent updates.
    downloadTimeout string
    Timeout for downloading agent updates.
    featuresDisablePolicyChangeAcksEnabled boolean
    Whether policy change acknowledgements from agents are disabled.
    featuresIncludeTagsInEventsEnabled boolean
    Whether the agent's tags are included in events it sends.
    goMaxProcs number
    Maximum number of CPUs that the agent can use (GOMAXPROCS).
    internal string
    Advanced internal agent settings as free-form YAML.
    loggingFilesInterval string
    Interval for log file rotation.
    loggingFilesKeepfiles number
    Number of rotated log files to keep.
    loggingFilesRotateeverybytes number
    Rotate log files when they reach this size in bytes.
    loggingLevel string
    Logging level for the agent.
    loggingMetricsPeriod string
    Period for logging agent metrics.
    loggingToFiles boolean
    Whether logging to files is enabled.
    monitoringRuntimeExperimental string
    Experimental runtime monitoring mode.
    download_target_directory str
    Target directory for downloading agent updates.
    download_timeout str
    Timeout for downloading agent updates.
    features_disable_policy_change_acks_enabled bool
    Whether policy change acknowledgements from agents are disabled.
    features_include_tags_in_events_enabled bool
    Whether the agent's tags are included in events it sends.
    go_max_procs float
    Maximum number of CPUs that the agent can use (GOMAXPROCS).
    internal str
    Advanced internal agent settings as free-form YAML.
    logging_files_interval str
    Interval for log file rotation.
    logging_files_keepfiles float
    Number of rotated log files to keep.
    logging_files_rotateeverybytes float
    Rotate log files when they reach this size in bytes.
    logging_level str
    Logging level for the agent.
    logging_metrics_period str
    Period for logging agent metrics.
    logging_to_files bool
    Whether logging to files is enabled.
    monitoring_runtime_experimental str
    Experimental runtime monitoring mode.
    downloadTargetDirectory String
    Target directory for downloading agent updates.
    downloadTimeout String
    Timeout for downloading agent updates.
    featuresDisablePolicyChangeAcksEnabled Boolean
    Whether policy change acknowledgements from agents are disabled.
    featuresIncludeTagsInEventsEnabled Boolean
    Whether the agent's tags are included in events it sends.
    goMaxProcs Number
    Maximum number of CPUs that the agent can use (GOMAXPROCS).
    internal String
    Advanced internal agent settings as free-form YAML.
    loggingFilesInterval String
    Interval for log file rotation.
    loggingFilesKeepfiles Number
    Number of rotated log files to keep.
    loggingFilesRotateeverybytes Number
    Rotate log files when they reach this size in bytes.
    loggingLevel String
    Logging level for the agent.
    loggingMetricsPeriod String
    Period for logging agent metrics.
    loggingToFiles Boolean
    Whether logging to files is enabled.
    monitoringRuntimeExperimental String
    Experimental runtime monitoring mode.

    GetFleetAgentPolicyGlobalDataTags

    NumberValue double
    Number value for the tag.
    StringValue string
    String value for the tag.
    NumberValue float64
    Number value for the tag.
    StringValue string
    String value for the tag.
    number_value number
    Number value for the tag.
    string_value string
    String value for the tag.
    numberValue Double
    Number value for the tag.
    stringValue String
    String value for the tag.
    numberValue number
    Number value for the tag.
    stringValue string
    String value for the tag.
    number_value float
    Number value for the tag.
    string_value str
    String value for the tag.
    numberValue Number
    Number value for the tag.
    stringValue String
    String value for the tag.

    GetFleetAgentPolicyKibanaConnection

    ApiKey string
    API Key to use for authentication to Kibana
    BearerToken string
    Bearer Token to use for authentication to Kibana
    CaCerts List<string>
    A list of paths to CA certificates to validate the certificate presented by the Kibana server.
    Endpoints List<string>
    Headers Dictionary<string, string>
    A map of headers to be sent with each request to Kibana. Custom header values may appear in provider debug logs: Authorization is masked, but arbitrary custom proxy-token headers are not generally redacted.
    Insecure bool
    Disable TLS certificate validation
    Password string
    Password to use for API authentication to Kibana.
    Username string
    Username to use for API authentication to Kibana.
    ApiKey string
    API Key to use for authentication to Kibana
    BearerToken string
    Bearer Token to use for authentication to Kibana
    CaCerts []string
    A list of paths to CA certificates to validate the certificate presented by the Kibana server.
    Endpoints []string
    Headers map[string]string
    A map of headers to be sent with each request to Kibana. Custom header values may appear in provider debug logs: Authorization is masked, but arbitrary custom proxy-token headers are not generally redacted.
    Insecure bool
    Disable TLS certificate validation
    Password string
    Password to use for API authentication to Kibana.
    Username string
    Username to use for API authentication to Kibana.
    api_key string
    API Key to use for authentication to Kibana
    bearer_token string
    Bearer Token to use for authentication to Kibana
    ca_certs list(string)
    A list of paths to CA certificates to validate the certificate presented by the Kibana server.
    endpoints list(string)
    headers map(string)
    A map of headers to be sent with each request to Kibana. Custom header values may appear in provider debug logs: Authorization is masked, but arbitrary custom proxy-token headers are not generally redacted.
    insecure bool
    Disable TLS certificate validation
    password string
    Password to use for API authentication to Kibana.
    username string
    Username to use for API authentication to Kibana.
    apiKey String
    API Key to use for authentication to Kibana
    bearerToken String
    Bearer Token to use for authentication to Kibana
    caCerts List<String>
    A list of paths to CA certificates to validate the certificate presented by the Kibana server.
    endpoints List<String>
    headers Map<String,String>
    A map of headers to be sent with each request to Kibana. Custom header values may appear in provider debug logs: Authorization is masked, but arbitrary custom proxy-token headers are not generally redacted.
    insecure Boolean
    Disable TLS certificate validation
    password String
    Password to use for API authentication to Kibana.
    username String
    Username to use for API authentication to Kibana.
    apiKey string
    API Key to use for authentication to Kibana
    bearerToken string
    Bearer Token to use for authentication to Kibana
    caCerts string[]
    A list of paths to CA certificates to validate the certificate presented by the Kibana server.
    endpoints string[]
    headers {[key: string]: string}
    A map of headers to be sent with each request to Kibana. Custom header values may appear in provider debug logs: Authorization is masked, but arbitrary custom proxy-token headers are not generally redacted.
    insecure boolean
    Disable TLS certificate validation
    password string
    Password to use for API authentication to Kibana.
    username string
    Username to use for API authentication to Kibana.
    api_key str
    API Key to use for authentication to Kibana
    bearer_token str
    Bearer Token to use for authentication to Kibana
    ca_certs Sequence[str]
    A list of paths to CA certificates to validate the certificate presented by the Kibana server.
    endpoints Sequence[str]
    headers Mapping[str, str]
    A map of headers to be sent with each request to Kibana. Custom header values may appear in provider debug logs: Authorization is masked, but arbitrary custom proxy-token headers are not generally redacted.
    insecure bool
    Disable TLS certificate validation
    password str
    Password to use for API authentication to Kibana.
    username str
    Username to use for API authentication to Kibana.
    apiKey String
    API Key to use for authentication to Kibana
    bearerToken String
    Bearer Token to use for authentication to Kibana
    caCerts List<String>
    A list of paths to CA certificates to validate the certificate presented by the Kibana server.
    endpoints List<String>
    headers Map<String>
    A map of headers to be sent with each request to Kibana. Custom header values may appear in provider debug logs: Authorization is masked, but arbitrary custom proxy-token headers are not generally redacted.
    insecure Boolean
    Disable TLS certificate validation
    password String
    Password to use for API authentication to Kibana.
    username String
    Username to use for API authentication to Kibana.

    Package Details

    Repository
    elasticstack elastic/terraform-provider-elasticstack
    License
    Notes
    This Pulumi package is based on the elasticstack Terraform Provider.
    elasticstack
    Viewing docs for elasticstack 0.17.0
    published on Tuesday, Nov 10, 2026 by elastic

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial