elbv2 api for rules - need example for http-header condition type

0

Hi,

I am looking for a documented example for creating listener rule with the condition type of "http-header". The API for the conditions element only allows attributes for "Field" and "Values". However, the "http-header" condition type also requires providing the "HttpHeaderName". For eg: "cookie". Trying to specify that in various ways but getting errors.

Is there an example of specifying this via the CLI?

Appreciate the help.

Thanks

shard
asked 5 years ago669 views
2 Answers
0

this is a relateively new feature..upgrade your aws cli to at least:
aws-cli/1.16.144

then e.g:
aws elbv2 create-rule --listener-arn <listener arn> --priority 90 --conditions '{"Field":"http-header","HttpHeaderConfig":{"HttpHeaderName":"Cache-control","Values":["no-cache"]}} ' --actions Type=forward,TargetGroupArn=<targetarn>

answered 5 years ago
0

Thanks. Upgrading the cli and using the example below works.

shard
answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions