Viewing docs for elasticstack 0.15.0
published on Thursday, May 14, 2026 by elastic
published on Thursday, May 14, 2026 by elastic
Viewing docs for elasticstack 0.15.0
published on Thursday, May 14, 2026 by elastic
published on Thursday, May 14, 2026 by elastic
Retrieves Elasticsearch API keys used to enroll Elastic Agents in Fleet. See the Fleet enrollment tokens documentation for more details.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as elasticstack from "@pulumi/elasticstack";
const test = elasticstack.getFleetEnrollmentTokens({
policyId: "223b1bf8-240f-463f-8466-5062670d0754",
});
import pulumi
import pulumi_elasticstack as elasticstack
test = elasticstack.get_fleet_enrollment_tokens(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 {
_, err := elasticstack.GetFleetEnrollmentTokens(ctx, &elasticstack.GetFleetEnrollmentTokensArgs{
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 test = Elasticstack.GetFleetEnrollmentTokens.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.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 test = ElasticstackFunctions.getFleetEnrollmentTokens(GetFleetEnrollmentTokensArgs.builder()
.policyId("223b1bf8-240f-463f-8466-5062670d0754")
.build());
}
}
variables:
test:
fn::invoke:
function: elasticstack:getFleetEnrollmentTokens
arguments:
policyId: 223b1bf8-240f-463f-8466-5062670d0754
Example coming soon!
Using getFleetEnrollmentTokens
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 getFleetEnrollmentTokens(args: GetFleetEnrollmentTokensArgs, opts?: InvokeOptions): Promise<GetFleetEnrollmentTokensResult>
function getFleetEnrollmentTokensOutput(args: GetFleetEnrollmentTokensOutputArgs, opts?: InvokeOptions): Output<GetFleetEnrollmentTokensResult>def get_fleet_enrollment_tokens(kibana_connections: Optional[Sequence[GetFleetEnrollmentTokensKibanaConnection]] = None,
policy_id: Optional[str] = None,
space_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetFleetEnrollmentTokensResult
def get_fleet_enrollment_tokens_output(kibana_connections: pulumi.Input[Optional[Sequence[pulumi.Input[GetFleetEnrollmentTokensKibanaConnectionArgs]]]] = None,
policy_id: pulumi.Input[Optional[str]] = None,
space_id: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetFleetEnrollmentTokensResult]func GetFleetEnrollmentTokens(ctx *Context, args *GetFleetEnrollmentTokensArgs, opts ...InvokeOption) (*GetFleetEnrollmentTokensResult, error)
func GetFleetEnrollmentTokensOutput(ctx *Context, args *GetFleetEnrollmentTokensOutputArgs, opts ...InvokeOption) GetFleetEnrollmentTokensResultOutput> Note: This function is named GetFleetEnrollmentTokens in the Go SDK.
public static class GetFleetEnrollmentTokens
{
public static Task<GetFleetEnrollmentTokensResult> InvokeAsync(GetFleetEnrollmentTokensArgs args, InvokeOptions? opts = null)
public static Output<GetFleetEnrollmentTokensResult> Invoke(GetFleetEnrollmentTokensInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetFleetEnrollmentTokensResult> getFleetEnrollmentTokens(GetFleetEnrollmentTokensArgs args, InvokeOptions options)
public static Output<GetFleetEnrollmentTokensResult> getFleetEnrollmentTokens(GetFleetEnrollmentTokensArgs args, InvokeOptions options)
fn::invoke:
function: elasticstack:index/getFleetEnrollmentTokens:getFleetEnrollmentTokens
arguments:
# arguments dictionarydata "elasticstack_getfleetenrollmenttokens" "name" {
# arguments
}The following arguments are supported:
- Kibana
Connections List<GetFleet Enrollment Tokens Kibana Connection> - Kibana connection configuration block.
- Policy
Id string - The identifier of the target agent policy. When provided, only the enrollment tokens associated with this agent policy will be selected. Omit this value to select all enrollment tokens.
- Space
Id string - The Kibana space ID to query enrollment tokens from. When the agent policy is space-scoped, this must be set to match the policy's space. If not specified, queries the default space.
- Kibana
Connections []GetFleet Enrollment Tokens Kibana Connection - Kibana connection configuration block.
- Policy
Id string - The identifier of the target agent policy. When provided, only the enrollment tokens associated with this agent policy will be selected. Omit this value to select all enrollment tokens.
- Space
Id string - The Kibana space ID to query enrollment tokens from. When the agent policy is space-scoped, this must be set to match the policy's space. If not specified, queries the default space.
- kibana_
connections list(object) - Kibana connection configuration block.
- policy_
id string - The identifier of the target agent policy. When provided, only the enrollment tokens associated with this agent policy will be selected. Omit this value to select all enrollment tokens.
- space_
id string - The Kibana space ID to query enrollment tokens from. When the agent policy is space-scoped, this must be set to match the policy's space. If not specified, queries the default space.
- kibana
Connections List<GetFleet Enrollment Tokens Kibana Connection> - Kibana connection configuration block.
- policy
Id String - The identifier of the target agent policy. When provided, only the enrollment tokens associated with this agent policy will be selected. Omit this value to select all enrollment tokens.
- space
Id String - The Kibana space ID to query enrollment tokens from. When the agent policy is space-scoped, this must be set to match the policy's space. If not specified, queries the default space.
- kibana
Connections GetFleet Enrollment Tokens Kibana Connection[] - Kibana connection configuration block.
- policy
Id string - The identifier of the target agent policy. When provided, only the enrollment tokens associated with this agent policy will be selected. Omit this value to select all enrollment tokens.
- space
Id string - The Kibana space ID to query enrollment tokens from. When the agent policy is space-scoped, this must be set to match the policy's space. If not specified, queries the default space.
- kibana_
connections Sequence[GetFleet Enrollment Tokens Kibana Connection] - Kibana connection configuration block.
- policy_
id str - The identifier of the target agent policy. When provided, only the enrollment tokens associated with this agent policy will be selected. Omit this value to select all enrollment tokens.
- space_
id str - The Kibana space ID to query enrollment tokens from. When the agent policy is space-scoped, this must be set to match the policy's space. If not specified, queries the default space.
- kibana
Connections List<Property Map> - Kibana connection configuration block.
- policy
Id String - The identifier of the target agent policy. When provided, only the enrollment tokens associated with this agent policy will be selected. Omit this value to select all enrollment tokens.
- space
Id String - The Kibana space ID to query enrollment tokens from. When the agent policy is space-scoped, this must be set to match the policy's space. If not specified, queries the default space.
getFleetEnrollmentTokens Result
The following output properties are available:
- Id string
- The ID of this resource.
- Tokens
List<Get
Fleet Enrollment Tokens Token> - A list of enrollment tokens.
- Kibana
Connections List<GetFleet Enrollment Tokens Kibana Connection> - Kibana connection configuration block.
- Policy
Id string - The identifier of the target agent policy. When provided, only the enrollment tokens associated with this agent policy will be selected. Omit this value to select all enrollment tokens.
- Space
Id string - The Kibana space ID to query enrollment tokens from. When the agent policy is space-scoped, this must be set to match the policy's space. If not specified, queries the default space.
- Id string
- The ID of this resource.
- Tokens
[]Get
Fleet Enrollment Tokens Token - A list of enrollment tokens.
- Kibana
Connections []GetFleet Enrollment Tokens Kibana Connection - Kibana connection configuration block.
- Policy
Id string - The identifier of the target agent policy. When provided, only the enrollment tokens associated with this agent policy will be selected. Omit this value to select all enrollment tokens.
- Space
Id string - The Kibana space ID to query enrollment tokens from. When the agent policy is space-scoped, this must be set to match the policy's space. If not specified, queries the default space.
- id string
- The ID of this resource.
- tokens list(object)
- A list of enrollment tokens.
- kibana_
connections list(object) - Kibana connection configuration block.
- policy_
id string - The identifier of the target agent policy. When provided, only the enrollment tokens associated with this agent policy will be selected. Omit this value to select all enrollment tokens.
- space_
id string - The Kibana space ID to query enrollment tokens from. When the agent policy is space-scoped, this must be set to match the policy's space. If not specified, queries the default space.
- id String
- The ID of this resource.
- tokens
List<Get
Fleet Enrollment Tokens Token> - A list of enrollment tokens.
- kibana
Connections List<GetFleet Enrollment Tokens Kibana Connection> - Kibana connection configuration block.
- policy
Id String - The identifier of the target agent policy. When provided, only the enrollment tokens associated with this agent policy will be selected. Omit this value to select all enrollment tokens.
- space
Id String - The Kibana space ID to query enrollment tokens from. When the agent policy is space-scoped, this must be set to match the policy's space. If not specified, queries the default space.
- id string
- The ID of this resource.
- tokens
Get
Fleet Enrollment Tokens Token[] - A list of enrollment tokens.
- kibana
Connections GetFleet Enrollment Tokens Kibana Connection[] - Kibana connection configuration block.
- policy
Id string - The identifier of the target agent policy. When provided, only the enrollment tokens associated with this agent policy will be selected. Omit this value to select all enrollment tokens.
- space
Id string - The Kibana space ID to query enrollment tokens from. When the agent policy is space-scoped, this must be set to match the policy's space. If not specified, queries the default space.
- id str
- The ID of this resource.
- tokens
Sequence[Get
Fleet Enrollment Tokens Token] - A list of enrollment tokens.
- kibana_
connections Sequence[GetFleet Enrollment Tokens Kibana Connection] - Kibana connection configuration block.
- policy_
id str - The identifier of the target agent policy. When provided, only the enrollment tokens associated with this agent policy will be selected. Omit this value to select all enrollment tokens.
- space_
id str - The Kibana space ID to query enrollment tokens from. When the agent policy is space-scoped, this must be set to match the policy's space. If not specified, queries the default space.
- id String
- The ID of this resource.
- tokens List<Property Map>
- A list of enrollment tokens.
- kibana
Connections List<Property Map> - Kibana connection configuration block.
- policy
Id String - The identifier of the target agent policy. When provided, only the enrollment tokens associated with this agent policy will be selected. Omit this value to select all enrollment tokens.
- space
Id String - The Kibana space ID to query enrollment tokens from. When the agent policy is space-scoped, this must be set to match the policy's space. If not specified, queries the default space.
Supporting Types
GetFleetEnrollmentTokensKibanaConnection
- 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>
- 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 []string - A list of paths to CA certificates to validate the certificate presented by the Kibana server.
- Endpoints []string
- 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)
- 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>
- 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 string - API Key to use for authentication to Kibana
- bearer
Token string - Bearer Token to use for authentication to Kibana
- ca
Certs string[] - A list of paths to CA certificates to validate the certificate presented by the Kibana server.
- endpoints string[]
- 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]
- 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.
- 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>
- 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.
GetFleetEnrollmentTokensToken
- Active bool
- Indicates if the enrollment token is active.
- Api
Key string - The API key.
- Api
Key stringId - The API key identifier.
- Created
At string - The time at which the enrollment token was created.
- Key
Id string - The unique identifier of the enrollment token.
- Name string
- The name of the enrollment token.
- Policy
Id string - The identifier of the associated agent policy.
- Active bool
- Indicates if the enrollment token is active.
- Api
Key string - The API key.
- Api
Key stringId - The API key identifier.
- Created
At string - The time at which the enrollment token was created.
- Key
Id string - The unique identifier of the enrollment token.
- Name string
- The name of the enrollment token.
- Policy
Id string - The identifier of the associated agent policy.
- active bool
- Indicates if the enrollment token is active.
- api_
key string - The API key.
- api_
key_ stringid - The API key identifier.
- created_
at string - The time at which the enrollment token was created.
- key_
id string - The unique identifier of the enrollment token.
- name string
- The name of the enrollment token.
- policy_
id string - The identifier of the associated agent policy.
- active Boolean
- Indicates if the enrollment token is active.
- api
Key String - The API key.
- api
Key StringId - The API key identifier.
- created
At String - The time at which the enrollment token was created.
- key
Id String - The unique identifier of the enrollment token.
- name String
- The name of the enrollment token.
- policy
Id String - The identifier of the associated agent policy.
- active boolean
- Indicates if the enrollment token is active.
- api
Key string - The API key.
- api
Key stringId - The API key identifier.
- created
At string - The time at which the enrollment token was created.
- key
Id string - The unique identifier of the enrollment token.
- name string
- The name of the enrollment token.
- policy
Id string - The identifier of the associated agent policy.
- active bool
- Indicates if the enrollment token is active.
- api_
key str - The API key.
- api_
key_ strid - The API key identifier.
- created_
at str - The time at which the enrollment token was created.
- key_
id str - The unique identifier of the enrollment token.
- name str
- The name of the enrollment token.
- policy_
id str - The identifier of the associated agent policy.
- active Boolean
- Indicates if the enrollment token is active.
- api
Key String - The API key.
- api
Key StringId - The API key identifier.
- created
At String - The time at which the enrollment token was created.
- key
Id String - The unique identifier of the enrollment token.
- name String
- The name of the enrollment token.
- policy
Id String - The identifier of the associated agent policy.
Package Details
- Repository
- elasticstack elastic/terraform-provider-elasticstack
- License
- Notes
- This Pulumi package is based on the
elasticstackTerraform Provider.
Viewing docs for elasticstack 0.15.0
published on Thursday, May 14, 2026 by elastic
published on Thursday, May 14, 2026 by elastic
