
Answer-first summary for fast verification
Answer: [ { "Field": "query-string", "QueryStringConfig": { "Values": [ { "Key": "version", "Value": "v1" }, { "Value": "*example*" } ] } } ]
Overall explanation Correct option: ** [ { "Field": "query-string", "QueryStringConfig": { "Values": [ { "Key": "version", "Value": "v1" }, { "Value": "*example*" } ] } } ] ** You can use query string conditions to configure rules that route requests based on key/value pairs or values in the query string. The match evaluation is not case-sensitive. The following wildcard characters are supported: * (matches 0 or more characters) and ? (matches exactly 1 character). You can specify conditions when you create or modify a rule. Query parameters are often used along with the path component of the URL for applying a special logic to the resource being fetched. The query string component starts after the first "?" in a URI. Typically query strings contain key-value pairs separated by a delimiter "&". Example: http://example.com/path/to/page?version=A&gender=female The example condition given in the question is satisfied by requests with a query string that includes either a key/value pair of "version=v1" or any key set to "example". Incorrect options: ** [ { "Field": "query-string", "PathPatternConfig": { "Values": ["/img/*"] } } ] ** ** [ { "Field": "query-string", "StringHeaderConfig": { "Values": ["*.example.com"] } } ] ** These two options are malformed and are incorrect. ** [ { "Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "Host": "#{host}", "Path": "/#{path}", "Query": "#{query}", "StatusCode": "HTTP_301" } } ] ** - This action redirects an HTTP request to an HTTPS request on port 443, with the same hostname, path, and query string as the HTTP request.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
In the process of configuring redirection rules for an Application Load Balancer, a developer has encountered a code snippet related to this task. To proceed efficiently using the AWS Command Line Interface (CLI), the developer needs to implement a specific type of condition.
Which of the following represents a valid query string condition that the developer can implement using the AWS CLI?
A
[ { "Field": "query-string", "QueryStringConfig": { "Values": [ { "Key": "version", "Value": "v1" }, { "Value": "example" } ] } } ]
B
[ { "Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "Host": "#{host}", "Path": "/#{path}", "Query": "#{query}", "StatusCode": "HTTP_301" } } ]
C
[ { "Field": "query-string", "PathPatternConfig": { "Values": ["/img/*"] } } ]
D
[ { "Field": "query-string", "StringHeaderConfig": { "Values": ["*.example.com"] } } ]