nomad.getDeployments
Retrieve a list of deployments in Nomad.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Nomad = Pulumi.Nomad;
return await Deployment.RunAsync(() =>
{
var example = Nomad.GetDeployments.Invoke();
});
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.GetDeployments(ctx, nil, nil)
if err != nil {
return err
}
return nil
})
}
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();
}
}
import pulumi
import pulumi_nomad as nomad
example = nomad.get_deployments()
import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";
const example = nomad.getDeployments({});
variables:
example:
fn::invoke:
Function: nomad:getDeployments
Arguments: {}
Using getDeployments
function getDeployments(opts?: InvokeOptions): Promise<GetDeploymentsResult>
def get_deployments(opts: Optional[InvokeOptions] = None) -> GetDeploymentsResult
func GetDeployments(ctx *Context, opts ...InvokeOption) (*GetDeploymentsResult, error)
> Note: This function is named GetDeployments
in the Go SDK.
public static class GetDeployments
{
public static Task<GetDeploymentsResult> InvokeAsync(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<Immutable
Dictionary<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.