1. Packages
  2. Nomad Provider
  3. API Docs
  4. getAclToken
Nomad v2.5.0 published on Thursday, Apr 17, 2025 by Pulumi

nomad.getAclToken

Explore with Pulumi AI

Nomad v2.5.0 published on Thursday, Apr 17, 2025 by Pulumi

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";

const myToken = nomad.getAclToken({
    accessorId: "aa534e09-6a07-0a45-2295-a7f77063d429",
});
Copy
import pulumi
import pulumi_nomad as nomad

my_token = nomad.get_acl_token(accessor_id="aa534e09-6a07-0a45-2295-a7f77063d429")
Copy
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.LookupAclToken(ctx, &nomad.LookupAclTokenArgs{
			AccessorId: "aa534e09-6a07-0a45-2295-a7f77063d429",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nomad = Pulumi.Nomad;

return await Deployment.RunAsync(() => 
{
    var myToken = Nomad.GetAclToken.Invoke(new()
    {
        AccessorId = "aa534e09-6a07-0a45-2295-a7f77063d429",
    });

});
Copy
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.GetAclTokenArgs;
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 myToken = NomadFunctions.getAclToken(GetAclTokenArgs.builder()
            .accessorId("aa534e09-6a07-0a45-2295-a7f77063d429")
            .build());

    }
}
Copy
variables:
  myToken:
    fn::invoke:
      function: nomad:getAclToken
      arguments:
        accessorId: aa534e09-6a07-0a45-2295-a7f77063d429
Copy

Using getAclToken

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 getAclToken(args: GetAclTokenArgs, opts?: InvokeOptions): Promise<GetAclTokenResult>
function getAclTokenOutput(args: GetAclTokenOutputArgs, opts?: InvokeOptions): Output<GetAclTokenResult>
Copy
def get_acl_token(accessor_id: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetAclTokenResult
def get_acl_token_output(accessor_id: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetAclTokenResult]
Copy
func LookupAclToken(ctx *Context, args *LookupAclTokenArgs, opts ...InvokeOption) (*LookupAclTokenResult, error)
func LookupAclTokenOutput(ctx *Context, args *LookupAclTokenOutputArgs, opts ...InvokeOption) LookupAclTokenResultOutput
Copy

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

public static class GetAclToken 
{
    public static Task<GetAclTokenResult> InvokeAsync(GetAclTokenArgs args, InvokeOptions? opts = null)
    public static Output<GetAclTokenResult> Invoke(GetAclTokenInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetAclTokenResult> getAclToken(GetAclTokenArgs args, InvokeOptions options)
public static Output<GetAclTokenResult> getAclToken(GetAclTokenArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: nomad:index/getAclToken:getAclToken
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AccessorId This property is required. string
(string) Non-sensitive identifier for this token.
AccessorId This property is required. string
(string) Non-sensitive identifier for this token.
accessorId This property is required. String
(string) Non-sensitive identifier for this token.
accessorId This property is required. string
(string) Non-sensitive identifier for this token.
accessor_id This property is required. str
(string) Non-sensitive identifier for this token.
accessorId This property is required. String
(string) Non-sensitive identifier for this token.

getAclToken Result

The following output properties are available:

AccessorId string
(string) Non-sensitive identifier for this token.
CreateTime string
(string) Date and time the token was created.
ExpirationTime string
(string) - The timestamp after which the token is considered expired and eligible for destruction.
ExpirationTtl string
(string) The expiration TTL for the token.
Global bool
(bool) Whether the token is replicated to all regions, or if it will only be used in the region it was created.
Id string
The provider-assigned unique ID for this managed resource.
Name string
(string) Non-sensitive identifier for this token.
Policies List<string>
(list of strings) List of policy names associated with this token.
Roles List<GetAclTokenRole>
(set: []) - The list of roles attached to the token. Each entry has name and id attributes.
SecretId string
(string) The token value itself.
Type string
(string) The type of the token.
AccessorId string
(string) Non-sensitive identifier for this token.
CreateTime string
(string) Date and time the token was created.
ExpirationTime string
(string) - The timestamp after which the token is considered expired and eligible for destruction.
ExpirationTtl string
(string) The expiration TTL for the token.
Global bool
(bool) Whether the token is replicated to all regions, or if it will only be used in the region it was created.
Id string
The provider-assigned unique ID for this managed resource.
Name string
(string) Non-sensitive identifier for this token.
Policies []string
(list of strings) List of policy names associated with this token.
Roles []GetAclTokenRole
(set: []) - The list of roles attached to the token. Each entry has name and id attributes.
SecretId string
(string) The token value itself.
Type string
(string) The type of the token.
accessorId String
(string) Non-sensitive identifier for this token.
createTime String
(string) Date and time the token was created.
expirationTime String
(string) - The timestamp after which the token is considered expired and eligible for destruction.
expirationTtl String
(string) The expiration TTL for the token.
global Boolean
(bool) Whether the token is replicated to all regions, or if it will only be used in the region it was created.
id String
The provider-assigned unique ID for this managed resource.
name String
(string) Non-sensitive identifier for this token.
policies List<String>
(list of strings) List of policy names associated with this token.
roles List<GetAclTokenRole>
(set: []) - The list of roles attached to the token. Each entry has name and id attributes.
secretId String
(string) The token value itself.
type String
(string) The type of the token.
accessorId string
(string) Non-sensitive identifier for this token.
createTime string
(string) Date and time the token was created.
expirationTime string
(string) - The timestamp after which the token is considered expired and eligible for destruction.
expirationTtl string
(string) The expiration TTL for the token.
global boolean
(bool) Whether the token is replicated to all regions, or if it will only be used in the region it was created.
id string
The provider-assigned unique ID for this managed resource.
name string
(string) Non-sensitive identifier for this token.
policies string[]
(list of strings) List of policy names associated with this token.
roles GetAclTokenRole[]
(set: []) - The list of roles attached to the token. Each entry has name and id attributes.
secretId string
(string) The token value itself.
type string
(string) The type of the token.
accessor_id str
(string) Non-sensitive identifier for this token.
create_time str
(string) Date and time the token was created.
expiration_time str
(string) - The timestamp after which the token is considered expired and eligible for destruction.
expiration_ttl str
(string) The expiration TTL for the token.
global_ bool
(bool) Whether the token is replicated to all regions, or if it will only be used in the region it was created.
id str
The provider-assigned unique ID for this managed resource.
name str
(string) Non-sensitive identifier for this token.
policies Sequence[str]
(list of strings) List of policy names associated with this token.
roles Sequence[GetAclTokenRole]
(set: []) - The list of roles attached to the token. Each entry has name and id attributes.
secret_id str
(string) The token value itself.
type str
(string) The type of the token.
accessorId String
(string) Non-sensitive identifier for this token.
createTime String
(string) Date and time the token was created.
expirationTime String
(string) - The timestamp after which the token is considered expired and eligible for destruction.
expirationTtl String
(string) The expiration TTL for the token.
global Boolean
(bool) Whether the token is replicated to all regions, or if it will only be used in the region it was created.
id String
The provider-assigned unique ID for this managed resource.
name String
(string) Non-sensitive identifier for this token.
policies List<String>
(list of strings) List of policy names associated with this token.
roles List<Property Map>
(set: []) - The list of roles attached to the token. Each entry has name and id attributes.
secretId String
(string) The token value itself.
type String
(string) The type of the token.

Supporting Types

GetAclTokenRole

Id This property is required. string
The ID of the ACL role.
Name This property is required. string
(string) Non-sensitive identifier for this token.
Id This property is required. string
The ID of the ACL role.
Name This property is required. string
(string) Non-sensitive identifier for this token.
id This property is required. String
The ID of the ACL role.
name This property is required. String
(string) Non-sensitive identifier for this token.
id This property is required. string
The ID of the ACL role.
name This property is required. string
(string) Non-sensitive identifier for this token.
id This property is required. str
The ID of the ACL role.
name This property is required. str
(string) Non-sensitive identifier for this token.
id This property is required. String
The ID of the ACL role.
name This property is required. String
(string) Non-sensitive identifier for this token.

Package Details

Repository
HashiCorp Nomad pulumi/pulumi-nomad
License
Apache-2.0
Notes
This Pulumi package is based on the nomad Terraform Provider.
Nomad v2.5.0 published on Thursday, Apr 17, 2025 by Pulumi