Score:1

While creating App Engine firewall rules, How to get get Max existing firewall priority from the rule list

jp flag

In creating an app Engine firewall rule, we need the priority number.

While adding a new rule to the firewall our code checks a database for the latest priority number on the console and calculates the next number by incrementing the same. In case this fails, or the value is edited on console, firewall rule creation might fail. Hence, an API call should be made as a backup measure that gets the max firewall number on console.

Is there a specific API given on the documentation regarding this? Or do we have to list all the rules and then find the latest rule priority?

Score:0
lv flag

This is not currently available.
The best you can do is to list the firewall rules and sort them by creation timestamp or filter them by priority. You can also add the priority into the rule's name and then sort them by names.
You can test all these options here.
Alternatively, you can file a Feature Request on Public Issue Tracker to add highestPriority parameter to the API but there is no guarantee this will be implemented.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.