1. Packages
  2. Nomad Provider
  3. API Docs
  4. QuoteSpecification
Nomad v2.4.3 published on Saturday, Mar 15, 2025 by Pulumi

nomad.QuoteSpecification

Explore with Pulumi AI

Manages a quota specification in a Nomad cluster.

Example Usage

Registering a quota specification:

import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";

const prodApi = new nomad.QuoteSpecification("prod_api", {
    name: "prod-api",
    description: "Production instances of backend API servers",
    limits: [{
        region: "global",
        regionLimit: {
            cpu: 2400,
            memoryMb: 1200,
        },
    }],
});
Copy
import pulumi
import pulumi_nomad as nomad

prod_api = nomad.QuoteSpecification("prod_api",
    name="prod-api",
    description="Production instances of backend API servers",
    limits=[{
        "region": "global",
        "region_limit": {
            "cpu": 2400,
            "memory_mb": 1200,
        },
    }])
Copy
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.NewQuoteSpecification(ctx, "prod_api", &nomad.QuoteSpecificationArgs{
			Name:        pulumi.String("prod-api"),
			Description: pulumi.String("Production instances of backend API servers"),
			Limits: nomad.QuoteSpecificationLimitArray{
				&nomad.QuoteSpecificationLimitArgs{
					Region: pulumi.String("global"),
					RegionLimit: &nomad.QuoteSpecificationLimitRegionLimitArgs{
						Cpu:      pulumi.Int(2400),
						MemoryMb: pulumi.Int(1200),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nomad = Pulumi.Nomad;

return await Deployment.RunAsync(() => 
{
    var prodApi = new Nomad.QuoteSpecification("prod_api", new()
    {
        Name = "prod-api",
        Description = "Production instances of backend API servers",
        Limits = new[]
        {
            new Nomad.Inputs.QuoteSpecificationLimitArgs
            {
                Region = "global",
                RegionLimit = new Nomad.Inputs.QuoteSpecificationLimitRegionLimitArgs
                {
                    Cpu = 2400,
                    MemoryMb = 1200,
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nomad.QuoteSpecification;
import com.pulumi.nomad.QuoteSpecificationArgs;
import com.pulumi.nomad.inputs.QuoteSpecificationLimitArgs;
import com.pulumi.nomad.inputs.QuoteSpecificationLimitRegionLimitArgs;
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) {
        var prodApi = new QuoteSpecification("prodApi", QuoteSpecificationArgs.builder()
            .name("prod-api")
            .description("Production instances of backend API servers")
            .limits(QuoteSpecificationLimitArgs.builder()
                .region("global")
                .regionLimit(QuoteSpecificationLimitRegionLimitArgs.builder()
                    .cpu(2400)
                    .memoryMb(1200)
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  prodApi:
    type: nomad:QuoteSpecification
    name: prod_api
    properties:
      name: prod-api
      description: Production instances of backend API servers
      limits:
        - region: global
          regionLimit:
            cpu: 2400
            memoryMb: 1200
Copy

Create QuoteSpecification Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new QuoteSpecification(name: string, args: QuoteSpecificationArgs, opts?: CustomResourceOptions);
@overload
def QuoteSpecification(resource_name: str,
                       args: QuoteSpecificationArgs,
                       opts: Optional[ResourceOptions] = None)

@overload
def QuoteSpecification(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       limits: Optional[Sequence[QuoteSpecificationLimitArgs]] = None,
                       description: Optional[str] = None,
                       name: Optional[str] = None)
func NewQuoteSpecification(ctx *Context, name string, args QuoteSpecificationArgs, opts ...ResourceOption) (*QuoteSpecification, error)
public QuoteSpecification(string name, QuoteSpecificationArgs args, CustomResourceOptions? opts = null)
public QuoteSpecification(String name, QuoteSpecificationArgs args)
public QuoteSpecification(String name, QuoteSpecificationArgs args, CustomResourceOptions options)
type: nomad:QuoteSpecification
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. QuoteSpecificationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. QuoteSpecificationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. QuoteSpecificationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. QuoteSpecificationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. QuoteSpecificationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var quoteSpecificationResource = new Nomad.QuoteSpecification("quoteSpecificationResource", new()
{
    Limits = new[]
    {
        new Nomad.Inputs.QuoteSpecificationLimitArgs
        {
            Region = "string",
            RegionLimit = new Nomad.Inputs.QuoteSpecificationLimitRegionLimitArgs
            {
                Cpu = 0,
                MemoryMb = 0,
            },
        },
    },
    Description = "string",
    Name = "string",
});
Copy
example, err := nomad.NewQuoteSpecification(ctx, "quoteSpecificationResource", &nomad.QuoteSpecificationArgs{
	Limits: nomad.QuoteSpecificationLimitArray{
		&nomad.QuoteSpecificationLimitArgs{
			Region: pulumi.String("string"),
			RegionLimit: &nomad.QuoteSpecificationLimitRegionLimitArgs{
				Cpu:      pulumi.Int(0),
				MemoryMb: pulumi.Int(0),
			},
		},
	},
	Description: pulumi.String("string"),
	Name:        pulumi.String("string"),
})
Copy
var quoteSpecificationResource = new QuoteSpecification("quoteSpecificationResource", QuoteSpecificationArgs.builder()
    .limits(QuoteSpecificationLimitArgs.builder()
        .region("string")
        .regionLimit(QuoteSpecificationLimitRegionLimitArgs.builder()
            .cpu(0)
            .memoryMb(0)
            .build())
        .build())
    .description("string")
    .name("string")
    .build());
Copy
quote_specification_resource = nomad.QuoteSpecification("quoteSpecificationResource",
    limits=[{
        "region": "string",
        "region_limit": {
            "cpu": 0,
            "memory_mb": 0,
        },
    }],
    description="string",
    name="string")
Copy
const quoteSpecificationResource = new nomad.QuoteSpecification("quoteSpecificationResource", {
    limits: [{
        region: "string",
        regionLimit: {
            cpu: 0,
            memoryMb: 0,
        },
    }],
    description: "string",
    name: "string",
});
Copy
type: nomad:QuoteSpecification
properties:
    description: string
    limits:
        - region: string
          regionLimit:
            cpu: 0
            memoryMb: 0
    name: string
Copy

QuoteSpecification Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The QuoteSpecification resource accepts the following input properties:

Limits This property is required. List<QuoteSpecificationLimit>
(block: <required>) - A block of quota limits to enforce. Can be repeated. See below for the structure of this block.
Description string
(string: "") - A description of the quota specification.
Name Changes to this property will trigger replacement. string
(string: <required>) - A unique name for the quota specification.
Limits This property is required. []QuoteSpecificationLimitArgs
(block: <required>) - A block of quota limits to enforce. Can be repeated. See below for the structure of this block.
Description string
(string: "") - A description of the quota specification.
Name Changes to this property will trigger replacement. string
(string: <required>) - A unique name for the quota specification.
limits This property is required. List<QuoteSpecificationLimit>
(block: <required>) - A block of quota limits to enforce. Can be repeated. See below for the structure of this block.
description String
(string: "") - A description of the quota specification.
name Changes to this property will trigger replacement. String
(string: <required>) - A unique name for the quota specification.
limits This property is required. QuoteSpecificationLimit[]
(block: <required>) - A block of quota limits to enforce. Can be repeated. See below for the structure of this block.
description string
(string: "") - A description of the quota specification.
name Changes to this property will trigger replacement. string
(string: <required>) - A unique name for the quota specification.
limits This property is required. Sequence[QuoteSpecificationLimitArgs]
(block: <required>) - A block of quota limits to enforce. Can be repeated. See below for the structure of this block.
description str
(string: "") - A description of the quota specification.
name Changes to this property will trigger replacement. str
(string: <required>) - A unique name for the quota specification.
limits This property is required. List<Property Map>
(block: <required>) - A block of quota limits to enforce. Can be repeated. See below for the structure of this block.
description String
(string: "") - A description of the quota specification.
name Changes to this property will trigger replacement. String
(string: <required>) - A unique name for the quota specification.

Outputs

All input properties are implicitly available as output properties. Additionally, the QuoteSpecification resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing QuoteSpecification Resource

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

public static get(name: string, id: Input<ID>, state?: QuoteSpecificationState, opts?: CustomResourceOptions): QuoteSpecification
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        limits: Optional[Sequence[QuoteSpecificationLimitArgs]] = None,
        name: Optional[str] = None) -> QuoteSpecification
func GetQuoteSpecification(ctx *Context, name string, id IDInput, state *QuoteSpecificationState, opts ...ResourceOption) (*QuoteSpecification, error)
public static QuoteSpecification Get(string name, Input<string> id, QuoteSpecificationState? state, CustomResourceOptions? opts = null)
public static QuoteSpecification get(String name, Output<String> id, QuoteSpecificationState state, CustomResourceOptions options)
resources:  _:    type: nomad:QuoteSpecification    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Description string
(string: "") - A description of the quota specification.
Limits List<QuoteSpecificationLimit>
(block: <required>) - A block of quota limits to enforce. Can be repeated. See below for the structure of this block.
Name Changes to this property will trigger replacement. string
(string: <required>) - A unique name for the quota specification.
Description string
(string: "") - A description of the quota specification.
Limits []QuoteSpecificationLimitArgs
(block: <required>) - A block of quota limits to enforce. Can be repeated. See below for the structure of this block.
Name Changes to this property will trigger replacement. string
(string: <required>) - A unique name for the quota specification.
description String
(string: "") - A description of the quota specification.
limits List<QuoteSpecificationLimit>
(block: <required>) - A block of quota limits to enforce. Can be repeated. See below for the structure of this block.
name Changes to this property will trigger replacement. String
(string: <required>) - A unique name for the quota specification.
description string
(string: "") - A description of the quota specification.
limits QuoteSpecificationLimit[]
(block: <required>) - A block of quota limits to enforce. Can be repeated. See below for the structure of this block.
name Changes to this property will trigger replacement. string
(string: <required>) - A unique name for the quota specification.
description str
(string: "") - A description of the quota specification.
limits Sequence[QuoteSpecificationLimitArgs]
(block: <required>) - A block of quota limits to enforce. Can be repeated. See below for the structure of this block.
name Changes to this property will trigger replacement. str
(string: <required>) - A unique name for the quota specification.
description String
(string: "") - A description of the quota specification.
limits List<Property Map>
(block: <required>) - A block of quota limits to enforce. Can be repeated. See below for the structure of this block.
name Changes to this property will trigger replacement. String
(string: <required>) - A unique name for the quota specification.

Supporting Types

QuoteSpecificationLimit
, QuoteSpecificationLimitArgs

Region This property is required. string
(string: <required>) - The region these limits should apply to.
RegionLimit This property is required. QuoteSpecificationLimitRegionLimit
(block: <required>) - The limits to enforce. This block may only be specified once in the limits block. Its structure is documented below.
Region This property is required. string
(string: <required>) - The region these limits should apply to.
RegionLimit This property is required. QuoteSpecificationLimitRegionLimit
(block: <required>) - The limits to enforce. This block may only be specified once in the limits block. Its structure is documented below.
region This property is required. String
(string: <required>) - The region these limits should apply to.
regionLimit This property is required. QuoteSpecificationLimitRegionLimit
(block: <required>) - The limits to enforce. This block may only be specified once in the limits block. Its structure is documented below.
region This property is required. string
(string: <required>) - The region these limits should apply to.
regionLimit This property is required. QuoteSpecificationLimitRegionLimit
(block: <required>) - The limits to enforce. This block may only be specified once in the limits block. Its structure is documented below.
region This property is required. str
(string: <required>) - The region these limits should apply to.
region_limit This property is required. QuoteSpecificationLimitRegionLimit
(block: <required>) - The limits to enforce. This block may only be specified once in the limits block. Its structure is documented below.
region This property is required. String
(string: <required>) - The region these limits should apply to.
regionLimit This property is required. Property Map
(block: <required>) - The limits to enforce. This block may only be specified once in the limits block. Its structure is documented below.

QuoteSpecificationLimitRegionLimit
, QuoteSpecificationLimitRegionLimitArgs

Cpu int
(int: 0) - The amount of CPU to limit allocations to. A value of zero is treated as unlimited, and a negative value is treated as fully disallowed.
MemoryMb int
(int: 0) - The amount of memory (in megabytes) to limit allocations to. A value of zero is treated as unlimited, and a negative value is treated as fully disallowed.
Cpu int
(int: 0) - The amount of CPU to limit allocations to. A value of zero is treated as unlimited, and a negative value is treated as fully disallowed.
MemoryMb int
(int: 0) - The amount of memory (in megabytes) to limit allocations to. A value of zero is treated as unlimited, and a negative value is treated as fully disallowed.
cpu Integer
(int: 0) - The amount of CPU to limit allocations to. A value of zero is treated as unlimited, and a negative value is treated as fully disallowed.
memoryMb Integer
(int: 0) - The amount of memory (in megabytes) to limit allocations to. A value of zero is treated as unlimited, and a negative value is treated as fully disallowed.
cpu number
(int: 0) - The amount of CPU to limit allocations to. A value of zero is treated as unlimited, and a negative value is treated as fully disallowed.
memoryMb number
(int: 0) - The amount of memory (in megabytes) to limit allocations to. A value of zero is treated as unlimited, and a negative value is treated as fully disallowed.
cpu int
(int: 0) - The amount of CPU to limit allocations to. A value of zero is treated as unlimited, and a negative value is treated as fully disallowed.
memory_mb int
(int: 0) - The amount of memory (in megabytes) to limit allocations to. A value of zero is treated as unlimited, and a negative value is treated as fully disallowed.
cpu Number
(int: 0) - The amount of CPU to limit allocations to. A value of zero is treated as unlimited, and a negative value is treated as fully disallowed.
memoryMb Number
(int: 0) - The amount of memory (in megabytes) to limit allocations to. A value of zero is treated as unlimited, and a negative value is treated as fully disallowed.

Package Details

Repository
HashiCorp Nomad pulumi/pulumi-nomad
License
Apache-2.0
Notes
This Pulumi package is based on the nomad Terraform Provider.