QuotaRateLimitArgs

data class QuotaRateLimitArgs(val blockInterval: Output<Int>? = null, val inheritable: Output<Boolean>? = null, val interval: Output<Int>? = null, val name: Output<String>? = null, val namespace: Output<String>? = null, val path: Output<String>? = null, val rate: Output<Double>? = null, val role: Output<String>? = null) : ConvertibleToJava<QuotaRateLimitArgs>

Manage rate limit quotas which enforce API rate limiting using a token bucket algorithm. A rate limit quota can be created at the root level or defined on a namespace or mount by specifying a path when creating the quota. See Vault's Documentation for more information.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const global = new vault.QuotaRateLimit("global", {
name: "global",
path: "",
rate: 100,
});
import pulumi
import pulumi_vault as vault
global_ = vault.QuotaRateLimit("global",
name="global",
path="",
rate=100)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var @global = new Vault.QuotaRateLimit("global", new()
{
Name = "global",
Path = "",
Rate = 100,
});
});
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vault.NewQuotaRateLimit(ctx, "global", &vault.QuotaRateLimitArgs{
Name: pulumi.String("global"),
Path: pulumi.String(""),
Rate: pulumi.Float64(100),
})
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.vault.QuotaRateLimit;
import com.pulumi.vault.QuotaRateLimitArgs;
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 global = new QuotaRateLimit("global", QuotaRateLimitArgs.builder()
.name("global")
.path("")
.rate(100.0)
.build());
}
}
resources:
global:
type: vault:QuotaRateLimit
properties:
name: global
path: ""
rate: 100

Import

Rate limit quotas can be imported using their names

$ pulumi import vault:index/quotaRateLimit:QuotaRateLimit global global

Constructors

Link copied to clipboard
constructor(blockInterval: Output<Int>? = null, inheritable: Output<Boolean>? = null, interval: Output<Int>? = null, name: Output<String>? = null, namespace: Output<String>? = null, path: Output<String>? = null, rate: Output<Double>? = null, role: Output<String>? = null)

Properties

Link copied to clipboard
val blockInterval: Output<Int>? = null

If set, when a client reaches a rate limit threshold, the client will be prohibited from any further requests until after the 'block_interval' in seconds has elapsed.

Link copied to clipboard
val inheritable: Output<Boolean>? = null

If set to true on a quota where path is set to a namespace, the same quota will be cumulatively applied to all child namespace. The inheritable parameter cannot be set to true if the path does not specify a namespace. Only the quotas associated with the root namespace are inheritable by default. Requires Vault 1.15+.

Link copied to clipboard
val interval: Output<Int>? = null

The duration in seconds to enforce rate limiting for.

Link copied to clipboard
val name: Output<String>? = null

Name of the rate limit quota

Link copied to clipboard
val namespace: Output<String>? = null

The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.

Link copied to clipboard
val path: Output<String>? = null

Path of the mount or namespace to apply the quota. A blank path configures a global rate limit quota. For example namespace1/ adds a quota to a full namespace, namespace1/auth/userpass adds a quota to userpass in namespace1. Updating this field on an existing quota can have "moving" effects. For example, updating auth/userpass to namespace1/auth/userpass moves this quota from being a global mount quota to a namespace specific mount quota. Note, namespaces are supported in Enterprise only.

Link copied to clipboard
val rate: Output<Double>? = null

The maximum number of requests at any given second to be allowed by the quota rule. The rate must be positive.

Link copied to clipboard
val role: Output<String>? = null

If set on a quota where path is set to an auth mount with a concept of roles (such as /auth/approle/), this will make the quota restrict login requests to that mount that are made with the specified role.

Functions

Link copied to clipboard
open override fun toJava(): QuotaRateLimitArgs