def chase(target): return [ dalek("iot_things", region=target["region"]), dalek("iot_rules", region=target["region"]), dalek("iot_policies", region=target["region"]), dalek("iot_certificates", region=target["region"]) ]
def chase(target): iot = boto3.client('iot', region_name=target["region"]) rules = iot.list_topic_rules()['rules'] rules = [rule["ruleName"] for rule in rules] daleks = [dalek("iot_rule", region=target["region"], names=[rule]) for rule in rules] return daleks
def chase(target): client = boto3.client('lambda', region_name=target["region"]) functions = client.list_functions()["Functions"] functions = [fun["FunctionName"] for fun in functions] daleks = [dalek("lambda_function", region=target["region"], names=[fun]) for fun in functions] return daleks
def chase(target): iot = boto3.client('iot', region_name=target["region"]) things = iot.list_things()['things'] things = [ dalek("iot_thing", region=target["region"], names=[thing["thingName"]]) for thing in things ] return things
def chase(target): iot = boto3.client('iot', region_name=target["region"]) pols = iot.list_policies()['policies'] pols = [pol["policyName"] for pol in pols] daleks = [ dalek("iot_policy", region=target["region"], names=[pol]) for pol in pols ] return daleks
def chase(target): client = boto3.client('lambda', region_name=target["region"]) functions = client.list_functions()["Functions"] functions = [fun["FunctionName"] for fun in functions] daleks = [ dalek("lambda_function", region=target["region"], names=[fun]) for fun in functions ] return daleks
def chase(target): iot = boto3.client('iot', region_name=target["region"]) certs = iot.list_certificates()['certificates'] daleks = [] for cert in certs: if cert["status"] == "ACTIVE": daleks.append(dalek("iot_certificate", region=target["region"], names=[ cert["certificateId"]])) return daleks
def chase(target): iot = boto3.client('iot', region_name=target["region"]) certs = iot.list_certificates()['certificates'] daleks = [] for cert in certs: if cert["status"] == "ACTIVE": daleks.append( dalek("iot_certificate", region=target["region"], names=[cert["certificateId"]])) return daleks
def chase(target): region_name = target["region"] ec2 = boto3.client('ec2', region_name=region_name) describe_instances = ec2.describe_instances(Filters=[{ 'Name': 'instance-state-name', 'Values': ['running'] }]) reservations = describe_instances['Reservations'] instancess = [r['Instances'] for r in reservations] instances = [i for instances in instancess for i in instances] instance_ids = [i['InstanceId'] for i in instances] daleks = [dalek("ec2_instance", region=region_name, names=instance_ids)] return daleks
def chase(target): region_name = target["region"] ec2 = boto3.client('ec2', region_name=region_name) describe_instances = ec2.describe_instances( Filters=[{ 'Name': 'instance-state-name', 'Values': [ 'running' ] }] ) reservations = describe_instances['Reservations'] instancess = [r['Instances'] for r in reservations] instances = [i for instances in instancess for i in instances] instance_ids = [i['InstanceId'] for i in instances] daleks = [dalek("ec2_instance", region=region_name, names=instance_ids)] return daleks
def chase(target): iot = boto3.client('iot', region_name=target["region"]) things = iot.list_things()['things'] things = [dalek("iot_thing", region=target["region"], names=[thing["thingName"]]) for thing in things] return things
def chase(target): list_users = iam.list_users()['Users'] daleks = [dalek("iam-user", None, user['UserName']) for user in list_users] return daleks
def daleks(*args): return [dalek(arg) for arg in args]