Get ARN for Classic WAF rules

0

Hi There,

I'm looking for a way to check rules tags with Classic WAF in python. However list_tags_for_resource requires an ARN. As far as I know, it is not possible to get an ARN with get_rule or create_rule (or update_rule). Is there a way to get the ARN for a Classic WAF rule in python or to get rule tags without using an ARN ?

Thanks.

已提問 1 年前檢視次數 472 次
1 個回答
0
已接受的答案

Hi,

would it be possible for you to construct it yourself? I guess the nature and format of a WAF ARN is kinda of known.

arn:aws:waf::<WAF_REGION>:rule/<RULE_ID>

You would need to find the specific rule id you need, and the list_rules https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/waf/client/list_rules.html may do that trick, unless you already have it.

Hope it helps ;)

profile picture
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南