import * as pulumi from "@pulumi/pulumi"; import * as outputs from "./types/output"; /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as cloudflare from "@pulumi/cloudflare"; * * const exampleLoadBalancer = cloudflare.getLoadBalancer({ * zoneId: "699d98642c564d2e855e9661899b7252", * loadBalancerId: "699d98642c564d2e855e9661899b7252", * }); * ``` */ export declare function getLoadBalancer(args: GetLoadBalancerArgs, opts?: pulumi.InvokeOptions): Promise; /** * A collection of arguments for invoking getLoadBalancer. */ export interface GetLoadBalancerArgs { loadBalancerId?: string; /** * Enterprise only: A mapping of Cloudflare PoP identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). Any PoPs not explicitly defined will fall back to using the corresponding country*pool, then region*pool mapping if it exists else to default_pools. */ popPools?: { [key: string]: string[]; }; /** * A mapping of region codes to a list of pool IDs (ordered by their failover priority) for the given region. Any regions not explicitly defined will fall back to using default_pools. */ regionPools?: { [key: string]: string[]; }; zoneId: string; } /** * A collection of values returned by getLoadBalancer. */ export interface GetLoadBalancerResult { /** * Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests. For example, zero-downtime failover occurs immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 response codes. If there is another healthy origin in the same pool, the request is retried once against this alternate origin. */ readonly adaptiveRouting: outputs.GetLoadBalancerAdaptiveRouting; /** * A mapping of country codes to a list of pool IDs (ordered by their failover priority) for the given country. Any country not explicitly defined will fall back to using the corresponding region*pool mapping if it exists else to default*pools. */ readonly countryPools: { [key: string]: string[]; }; readonly createdOn: string; /** * A list of pool IDs ordered by their failover priority. Pools defined here are used by default, or when regionPools are not configured for a given region. */ readonly defaultPools: string[]; /** * Object description. */ readonly description: string; /** * Whether to enable (the default) this load balancer. */ readonly enabled: boolean; /** * The pool ID to use when all other pools are detected as unhealthy. */ readonly fallbackPool: string; /** * The ID of this resource. */ readonly id: string; readonly loadBalancerId?: string; /** * Controls location-based steering for non-proxied requests. See `steeringPolicy` to learn how steering is affected. */ readonly locationStrategy: outputs.GetLoadBalancerLocationStrategy; readonly modifiedOn: string; /** * The DNS hostname to associate with your Load Balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the Load Balancer will take precedence and the DNS record will not be used. */ readonly name: string; /** * List of networks where Load Balancer or Pool is enabled. */ readonly networks: string[]; /** * Enterprise only: A mapping of Cloudflare PoP identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). Any PoPs not explicitly defined will fall back to using the corresponding country*pool, then region*pool mapping if it exists else to default_pools. */ readonly popPools: { [key: string]: string[]; }; /** * Whether the hostname should be gray clouded (false) or orange clouded (true). */ readonly proxied: boolean; /** * Configures pool weights. */ readonly randomSteering: outputs.GetLoadBalancerRandomSteering; /** * A mapping of region codes to a list of pool IDs (ordered by their failover priority) for the given region. Any regions not explicitly defined will fall back to using default_pools. */ readonly regionPools: { [key: string]: string[]; }; /** * BETA Field Not General Access: A list of rules for this load balancer to execute. */ readonly rules: outputs.GetLoadBalancerRule[]; /** * Specifies the type of session affinity the load balancer should use unless specified as `"none"`. The supported types are: - `"cookie"`: On the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy, then a new origin server is calculated and used. - `"ipCookie"`: Behaves the same as `"cookie"` except the initial origin selection is stable and based on the client's ip address. - `"header"`: On the first request to a proxied load balancer, a session key based on the configured HTTP headers (see `session_affinity_attributes.headers`) is generated, encoding the request headers used for storing in the load balancer session state which origin the request will be forwarded to. Subsequent requests to the load balancer with the same headers will be sent to the same origin server, for the duration of the session and as long as the origin server remains healthy. If the session has been idle for the duration of `sessionAffinityTtl` seconds or the origin server is unhealthy, then a new origin server is calculated and used. See `headers` in `sessionAffinityAttributes` for additional required configuration. * Available values: "none", "cookie", "ipCookie", "header". */ readonly sessionAffinity: string; /** * Configures attributes for session affinity. */ readonly sessionAffinityAttributes: outputs.GetLoadBalancerSessionAffinityAttributes; /** * Time, in seconds, until a client's session expires after being created. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. The accepted ranges per `sessionAffinity` policy are: - `"cookie"` / `"ipCookie"`: The current default of 23 hours will be used unless explicitly set. The accepted range of values is between [1800, 604800]. - `"header"`: The current default of 1800 seconds will be used unless explicitly set. The accepted range of values is between [30, 3600]. Note: With session affinity by header, sessions only expire after they haven't been used for the number of seconds specified. */ readonly sessionAffinityTtl: number; /** * Steering Policy for this load balancer. */ readonly steeringPolicy: string; /** * Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This only applies to gray-clouded (unproxied) load balancers. */ readonly ttl: number; readonly zoneId: string; } /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as cloudflare from "@pulumi/cloudflare"; * * const exampleLoadBalancer = cloudflare.getLoadBalancer({ * zoneId: "699d98642c564d2e855e9661899b7252", * loadBalancerId: "699d98642c564d2e855e9661899b7252", * }); * ``` */ export declare function getLoadBalancerOutput(args: GetLoadBalancerOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output; /** * A collection of arguments for invoking getLoadBalancer. */ export interface GetLoadBalancerOutputArgs { loadBalancerId?: pulumi.Input; /** * Enterprise only: A mapping of Cloudflare PoP identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). Any PoPs not explicitly defined will fall back to using the corresponding country*pool, then region*pool mapping if it exists else to default_pools. */ popPools?: pulumi.Input<{ [key: string]: pulumi.Input[]>; }>; /** * A mapping of region codes to a list of pool IDs (ordered by their failover priority) for the given region. Any regions not explicitly defined will fall back to using default_pools. */ regionPools?: pulumi.Input<{ [key: string]: pulumi.Input[]>; }>; zoneId: pulumi.Input; }