All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ovhcloud.pulumi.ovh.IpLoadBalancing.HttpFarmServer Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.ovhcloud.pulumi.ovh.IpLoadBalancing;

import com.ovhcloud.pulumi.ovh.IpLoadBalancing.HttpFarmServerArgs;
import com.ovhcloud.pulumi.ovh.IpLoadBalancing.inputs.HttpFarmServerState;
import com.ovhcloud.pulumi.ovh.Utilities;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Creates a backend server entry linked to HTTP loadbalancing group (farm)
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.ovh.IpLoadBalancing.IpLoadBalancingFunctions;
 * import com.pulumi.ovh.IpLoadBalancing.inputs.GetIpLoadBalancingArgs;
 * import com.pulumi.ovh.IpLoadBalancing.HttpFarm;
 * import com.pulumi.ovh.IpLoadBalancing.HttpFarmArgs;
 * import com.pulumi.ovh.IpLoadBalancing.HttpFarmServer;
 * import com.pulumi.ovh.IpLoadBalancing.HttpFarmServerArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         final var lb = IpLoadBalancingFunctions.getIpLoadBalancing(GetIpLoadBalancingArgs.builder()
 *             .serviceName("ip-1.2.3.4")
 *             .state("ok")
 *             .build());
 * 
 *         var farmname = new HttpFarm("farmname", HttpFarmArgs.builder()
 *             .port(8080)
 *             .serviceName(lb.applyValue(getIpLoadBalancingResult -> getIpLoadBalancingResult.serviceName()))
 *             .zone("all")
 *             .build());
 * 
 *         var backend = new HttpFarmServer("backend", HttpFarmServerArgs.builder()
 *             .address("4.5.6.7")
 *             .backup(true)
 *             .displayName("mybackend")
 *             .farmId(farmname.id())
 *             .port(80)
 *             .probe(true)
 *             .proxyProtocolVersion("v2")
 *             .serviceName(lb.applyValue(getIpLoadBalancingResult -> getIpLoadBalancingResult.serviceName()))
 *             .ssl(false)
 *             .status("active")
 *             .weight(2)
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * HTTP farm server can be imported using the following format `service_name`, the `id` of the farm and the `id` of the server separated by "/" e.g. * */ @ResourceType(type="ovh:IpLoadBalancing/httpFarmServer:HttpFarmServer") public class HttpFarmServer extends com.pulumi.resources.CustomResource { /** * Address of the backend server (IP from either internal or OVHcloud network) * */ @Export(name="address", refs={String.class}, tree="[0]") private Output address; /** * @return Address of the backend server (IP from either internal or OVHcloud network) * */ public Output address() { return this.address; } /** * is it a backup server used in case of failure of all the non-backup backends * */ @Export(name="backup", refs={Boolean.class}, tree="[0]") private Output backup; /** * @return is it a backup server used in case of failure of all the non-backup backends * */ public Output> backup() { return Codegen.optional(this.backup); } @Export(name="chain", refs={String.class}, tree="[0]") private Output chain; public Output> chain() { return Codegen.optional(this.chain); } /** * Value of the stickiness cookie used for this backend. * */ @Export(name="cookie", refs={String.class}, tree="[0]") private Output cookie; /** * @return Value of the stickiness cookie used for this backend. * */ public Output cookie() { return this.cookie; } /** * Label for the server * */ @Export(name="displayName", refs={String.class}, tree="[0]") private Output displayName; /** * @return Label for the server * */ public Output> displayName() { return Codegen.optional(this.displayName); } /** * ID of the farm this server is attached to * */ @Export(name="farmId", refs={Integer.class}, tree="[0]") private Output farmId; /** * @return ID of the farm this server is attached to * */ public Output farmId() { return this.farmId; } /** * enable action when backend marked down. (`shutdown-sessions`) * */ @Export(name="onMarkedDown", refs={String.class}, tree="[0]") private Output onMarkedDown; /** * @return enable action when backend marked down. (`shutdown-sessions`) * */ public Output> onMarkedDown() { return Codegen.optional(this.onMarkedDown); } /** * Port that backend will respond on * */ @Export(name="port", refs={Integer.class}, tree="[0]") private Output port; /** * @return Port that backend will respond on * */ public Output> port() { return Codegen.optional(this.port); } /** * defines if backend will be probed to determine health and keep as active in farm if healthy * */ @Export(name="probe", refs={Boolean.class}, tree="[0]") private Output probe; /** * @return defines if backend will be probed to determine health and keep as active in farm if healthy * */ public Output> probe() { return Codegen.optional(this.probe); } /** * version of the PROXY protocol used to pass origin connection information from loadbalancer to receiving service (`v1`, `v2`, `v2-ssl`, `v2-ssl-cn`) * */ @Export(name="proxyProtocolVersion", refs={String.class}, tree="[0]") private Output proxyProtocolVersion; /** * @return version of the PROXY protocol used to pass origin connection information from loadbalancer to receiving service (`v1`, `v2`, `v2-ssl`, `v2-ssl-cn`) * */ public Output> proxyProtocolVersion() { return Codegen.optional(this.proxyProtocolVersion); } /** * The internal name of your IP load balancing * */ @Export(name="serviceName", refs={String.class}, tree="[0]") private Output serviceName; /** * @return The internal name of your IP load balancing * */ public Output serviceName() { return this.serviceName; } /** * is the connection ciphered with SSL (TLS) * */ @Export(name="ssl", refs={Boolean.class}, tree="[0]") private Output ssl; /** * @return is the connection ciphered with SSL (TLS) * */ public Output> ssl() { return Codegen.optional(this.ssl); } /** * backend status - `active` or `inactive` * */ @Export(name="status", refs={String.class}, tree="[0]") private Output status; /** * @return backend status - `active` or `inactive` * */ public Output status() { return this.status; } /** * used in loadbalancing algorithm * */ @Export(name="weight", refs={Integer.class}, tree="[0]") private Output weight; /** * @return used in loadbalancing algorithm * */ public Output> weight() { return Codegen.optional(this.weight); } /** * * @param name The _unique_ name of the resulting resource. */ public HttpFarmServer(java.lang.String name) { this(name, HttpFarmServerArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public HttpFarmServer(java.lang.String name, HttpFarmServerArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public HttpFarmServer(java.lang.String name, HttpFarmServerArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("ovh:IpLoadBalancing/httpFarmServer:HttpFarmServer", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private HttpFarmServer(java.lang.String name, Output id, @Nullable HttpFarmServerState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("ovh:IpLoadBalancing/httpFarmServer:HttpFarmServer", name, state, makeResourceOptions(options, id), false); } private static HttpFarmServerArgs makeArgs(HttpFarmServerArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? HttpFarmServerArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static HttpFarmServer get(java.lang.String name, Output id, @Nullable HttpFarmServerState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new HttpFarmServer(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy