1. Packages
  2. Nomad Provider
  3. API Docs
  4. getAclPolicy
Nomad v2.4.1 published on Wednesday, Oct 30, 2024 by Pulumi

nomad.getAclPolicy

Explore with Pulumi AI

nomad logo
Nomad v2.4.1 published on Wednesday, Oct 30, 2024 by Pulumi

    Retrieve information on an ACL Policy.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nomad from "@pulumi/nomad";
    
    const myPolicy = nomad.getAclPolicy({
        name: "my-policy",
    });
    
    import pulumi
    import pulumi_nomad as nomad
    
    my_policy = nomad.get_acl_policy(name="my-policy")
    
    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.LookupAclPolicy(ctx, &nomad.LookupAclPolicyArgs{
    			Name: "my-policy",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nomad = Pulumi.Nomad;
    
    return await Deployment.RunAsync(() => 
    {
        var myPolicy = Nomad.GetAclPolicy.Invoke(new()
        {
            Name = "my-policy",
        });
    
    });
    
    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.GetAclPolicyArgs;
    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 myPolicy = NomadFunctions.getAclPolicy(GetAclPolicyArgs.builder()
                .name("my-policy")
                .build());
    
        }
    }
    
    variables:
      myPolicy:
        fn::invoke:
          Function: nomad:getAclPolicy
          Arguments:
            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)
    }
    public static CompletableFuture<GetAclPolicyResult> getAclPolicy(GetAclPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: nomad:index/getAclPolicy:getAclPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    (string) - the name of the ACL Policy.
    Name string
    (string) - the name of the ACL Policy.
    name String
    (string) - the name of the ACL Policy.
    name string
    (string) - the name of the ACL Policy.
    name str
    (string) - the name of the ACL Policy.
    name String
    (string) - the name of the ACL Policy.

    getAclPolicy Result

    The following output properties are available:

    Description string
    (string) - the description of the ACL Policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    (string) - the name of the ACL Policy.
    Rules string
    (string) - the ACL Policy rules in HCL format.
    Description string
    (string) - the description of the ACL Policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    (string) - the name of the ACL Policy.
    Rules string
    (string) - the ACL Policy rules in HCL format.
    description String
    (string) - the description of the ACL Policy.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    (string) - the name of the ACL Policy.
    rules String
    (string) - the ACL Policy rules in HCL format.
    description string
    (string) - the description of the ACL Policy.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    (string) - the name of the ACL Policy.
    rules string
    (string) - the ACL Policy rules in HCL format.
    description str
    (string) - the description of the ACL Policy.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    (string) - the name of the ACL Policy.
    rules str
    (string) - the ACL Policy rules in HCL format.
    description String
    (string) - the description of the ACL Policy.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    (string) - the name of the ACL Policy.
    rules String
    (string) - the ACL Policy rules in HCL format.

    Package Details

    Repository
    HashiCorp Nomad pulumi/pulumi-nomad
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the nomad Terraform Provider.
    nomad logo
    Nomad v2.4.1 published on Wednesday, Oct 30, 2024 by Pulumi