HashiCorp Nomad

v0.2.1 published on Tuesday, Dec 7, 2021 by Pulumi

getAclPolicy

Retrieve information on an ACL Policy.

Example Usage

using Pulumi;
using Nomad = Pulumi.Nomad;

class MyStack : Stack
{
    public MyStack()
    {
        var myPolicy = Output.Create(Nomad.GetAclPolicy.InvokeAsync(new Nomad.GetAclPolicyArgs
        {
            Name = "my-policy",
        }));
    }

}
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.LookupAclPolicy(ctx, &GetAclPolicyArgs{
			Name: "my-policy",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_nomad as nomad

my_policy = nomad.get_acl_policy(name="my-policy")
import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";

const myPolicy = pulumi.output(nomad.getAclPolicy({
    name: "my-policy",
}));

Using getAclPolicy

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 getAclPolicy(args: GetAclPolicyArgs, opts?: InvokeOptions): Promise<GetAclPolicyResult>
function getAclPolicyOutput(args: GetAclPolicyOutputArgs, opts?: InvokeOptions): Output<GetAclPolicyResult>
def get_acl_policy(name: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetAclPolicyResult
def get_acl_policy_output(name: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetAclPolicyResult]
func LookupAclPolicy(ctx *Context, args *LookupAclPolicyArgs, opts ...InvokeOption) (*LookupAclPolicyResult, error)
func LookupAclPolicyOutput(ctx *Context, args *LookupAclPolicyOutputArgs, opts ...InvokeOption) LookupAclPolicyResultOutput

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

public static class GetAclPolicy 
{
    public static Task<GetAclPolicyResult> InvokeAsync(GetAclPolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetAclPolicyResult> Invoke(GetAclPolicyInvokeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string
Name string
name string
name str

getAclPolicy Result

The following output properties are available:

Description string
Id string
The provider-assigned unique ID for this managed resource.
Name string
Rules string
Description string
Id string
The provider-assigned unique ID for this managed resource.
Name string
Rules string
description string
id string
The provider-assigned unique ID for this managed resource.
name string
rules string
description str
id str
The provider-assigned unique ID for this managed resource.
name str
rules str

Package Details

Repository
https://github.com/pulumi/pulumi-nomad
License
Apache-2.0
Notes
This Pulumi package is based on the nomad Terraform Provider.