0
一部のインスタンスにアラームがない場合に電子メールを送信するアラームシステムを設定しようとしています。しかし、テストのインスタンスの中には、それらに含まれないようにするために、「NoAlarms」というタグを付けます。私は、私の存在するpythonスクリプトでこの機能を追加したいと思っています。pythonを使って特定のタグを持たないすべてのmysqlインスタンスを取得する方法は?
これは基本的に私が今持っているものです。
from RDSFunctions import GetListRDSEndpoints
from RDSFunctions import GetListRDSIdentifiers
from boto.ec2.cloudwatch import CloudWatchConnection
from SMTPMail import SendSMTPMail
from boto import ec2
lst_instances = GetListRDSIdentifiers(accesskey, secretkey)
lst_expected_alarms = []
for inst in lst_instances:
if "relprac" not in inst.lower():
lst_expected_alarms.append(inst + ' - ' + 'CPUUtilization')
我々はこれらのインスタンスではないEC2のためにRDSを使用しているので、私は「NoAlarms」タグを持たないすべてのインスタンスを見つけるために何をすべきでしょうか?