nomad.getAclTokens

Explore with Pulumi AI

Get a list of ACL tokens.

Example Usage

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 main

import (
	"github.com/pulumi/pulumi-nomad/sdk/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
	})
}
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());

    }
}
import pulumi
import pulumi_nomad as nomad

tokens = nomad.get_acl_tokens(prefix="a242")
import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";

const tokens = nomad.getAclTokens({
    prefix: "a242",
});
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 dictionary

The 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:

AclTokens List<GetAclTokensAclToken>

(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
AclTokens []GetAclTokensAclToken

(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
aclTokens List<GetAclTokensAclToken>

(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
aclTokens GetAclTokensAclToken[]

(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[GetAclTokensAclToken]

(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
aclTokens 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

AccessorId string

(TypeString) Non-sensitive identifier for the token.

CreateTime string

(string) Date and time the token was created at.

ExpirationTime 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<GetAclTokensAclTokenRole>

(set: []) - The list of roles attached to the token. Each entry has name and id attributes.

Type string

(TypeString) The type of the token.

AccessorId string

(TypeString) Non-sensitive identifier for the token.

CreateTime string

(string) Date and time the token was created at.

ExpirationTime 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 []GetAclTokensAclTokenRole

(set: []) - The list of roles attached to the token. Each entry has name and id attributes.

Type string

(TypeString) The type of the token.

accessorId String

(TypeString) Non-sensitive identifier for the token.

createTime String

(string) Date and time the token was created at.

expirationTime 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<GetAclTokensAclTokenRole>

(set: []) - The list of roles attached to the token. Each entry has name and id attributes.

type String

(TypeString) The type of the token.

accessorId string

(TypeString) Non-sensitive identifier for the token.

createTime string

(string) Date and time the token was created at.

expirationTime 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 GetAclTokensAclTokenRole[]

(set: []) - The list of roles attached to the token. Each entry has name and id attributes.

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[GetAclTokensAclTokenRole]

(set: []) - The list of roles attached to the token. Each entry has name and id attributes.

type str

(TypeString) The type of the token.

accessorId String

(TypeString) Non-sensitive identifier for the token.

createTime String

(string) Date and time the token was created at.

expirationTime 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 has name and id attributes.

type String

(TypeString) The type of the token.

GetAclTokensAclTokenRole

Id string
Name string

(TypeString) The name of the token.

Id string
Name string

(TypeString) The name of the token.

id String
name String

(TypeString) The name of the token.

id string
name string

(TypeString) The name of the token.

id str
name str

(TypeString) The name of the token.

id String
name String

(TypeString) The name of the token.

Package Details

Repository
HashiCorp Nomad pulumi/pulumi-nomad
License
Apache-2.0
Notes

This Pulumi package is based on the nomad Terraform Provider.