This section provides information on the various types of properties used with Cloudlets match rules.
Match rules properties
The Match Rules (matchRules
) array contains all of your rules and includes the following properties, which vary based on the Cloudlet you are using:
Property | Type | Description | Cloudlets |
---|---|---|---|
allowDeny | Enumeration | If set to allow , the request is sent to origin when all conditions are true. If deny , the request is denied when all conditions are true. If denybranded , the request is denied and rerouted according to the configuration of the Request Control behavior. | Request Control |
disabled | Boolean | Optional. If set to true , disables a rule so it is not evaluated against incoming requests. The default setting is false . | All |
end | Integer | The end time for the match rule when matchesAlways is false . The end value is entered in epoch seconds. | All |
forwardSettings | Object | Defines data used to construct a new request URL. If all set conditions are true, the edge server returns an HTTP response from the rewritten URL. You can specify any of the following with this object: originId , pathAndQS , and useIncomingQueryString . | |
id | Integer | Akamai internal use only. | All |
matches | Integer | See matches in the following tables. | All |
matchURL | String | If using a URL match, this property is the URL that the Cloudlet uses to match the incoming request. | |
name | String | The name of the rule. | All |
originId | String | The ID of the Conditional Origin requests are forwarded to. To retrieve the originId, run a GET on the /cloudlets/v3/policies/{policyId}/properties endpoint. | |
passThroughPercent | Number | The range 0.000: 99.000 specifies the percentage of requests that pass through to the origin. The value of 100 means the request always passes through to the origin. | API Prioritization |
pathAndQS | String | If a value is provided and match conditions are met, this is the URL path to rewrite the incoming request's URL. The URL may include additional query parameters. | |
redirectURL | String | The URL Edge Redirector redirects the request to. If using useRelativeUrl , you can enter a path for the value. If useRelativeUrl is not used or set to none , then the redirectUrl should be a fully qualified URL. | Edge Redirector |
start | Integer | The start time for this match rule when matchesAlways is false . The start value is entered in epoch seconds. | All |
statusCode | Integer | The HTTP response redirect type status code: 301 for permanent redirect, 302 for temporary redirect, 303 for temporary using GET, 307 for temporary retain method, or 308 for permanent retain method. | Edge Redirector |
type | String | The type of Cloudlet the rule is for. For example, the string for Edge Redirector is erMatchRule. | All |
useIncomingQueryString | Boolean | If set to true , the Cloudlet includes the requests' query string in the rewritten or forwarded URL. | |
useIncomingSchemeAndHost | Boolean | If set to true , the Cloudlet copies both the scheme and the hostname from the incoming request to use in the redirect URL. | Edge Redirector |
useRelativeUrl | Enumeration | If set to relative_url , takes the path entered for the redirectUrl and sets it in the response's Location header. The client or browser receiving the request decides which protocol and hostname to use.If set to copy_scheme_hostname , creates an absolute path by taking the protocol and hostname from the incoming request and combining them with path information entered for the redirectUrl . This absolute path is set in the response's Location header.If this property is not included, or is set to none, then the redirectUrl should be fully-qualified URL. | Edge Redirector |
Match conditions properties
Each object within the matches
array defines potential conditions, like case sensitivity (caseSensitive
) or the type of match (matchType
). These properties apply to all Cloudlets.
A matches
property contains an array of objects with the following properties/conditions:
Property | Type | Description |
---|---|---|
caseSensitive | Boolean | If true , the match is case sensitive. |
checkIPs | Enumeration | For clientip , continent , countrycode , proxy , and regioncode match types, the part of the request that determines the IP address to use. Values include the connecting IP address (CONNECTING_IP ) and the X_Forwarded_For header (XFF_HEADERS ). To select both, enter the two values separated by a space delimiter. When both values are included, the connecting IP address is evaluated first. |
matchOperator | Enumeration | Valid entries for this property are contains , exists , and equals . |
matchtype | Enumeration | The type of match used. Possible values include the hostname (hostname ) or the cookie (cookie ). See the Match Type Property section. |
matchValue | String | This depends on the matchType . If the matchType is hostname , then matchValue is the fully qualified domain name, like www.akamai.com. See the examples in the Match Type Property table. |
negate | Boolean | If true, negates the match. |
objectMatchValue | Object | An object used when a rule either includes more complex match criteria, like multiple value attributes, or a range match. |
Match value object properties
The following table lists the properties available for the objectMatchValue object:
Property | Type | Description |
---|---|---|
type | Enumeration | The array type, which can be one of the following: object , range , or simple . Use the simple option when adding only an array of string-based values. |
name | Array | If using a match type that supports name attributes, enter the value in the incoming request to match on. The following match types are supported: cookie , header , parameter , and query . |
nameCaseSensitive | Boolean | Set to true if the entry for the `name' should be evaluated based on case sensitivity. |
nameHasRegex | Boolean | Set to true if the entry for the name is a regular expression. |
nameHasWildcard | Boolean | Set to true if the entry for the name includes wildcards. |
value | Array | If using the simple or range array types, enter the value attributes in the incoming request to match on. Valid entries vary by match type. For example, GET and POST are valid entries for the method match type. |
valueCaseSensitive | Boolean | Set to true if the entries for value should be evaluated based on case sensitivity. |
valueHasRegex | Boolean | Set to true if the entries for value includes a capture group for a regular expression. |
valueHasWildcard | Boolean | Set to true if the entries for value includes wildcards. |
options | Array | If using the object type, use this array to list the values to match on. |
Match type property
The matchType properties provide information about the match types used to conditionally pass through the request.
Match types with an "(m)" in the following table, support multiple space-separated values (not names).
Match Type | Description | Example Match Value |
---|---|---|
clientip | The IP address or CIDR list to match on. | 182.1.0.0 |
continent | The continent to match on. See Continent Codes for a list of valid codes. | SA |
cookie | The cookie values to match on. | name=value1 |
countrycode | The country to match on. See Country Codes for a list of valid codes. | US |
deviceCharacteristics | The device characteristic to match on. See Device Characteristics Match Values for the list of available match values. | is_mobile=true |
extension (m) | The file extensions to match on. | jpg png gif |
header | The parts of the request header to match on. | See Matches in Requests and Responses for an example. |
hostname (m) | The hostnames to match on. | www.akamai.com |
method | The HTTP method used for the request. | GET |
path (m) | The URL paths to match on. | /clothing/children/shoes/shoe1.jpg |
protocol | The protocol to match on. You can only enter a single value in this field. | http |
proxy | The type of proxy to match on. Values include anonymous , transparent , and both . | anonymous |
query (m) | The query string values to match on. | name or name=value1 or name=value1 value2 |
range | A range of two numbers between 1 and 100 (inclusive) for the random value assigned to a user. If the random value assigned to an incoming request falls within this range, the match is true. | See Audience Segmentation for an example. |
regex | The regular expression to match on. | ab(c.)d+ |
regioncode | See Region Codes for a list of valid codes. | MA |
Device characteristics match values
The following values are available for the deviceCharacteristics
match type:
Match Value | Description |
---|---|
accept_third_party_cookie | Indicates whether the device, by default, accepts a cookie set from a pixel in a page of a different domain. |
ajax_support_javascript | Indicates whether the device supports asynchronous JavaScript and XML (AJAX), a set of programming techniques. |
cookie_support | Indicates whether the device's browser supports cookies. However, this device characteristic does not indicate that cookies exist. In addition, if the value is false because the native browser does not support cookies, cookies may be supported using other methods. |
full_flash_support | Indicates whether the device has full Flash support. |
is_mobile | Indicates whether the requesting device is a mobile device. |
is_tablet | Indicates whether the device is a tablet. |
is_wireless_device | Indicates whether the device is, or is not, wireless. A mobile phone returns true , but a desktop or laptop returns false. |
Supported match types by Cloudlet
The following table lists, by Cloudlet, the supported match types:
Cloudlet | Supported Match Types |
---|---|
API Prioritization | clientip , continent , cookie , countrycode , deviceCharacteristics , extension , header , hostname , method , path , protocol , proxy , query , regioncode |
Audience Segmentation | clientip , continent , cookie , countrycode , deviceCharacteristics , extension , header , hostname , method , path , protocol , proxy , query , range , regex ,regioncode |
Edge Redirector | clientip , continent , cookie , countrycode , deviceCharacteristics , extension , header , hostname , method , path , protocol , proxy , query , regex , regioncode |
Forward Rewrite | clientip , continent , cookie , countrycode , deviceCharacteristics , extension , header , hostname , method , path , protocol , proxy , query , regex , regioncode |
Phased Release | clientip , continent , cookie , countrycode , deviceCharacteristics , extension , header , hostname , method , path , protocol , proxy , query , regioncode |
Request Control | clientip , continent , cookie , countrycode , deviceCharacteristics , extension , header , hostname , method , path , protocol , proxy , query , regioncode |