HashiCorp Nomad

v0.3.0 published on Tuesday, Sep 27, 2022 by Pulumi

getAclTokens

Get a list of ACL tokens.

Example Usage

using System.Collections.Generic;
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, &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 = pulumi.output(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
Prefix string
prefix String
prefix string
prefix str
prefix String

getAclTokens Result

The following output properties are available:

AclTokens List<GetAclTokensAclToken>
Id string

The provider-assigned unique ID for this managed resource.

Prefix string
AclTokens []GetAclTokensAclToken
Id string

The provider-assigned unique ID for this managed resource.

Prefix string
aclTokens List<GetAclTokensAclToken>
id String

The provider-assigned unique ID for this managed resource.

prefix String
aclTokens GetAclTokensAclToken[]
id string

The provider-assigned unique ID for this managed resource.

prefix string
acl_tokens Sequence[GetAclTokensAclToken]
id str

The provider-assigned unique ID for this managed resource.

prefix str
aclTokens List<Property Map>
id String

The provider-assigned unique ID for this managed resource.

prefix String

Supporting Types

GetAclTokensAclToken

AccessorId string
CreateTime string
Global bool
Name string
Policies List<string>
Type string
AccessorId string
CreateTime string
Global bool
Name string
Policies []string
Type string
accessorId String
createTime String
global Boolean
name String
policies List<String>
type String
accessorId string
createTime string
global boolean
name string
policies string[]
type string
accessor_id str
create_time str
global_ bool
name str
policies Sequence[str]
type str
accessorId String
createTime String
global Boolean
name String
policies List<String>
type String

Package Details

Repository
https://github.com/pulumi/pulumi-nomad
License
Apache-2.0
Notes

This Pulumi package is based on the nomad Terraform Provider.