Class TrafficShapingConfig
- TrafficShapingConfig defines the configuration for shaping API traffic by specifying a quota limit and the duration over which this limit is enforced. This configuration helps to control and manage the rate at which API calls are made on the client side, preventing service overload on the backend. For example: - if the quota limit is 100 calls per 10 seconds, then the message would be: { quota_limit: 100 duration: { seconds: 10 } } - if the quota limit is 100 calls per 5 minutes, then the message would be: { quota_limit: 100 duration: { seconds: 300 } } - if the quota limit is 10000 calls per day, then the message would be: { quota_limit: 10000 duration: { seconds: 86400 } and so on.
Implements
Inherited Members
Namespace: Google.Apis.Connectors.v1.Data
Assembly: Google.Apis.Connectors.v1.dll
Syntax
public class TrafficShapingConfig : IDirectResponseSchema
Properties
Duration
Required. * The duration over which the API call quota limits are calculated. This duration is used to
define the time window for evaluating if the number of API calls made by a user is within the allowed quota
limits. For example: - To define a quota sampled over 16 seconds, set seconds
to 16 - To define a quota
sampled over 5 minutes, set seconds
to 300 (5 * 60) - To define a quota sampled over 1 day, set seconds
to 86400 (24 * 60 * 60) and so on. It is important to note that this duration is not the time the quota is
valid for, but rather the time window over which the quota is evaluated. For example, if the quota is 100
calls per 10 seconds, then this duration field would be set to 10 seconds.
Declaration
[JsonProperty("duration")]
public virtual object Duration { get; set; }
Property Value
Type | Description |
---|---|
object |
ETag
The ETag of the item.
Declaration
public virtual string ETag { get; set; }
Property Value
Type | Description |
---|---|
string |
QuotaLimit
Required. Maximum number of api calls allowed.
Declaration
[JsonProperty("quotaLimit")]
public virtual long? QuotaLimit { get; set; }
Property Value
Type | Description |
---|---|
long? |