Share via


DeliveryRule(Int32, IEnumerable<DeliveryRuleAction>) Constructor

Definition

Initializes a new instance of DeliveryRule.

public DeliveryRule (int order, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Cdn.Models.DeliveryRuleAction> actions);
new Azure.ResourceManager.Cdn.Models.DeliveryRule : int * seq<Azure.ResourceManager.Cdn.Models.DeliveryRuleAction> -> Azure.ResourceManager.Cdn.Models.DeliveryRule
Public Sub New (order As Integer, actions As IEnumerable(Of DeliveryRuleAction))

Parameters

order
Int32

The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.

actions
IEnumerable<DeliveryRuleAction>

A list of actions that are executed when all the conditions of a rule are satisfied. Please note DeliveryRuleAction is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include DeliveryRuleCacheExpirationAction, DeliveryRuleCacheKeyQueryStringAction, DeliveryRuleRequestHeaderAction, DeliveryRuleResponseHeaderAction, OriginGroupOverrideAction, DeliveryRuleRouteConfigurationOverrideAction, UriRedirectAction, UriRewriteAction and UriSigningAction.

Exceptions

actions is null.

Applies to