Nomad v2.3.0 published on Wednesday, Jun 5, 2024 by Pulumi
nomad.getAclTokens
Explore with Pulumi AI
Get a list of ACL tokens.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";
const tokens = nomad.getAclTokens({
    prefix: "a242",
});
import pulumi
import pulumi_nomad as nomad
tokens = nomad.get_acl_tokens(prefix="a242")
package main
import (
	"github.com/pulumi/pulumi-nomad/sdk/v2/go/nomad"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := nomad.GetAclTokens(ctx, &nomad.GetAclTokensArgs{
			Prefix: pulumi.StringRef("a242"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nomad = Pulumi.Nomad;
return await Deployment.RunAsync(() => 
{
    var tokens = Nomad.GetAclTokens.Invoke(new()
    {
        Prefix = "a242",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nomad.NomadFunctions;
import com.pulumi.nomad.inputs.GetAclTokensArgs;
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 tokens = NomadFunctions.getAclTokens(GetAclTokensArgs.builder()
            .prefix("a242")
            .build());
    }
}
variables:
  tokens:
    fn::invoke:
      Function: nomad:getAclTokens
      Arguments:
        prefix: a242
Using getAclTokens
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 getAclTokens(args: GetAclTokensArgs, opts?: InvokeOptions): Promise<GetAclTokensResult>
function getAclTokensOutput(args: GetAclTokensOutputArgs, opts?: InvokeOptions): Output<GetAclTokensResult>def get_acl_tokens(prefix: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetAclTokensResult
def get_acl_tokens_output(prefix: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetAclTokensResult]func GetAclTokens(ctx *Context, args *GetAclTokensArgs, opts ...InvokeOption) (*GetAclTokensResult, error)
func GetAclTokensOutput(ctx *Context, args *GetAclTokensOutputArgs, opts ...InvokeOption) GetAclTokensResultOutput> Note: This function is named GetAclTokens in the Go SDK.
public static class GetAclTokens 
{
    public static Task<GetAclTokensResult> InvokeAsync(GetAclTokensArgs args, InvokeOptions? opts = null)
    public static Output<GetAclTokensResult> Invoke(GetAclTokensInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAclTokensResult> getAclTokens(GetAclTokensArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: nomad:index/getAclTokens:getAclTokens
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Prefix string
 (string)Optional prefix to filter the tokens.
- Prefix string
 (string)Optional prefix to filter the tokens.
- prefix String
 (string)Optional prefix to filter the tokens.
- prefix string
 (string)Optional prefix to filter the tokens.
- prefix str
 (string)Optional prefix to filter the tokens.
- prefix String
 (string)Optional prefix to filter the tokens.
getAclTokens Result
The following output properties are available:
- Acl
Tokens List<GetAcl Tokens Acl Token>  (list of objects)The list of tokens found in the given prefix.- Id string
 - The provider-assigned unique ID for this managed resource.
 - Prefix string
 
- Acl
Tokens []GetAcl Tokens Acl Token  (list of objects)The list of tokens found in the given prefix.- Id string
 - The provider-assigned unique ID for this managed resource.
 - Prefix string
 
- acl
Tokens List<GetAcl Tokens Acl Token>  (list of objects)The list of tokens found in the given prefix.- id String
 - The provider-assigned unique ID for this managed resource.
 - prefix String
 
- acl
Tokens GetAcl Tokens Acl Token[]  (list of objects)The list of tokens found in the given prefix.- id string
 - The provider-assigned unique ID for this managed resource.
 - prefix string
 
- acl_
tokens Sequence[GetAcl Tokens Acl Token]  (list of objects)The list of tokens found in the given prefix.- id str
 - The provider-assigned unique ID for this managed resource.
 - prefix str
 
- acl
Tokens List<Property Map> (list of objects)The list of tokens found in the given prefix.- id String
 - The provider-assigned unique ID for this managed resource.
 - prefix String
 
Supporting Types
GetAclTokensAclToken    
- Accessor
Id string (TypeString)Non-sensitive identifier for the token.- Create
Time string (string)Date and time the token was created at.- Expiration
Time string (string)- The timestamp after which the token is considered expired and eligible for destruction.- Global bool
 (bool)Whether the token is replicated to all regions.- Name string
 (TypeString)The name of the token.- Policies List<string>
 (list of strings)The list of policies attached to the token.- Roles
List<Get
Acl Tokens Acl Token Role>  (set: [])- The list of roles attached to the token. Each entry hasnameandidattributes.- Type string
 (TypeString)The type of the token.
- Accessor
Id string (TypeString)Non-sensitive identifier for the token.- Create
Time string (string)Date and time the token was created at.- Expiration
Time string (string)- The timestamp after which the token is considered expired and eligible for destruction.- Global bool
 (bool)Whether the token is replicated to all regions.- Name string
 (TypeString)The name of the token.- Policies []string
 (list of strings)The list of policies attached to the token.- Roles
[]Get
Acl Tokens Acl Token Role  (set: [])- The list of roles attached to the token. Each entry hasnameandidattributes.- Type string
 (TypeString)The type of the token.
- accessor
Id String (TypeString)Non-sensitive identifier for the token.- create
Time String (string)Date and time the token was created at.- expiration
Time String (string)- The timestamp after which the token is considered expired and eligible for destruction.- global Boolean
 (bool)Whether the token is replicated to all regions.- name String
 (TypeString)The name of the token.- policies List<String>
 (list of strings)The list of policies attached to the token.- roles
List<Get
Acl Tokens Acl Token Role>  (set: [])- The list of roles attached to the token. Each entry hasnameandidattributes.- type String
 (TypeString)The type of the token.
- accessor
Id string (TypeString)Non-sensitive identifier for the token.- create
Time string (string)Date and time the token was created at.- expiration
Time string (string)- The timestamp after which the token is considered expired and eligible for destruction.- global boolean
 (bool)Whether the token is replicated to all regions.- name string
 (TypeString)The name of the token.- policies string[]
 (list of strings)The list of policies attached to the token.- roles
Get
Acl Tokens Acl Token Role[]  (set: [])- The list of roles attached to the token. Each entry hasnameandidattributes.- type string
 (TypeString)The type of the token.
- accessor_
id str (TypeString)Non-sensitive identifier for the token.- create_
time str (string)Date and time the token was created at.- expiration_
time str (string)- The timestamp after which the token is considered expired and eligible for destruction.- global_ bool
 (bool)Whether the token is replicated to all regions.- name str
 (TypeString)The name of the token.- policies Sequence[str]
 (list of strings)The list of policies attached to the token.- roles
Sequence[Get
Acl Tokens Acl Token Role]  (set: [])- The list of roles attached to the token. Each entry hasnameandidattributes.- type str
 (TypeString)The type of the token.
- accessor
Id String (TypeString)Non-sensitive identifier for the token.- create
Time String (string)Date and time the token was created at.- expiration
Time String (string)- The timestamp after which the token is considered expired and eligible for destruction.- global Boolean
 (bool)Whether the token is replicated to all regions.- name String
 (TypeString)The name of the token.- policies List<String>
 (list of strings)The list of policies attached to the token.- roles List<Property Map>
 (set: [])- The list of roles attached to the token. Each entry hasnameandidattributes.- type String
 (TypeString)The type of the token.
GetAclTokensAclTokenRole     
Package Details
- Repository
 - HashiCorp Nomad pulumi/pulumi-nomad
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
nomadTerraform Provider.