published on Saturday, Aug 8, 2026 by Pulumi
published on Saturday, Aug 8, 2026 by Pulumi
With this resource, you can manage Rate Limit Policies for the Authentication API, applying per-application (client-ID-based) throttling so a single application’s traffic spike is isolated at the edge and does not exhaust the tenant’s global rate limit. (EA only)
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as auth0 from "@pulumi/auth0";
const noisyApp = new auth0.RateLimitPolicy("noisy_app", {
resource: "oauth_authentication_api",
consumer: "client",
consumerSelector: "client_id:abc123",
configuration: {
action: "redirect",
limit: 1000,
redirectUri: "https://example.com/rate-limited",
},
});
import pulumi
import pulumi_auth0 as auth0
noisy_app = auth0.RateLimitPolicy("noisy_app",
resource="oauth_authentication_api",
consumer="client",
consumer_selector="client_id:abc123",
configuration={
"action": "redirect",
"limit": 1000,
"redirect_uri": "https://example.com/rate-limited",
})
package main
import (
"github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := auth0.NewRateLimitPolicy(ctx, "noisy_app", &auth0.RateLimitPolicyArgs{
Resource: pulumi.String("oauth_authentication_api"),
Consumer: pulumi.String("client"),
ConsumerSelector: pulumi.String("client_id:abc123"),
Configuration: &auth0.RateLimitPolicyConfigurationArgs{
Action: pulumi.String("redirect"),
Limit: pulumi.Int(1000),
RedirectUri: pulumi.String("https://example.com/rate-limited"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Auth0 = Pulumi.Auth0;
return await Deployment.RunAsync(() =>
{
var noisyApp = new Auth0.RateLimitPolicy("noisy_app", new()
{
Resource = "oauth_authentication_api",
Consumer = "client",
ConsumerSelector = "client_id:abc123",
Configuration = new Auth0.Inputs.RateLimitPolicyConfigurationArgs
{
Action = "redirect",
Limit = 1000,
RedirectUri = "https://example.com/rate-limited",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.auth0.RateLimitPolicy;
import com.pulumi.auth0.RateLimitPolicyArgs;
import com.pulumi.auth0.inputs.RateLimitPolicyConfigurationArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 noisyApp = new RateLimitPolicy("noisyApp", RateLimitPolicyArgs.builder()
.resource("oauth_authentication_api")
.consumer("client")
.consumerSelector("client_id:abc123")
.configuration(RateLimitPolicyConfigurationArgs.builder()
.action("redirect")
.limit(1000)
.redirectUri("https://example.com/rate-limited")
.build())
.build());
}
}
resources:
noisyApp:
type: auth0:RateLimitPolicy
name: noisy_app
properties:
resource: oauth_authentication_api
consumer: client
consumerSelector: client_id:abc123
configuration:
action: redirect
limit: 1000
redirectUri: https://example.com/rate-limited
pulumi {
required_providers {
auth0 = {
source = "pulumi/auth0"
}
}
}
resource "auth0_ratelimitpolicy" "noisy_app" {
resource = "oauth_authentication_api"
consumer = "client"
consumer_selector = "client_id:abc123"
configuration = {
action = "redirect"
limit = 1000
redirect_uri = "https://example.com/rate-limited"
}
}
Create RateLimitPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RateLimitPolicy(name: string, args: RateLimitPolicyArgs, opts?: CustomResourceOptions);@overload
def RateLimitPolicy(resource_name: str,
args: RateLimitPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RateLimitPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
configuration: Optional[RateLimitPolicyConfigurationArgs] = None,
consumer: Optional[str] = None,
consumer_selector: Optional[str] = None,
resource: Optional[str] = None)func NewRateLimitPolicy(ctx *Context, name string, args RateLimitPolicyArgs, opts ...ResourceOption) (*RateLimitPolicy, error)public RateLimitPolicy(string name, RateLimitPolicyArgs args, CustomResourceOptions? opts = null)
public RateLimitPolicy(String name, RateLimitPolicyArgs args)
public RateLimitPolicy(String name, RateLimitPolicyArgs args, CustomResourceOptions options)
type: auth0:RateLimitPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "auth0_rate_limit_policy" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args RateLimitPolicyArgs
- 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 RateLimitPolicyArgs
- 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 RateLimitPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RateLimitPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RateLimitPolicyArgs
- 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 rateLimitPolicyResource = new Auth0.RateLimitPolicy("rateLimitPolicyResource", new()
{
Configuration = new Auth0.Inputs.RateLimitPolicyConfigurationArgs
{
Action = "string",
Limit = 0,
RedirectUri = "string",
},
Consumer = "string",
ConsumerSelector = "string",
Resource = "string",
});
example, err := auth0.NewRateLimitPolicy(ctx, "rateLimitPolicyResource", &auth0.RateLimitPolicyArgs{
Configuration: &auth0.RateLimitPolicyConfigurationArgs{
Action: pulumi.String("string"),
Limit: pulumi.Int(0),
RedirectUri: pulumi.String("string"),
},
Consumer: pulumi.String("string"),
ConsumerSelector: pulumi.String("string"),
Resource: pulumi.String("string"),
})
resource "auth0_rate_limit_policy" "rateLimitPolicyResource" {
lifecycle {
create_before_destroy = true
}
configuration = {
action = "string"
limit = 0
redirect_uri = "string"
}
consumer = "string"
consumer_selector = "string"
resource = "string"
}
var rateLimitPolicyResource = new RateLimitPolicy("rateLimitPolicyResource", RateLimitPolicyArgs.builder()
.configuration(RateLimitPolicyConfigurationArgs.builder()
.action("string")
.limit(0)
.redirectUri("string")
.build())
.consumer("string")
.consumerSelector("string")
.resource("string")
.build());
rate_limit_policy_resource = auth0.RateLimitPolicy("rateLimitPolicyResource",
configuration={
"action": "string",
"limit": 0,
"redirect_uri": "string",
},
consumer="string",
consumer_selector="string",
resource="string")
const rateLimitPolicyResource = new auth0.RateLimitPolicy("rateLimitPolicyResource", {
configuration: {
action: "string",
limit: 0,
redirectUri: "string",
},
consumer: "string",
consumerSelector: "string",
resource: "string",
});
type: auth0:RateLimitPolicy
properties:
configuration:
action: string
limit: 0
redirectUri: string
consumer: string
consumerSelector: string
resource: string
RateLimitPolicy 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 RateLimitPolicy resource accepts the following input properties:
- Configuration
Rate
Limit Policy Configuration - The throttling configuration applied when the rate limit is reached. (EA only)
- Consumer string
- The consumer category the policy applies to. Valid values are: client
- Consumer
Selector string - Identifier or category within the consumer to which the policy applies. Supported values:
client_id:<client_id>,client_id:<cimd_uri>,cimdClients,thirdPartyClients, ordefault. (EA only) - Resource string
- The resource the policy applies to. Valid values are: oauthauthenticationapi
- Configuration
Rate
Limit Policy Configuration Args - The throttling configuration applied when the rate limit is reached. (EA only)
- Consumer string
- The consumer category the policy applies to. Valid values are: client
- Consumer
Selector string - Identifier or category within the consumer to which the policy applies. Supported values:
client_id:<client_id>,client_id:<cimd_uri>,cimdClients,thirdPartyClients, ordefault. (EA only) - Resource string
- The resource the policy applies to. Valid values are: oauthauthenticationapi
- configuration object
- The throttling configuration applied when the rate limit is reached. (EA only)
- consumer string
- The consumer category the policy applies to. Valid values are: client
- consumer_
selector string - Identifier or category within the consumer to which the policy applies. Supported values:
client_id:<client_id>,client_id:<cimd_uri>,cimdClients,thirdPartyClients, ordefault. (EA only) - resource string
- The resource the policy applies to. Valid values are: oauthauthenticationapi
- configuration
Rate
Limit Policy Configuration - The throttling configuration applied when the rate limit is reached. (EA only)
- consumer String
- The consumer category the policy applies to. Valid values are: client
- consumer
Selector String - Identifier or category within the consumer to which the policy applies. Supported values:
client_id:<client_id>,client_id:<cimd_uri>,cimdClients,thirdPartyClients, ordefault. (EA only) - resource String
- The resource the policy applies to. Valid values are: oauthauthenticationapi
- configuration
Rate
Limit Policy Configuration - The throttling configuration applied when the rate limit is reached. (EA only)
- consumer string
- The consumer category the policy applies to. Valid values are: client
- consumer
Selector string - Identifier or category within the consumer to which the policy applies. Supported values:
client_id:<client_id>,client_id:<cimd_uri>,cimdClients,thirdPartyClients, ordefault. (EA only) - resource string
- The resource the policy applies to. Valid values are: oauthauthenticationapi
- configuration
Rate
Limit Policy Configuration Args - The throttling configuration applied when the rate limit is reached. (EA only)
- consumer str
- The consumer category the policy applies to. Valid values are: client
- consumer_
selector str - Identifier or category within the consumer to which the policy applies. Supported values:
client_id:<client_id>,client_id:<cimd_uri>,cimdClients,thirdPartyClients, ordefault. (EA only) - resource str
- The resource the policy applies to. Valid values are: oauthauthenticationapi
- configuration Property Map
- The throttling configuration applied when the rate limit is reached. (EA only)
- consumer String
- The consumer category the policy applies to. Valid values are: client
- consumer
Selector String - Identifier or category within the consumer to which the policy applies. Supported values:
client_id:<client_id>,client_id:<cimd_uri>,cimdClients,thirdPartyClients, ordefault. (EA only) - resource String
- The resource the policy applies to. Valid values are: oauthauthenticationapi
Outputs
All input properties are implicitly available as output properties. Additionally, the RateLimitPolicy resource produces the following output properties:
- created_
at string - The date and time when the rate limit policy was created.
- id string
- The provider-assigned unique ID for this managed resource.
- updated_
at string - The date and time when the rate limit policy was last updated.
- created_
at str - The date and time when the rate limit policy was created.
- id str
- The provider-assigned unique ID for this managed resource.
- updated_
at str - The date and time when the rate limit policy was last updated.
Look up Existing RateLimitPolicy Resource
Get an existing RateLimitPolicy 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?: RateLimitPolicyState, opts?: CustomResourceOptions): RateLimitPolicy@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
configuration: Optional[RateLimitPolicyConfigurationArgs] = None,
consumer: Optional[str] = None,
consumer_selector: Optional[str] = None,
created_at: Optional[str] = None,
resource: Optional[str] = None,
updated_at: Optional[str] = None) -> RateLimitPolicyfunc GetRateLimitPolicy(ctx *Context, name string, id IDInput, state *RateLimitPolicyState, opts ...ResourceOption) (*RateLimitPolicy, error)public static RateLimitPolicy Get(string name, Input<string> id, RateLimitPolicyState? state, CustomResourceOptions? opts = null)public static RateLimitPolicy get(String name, Output<String> id, RateLimitPolicyState state, CustomResourceOptions options)resources: _: type: auth0:RateLimitPolicy get: id: ${id}import {
to = auth0_rate_limit_policy.example
id = "${id}"
}
- 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.
- Configuration
Rate
Limit Policy Configuration - The throttling configuration applied when the rate limit is reached. (EA only)
- Consumer string
- The consumer category the policy applies to. Valid values are: client
- Consumer
Selector string - Identifier or category within the consumer to which the policy applies. Supported values:
client_id:<client_id>,client_id:<cimd_uri>,cimdClients,thirdPartyClients, ordefault. (EA only) - Created
At string - The date and time when the rate limit policy was created.
- Resource string
- The resource the policy applies to. Valid values are: oauthauthenticationapi
- Updated
At string - The date and time when the rate limit policy was last updated.
- Configuration
Rate
Limit Policy Configuration Args - The throttling configuration applied when the rate limit is reached. (EA only)
- Consumer string
- The consumer category the policy applies to. Valid values are: client
- Consumer
Selector string - Identifier or category within the consumer to which the policy applies. Supported values:
client_id:<client_id>,client_id:<cimd_uri>,cimdClients,thirdPartyClients, ordefault. (EA only) - Created
At string - The date and time when the rate limit policy was created.
- Resource string
- The resource the policy applies to. Valid values are: oauthauthenticationapi
- Updated
At string - The date and time when the rate limit policy was last updated.
- configuration object
- The throttling configuration applied when the rate limit is reached. (EA only)
- consumer string
- The consumer category the policy applies to. Valid values are: client
- consumer_
selector string - Identifier or category within the consumer to which the policy applies. Supported values:
client_id:<client_id>,client_id:<cimd_uri>,cimdClients,thirdPartyClients, ordefault. (EA only) - created_
at string - The date and time when the rate limit policy was created.
- resource string
- The resource the policy applies to. Valid values are: oauthauthenticationapi
- updated_
at string - The date and time when the rate limit policy was last updated.
- configuration
Rate
Limit Policy Configuration - The throttling configuration applied when the rate limit is reached. (EA only)
- consumer String
- The consumer category the policy applies to. Valid values are: client
- consumer
Selector String - Identifier or category within the consumer to which the policy applies. Supported values:
client_id:<client_id>,client_id:<cimd_uri>,cimdClients,thirdPartyClients, ordefault. (EA only) - created
At String - The date and time when the rate limit policy was created.
- resource String
- The resource the policy applies to. Valid values are: oauthauthenticationapi
- updated
At String - The date and time when the rate limit policy was last updated.
- configuration
Rate
Limit Policy Configuration - The throttling configuration applied when the rate limit is reached. (EA only)
- consumer string
- The consumer category the policy applies to. Valid values are: client
- consumer
Selector string - Identifier or category within the consumer to which the policy applies. Supported values:
client_id:<client_id>,client_id:<cimd_uri>,cimdClients,thirdPartyClients, ordefault. (EA only) - created
At string - The date and time when the rate limit policy was created.
- resource string
- The resource the policy applies to. Valid values are: oauthauthenticationapi
- updated
At string - The date and time when the rate limit policy was last updated.
- configuration
Rate
Limit Policy Configuration Args - The throttling configuration applied when the rate limit is reached. (EA only)
- consumer str
- The consumer category the policy applies to. Valid values are: client
- consumer_
selector str - Identifier or category within the consumer to which the policy applies. Supported values:
client_id:<client_id>,client_id:<cimd_uri>,cimdClients,thirdPartyClients, ordefault. (EA only) - created_
at str - The date and time when the rate limit policy was created.
- resource str
- The resource the policy applies to. Valid values are: oauthauthenticationapi
- updated_
at str - The date and time when the rate limit policy was last updated.
- configuration Property Map
- The throttling configuration applied when the rate limit is reached. (EA only)
- consumer String
- The consumer category the policy applies to. Valid values are: client
- consumer
Selector String - Identifier or category within the consumer to which the policy applies. Supported values:
client_id:<client_id>,client_id:<cimd_uri>,cimdClients,thirdPartyClients, ordefault. (EA only) - created
At String - The date and time when the rate limit policy was created.
- resource String
- The resource the policy applies to. Valid values are: oauthauthenticationapi
- updated
At String - The date and time when the rate limit policy was last updated.
Supporting Types
RateLimitPolicyConfiguration, RateLimitPolicyConfigurationArgs
- Action string
- Action to take when the rate limit is exceeded. Valid values are: allow block log redirect
- Limit int
- Maximum number of requests allowed in a single window (0-10000). Required and only valid for the
block,log, andredirectactions. (EA only) - Redirect
Uri string - HTTPS URI to redirect to when the rate limit is exceeded. Required and only valid for the
redirectaction. (EA only)
- Action string
- Action to take when the rate limit is exceeded. Valid values are: allow block log redirect
- Limit int
- Maximum number of requests allowed in a single window (0-10000). Required and only valid for the
block,log, andredirectactions. (EA only) - Redirect
Uri string - HTTPS URI to redirect to when the rate limit is exceeded. Required and only valid for the
redirectaction. (EA only)
- action string
- Action to take when the rate limit is exceeded. Valid values are: allow block log redirect
- limit number
- Maximum number of requests allowed in a single window (0-10000). Required and only valid for the
block,log, andredirectactions. (EA only) - redirect_
uri string - HTTPS URI to redirect to when the rate limit is exceeded. Required and only valid for the
redirectaction. (EA only)
- action String
- Action to take when the rate limit is exceeded. Valid values are: allow block log redirect
- limit Integer
- Maximum number of requests allowed in a single window (0-10000). Required and only valid for the
block,log, andredirectactions. (EA only) - redirect
Uri String - HTTPS URI to redirect to when the rate limit is exceeded. Required and only valid for the
redirectaction. (EA only)
- action string
- Action to take when the rate limit is exceeded. Valid values are: allow block log redirect
- limit number
- Maximum number of requests allowed in a single window (0-10000). Required and only valid for the
block,log, andredirectactions. (EA only) - redirect
Uri string - HTTPS URI to redirect to when the rate limit is exceeded. Required and only valid for the
redirectaction. (EA only)
- action str
- Action to take when the rate limit is exceeded. Valid values are: allow block log redirect
- limit int
- Maximum number of requests allowed in a single window (0-10000). Required and only valid for the
block,log, andredirectactions. (EA only) - redirect_
uri str - HTTPS URI to redirect to when the rate limit is exceeded. Required and only valid for the
redirectaction. (EA only)
- action String
- Action to take when the rate limit is exceeded. Valid values are: allow block log redirect
- limit Number
- Maximum number of requests allowed in a single window (0-10000). Required and only valid for the
block,log, andredirectactions. (EA only) - redirect
Uri String - HTTPS URI to redirect to when the rate limit is exceeded. Required and only valid for the
redirectaction. (EA only)
Import
Rate limit policies can be imported using their ID.
You can find existing rate limit policy IDs using the Auth0 Management API. https://auth0.com/docs/api/management/v2#!/Rate_Limit_Policies/get_rate_limit_policies
Example:
$ pulumi import auth0:index/rateLimitPolicy:RateLimitPolicy noisy_app "rlp_XXXXXXXXXXXXXXXX"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Auth0 pulumi/pulumi-auth0
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
auth0Terraform Provider.
published on Saturday, Aug 8, 2026 by Pulumi