def get_backend_services(properties, res_name, project_id):
    ' Creates all backend services to be used by the load balancer. '
    backend_resources = []
    backend_outputs_map = {'backendServiceName': [], 'backendServiceSelfLink': []}
    backend_specs = properties['backendServices']
    for backend_spec in backend_specs:
        backend_res_name = '{}-backend-service-{}'.format(res_name, sha1(json.dumps(backend_spec).encode('utf-8')).hexdigest()[:10])
        (resources, outputs) = get_backend_service(properties, backend_spec, backend_res_name, project_id)
        backend_resources += resources
        for output in outputs:
            backend_outputs_map[output['name']].append(output['value'])
    backend_outputs = []
    for (key, value) in backend_outputs_map.items():
        backend_outputs.append({'name': (key + 's'), 'value': value})
    return (backend_resources, backend_outputs)
Creates all backend services to be used by the load balancer.
def get_backend_services(properties, res_name, project_id):
    '  '
    backend_resources = []
    backend_outputs_map = {'backendServiceName': [], 'backendServiceSelfLink': []}
    backend_specs = properties['backendServices']
    for backend_spec in backend_specs:
        backend_res_name = '{}-backend-service-{}'.format(res_name, sha1(json.dumps(backend_spec).encode('utf-8')).hexdigest()[:10])
        (resources, outputs) = get_backend_service(properties, backend_spec, backend_res_name, project_id)
        backend_resources += resources
        for output in outputs:
            backend_outputs_map[output['name']].append(output['value'])
    backend_outputs = []
    for (key, value) in backend_outputs_map.items():
        backend_outputs.append({'name': (key + 's'), 'value': value})
    return (backend_resources, backend_outputs)