Creates a new Fleet Agent Policy. 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 testPolicy = new elasticstack.FleetAgentPolicy("test_policy", {
name: "Test Policy",
namespace: "default",
description: "Test Agent Policy",
sysMonitoring: true,
monitorLogs: true,
monitorMetrics: true,
spaceIds: ["default"],
hostNameFormat: "hostname",
globalDataTags: {
first_tag: {
stringValue: "tag_value",
},
second_tag: {
numberValue: 1.2,
},
},
});
import pulumi
import pulumi_elasticstack as elasticstack
test_policy = elasticstack.FleetAgentPolicy("test_policy",
name="Test Policy",
namespace="default",
description="Test Agent Policy",
sys_monitoring=True,
monitor_logs=True,
monitor_metrics=True,
space_ids=["default"],
host_name_format="hostname",
global_data_tags={
"first_tag": {
"string_value": "tag_value",
},
"second_tag": {
"number_value": 1.2,
},
})
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 {
_, err := elasticstack.NewFleetAgentPolicy(ctx, "test_policy", &elasticstack.FleetAgentPolicyArgs{
Name: pulumi.String("Test Policy"),
Namespace: pulumi.String("default"),
Description: pulumi.String("Test Agent Policy"),
SysMonitoring: pulumi.Bool(true),
MonitorLogs: pulumi.Bool(true),
MonitorMetrics: pulumi.Bool(true),
SpaceIds: pulumi.StringArray{
pulumi.String("default"),
},
HostNameFormat: pulumi.String("hostname"),
GlobalDataTags: elasticstack.FleetAgentPolicyGlobalDataTagsMap{
"first_tag": &elasticstack.FleetAgentPolicyGlobalDataTagsArgs{
StringValue: pulumi.String("tag_value"),
},
"second_tag": &elasticstack.FleetAgentPolicyGlobalDataTagsArgs{
NumberValue: pulumi.Float64(1.2),
},
},
})
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 testPolicy = new Elasticstack.FleetAgentPolicy("test_policy", new()
{
Name = "Test Policy",
Namespace = "default",
Description = "Test Agent Policy",
SysMonitoring = true,
MonitorLogs = true,
MonitorMetrics = true,
SpaceIds = new[]
{
"default",
},
HostNameFormat = "hostname",
GlobalDataTags =
{
{ "first_tag", new Elasticstack.Inputs.FleetAgentPolicyGlobalDataTagsArgs
{
StringValue = "tag_value",
} },
{ "second_tag", new Elasticstack.Inputs.FleetAgentPolicyGlobalDataTagsArgs
{
NumberValue = 1.2,
} },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.elasticstack.FleetAgentPolicy;
import com.pulumi.elasticstack.FleetAgentPolicyArgs;
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) {
var testPolicy = new FleetAgentPolicy("testPolicy", FleetAgentPolicyArgs.builder()
.name("Test Policy")
.namespace("default")
.description("Test Agent Policy")
.sysMonitoring(true)
.monitorLogs(true)
.monitorMetrics(true)
.spaceIds("default")
.hostNameFormat("hostname")
.globalDataTags(Map.ofEntries(
Map.entry("first_tag", FleetAgentPolicyGlobalDataTagsArgs.builder()
.stringValue("tag_value")
.build()),
Map.entry("second_tag", FleetAgentPolicyGlobalDataTagsArgs.builder()
.numberValue(1.2)
.build())
))
.build());
}
}
resources:
testPolicy:
type: elasticstack:FleetAgentPolicy
name: test_policy
properties:
name: Test Policy
namespace: default
description: Test Agent Policy
sysMonitoring: true
monitorLogs: true
monitorMetrics: true
spaceIds:
- default
hostNameFormat: hostname
globalDataTags:
first_tag:
stringValue: tag_value
second_tag:
numberValue: 1.2
Create FleetAgentPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FleetAgentPolicy(name: string, args: FleetAgentPolicyArgs, opts?: CustomResourceOptions);@overload
def FleetAgentPolicy(resource_name: str,
args: FleetAgentPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FleetAgentPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
namespace: Optional[str] = None,
monitor_metrics: Optional[bool] = None,
description: Optional[str] = None,
fleet_server_host_id: Optional[str] = None,
global_data_tags: Optional[Mapping[str, FleetAgentPolicyGlobalDataTagsArgs]] = None,
host_name_format: Optional[str] = None,
inactivity_timeout: Optional[str] = None,
monitor_logs: Optional[bool] = None,
data_output_id: Optional[str] = None,
download_source_id: Optional[str] = None,
monitoring_output_id: Optional[str] = None,
name: Optional[str] = None,
policy_id: Optional[str] = None,
required_versions: Optional[Mapping[str, float]] = None,
skip_destroy: Optional[bool] = None,
space_ids: Optional[Sequence[str]] = None,
supports_agentless: Optional[bool] = None,
sys_monitoring: Optional[bool] = None,
unenrollment_timeout: Optional[str] = None)func NewFleetAgentPolicy(ctx *Context, name string, args FleetAgentPolicyArgs, opts ...ResourceOption) (*FleetAgentPolicy, error)public FleetAgentPolicy(string name, FleetAgentPolicyArgs args, CustomResourceOptions? opts = null)
public FleetAgentPolicy(String name, FleetAgentPolicyArgs args)
public FleetAgentPolicy(String name, FleetAgentPolicyArgs args, CustomResourceOptions options)
type: elasticstack:FleetAgentPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args FleetAgentPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args FleetAgentPolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args FleetAgentPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FleetAgentPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FleetAgentPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var fleetAgentPolicyResource = new Elasticstack.FleetAgentPolicy("fleetAgentPolicyResource", new()
{
Namespace = "string",
MonitorMetrics = false,
Description = "string",
FleetServerHostId = "string",
GlobalDataTags =
{
{ "string", new Elasticstack.Inputs.FleetAgentPolicyGlobalDataTagsArgs
{
NumberValue = 0,
StringValue = "string",
} },
},
HostNameFormat = "string",
InactivityTimeout = "string",
MonitorLogs = false,
DataOutputId = "string",
DownloadSourceId = "string",
MonitoringOutputId = "string",
Name = "string",
PolicyId = "string",
RequiredVersions =
{
{ "string", 0 },
},
SkipDestroy = false,
SpaceIds = new[]
{
"string",
},
SupportsAgentless = false,
SysMonitoring = false,
UnenrollmentTimeout = "string",
});
example, err := elasticstack.NewFleetAgentPolicy(ctx, "fleetAgentPolicyResource", &elasticstack.FleetAgentPolicyArgs{
Namespace: pulumi.String("string"),
MonitorMetrics: pulumi.Bool(false),
Description: pulumi.String("string"),
FleetServerHostId: pulumi.String("string"),
GlobalDataTags: elasticstack.FleetAgentPolicyGlobalDataTagsMap{
"string": &elasticstack.FleetAgentPolicyGlobalDataTagsArgs{
NumberValue: pulumi.Float64(0),
StringValue: pulumi.String("string"),
},
},
HostNameFormat: pulumi.String("string"),
InactivityTimeout: pulumi.String("string"),
MonitorLogs: pulumi.Bool(false),
DataOutputId: pulumi.String("string"),
DownloadSourceId: pulumi.String("string"),
MonitoringOutputId: pulumi.String("string"),
Name: pulumi.String("string"),
PolicyId: pulumi.String("string"),
RequiredVersions: pulumi.Float64Map{
"string": pulumi.Float64(0),
},
SkipDestroy: pulumi.Bool(false),
SpaceIds: pulumi.StringArray{
pulumi.String("string"),
},
SupportsAgentless: pulumi.Bool(false),
SysMonitoring: pulumi.Bool(false),
UnenrollmentTimeout: pulumi.String("string"),
})
var fleetAgentPolicyResource = new FleetAgentPolicy("fleetAgentPolicyResource", FleetAgentPolicyArgs.builder()
.namespace("string")
.monitorMetrics(false)
.description("string")
.fleetServerHostId("string")
.globalDataTags(Map.of("string", FleetAgentPolicyGlobalDataTagsArgs.builder()
.numberValue(0.0)
.stringValue("string")
.build()))
.hostNameFormat("string")
.inactivityTimeout("string")
.monitorLogs(false)
.dataOutputId("string")
.downloadSourceId("string")
.monitoringOutputId("string")
.name("string")
.policyId("string")
.requiredVersions(Map.of("string", 0.0))
.skipDestroy(false)
.spaceIds("string")
.supportsAgentless(false)
.sysMonitoring(false)
.unenrollmentTimeout("string")
.build());
fleet_agent_policy_resource = elasticstack.FleetAgentPolicy("fleetAgentPolicyResource",
namespace="string",
monitor_metrics=False,
description="string",
fleet_server_host_id="string",
global_data_tags={
"string": {
"number_value": 0,
"string_value": "string",
},
},
host_name_format="string",
inactivity_timeout="string",
monitor_logs=False,
data_output_id="string",
download_source_id="string",
monitoring_output_id="string",
name="string",
policy_id="string",
required_versions={
"string": 0,
},
skip_destroy=False,
space_ids=["string"],
supports_agentless=False,
sys_monitoring=False,
unenrollment_timeout="string")
const fleetAgentPolicyResource = new elasticstack.FleetAgentPolicy("fleetAgentPolicyResource", {
namespace: "string",
monitorMetrics: false,
description: "string",
fleetServerHostId: "string",
globalDataTags: {
string: {
numberValue: 0,
stringValue: "string",
},
},
hostNameFormat: "string",
inactivityTimeout: "string",
monitorLogs: false,
dataOutputId: "string",
downloadSourceId: "string",
monitoringOutputId: "string",
name: "string",
policyId: "string",
requiredVersions: {
string: 0,
},
skipDestroy: false,
spaceIds: ["string"],
supportsAgentless: false,
sysMonitoring: false,
unenrollmentTimeout: "string",
});
type: elasticstack:FleetAgentPolicy
properties:
dataOutputId: string
description: string
downloadSourceId: string
fleetServerHostId: string
globalDataTags:
string:
numberValue: 0
stringValue: string
hostNameFormat: string
inactivityTimeout: string
monitorLogs: false
monitorMetrics: false
monitoringOutputId: string
name: string
namespace: string
policyId: string
requiredVersions:
string: 0
skipDestroy: false
spaceIds:
- string
supportsAgentless: false
sysMonitoring: false
unenrollmentTimeout: string
FleetAgentPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The FleetAgentPolicy resource accepts the following input properties:
- Namespace string
- The namespace of the agent policy.
- Data
Output stringId - The identifier for the data output.
- Description string
- The description of the agent policy.
- Download
Source stringId - The identifier for the Elastic Agent binary download server.
- Fleet
Server stringHost Id - The identifier for the Fleet server host.
-
Dictionary<string, Fleet
Agent Policy Global Data Tags Args> - User-defined data tags to apply to all inputs. Values can be strings (stringvalue) or numbers (numbervalue) but not both. Example -- key1 = {stringvalue = value1}, key2 = {numbervalue = 42}
- Host
Name stringFormat - Determines the format of the host.name field in events. Can be 'hostname' (short hostname, e.g., 'myhost') or 'fqdn' (fully qualified domain name, e.g., 'myhost.example.com'). Defaults to 'hostname'.
- Inactivity
Timeout string - The inactivity timeout for the agent policy. If an agent does not report within this time period, it will be considered inactive. Supports duration strings (e.g., '30s', '2m', '1h').
- Monitor
Logs bool - Enable collection of agent logs.
- Monitor
Metrics bool - Enable collection of agent metrics.
- Monitoring
Output stringId - The identifier for monitoring output.
- Name string
- The name of the agent policy.
- Policy
Id string - Unique identifier of the agent policy.
- Required
Versions 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.
- Skip
Destroy bool - Space
Ids List<string> - The Kibana space IDs that this agent policy should be available in. When not specified, defaults to ["default"]. Note: The order of space IDs does not matter as this is a set.
- Supports
Agentless bool - Set to true to enable agentless data collection.
- Sys
Monitoring bool - Enable collection of system logs and metrics.
- Unenrollment
Timeout string - The unenrollment timeout for the agent policy. If an agent is inactive for this period, it will be automatically unenrolled. Supports duration strings (e.g., '30s', '2m', '1h').
- Namespace string
- The namespace of the agent policy.
- Data
Output stringId - The identifier for the data output.
- Description string
- The description of the agent policy.
- Download
Source stringId - The identifier for the Elastic Agent binary download server.
- Fleet
Server stringHost Id - The identifier for the Fleet server host.
-
map[string]Fleet
Agent Policy Global Data Tags Args - User-defined data tags to apply to all inputs. Values can be strings (stringvalue) or numbers (numbervalue) but not both. Example -- key1 = {stringvalue = value1}, key2 = {numbervalue = 42}
- Host
Name stringFormat - Determines the format of the host.name field in events. Can be 'hostname' (short hostname, e.g., 'myhost') or 'fqdn' (fully qualified domain name, e.g., 'myhost.example.com'). Defaults to 'hostname'.
- Inactivity
Timeout string - The inactivity timeout for the agent policy. If an agent does not report within this time period, it will be considered inactive. Supports duration strings (e.g., '30s', '2m', '1h').
- Monitor
Logs bool - Enable collection of agent logs.
- Monitor
Metrics bool - Enable collection of agent metrics.
- Monitoring
Output stringId - The identifier for monitoring output.
- Name string
- The name of the agent policy.
- Policy
Id string - Unique identifier of the agent policy.
- Required
Versions 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.
- Skip
Destroy bool - Space
Ids []string - The Kibana space IDs that this agent policy should be available in. When not specified, defaults to ["default"]. Note: The order of space IDs does not matter as this is a set.
- Supports
Agentless bool - Set to true to enable agentless data collection.
- Sys
Monitoring bool - Enable collection of system logs and metrics.
- Unenrollment
Timeout string - The unenrollment timeout for the agent policy. If an agent is inactive for this period, it will be automatically unenrolled. Supports duration strings (e.g., '30s', '2m', '1h').
- namespace String
- The namespace of the agent policy.
- data
Output StringId - The identifier for the data output.
- description String
- The description of the agent policy.
- download
Source StringId - The identifier for the Elastic Agent binary download server.
- fleet
Server StringHost Id - The identifier for the Fleet server host.
-
Map<String,Fleet
Agent Policy Global Data Tags Args> - User-defined data tags to apply to all inputs. Values can be strings (stringvalue) or numbers (numbervalue) but not both. Example -- key1 = {stringvalue = value1}, key2 = {numbervalue = 42}
- host
Name StringFormat - Determines the format of the host.name field in events. Can be 'hostname' (short hostname, e.g., 'myhost') or 'fqdn' (fully qualified domain name, e.g., 'myhost.example.com'). Defaults to 'hostname'.
- inactivity
Timeout String - The inactivity timeout for the agent policy. If an agent does not report within this time period, it will be considered inactive. Supports duration strings (e.g., '30s', '2m', '1h').
- monitor
Logs Boolean - Enable collection of agent logs.
- monitor
Metrics Boolean - Enable collection of agent metrics.
- monitoring
Output StringId - The identifier for monitoring output.
- name String
- The name of the agent policy.
- policy
Id String - Unique identifier of the agent policy.
- required
Versions 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.
- skip
Destroy Boolean - space
Ids List<String> - The Kibana space IDs that this agent policy should be available in. When not specified, defaults to ["default"]. Note: The order of space IDs does not matter as this is a set.
- supports
Agentless Boolean - Set to true to enable agentless data collection.
- sys
Monitoring Boolean - Enable collection of system logs and metrics.
- unenrollment
Timeout String - The unenrollment timeout for the agent policy. If an agent is inactive for this period, it will be automatically unenrolled. Supports duration strings (e.g., '30s', '2m', '1h').
- namespace string
- The namespace of the agent policy.
- data
Output stringId - The identifier for the data output.
- description string
- The description of the agent policy.
- download
Source stringId - The identifier for the Elastic Agent binary download server.
- fleet
Server stringHost Id - The identifier for the Fleet server host.
-
{[key: string]: Fleet
Agent Policy Global Data Tags Args} - User-defined data tags to apply to all inputs. Values can be strings (stringvalue) or numbers (numbervalue) but not both. Example -- key1 = {stringvalue = value1}, key2 = {numbervalue = 42}
- host
Name stringFormat - Determines the format of the host.name field in events. Can be 'hostname' (short hostname, e.g., 'myhost') or 'fqdn' (fully qualified domain name, e.g., 'myhost.example.com'). Defaults to 'hostname'.
- inactivity
Timeout string - The inactivity timeout for the agent policy. If an agent does not report within this time period, it will be considered inactive. Supports duration strings (e.g., '30s', '2m', '1h').
- monitor
Logs boolean - Enable collection of agent logs.
- monitor
Metrics boolean - Enable collection of agent metrics.
- monitoring
Output stringId - The identifier for monitoring output.
- name string
- The name of the agent policy.
- policy
Id string - Unique identifier of the agent policy.
- required
Versions {[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.
- skip
Destroy boolean - space
Ids string[] - The Kibana space IDs that this agent policy should be available in. When not specified, defaults to ["default"]. Note: The order of space IDs does not matter as this is a set.
- supports
Agentless boolean - Set to true to enable agentless data collection.
- sys
Monitoring boolean - Enable collection of system logs and metrics.
- unenrollment
Timeout string - The unenrollment timeout for the agent policy. If an agent is inactive for this period, it will be automatically unenrolled. Supports duration strings (e.g., '30s', '2m', '1h').
- namespace str
- The namespace of the agent policy.
- data_
output_ strid - The identifier for the data output.
- description str
- The description of the agent policy.
- download_
source_ strid - The identifier for the Elastic Agent binary download server.
- fleet_
server_ strhost_ id - The identifier for the Fleet server host.
-
Mapping[str, Fleet
Agent Policy Global Data Tags Args] - User-defined data tags to apply to all inputs. Values can be strings (stringvalue) or numbers (numbervalue) but not both. Example -- key1 = {stringvalue = value1}, key2 = {numbervalue = 42}
- host_
name_ strformat - Determines the format of the host.name field in events. Can be 'hostname' (short hostname, e.g., 'myhost') or 'fqdn' (fully qualified domain name, e.g., 'myhost.example.com'). Defaults to 'hostname'.
- inactivity_
timeout str - The inactivity timeout for the agent policy. If an agent does not report within this time period, it will be considered inactive. Supports duration strings (e.g., '30s', '2m', '1h').
- monitor_
logs bool - Enable collection of agent logs.
- monitor_
metrics bool - Enable collection of agent metrics.
- monitoring_
output_ strid - The identifier for monitoring output.
- name str
- The name of the agent policy.
- policy_
id str - Unique identifier of the agent policy.
- 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.
- skip_
destroy bool - space_
ids Sequence[str] - The Kibana space IDs that this agent policy should be available in. When not specified, defaults to ["default"]. Note: The order of space IDs does not matter as this is a set.
- supports_
agentless bool - Set to true to enable agentless data collection.
- sys_
monitoring bool - Enable collection of system logs and metrics.
- unenrollment_
timeout str - The unenrollment timeout for the agent policy. If an agent is inactive for this period, it will be automatically unenrolled. Supports duration strings (e.g., '30s', '2m', '1h').
- namespace String
- The namespace of the agent policy.
- data
Output StringId - The identifier for the data output.
- description String
- The description of the agent policy.
- download
Source StringId - The identifier for the Elastic Agent binary download server.
- fleet
Server StringHost Id - The identifier for the Fleet server host.
- Map<Property Map>
- User-defined data tags to apply to all inputs. Values can be strings (stringvalue) or numbers (numbervalue) but not both. Example -- key1 = {stringvalue = value1}, key2 = {numbervalue = 42}
- host
Name StringFormat - Determines the format of the host.name field in events. Can be 'hostname' (short hostname, e.g., 'myhost') or 'fqdn' (fully qualified domain name, e.g., 'myhost.example.com'). Defaults to 'hostname'.
- inactivity
Timeout String - The inactivity timeout for the agent policy. If an agent does not report within this time period, it will be considered inactive. Supports duration strings (e.g., '30s', '2m', '1h').
- monitor
Logs Boolean - Enable collection of agent logs.
- monitor
Metrics Boolean - Enable collection of agent metrics.
- monitoring
Output StringId - The identifier for monitoring output.
- name String
- The name of the agent policy.
- policy
Id String - Unique identifier of the agent policy.
- 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.
- skip
Destroy Boolean - space
Ids List<String> - The Kibana space IDs that this agent policy should be available in. When not specified, defaults to ["default"]. Note: The order of space IDs does not matter as this is a set.
- supports
Agentless Boolean - Set to true to enable agentless data collection.
- sys
Monitoring Boolean - Enable collection of system logs and metrics.
- unenrollment
Timeout String - The unenrollment timeout for the agent policy. If an agent is inactive for this period, it will be automatically unenrolled. Supports duration strings (e.g., '30s', '2m', '1h').
Outputs
All input properties are implicitly available as output properties. Additionally, the FleetAgentPolicy resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing FleetAgentPolicy Resource
Get an existing FleetAgentPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: FleetAgentPolicyState, opts?: CustomResourceOptions): FleetAgentPolicy@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
data_output_id: Optional[str] = None,
description: Optional[str] = None,
download_source_id: Optional[str] = None,
fleet_server_host_id: Optional[str] = None,
global_data_tags: Optional[Mapping[str, FleetAgentPolicyGlobalDataTagsArgs]] = None,
host_name_format: Optional[str] = None,
inactivity_timeout: Optional[str] = None,
monitor_logs: Optional[bool] = None,
monitor_metrics: Optional[bool] = None,
monitoring_output_id: Optional[str] = None,
name: Optional[str] = None,
namespace: Optional[str] = None,
policy_id: Optional[str] = None,
required_versions: Optional[Mapping[str, float]] = None,
skip_destroy: Optional[bool] = None,
space_ids: Optional[Sequence[str]] = None,
supports_agentless: Optional[bool] = None,
sys_monitoring: Optional[bool] = None,
unenrollment_timeout: Optional[str] = None) -> FleetAgentPolicyfunc GetFleetAgentPolicy(ctx *Context, name string, id IDInput, state *FleetAgentPolicyState, opts ...ResourceOption) (*FleetAgentPolicy, error)public static FleetAgentPolicy Get(string name, Input<string> id, FleetAgentPolicyState? state, CustomResourceOptions? opts = null)public static FleetAgentPolicy get(String name, Output<String> id, FleetAgentPolicyState state, CustomResourceOptions options)resources: _: type: elasticstack:FleetAgentPolicy get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Data
Output stringId - The identifier for the data output.
- Description string
- The description of the agent policy.
- Download
Source stringId - The identifier for the Elastic Agent binary download server.
- Fleet
Server stringHost Id - The identifier for the Fleet server host.
-
Dictionary<string, Fleet
Agent Policy Global Data Tags Args> - User-defined data tags to apply to all inputs. Values can be strings (stringvalue) or numbers (numbervalue) but not both. Example -- key1 = {stringvalue = value1}, key2 = {numbervalue = 42}
- Host
Name stringFormat - Determines the format of the host.name field in events. Can be 'hostname' (short hostname, e.g., 'myhost') or 'fqdn' (fully qualified domain name, e.g., 'myhost.example.com'). Defaults to 'hostname'.
- Inactivity
Timeout string - The inactivity timeout for the agent policy. If an agent does not report within this time period, it will be considered inactive. Supports duration strings (e.g., '30s', '2m', '1h').
- Monitor
Logs bool - Enable collection of agent logs.
- Monitor
Metrics bool - Enable collection of agent metrics.
- Monitoring
Output stringId - The identifier for monitoring output.
- Name string
- The name of the agent policy.
- Namespace string
- The namespace of the agent policy.
- Policy
Id string - Unique identifier of the agent policy.
- Required
Versions 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.
- Skip
Destroy bool - Space
Ids List<string> - The Kibana space IDs that this agent policy should be available in. When not specified, defaults to ["default"]. Note: The order of space IDs does not matter as this is a set.
- Supports
Agentless bool - Set to true to enable agentless data collection.
- Sys
Monitoring bool - Enable collection of system logs and metrics.
- Unenrollment
Timeout string - The unenrollment timeout for the agent policy. If an agent is inactive for this period, it will be automatically unenrolled. Supports duration strings (e.g., '30s', '2m', '1h').
- Data
Output stringId - The identifier for the data output.
- Description string
- The description of the agent policy.
- Download
Source stringId - The identifier for the Elastic Agent binary download server.
- Fleet
Server stringHost Id - The identifier for the Fleet server host.
-
map[string]Fleet
Agent Policy Global Data Tags Args - User-defined data tags to apply to all inputs. Values can be strings (stringvalue) or numbers (numbervalue) but not both. Example -- key1 = {stringvalue = value1}, key2 = {numbervalue = 42}
- Host
Name stringFormat - Determines the format of the host.name field in events. Can be 'hostname' (short hostname, e.g., 'myhost') or 'fqdn' (fully qualified domain name, e.g., 'myhost.example.com'). Defaults to 'hostname'.
- Inactivity
Timeout string - The inactivity timeout for the agent policy. If an agent does not report within this time period, it will be considered inactive. Supports duration strings (e.g., '30s', '2m', '1h').
- Monitor
Logs bool - Enable collection of agent logs.
- Monitor
Metrics bool - Enable collection of agent metrics.
- Monitoring
Output stringId - The identifier for monitoring output.
- Name string
- The name of the agent policy.
- Namespace string
- The namespace of the agent policy.
- Policy
Id string - Unique identifier of the agent policy.
- Required
Versions 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.
- Skip
Destroy bool - Space
Ids []string - The Kibana space IDs that this agent policy should be available in. When not specified, defaults to ["default"]. Note: The order of space IDs does not matter as this is a set.
- Supports
Agentless bool - Set to true to enable agentless data collection.
- Sys
Monitoring bool - Enable collection of system logs and metrics.
- Unenrollment
Timeout string - The unenrollment timeout for the agent policy. If an agent is inactive for this period, it will be automatically unenrolled. Supports duration strings (e.g., '30s', '2m', '1h').
- data
Output StringId - The identifier for the data output.
- description String
- The description of the agent policy.
- download
Source StringId - The identifier for the Elastic Agent binary download server.
- fleet
Server StringHost Id - The identifier for the Fleet server host.
-
Map<String,Fleet
Agent Policy Global Data Tags Args> - User-defined data tags to apply to all inputs. Values can be strings (stringvalue) or numbers (numbervalue) but not both. Example -- key1 = {stringvalue = value1}, key2 = {numbervalue = 42}
- host
Name StringFormat - Determines the format of the host.name field in events. Can be 'hostname' (short hostname, e.g., 'myhost') or 'fqdn' (fully qualified domain name, e.g., 'myhost.example.com'). Defaults to 'hostname'.
- inactivity
Timeout String - The inactivity timeout for the agent policy. If an agent does not report within this time period, it will be considered inactive. Supports duration strings (e.g., '30s', '2m', '1h').
- monitor
Logs Boolean - Enable collection of agent logs.
- monitor
Metrics Boolean - Enable collection of agent metrics.
- monitoring
Output StringId - The identifier for monitoring output.
- name String
- The name of the agent policy.
- namespace String
- The namespace of the agent policy.
- policy
Id String - Unique identifier of the agent policy.
- required
Versions 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.
- skip
Destroy Boolean - space
Ids List<String> - The Kibana space IDs that this agent policy should be available in. When not specified, defaults to ["default"]. Note: The order of space IDs does not matter as this is a set.
- supports
Agentless Boolean - Set to true to enable agentless data collection.
- sys
Monitoring Boolean - Enable collection of system logs and metrics.
- unenrollment
Timeout String - The unenrollment timeout for the agent policy. If an agent is inactive for this period, it will be automatically unenrolled. Supports duration strings (e.g., '30s', '2m', '1h').
- data
Output stringId - The identifier for the data output.
- description string
- The description of the agent policy.
- download
Source stringId - The identifier for the Elastic Agent binary download server.
- fleet
Server stringHost Id - The identifier for the Fleet server host.
-
{[key: string]: Fleet
Agent Policy Global Data Tags Args} - User-defined data tags to apply to all inputs. Values can be strings (stringvalue) or numbers (numbervalue) but not both. Example -- key1 = {stringvalue = value1}, key2 = {numbervalue = 42}
- host
Name stringFormat - Determines the format of the host.name field in events. Can be 'hostname' (short hostname, e.g., 'myhost') or 'fqdn' (fully qualified domain name, e.g., 'myhost.example.com'). Defaults to 'hostname'.
- inactivity
Timeout string - The inactivity timeout for the agent policy. If an agent does not report within this time period, it will be considered inactive. Supports duration strings (e.g., '30s', '2m', '1h').
- monitor
Logs boolean - Enable collection of agent logs.
- monitor
Metrics boolean - Enable collection of agent metrics.
- monitoring
Output stringId - The identifier for monitoring output.
- name string
- The name of the agent policy.
- namespace string
- The namespace of the agent policy.
- policy
Id string - Unique identifier of the agent policy.
- required
Versions {[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.
- skip
Destroy boolean - space
Ids string[] - The Kibana space IDs that this agent policy should be available in. When not specified, defaults to ["default"]. Note: The order of space IDs does not matter as this is a set.
- supports
Agentless boolean - Set to true to enable agentless data collection.
- sys
Monitoring boolean - Enable collection of system logs and metrics.
- unenrollment
Timeout string - The unenrollment timeout for the agent policy. If an agent is inactive for this period, it will be automatically unenrolled. Supports duration strings (e.g., '30s', '2m', '1h').
- data_
output_ strid - The identifier for the data output.
- description str
- The description of the agent policy.
- download_
source_ strid - The identifier for the Elastic Agent binary download server.
- fleet_
server_ strhost_ id - The identifier for the Fleet server host.
-
Mapping[str, Fleet
Agent Policy Global Data Tags Args] - User-defined data tags to apply to all inputs. Values can be strings (stringvalue) or numbers (numbervalue) but not both. Example -- key1 = {stringvalue = value1}, key2 = {numbervalue = 42}
- host_
name_ strformat - Determines the format of the host.name field in events. Can be 'hostname' (short hostname, e.g., 'myhost') or 'fqdn' (fully qualified domain name, e.g., 'myhost.example.com'). Defaults to 'hostname'.
- inactivity_
timeout str - The inactivity timeout for the agent policy. If an agent does not report within this time period, it will be considered inactive. Supports duration strings (e.g., '30s', '2m', '1h').
- monitor_
logs bool - Enable collection of agent logs.
- monitor_
metrics bool - Enable collection of agent metrics.
- monitoring_
output_ strid - The identifier for monitoring output.
- name str
- The name of the agent policy.
- namespace str
- The namespace of the agent policy.
- policy_
id str - Unique identifier of the agent policy.
- 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.
- skip_
destroy bool - space_
ids Sequence[str] - The Kibana space IDs that this agent policy should be available in. When not specified, defaults to ["default"]. Note: The order of space IDs does not matter as this is a set.
- supports_
agentless bool - Set to true to enable agentless data collection.
- sys_
monitoring bool - Enable collection of system logs and metrics.
- unenrollment_
timeout str - The unenrollment timeout for the agent policy. If an agent is inactive for this period, it will be automatically unenrolled. Supports duration strings (e.g., '30s', '2m', '1h').
- data
Output StringId - The identifier for the data output.
- description String
- The description of the agent policy.
- download
Source StringId - The identifier for the Elastic Agent binary download server.
- fleet
Server StringHost Id - The identifier for the Fleet server host.
- Map<Property Map>
- User-defined data tags to apply to all inputs. Values can be strings (stringvalue) or numbers (numbervalue) but not both. Example -- key1 = {stringvalue = value1}, key2 = {numbervalue = 42}
- host
Name StringFormat - Determines the format of the host.name field in events. Can be 'hostname' (short hostname, e.g., 'myhost') or 'fqdn' (fully qualified domain name, e.g., 'myhost.example.com'). Defaults to 'hostname'.
- inactivity
Timeout String - The inactivity timeout for the agent policy. If an agent does not report within this time period, it will be considered inactive. Supports duration strings (e.g., '30s', '2m', '1h').
- monitor
Logs Boolean - Enable collection of agent logs.
- monitor
Metrics Boolean - Enable collection of agent metrics.
- monitoring
Output StringId - The identifier for monitoring output.
- name String
- The name of the agent policy.
- namespace String
- The namespace of the agent policy.
- policy
Id String - Unique identifier of the agent policy.
- 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.
- skip
Destroy Boolean - space
Ids List<String> - The Kibana space IDs that this agent policy should be available in. When not specified, defaults to ["default"]. Note: The order of space IDs does not matter as this is a set.
- supports
Agentless Boolean - Set to true to enable agentless data collection.
- sys
Monitoring Boolean - Enable collection of system logs and metrics.
- unenrollment
Timeout String - The unenrollment timeout for the agent policy. If an agent is inactive for this period, it will be automatically unenrolled. Supports duration strings (e.g., '30s', '2m', '1h').
Supporting Types
FleetAgentPolicyGlobalDataTags, FleetAgentPolicyGlobalDataTagsArgs
- Number
Value double - Number value for the field. If this is set, string_value must not be defined.
- String
Value string - String value for the field. If this is set, number_value must not be defined.
- Number
Value float64 - Number value for the field. If this is set, string_value must not be defined.
- String
Value string - String value for the field. If this is set, number_value must not be defined.
- number
Value Double - Number value for the field. If this is set, string_value must not be defined.
- string
Value String - String value for the field. If this is set, number_value must not be defined.
- number
Value number - Number value for the field. If this is set, string_value must not be defined.
- string
Value string - String value for the field. If this is set, number_value must not be defined.
- number_
value float - Number value for the field. If this is set, string_value must not be defined.
- string_
value str - String value for the field. If this is set, number_value must not be defined.
- number
Value Number - Number value for the field. If this is set, string_value must not be defined.
- string
Value String - String value for the field. If this is set, number_value must not be defined.
Import
The pulumi import command can be used, for example:
$ pulumi import elasticstack:index/fleetAgentPolicy:FleetAgentPolicy my_policy <fleet_agent_policy_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- elasticstack elastic/terraform-provider-elasticstack
- License
- Notes
- This Pulumi package is based on the
elasticstackTerraform Provider.
