1. Packages
  2. HashiCorp Nomad
  3. API Docs
  4. getDeployments
Nomad v2.2.0 published on Wednesday, Mar 13, 2024 by Pulumi

nomad.getDeployments

Explore with Pulumi AI

nomad logo
Nomad v2.2.0 published on Wednesday, Mar 13, 2024 by Pulumi

    Retrieve a list of deployments in Nomad.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nomad from "@pulumi/nomad";
    
    const example = nomad.getDeployments({});
    
    import pulumi
    import pulumi_nomad as nomad
    
    example = nomad.get_deployments()
    
    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.GetDeployments(ctx, nil, 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 example = Nomad.GetDeployments.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nomad.NomadFunctions;
    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 example = NomadFunctions.getDeployments();
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: nomad:getDeployments
          Arguments: {}
    

    Using getDeployments

    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 getDeployments(opts?: InvokeOptions): Promise<GetDeploymentsResult>
    function getDeploymentsOutput(opts?: InvokeOptions): Output<GetDeploymentsResult>
    def get_deployments(opts: Optional[InvokeOptions] = None) -> GetDeploymentsResult
    def get_deployments_output(opts: Optional[InvokeOptions] = None) -> Output[GetDeploymentsResult]
    func GetDeployments(ctx *Context, opts ...InvokeOption) (*GetDeploymentsResult, error)
    func GetDeploymentsOutput(ctx *Context, opts ...InvokeOption) GetDeploymentsResultOutput

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

    public static class GetDeployments 
    {
        public static Task<GetDeploymentsResult> InvokeAsync(InvokeOptions? opts = null)
        public static Output<GetDeploymentsResult> Invoke(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDeploymentsResult> getDeployments(InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: nomad:index/getDeployments:getDeployments
      arguments:
        # arguments dictionary

    getDeployments Result

    The following output properties are available:

    Deployments List<ImmutableDictionary<string, object>>
    list of maps a list of deployments in the cluster.
    Id string
    The provider-assigned unique ID for this managed resource.
    Deployments []map[string]interface{}
    list of maps a list of deployments in the cluster.
    Id string
    The provider-assigned unique ID for this managed resource.
    deployments List<Map<String,Object>>
    list of maps a list of deployments in the cluster.
    id String
    The provider-assigned unique ID for this managed resource.
    deployments {[key: string]: any}[]
    list of maps a list of deployments in the cluster.
    id string
    The provider-assigned unique ID for this managed resource.
    deployments Sequence[Mapping[str, Any]]
    list of maps a list of deployments in the cluster.
    id str
    The provider-assigned unique ID for this managed resource.
    deployments List<Map<Any>>
    list of maps a list of deployments in the cluster.
    id String
    The provider-assigned unique ID for this managed resource.

    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.2.0 published on Wednesday, Mar 13, 2024 by Pulumi