def handle(self, *args, **options):
"""
Run the command
"""
with open(options['filejson']) as filejson:
presets = json.load(filejson)
client = boto3.client('elastictranscoder',
region_name=settings.AWS_REGION,
aws_access_key_id=settings.AWS_ACCESS_KEY_ID,
aws_secret_access_key=settings.AWS_SECRET_ACCESS_KEY)
for preset in presets:
preset['created'] = client.create_preset(**preset)
self.stdout.write('ET_PRESET_IDS={}'.format(','.join(
[preset['created']['Preset']['Id'] for preset in presets])))
评论列表
文章目录