DeliveryRule Class

Definition

A rule that specifies a set of actions and conditions.

public class DeliveryRule : System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.Cdn.Models.DeliveryRule>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.Cdn.Models.DeliveryRule>
public class DeliveryRule
type DeliveryRule = class
    interface IJsonModel<DeliveryRule>
    interface IPersistableModel<DeliveryRule>
type DeliveryRule = class
Public Class DeliveryRule
Implements IJsonModel(Of DeliveryRule), IPersistableModel(Of DeliveryRule)
Public Class DeliveryRule
Inheritance
DeliveryRule
Implements

Constructors

DeliveryRule(Int32, IEnumerable<DeliveryRuleAction>)

Initializes a new instance of DeliveryRule.

Properties

Actions

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.

Conditions

A list of conditions that must be matched for the actions to be executed Please note DeliveryRuleCondition 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 DeliveryRuleClientPortCondition, DeliveryRuleCookiesCondition, DeliveryRuleHostNameCondition, DeliveryRuleHttpVersionCondition, DeliveryRuleIsDeviceCondition, DeliveryRulePostArgsCondition, DeliveryRuleQueryStringCondition, DeliveryRuleRemoteAddressCondition, DeliveryRuleRequestBodyCondition, DeliveryRuleRequestHeaderCondition, DeliveryRuleRequestMethodCondition, DeliveryRuleRequestSchemeCondition, DeliveryRuleRequestUriCondition, DeliveryRuleServerPortCondition, DeliveryRuleSocketAddressCondition, DeliveryRuleSslProtocolCondition, DeliveryRuleUriFileExtensionCondition, DeliveryRuleUriFileNameCondition and DeliveryRuleUriPathCondition.

Name

Name of the rule.

Order

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.

Explicit Interface Implementations

IJsonModel<DeliveryRule>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<DeliveryRule>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<DeliveryRule>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<DeliveryRule>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<DeliveryRule>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to