#!/usr/bin/env python2

from hotcidr.fetch import main
import argparse

#Parse arguments
parser = argparse.ArgumentParser(description='Fetch VPC rules and save as FWMAN directory')
parser.add_argument('vpc-region-code', help='The region code for the EC2 VPC, e.g. \'us-west-1\'')
parser.add_argument('output', help='Output folder for FWMAN-style rules')
parser.add_argument('aws-access-key-id', help='The AWS access key id')
parser.add_argument('aws-secret-access-key', help='The AWS secret access key')
parser.add_argument('--vpc_id', help= 'The vpc-id of the vpc to run apply on. If this is not specified, all vpc-ids will be used.')
parser.add_argument('--silence', help='Silence output', action='store_true')
args = vars(parser.parse_args())

main(
    args['vpc-region-code'],
    vpc_id=args['vpc_id'],
    output=args['output'],
    access_id=args['aws-access-key-id'],
    access_key=args['aws-secret-access-key'],
    silence=args['silence']
)
