Show / Hide Table of Contents

Class AclToken

The consul..AclToken resource writes an ACL token into Consul.

Example Usage

Basic usage

using Pulumi;
using Consul = Pulumi.Consul;

class MyStack : Stack
{
public MyStack()
{
    var agent = new Consul.AclPolicy("agent", new Consul.AclPolicyArgs
    {
        Rules = @"node_prefix """" {
policy = ""read""
}

",
    });
    var test = new Consul.AclToken("test", new Consul.AclTokenArgs
    {
        Description = "my test token",
        Local = true,
        Policies = 
        {
            agent.Name,
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
AclToken
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Consul
Assembly: Pulumi.Consul.dll
Syntax
public class AclToken : CustomResource

Constructors

View Source

AclToken(String, AclTokenArgs, CustomResourceOptions)

Create a AclToken resource with the given unique name, arguments, and options.

Declaration
public AclToken(string name, AclTokenArgs args = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

AclTokenArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

AccessorId

The uuid of the token. If omitted, Consul will generate a random uuid.

Declaration
public Output<string> AccessorId { get; }
Property Value
Type Description
Output<System.String>
View Source

Description

The description of the token.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

Local

The flag to set the token local to the current datacenter.

Declaration
public Output<bool?> Local { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

Namespace

The namespace to create the token within.

Declaration
public Output<string> Namespace { get; }
Property Value
Type Description
Output<System.String>
View Source

Policies

The list of policies attached to the token.

Declaration
public Output<ImmutableArray<string>> Policies { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Roles

The list of roles attached to the token.

Declaration
public Output<ImmutableArray<string>> Roles { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>

Methods

View Source

Get(String, Input<String>, AclTokenState, CustomResourceOptions)

Get an existing AclToken resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static AclToken Get(string name, Input<string> id, AclTokenState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

AclTokenState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
AclToken
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.