1. Packages
  2. Elasticstack Provider
  3. API Docs
  4. getFleetEnrollmentTokens
elasticstack 0.11.15 published on Wednesday, Apr 23, 2025 by elastic

elasticstack.getFleetEnrollmentTokens

Explore with Pulumi AI

elasticstack logo
elasticstack 0.11.15 published on Wednesday, Apr 23, 2025 by elastic

    This data source provides information about Fleet Enrollment Tokens.

    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
    

    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(policy_id: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetFleetEnrollmentTokensResult
    def get_fleet_enrollment_tokens_output(policy_id: Optional[pulumi.Input[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 dictionary

    The following arguments are supported:

    PolicyId 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.
    PolicyId 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.
    policyId 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.
    policyId 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.
    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.
    policyId 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.

    getFleetEnrollmentTokens Result

    The following output properties are available:

    Id string
    The ID of this resource.
    Tokens List<GetFleetEnrollmentTokensToken>
    A list of enrollment tokens.
    PolicyId 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.
    Id string
    The ID of this resource.
    Tokens []GetFleetEnrollmentTokensToken
    A list of enrollment tokens.
    PolicyId 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.
    id String
    The ID of this resource.
    tokens List<GetFleetEnrollmentTokensToken>
    A list of enrollment tokens.
    policyId 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.
    id string
    The ID of this resource.
    tokens GetFleetEnrollmentTokensToken[]
    A list of enrollment tokens.
    policyId 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.
    id str
    The ID of this resource.
    tokens Sequence[GetFleetEnrollmentTokensToken]
    A list of enrollment tokens.
    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.
    id String
    The ID of this resource.
    tokens List<Property Map>
    A list of enrollment tokens.
    policyId 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.

    Supporting Types

    GetFleetEnrollmentTokensToken

    Active bool
    Indicates if the enrollment token is active.
    ApiKey string
    The API key.
    ApiKeyId string
    The API key identifier.
    CreatedAt string
    The time at which the enrollment token was created.
    KeyId string
    The unique identifier of the enrollment token.
    Name string
    The name of the enrollment token.
    PolicyId string
    The identifier of the associated agent policy.
    Active bool
    Indicates if the enrollment token is active.
    ApiKey string
    The API key.
    ApiKeyId string
    The API key identifier.
    CreatedAt string
    The time at which the enrollment token was created.
    KeyId string
    The unique identifier of the enrollment token.
    Name string
    The name of the enrollment token.
    PolicyId string
    The identifier of the associated agent policy.
    active Boolean
    Indicates if the enrollment token is active.
    apiKey String
    The API key.
    apiKeyId String
    The API key identifier.
    createdAt String
    The time at which the enrollment token was created.
    keyId String
    The unique identifier of the enrollment token.
    name String
    The name of the enrollment token.
    policyId String
    The identifier of the associated agent policy.
    active boolean
    Indicates if the enrollment token is active.
    apiKey string
    The API key.
    apiKeyId string
    The API key identifier.
    createdAt string
    The time at which the enrollment token was created.
    keyId string
    The unique identifier of the enrollment token.
    name string
    The name of the enrollment token.
    policyId 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_id str
    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.
    apiKey String
    The API key.
    apiKeyId String
    The API key identifier.
    createdAt String
    The time at which the enrollment token was created.
    keyId String
    The unique identifier of the enrollment token.
    name String
    The name of the enrollment token.
    policyId 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 elasticstack Terraform Provider.
    elasticstack logo
    elasticstack 0.11.15 published on Wednesday, Apr 23, 2025 by elastic