# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import pulumi
import pulumi.runtime
from .. import utilities

class GetLoadBalancerResult(object):
    """
    A collection of values returned by getLoadBalancer.
    """
    def __init__(__self__, algorithm=None, droplet_ids=None, droplet_tag=None, forwarding_rules=None, healthcheck=None, ip=None, redirect_http_to_https=None, region=None, status=None, sticky_sessions=None, id=None):
        if algorithm and not isinstance(algorithm, basestring):
            raise TypeError('Expected argument algorithm to be a basestring')
        __self__.algorithm = algorithm
        if droplet_ids and not isinstance(droplet_ids, list):
            raise TypeError('Expected argument droplet_ids to be a list')
        __self__.droplet_ids = droplet_ids
        if droplet_tag and not isinstance(droplet_tag, basestring):
            raise TypeError('Expected argument droplet_tag to be a basestring')
        __self__.droplet_tag = droplet_tag
        if forwarding_rules and not isinstance(forwarding_rules, list):
            raise TypeError('Expected argument forwarding_rules to be a list')
        __self__.forwarding_rules = forwarding_rules
        if healthcheck and not isinstance(healthcheck, dict):
            raise TypeError('Expected argument healthcheck to be a dict')
        __self__.healthcheck = healthcheck
        if ip and not isinstance(ip, basestring):
            raise TypeError('Expected argument ip to be a basestring')
        __self__.ip = ip
        if redirect_http_to_https and not isinstance(redirect_http_to_https, bool):
            raise TypeError('Expected argument redirect_http_to_https to be a bool')
        __self__.redirect_http_to_https = redirect_http_to_https
        if region and not isinstance(region, basestring):
            raise TypeError('Expected argument region to be a basestring')
        __self__.region = region
        if status and not isinstance(status, basestring):
            raise TypeError('Expected argument status to be a basestring')
        __self__.status = status
        if sticky_sessions and not isinstance(sticky_sessions, dict):
            raise TypeError('Expected argument sticky_sessions to be a dict')
        __self__.sticky_sessions = sticky_sessions
        if id and not isinstance(id, basestring):
            raise TypeError('Expected argument id to be a basestring')
        __self__.id = id
        """
        id is the provider-assigned unique ID for this managed resource.
        """

def get_load_balancer(name=None):
    __args__ = dict()

    __args__['name'] = name
    __ret__ = pulumi.runtime.invoke('do:core/getLoadBalancer:getLoadBalancer', __args__)

    return GetLoadBalancerResult(
        algorithm=__ret__.get('algorithm'),
        droplet_ids=__ret__.get('dropletIds'),
        droplet_tag=__ret__.get('dropletTag'),
        forwarding_rules=__ret__.get('forwardingRules'),
        healthcheck=__ret__.get('healthcheck'),
        ip=__ret__.get('ip'),
        redirect_http_to_https=__ret__.get('redirectHttpToHttps'),
        region=__ret__.get('region'),
        status=__ret__.get('status'),
        sticky_sessions=__ret__.get('stickySessions'),
        id=__ret__.get('id'))
