elasticstack.KibanaSyntheticsPrivateLocation
Explore with Pulumi AI
Creates or updates a Kibana synthetics private location. See Monitor via a private agent and API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as elasticstack from "@pulumi/elasticstack";
const sample = new elasticstack.FleetAgentPolicy("sample", {
namespace: "default",
description: "A sample agent policy",
monitorLogs: true,
monitorMetrics: true,
skipDestroy: false,
});
const example = new elasticstack.KibanaSyntheticsPrivateLocation("example", {
label: "example label",
agentPolicyId: sample.policyId,
tags: [
"tag-a",
"tag-b",
],
geo: {
lat: 40.7128,
lon: 74.006,
},
});
import pulumi
import pulumi_elasticstack as elasticstack
sample = elasticstack.FleetAgentPolicy("sample",
namespace="default",
description="A sample agent policy",
monitor_logs=True,
monitor_metrics=True,
skip_destroy=False)
example = elasticstack.KibanaSyntheticsPrivateLocation("example",
label="example label",
agent_policy_id=sample.policy_id,
tags=[
"tag-a",
"tag-b",
],
geo={
"lat": 40.7128,
"lon": 74.006,
})
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 {
sample, err := elasticstack.NewFleetAgentPolicy(ctx, "sample", &elasticstack.FleetAgentPolicyArgs{
Namespace: pulumi.String("default"),
Description: pulumi.String("A sample agent policy"),
MonitorLogs: pulumi.Bool(true),
MonitorMetrics: pulumi.Bool(true),
SkipDestroy: pulumi.Bool(false),
})
if err != nil {
return err
}
_, err = elasticstack.NewKibanaSyntheticsPrivateLocation(ctx, "example", &elasticstack.KibanaSyntheticsPrivateLocationArgs{
Label: pulumi.String("example label"),
AgentPolicyId: sample.PolicyId,
Tags: pulumi.StringArray{
pulumi.String("tag-a"),
pulumi.String("tag-b"),
},
Geo: &elasticstack.KibanaSyntheticsPrivateLocationGeoArgs{
Lat: pulumi.Float64(40.7128),
Lon: pulumi.Float64(74.006),
},
})
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 sample = new Elasticstack.FleetAgentPolicy("sample", new()
{
Namespace = "default",
Description = "A sample agent policy",
MonitorLogs = true,
MonitorMetrics = true,
SkipDestroy = false,
});
var example = new Elasticstack.KibanaSyntheticsPrivateLocation("example", new()
{
Label = "example label",
AgentPolicyId = sample.PolicyId,
Tags = new[]
{
"tag-a",
"tag-b",
},
Geo = new Elasticstack.Inputs.KibanaSyntheticsPrivateLocationGeoArgs
{
Lat = 40.7128,
Lon = 74.006,
},
});
});
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 com.pulumi.elasticstack.KibanaSyntheticsPrivateLocation;
import com.pulumi.elasticstack.KibanaSyntheticsPrivateLocationArgs;
import com.pulumi.elasticstack.inputs.KibanaSyntheticsPrivateLocationGeoArgs;
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 sample = new FleetAgentPolicy("sample", FleetAgentPolicyArgs.builder()
.namespace("default")
.description("A sample agent policy")
.monitorLogs(true)
.monitorMetrics(true)
.skipDestroy(false)
.build());
var example = new KibanaSyntheticsPrivateLocation("example", KibanaSyntheticsPrivateLocationArgs.builder()
.label("example label")
.agentPolicyId(sample.policyId())
.tags(
"tag-a",
"tag-b")
.geo(KibanaSyntheticsPrivateLocationGeoArgs.builder()
.lat(40.7128)
.lon(74.006)
.build())
.build());
}
}
resources:
sample:
type: elasticstack:FleetAgentPolicy
properties:
namespace: default
description: A sample agent policy
monitorLogs: true
monitorMetrics: true
skipDestroy: false
example:
type: elasticstack:KibanaSyntheticsPrivateLocation
properties:
label: example label
agentPolicyId: ${sample.policyId}
tags:
- tag-a
- tag-b
geo:
lat: 40.7128
lon: 74.006
Create KibanaSyntheticsPrivateLocation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new KibanaSyntheticsPrivateLocation(name: string, args: KibanaSyntheticsPrivateLocationArgs, opts?: CustomResourceOptions);
@overload
def KibanaSyntheticsPrivateLocation(resource_name: str,
args: KibanaSyntheticsPrivateLocationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def KibanaSyntheticsPrivateLocation(resource_name: str,
opts: Optional[ResourceOptions] = None,
agent_policy_id: Optional[str] = None,
label: Optional[str] = None,
geo: Optional[KibanaSyntheticsPrivateLocationGeoArgs] = None,
tags: Optional[Sequence[str]] = None)
func NewKibanaSyntheticsPrivateLocation(ctx *Context, name string, args KibanaSyntheticsPrivateLocationArgs, opts ...ResourceOption) (*KibanaSyntheticsPrivateLocation, error)
public KibanaSyntheticsPrivateLocation(string name, KibanaSyntheticsPrivateLocationArgs args, CustomResourceOptions? opts = null)
public KibanaSyntheticsPrivateLocation(String name, KibanaSyntheticsPrivateLocationArgs args)
public KibanaSyntheticsPrivateLocation(String name, KibanaSyntheticsPrivateLocationArgs args, CustomResourceOptions options)
type: elasticstack:KibanaSyntheticsPrivateLocation
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 KibanaSyntheticsPrivateLocationArgs
- 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 KibanaSyntheticsPrivateLocationArgs
- 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 KibanaSyntheticsPrivateLocationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KibanaSyntheticsPrivateLocationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KibanaSyntheticsPrivateLocationArgs
- 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 kibanaSyntheticsPrivateLocationResource = new Elasticstack.KibanaSyntheticsPrivateLocation("kibanaSyntheticsPrivateLocationResource", new()
{
AgentPolicyId = "string",
Label = "string",
Geo = new Elasticstack.Inputs.KibanaSyntheticsPrivateLocationGeoArgs
{
Lat = 0,
Lon = 0,
},
Tags = new[]
{
"string",
},
});
example, err := elasticstack.NewKibanaSyntheticsPrivateLocation(ctx, "kibanaSyntheticsPrivateLocationResource", &elasticstack.KibanaSyntheticsPrivateLocationArgs{
AgentPolicyId: pulumi.String("string"),
Label: pulumi.String("string"),
Geo: &elasticstack.KibanaSyntheticsPrivateLocationGeoArgs{
Lat: pulumi.Float64(0),
Lon: pulumi.Float64(0),
},
Tags: pulumi.StringArray{
pulumi.String("string"),
},
})
var kibanaSyntheticsPrivateLocationResource = new KibanaSyntheticsPrivateLocation("kibanaSyntheticsPrivateLocationResource", KibanaSyntheticsPrivateLocationArgs.builder()
.agentPolicyId("string")
.label("string")
.geo(KibanaSyntheticsPrivateLocationGeoArgs.builder()
.lat(0)
.lon(0)
.build())
.tags("string")
.build());
kibana_synthetics_private_location_resource = elasticstack.KibanaSyntheticsPrivateLocation("kibanaSyntheticsPrivateLocationResource",
agent_policy_id="string",
label="string",
geo={
"lat": 0,
"lon": 0,
},
tags=["string"])
const kibanaSyntheticsPrivateLocationResource = new elasticstack.KibanaSyntheticsPrivateLocation("kibanaSyntheticsPrivateLocationResource", {
agentPolicyId: "string",
label: "string",
geo: {
lat: 0,
lon: 0,
},
tags: ["string"],
});
type: elasticstack:KibanaSyntheticsPrivateLocation
properties:
agentPolicyId: string
geo:
lat: 0
lon: 0
label: string
tags:
- string
KibanaSyntheticsPrivateLocation 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 KibanaSyntheticsPrivateLocation resource accepts the following input properties:
- Agent
Policy stringId - The ID of the agent policy associated with the private location. To create a private location for synthetics monitor you need to create an agent policy in fleet and use its agentPolicyId
- Label string
- A label for the private location, used as unique identifier
- Geo
Kibana
Synthetics Private Location Geo - Geographic coordinates (WGS84) for the location
- List<string>
- An array of tags to categorize the private location.
- Agent
Policy stringId - The ID of the agent policy associated with the private location. To create a private location for synthetics monitor you need to create an agent policy in fleet and use its agentPolicyId
- Label string
- A label for the private location, used as unique identifier
- Geo
Kibana
Synthetics Private Location Geo Args - Geographic coordinates (WGS84) for the location
- []string
- An array of tags to categorize the private location.
- agent
Policy StringId - The ID of the agent policy associated with the private location. To create a private location for synthetics monitor you need to create an agent policy in fleet and use its agentPolicyId
- label String
- A label for the private location, used as unique identifier
- geo
Kibana
Synthetics Private Location Geo - Geographic coordinates (WGS84) for the location
- List<String>
- An array of tags to categorize the private location.
- agent
Policy stringId - The ID of the agent policy associated with the private location. To create a private location for synthetics monitor you need to create an agent policy in fleet and use its agentPolicyId
- label string
- A label for the private location, used as unique identifier
- geo
Kibana
Synthetics Private Location Geo - Geographic coordinates (WGS84) for the location
- string[]
- An array of tags to categorize the private location.
- agent_
policy_ strid - The ID of the agent policy associated with the private location. To create a private location for synthetics monitor you need to create an agent policy in fleet and use its agentPolicyId
- label str
- A label for the private location, used as unique identifier
- geo
Kibana
Synthetics Private Location Geo Args - Geographic coordinates (WGS84) for the location
- Sequence[str]
- An array of tags to categorize the private location.
- agent
Policy StringId - The ID of the agent policy associated with the private location. To create a private location for synthetics monitor you need to create an agent policy in fleet and use its agentPolicyId
- label String
- A label for the private location, used as unique identifier
- geo Property Map
- Geographic coordinates (WGS84) for the location
- List<String>
- An array of tags to categorize the private location.
Outputs
All input properties are implicitly available as output properties. Additionally, the KibanaSyntheticsPrivateLocation 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 KibanaSyntheticsPrivateLocation Resource
Get an existing KibanaSyntheticsPrivateLocation 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?: KibanaSyntheticsPrivateLocationState, opts?: CustomResourceOptions): KibanaSyntheticsPrivateLocation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
agent_policy_id: Optional[str] = None,
geo: Optional[KibanaSyntheticsPrivateLocationGeoArgs] = None,
label: Optional[str] = None,
tags: Optional[Sequence[str]] = None) -> KibanaSyntheticsPrivateLocation
func GetKibanaSyntheticsPrivateLocation(ctx *Context, name string, id IDInput, state *KibanaSyntheticsPrivateLocationState, opts ...ResourceOption) (*KibanaSyntheticsPrivateLocation, error)
public static KibanaSyntheticsPrivateLocation Get(string name, Input<string> id, KibanaSyntheticsPrivateLocationState? state, CustomResourceOptions? opts = null)
public static KibanaSyntheticsPrivateLocation get(String name, Output<String> id, KibanaSyntheticsPrivateLocationState state, CustomResourceOptions options)
resources: _: type: elasticstack:KibanaSyntheticsPrivateLocation 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.
- Agent
Policy stringId - The ID of the agent policy associated with the private location. To create a private location for synthetics monitor you need to create an agent policy in fleet and use its agentPolicyId
- Geo
Kibana
Synthetics Private Location Geo - Geographic coordinates (WGS84) for the location
- Label string
- A label for the private location, used as unique identifier
- List<string>
- An array of tags to categorize the private location.
- Agent
Policy stringId - The ID of the agent policy associated with the private location. To create a private location for synthetics monitor you need to create an agent policy in fleet and use its agentPolicyId
- Geo
Kibana
Synthetics Private Location Geo Args - Geographic coordinates (WGS84) for the location
- Label string
- A label for the private location, used as unique identifier
- []string
- An array of tags to categorize the private location.
- agent
Policy StringId - The ID of the agent policy associated with the private location. To create a private location for synthetics monitor you need to create an agent policy in fleet and use its agentPolicyId
- geo
Kibana
Synthetics Private Location Geo - Geographic coordinates (WGS84) for the location
- label String
- A label for the private location, used as unique identifier
- List<String>
- An array of tags to categorize the private location.
- agent
Policy stringId - The ID of the agent policy associated with the private location. To create a private location for synthetics monitor you need to create an agent policy in fleet and use its agentPolicyId
- geo
Kibana
Synthetics Private Location Geo - Geographic coordinates (WGS84) for the location
- label string
- A label for the private location, used as unique identifier
- string[]
- An array of tags to categorize the private location.
- agent_
policy_ strid - The ID of the agent policy associated with the private location. To create a private location for synthetics monitor you need to create an agent policy in fleet and use its agentPolicyId
- geo
Kibana
Synthetics Private Location Geo Args - Geographic coordinates (WGS84) for the location
- label str
- A label for the private location, used as unique identifier
- Sequence[str]
- An array of tags to categorize the private location.
- agent
Policy StringId - The ID of the agent policy associated with the private location. To create a private location for synthetics monitor you need to create an agent policy in fleet and use its agentPolicyId
- geo Property Map
- Geographic coordinates (WGS84) for the location
- label String
- A label for the private location, used as unique identifier
- List<String>
- An array of tags to categorize the private location.
Supporting Types
KibanaSyntheticsPrivateLocationGeo, KibanaSyntheticsPrivateLocationGeoArgs
Import
$ pulumi import elasticstack:index/kibanaSyntheticsPrivateLocation:KibanaSyntheticsPrivateLocation my_location <space id>/<private_location_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
elasticstack
Terraform Provider.