1. Packages
  2. Lacework Provider
  3. API Docs
  4. getAgentAccessToken
lacework 2.0.6 published on Monday, Apr 14, 2025 by lacework

lacework.getAgentAccessToken

Explore with Pulumi AI

lacework logo
lacework 2.0.6 published on Monday, Apr 14, 2025 by lacework

    Retrieve Lacework agent access tokens.

    Note: To list all agent access tokens in your Lacework account, use the Lacework CLI command lacework agent token list. To install this tool follow this documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as lacework from "@pulumi/lacework";
    
    const k8s = lacework.getAgentAccessToken({
        name: "k8s-deployments",
    });
    
    import pulumi
    import pulumi_lacework as lacework
    
    k8s = lacework.get_agent_access_token(name="k8s-deployments")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/lacework/v2/lacework"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lacework.LookupAgentAccessToken(ctx, &lacework.LookupAgentAccessTokenArgs{
    			Name: "k8s-deployments",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Lacework = Pulumi.Lacework;
    
    return await Deployment.RunAsync(() => 
    {
        var k8s = Lacework.GetAgentAccessToken.Invoke(new()
        {
            Name = "k8s-deployments",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.lacework.LaceworkFunctions;
    import com.pulumi.lacework.inputs.GetAgentAccessTokenArgs;
    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 k8s = LaceworkFunctions.getAgentAccessToken(GetAgentAccessTokenArgs.builder()
                .name("k8s-deployments")
                .build());
    
        }
    }
    
    variables:
      k8s:
        fn::invoke:
          function: lacework:getAgentAccessToken
          arguments:
            name: k8s-deployments
    

    Using getAgentAccessToken

    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 getAgentAccessToken(args: GetAgentAccessTokenArgs, opts?: InvokeOptions): Promise<GetAgentAccessTokenResult>
    function getAgentAccessTokenOutput(args: GetAgentAccessTokenOutputArgs, opts?: InvokeOptions): Output<GetAgentAccessTokenResult>
    def get_agent_access_token(id: Optional[str] = None,
                               name: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetAgentAccessTokenResult
    def get_agent_access_token_output(id: Optional[pulumi.Input[str]] = None,
                               name: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetAgentAccessTokenResult]
    func LookupAgentAccessToken(ctx *Context, args *LookupAgentAccessTokenArgs, opts ...InvokeOption) (*LookupAgentAccessTokenResult, error)
    func LookupAgentAccessTokenOutput(ctx *Context, args *LookupAgentAccessTokenOutputArgs, opts ...InvokeOption) LookupAgentAccessTokenResultOutput

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

    public static class GetAgentAccessToken 
    {
        public static Task<GetAgentAccessTokenResult> InvokeAsync(GetAgentAccessTokenArgs args, InvokeOptions? opts = null)
        public static Output<GetAgentAccessTokenResult> Invoke(GetAgentAccessTokenInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAgentAccessTokenResult> getAgentAccessToken(GetAgentAccessTokenArgs args, InvokeOptions options)
    public static Output<GetAgentAccessTokenResult> getAgentAccessToken(GetAgentAccessTokenArgs args, InvokeOptions options)
    
    fn::invoke:
      function: lacework:index/getAgentAccessToken:getAgentAccessToken
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The agent access token name.
    Id string
    Name string
    The agent access token name.
    Id string
    name String
    The agent access token name.
    id String
    name string
    The agent access token name.
    id string
    name str
    The agent access token name.
    id str
    name String
    The agent access token name.
    id String

    getAgentAccessToken Result

    The following output properties are available:

    Id string
    Name string
    Token string
    The agent access token.
    Id string
    Name string
    Token string
    The agent access token.
    id String
    name String
    token String
    The agent access token.
    id string
    name string
    token string
    The agent access token.
    id str
    name str
    token str
    The agent access token.
    id String
    name String
    token String
    The agent access token.

    Package Details

    Repository
    lacework lacework/terraform-provider-lacework
    License
    Notes
    This Pulumi package is based on the lacework Terraform Provider.
    lacework logo
    lacework 2.0.6 published on Monday, Apr 14, 2025 by lacework