def main():
    """
    Main entry point.

    :return dict: changed, batch_job_queue_action, response
    """

    argument_spec = ec2_argument_spec()
    argument_spec.update(
        dict(state=dict(required=False,
                        default='present',
                        choices=['present', 'absent']),
             job_queue_name=dict(required=True),
             job_queue_state=dict(required=False,
                                  default='ENABLED',
                                  choices=['ENABLED', 'DISABLED']),
             priority=dict(type='int', required=True),
             compute_environment_order=dict(type='list', required=True),
             region=dict(aliases=['aws_region', 'ec2_region'])))

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)

    # validate dependencies
    if not HAS_BOTO3:
        module.fail_json(msg='boto3 is required for this module.')

    aws = AWSConnection(module, ['batch'])

    validate_params(module, aws)

    results = manage_state(module, aws)

    module.exit_json(**camel_dict_to_snake_dict(results))
def main():
    """
    Main entry point.

    :return dict: ansible facts
    """

    argument_spec = ec2_argument_spec()
    argument_spec.update(
        dict(
            state=dict(required=False, default='present', choices=['present', 'absent']),
            job_definition_name=dict(required=True),
            job_definition_arn=dict(),
            type=dict(required=True),
            parameters=dict(type='dict'),
            image=dict(required=True),
            vcpus=dict(type='int', required=True),
            memory=dict(type='int', required=True),
            command=dict(type='list', default=[]),
            job_role_arn=dict(),
            volumes=dict(type='list', default=[]),
            environment=dict(type='list', default=[]),
            mount_points=dict(type='list', default=[]),
            readonly_root_filesystem=dict(),
            privileged=dict(),
            ulimits=dict(type='list', default=[]),
            user=dict(),
            attempts=dict(type='int'),
            region=dict(aliases=['aws_region', 'ec2_region'])
        )
    )

    module = AnsibleModule(
        argument_spec=argument_spec,
        supports_check_mode=True
    )

    # validate dependencies
    if not HAS_BOTO3:
        module.fail_json(msg='boto3 is required for this module.')

    aws = AWSConnection(module, ['batch'])

    validate_params(module, aws)

    results = manage_state(module, aws)

    module.exit_json(**camel_dict_to_snake_dict(results))
def main():
    """
    Main entry point.

    :return dict: changed, batch_compute_environment_action, response
    """

    argument_spec = ec2_argument_spec()
    argument_spec.update(
        dict(
            state=dict(default='present', choices=['present', 'absent']),
            compute_environment_name=dict(required=True),
            type=dict(required=True, choices=['MANAGED', 'UNMANAGED']),
            compute_environment_state=dict(required=False, default='ENABLED', choices=['ENABLED', 'DISABLED']),
            service_role=dict(required=True),
            compute_resource_type=dict(required=True, choices=['EC2', 'SPOT']),
            minv_cpus=dict(type='int', required=True),
            maxv_cpus=dict(type='int', required=True),
            desiredv_cpus=dict(type='int'),
            instance_types=dict(type='list', required=True),
            image_id=dict(),
            subnets=dict(type='list', required=True),
            security_group_ids=dict(type='list', required=True),
            ec2_key_pair=dict(),
            instance_role=dict(required=True),
            tags=dict(type='dict'),
            bid_percentage=dict(type='int'),
            spot_iam_fleet_role=dict(),
            region=dict(aliases=['aws_region', 'ec2_region'])
        )
    )

    module = AnsibleModule(
        argument_spec=argument_spec,
        supports_check_mode=True
    )

    # validate dependencies
    if not HAS_BOTO3:
        module.fail_json(msg='boto3 is required for this module.')

    aws = AWSConnection(module, ['batch'])

    validate_params(module, aws)

    results = manage_state(module, aws)

    module.exit_json(**camel_dict_to_snake_dict(results, ignore_list=['Tags']))