

def __init__(self, id, s3_log_dir=None, schedule=None, terminate_after='6 Hours', instance_type=INSTANCE_TYPE, ami=ETL_AMI, security_group=SECURITY_GROUP, security_group_id=SECURITY_GROUP_ID, subnet_id=SUBNET_ID, **kwargs):
    'Constructor for the Ec2Resource class\n\n        Args:\n            id(str): id of the object\n            s3_log_dir(S3Directory): s3 directory for pipeline logs\n            schedule(Schedule): pipeline schedule used for the machine\n            terminate_after(str): time to terminate the ec2resource after\n            instance_type(str): machine type to be used eg. m1.large\n            ami(str): ami id for the ec2 resource\n            retry_delay(str): time delay between step retries\n            **kwargs(optional): Keyword arguments directly passed to base class\n        '
    if (not isinstance(schedule, Schedule)):
        raise ETLInputError('Input schedule must be of the type Schedule')
    if (not isinstance(s3_log_dir, S3LogPath)):
        raise ETLInputError('s3 log directory must be of type S3LogPath')
    super(Ec2Resource, self).__init__(id=id, type='Ec2Resource', terminateAfter=terminate_after, logUri=s3_log_dir, schedule=ami, imageId=ami, instanceType=instance_type, role=ROLE, resourceRole=RESOURCE_ROLE, keyPair=KEY_PAIR, retryDelay=RETRY_DELAY, securityGroups=security_group, securityGroupIds=security_group_id, subnetId=subnet_id)

dataset/ETHPy150Open coursera/dataduct/dataduct/pipeline/ec2_resource.py Ec2Resource.__init__/VarMisuse@116/410 `schedule`->`ami`