RateLimiterEndpointConventionBuilderExtensions.RequireRateLimiting Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
RequireRateLimiting<TBuilder,TPartitionKey>(TBuilder, IRateLimiterPolicy<TPartitionKey>) |
Adds the specified rate limiting policy to the endpoint(s). |
RequireRateLimiting<TBuilder>(TBuilder, String) |
Adds the specified rate limiting policy to the endpoint(s). |
RequireRateLimiting<TBuilder,TPartitionKey>(TBuilder, IRateLimiterPolicy<TPartitionKey>)
Adds the specified rate limiting policy to the endpoint(s).
public static TBuilder RequireRateLimiting<TBuilder,TPartitionKey> (this TBuilder builder, Microsoft.AspNetCore.RateLimiting.IRateLimiterPolicy<TPartitionKey> policy) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member RequireRateLimiting : 'Builder * Microsoft.AspNetCore.RateLimiting.IRateLimiterPolicy<'PartitionKey> -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function RequireRateLimiting(Of TBuilder As IEndpointConventionBuilder, TPartitionKey As IEndpointConventionBuilder) (builder As TBuilder, policy As IRateLimiterPolicy(Of TPartitionKey)) As TBuilder
Type Parameters
- TBuilder
- TPartitionKey
Parameters
- builder
- TBuilder
The endpoint convention builder.
The rate limiting policy to add to the endpoint.
Returns
The original convention builder parameter.
Applies to
RequireRateLimiting<TBuilder>(TBuilder, String)
Adds the specified rate limiting policy to the endpoint(s).
public static TBuilder RequireRateLimiting<TBuilder> (this TBuilder builder, string policyName) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member RequireRateLimiting : 'Builder * string -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function RequireRateLimiting(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder, policyName As String) As TBuilder
Type Parameters
- TBuilder
Parameters
- builder
- TBuilder
The endpoint convention builder.
- policyName
- String
The name of the rate limiting policy to add to the endpoint.
Returns
The original convention builder parameter.