import Healthchecks from './healthchecks'; import Processes from './processes'; import ProcessDefinitions from './process-definitions'; import Tasks from './tasks'; const enums = { defaultEmrJobFlowRole: ['default_emr_job_flow_role'], defaultEmrServiceRole: ['default_emr_service_role'], emrApplication: ['Hadoop', 'Hive', 'Mahout', 'Pig', 'Spark', 'Ganglia'], emrReleaseLabel: ['emr-5.20.0', 'emr-5.19.0', 'emr-5.18.0', 'emr-5.17.0', 'emr-5.16.0', 'emr-5.15.0', 'emr-5.14.0', 'emr-5.13.0', 'emr-5.12.1', 'emr-5.12.0', 'emr-5.11.1', 'emr-5.11.0', 'emr-5.10.0', 'emr-5.9.0', 'emr-4.9.2', 'emr-4.9.1'], notificationOptions: ['always', 'on_failure', 'on_state_change', 'on_state_change_and_failures', 'never'], onDemand: ['on_demand'], processOverlapAction: ['wait', 'terminate'], processStatus: ['running', 'succeeded', 'failed'], taskStatus: ['submitted', 'runnable', 'starting', 'pending', 'running', 'failed', 'succeeded'], }; export default class SvcSundialClient { constructor(opts) { let options = opts; if (typeof opts === 'string') { options = { host: opts }; // convert host string to options object } this.enums = enums; this.healthchecks = new Healthchecks(options); this.processes = new Processes(options); this.processDefinitions = new ProcessDefinitions(options); this.tasks = new Tasks(options); } }