nomad.QuoteSpecification

Manages a quota specification in a Nomad cluster.

Example Usage

Registering a quota specification

using System.Collections.Generic;
using Pulumi;
using Nomad = Pulumi.Nomad;

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

});
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.NewQuoteSpecification(ctx, "prodApi", &nomad.QuoteSpecificationArgs{
			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
	})
}
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()        
            .description("Production instances of backend API servers")
            .limits(QuoteSpecificationLimitArgs.builder()
                .region("global")
                .regionLimit(QuoteSpecificationLimitRegionLimitArgs.builder()
                    .cpu(2400)
                    .memoryMb(1200)
                    .build())
                .build())
            .build());

    }
}
import pulumi
import pulumi_nomad as nomad

prod_api = nomad.QuoteSpecification("prodApi",
    description="Production instances of backend API servers",
    limits=[nomad.QuoteSpecificationLimitArgs(
        region="global",
        region_limit=nomad.QuoteSpecificationLimitRegionLimitArgs(
            cpu=2400,
            memory_mb=1200,
        ),
    )])
import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";

const prodApi = new nomad.QuoteSpecification("prodApi", {
    description: "Production instances of backend API servers",
    limits: [{
        region: "global",
        regionLimit: {
            cpu: 2400,
            memoryMb: 1200,
        },
    }],
});
resources:
  prodApi:
    type: nomad:QuoteSpecification
    properties:
      description: Production instances of backend API servers
      limits:
        - region: global
          regionLimit:
            cpu: 2400
            memoryMb: 1200

Create QuoteSpecification Resource

new QuoteSpecification(name: string, args: QuoteSpecificationArgs, opts?: CustomResourceOptions);
@overload
def QuoteSpecification(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       description: Optional[str] = None,
                       limits: Optional[Sequence[QuoteSpecificationLimitArgs]] = None,
                       name: Optional[str] = None)
@overload
def QuoteSpecification(resource_name: str,
                       args: QuoteSpecificationArgs,
                       opts: Optional[ResourceOptions] = 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.

name string
The unique name of the resource.
args QuoteSpecificationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args 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 string
The unique name of the resource.
args QuoteSpecificationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args QuoteSpecificationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args QuoteSpecificationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

The QuoteSpecification resource accepts the following input properties:

Limits List<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 string

(string: <required>) - A unique name for 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.

Description string

(string: "") - A description of the quota specification.

Name string

(string: <required>) - A unique name for the quota specification.

limits List<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 String

(string: <required>) - A unique name for 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.

description string

(string: "") - A description of the quota specification.

name string

(string: <required>) - A unique name for 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.

description str

(string: "") - A description of the quota specification.

name str

(string: <required>) - A unique name for 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.

description String

(string: "") - A description of the quota specification.

name 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)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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<QuoteSpecificationLimitArgs>

(block: <required>) - A block of quota limits to enforce. Can be repeated. See below for the structure of this block.

Name 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 string

(string: <required>) - A unique name for the quota specification.

description String

(string: "") - A description of the quota specification.

limits List<QuoteSpecificationLimitArgs>

(block: <required>) - A block of quota limits to enforce. Can be repeated. See below for the structure of this block.

name 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 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 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 String

(string: <required>) - A unique name for the quota specification.

Supporting Types

QuoteSpecificationLimit

Region string

(string: <required>) - The region these limits should apply to.

RegionLimit QuoteSpecificationLimitRegionLimit

(block: <required>) - The limits to enforce. This block may only be specified once in the limits block. Its structure is documented below.

Region string

(string: <required>) - The region these limits should apply to.

RegionLimit QuoteSpecificationLimitRegionLimit

(block: <required>) - The limits to enforce. This block may only be specified once in the limits block. Its structure is documented below.

region String

(string: <required>) - The region these limits should apply to.

regionLimit QuoteSpecificationLimitRegionLimit

(block: <required>) - The limits to enforce. This block may only be specified once in the limits block. Its structure is documented below.

region string

(string: <required>) - The region these limits should apply to.

regionLimit QuoteSpecificationLimitRegionLimit

(block: <required>) - The limits to enforce. This block may only be specified once in the limits block. Its structure is documented below.

region str

(string: <required>) - The region these limits should apply to.

region_limit QuoteSpecificationLimitRegionLimit

(block: <required>) - The limits to enforce. This block may only be specified once in the limits block. Its structure is documented below.

region String

(string: <required>) - The region these limits should apply to.

regionLimit 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

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.