Edge redirector match rule
akamai_cloudlets_edge_redirector_match_rule
Build a match rule JSON object for the Edge redirector cloudlet.
data "akamai_cloudlets_edge_redirector_match_rule" "my_er_match_rule" {
match_rules {
name = "my_er_match_rule"
match_url = "my_er_match_url.com"
redirect_url = "https://my_er_match_url.org"
status_code = 301
use_incoming_query_string = false
use_relative_url = "none"
matches {
case_sensitive = false
match_operator = "equals"
match_type = "method"
negate = false
object_match_value {
type = "simple"
value = ["GET"]
}
}
}
}
output "my_er_match_rule" {
value = data.akamai_cloudlets_edge_redirector_match_rule.my_er_match_rule
}
Changes to Outputs:
+ my_er_match_rule = {
+ id = "12ab3cde4f5g678h901234567i890123j456k789"
+ json = jsonencode(
[
+ {
+ matchURL = "my_er_match_url.com"
+ matches = [
+ {
+ caseSensitive = false
+ matchOperator = "equals"
+ matchType = "method"
+ negate = false
+ objectMatchValue = {
+ type = "simple"
+ value = [
+ "GET",
]
}
},
]
+ name = "my_er_match_rule"
+ redirectURL = "https://my_er_match_url.org"
+ statusCode = 301
+ type = "erMatchRule"
+ useIncomingQueryString = false
+ useIncomingSchemeAndHost = false
+ useRelativeUrl = "none"
},
]
)
+ match_rules = [
+ {
+ disabled = false
+ end = 0
+ match_url = "my_er_match_url.com"
+ matches = [
+ {
+ case_sensitive = false
+ check_ips = ""
+ match_operator = "equals"
+ match_type = "method"
+ match_value = ""
+ negate = false
+ object_match_value = [
+ {
+ name = ""
+ name_case_sensitive = false
+ name_has_wildcard = false
+ options = []
+ type = "simple"
+ value = [
+ "GET",
]
},
]
},
]
+ matches_always = false
+ name = "my_er_match_rule"
+ redirect_url = "https://my_er_match_url.org"
+ start = 0
+ status_code = 301
+ type = "erMatchRule"
+ use_incoming_query_string = false
+ use_relative_url = "none"
},
]
}
Arguments
Pass a match_rules
list with the options that best fit your business case. While the match definitions arguments are optional, expected, at a minimum, are the status_code
and redirect_url
arguments.
Use the information in the match options table to build out your rule's matches
criteria.
Argument | Required | Description |
---|---|---|
status_code |
✔ | The HTTP response status code. Value is 301 Permanent Redirect or 302 Temporary Redirect . |
redirect_url |
✔ | The URL path for the redirect. |
name |
A human-readable name for your rule. | |
start |
The start time for the match. Value is UTC through seconds. | |
end |
The end time for the match. Value is UTC through seconds. | |
match_url |
The URL that the cloudlet uses to match with the incoming request. | |
disabled |
Whether to disable a rule so it is not evaluated against incoming requests. | |
use_relative_url |
|
|
use_incoming_query_string |
Whether to include the query string from the request in the rewritten or forwarded URL. | |
matches |
The match object definitions list. |
Match options
The options listed are nested within the matches
argument.
All match options are optional.
Argument | Description |
---|---|
match_type |
The type of match used. Value is one of:
|
match_value |
A value that reflects your match type, for example, if you set your match type to countrycode , the value would reflect the match country. |
match_operator |
Compares a string expression with a pattern. Value is one of:
|
case_sensitive |
Whether the match is case sensitive. |
negate |
Whether to negate the match. |
check_ips |
For clientip , continent , countrycode , proxy , and regioncode match types, the part of the request to use as the IP address. Value options:
|
object_match_value |
Use when a rule includes more complex match criteria, like multiple value attributes. Value options:
|
Attributes
Returned is a jsonencoded list of the match rules defined in your query. Set the output type to capture the result based on your need as you use the return in the policy resource.
Updated 10 months ago
Did this page help you?