com.pulumi.alicloud.slb.BackendServer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alicloud Show documentation
Show all versions of alicloud Show documentation
A Pulumi package for creating and managing AliCloud resources.
// *** 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.pulumi.alicloud.slb;
import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.slb.BackendServerArgs;
import com.pulumi.alicloud.slb.inputs.BackendServerState;
import com.pulumi.alicloud.slb.outputs.BackendServerBackendServer;
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.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Add a group of backend servers (ECS or ENI instance) to the Server Load Balancer or remove them from it.
*
* > **NOTE:** Available in 1.53.0+
*
* ## Import
*
* Load balancer backend server can be imported using the load balancer id.
*
* ```sh
* $ pulumi import alicloud:slb/backendServer:BackendServer example <load_balancer_id>
* ```
*
*/
@ResourceType(type="alicloud:slb/backendServer:BackendServer")
public class BackendServer extends com.pulumi.resources.CustomResource {
/**
* A list of instances to added backend server in the SLB. It contains three sub-fields as `Block server` follows.
*
*/
@Export(name="backendServers", refs={List.class,BackendServerBackendServer.class}, tree="[0,1]")
private Output* @Nullable */ List> backendServers;
/**
* @return A list of instances to added backend server in the SLB. It contains three sub-fields as `Block server` follows.
*
*/
public Output>> backendServers() {
return Codegen.optional(this.backendServers);
}
/**
* Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
*
*/
@Export(name="deleteProtectionValidation", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> deleteProtectionValidation;
/**
* @return Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
*
*/
public Output> deleteProtectionValidation() {
return Codegen.optional(this.deleteProtectionValidation);
}
/**
* ID of the load balancer.
*
*/
@Export(name="loadBalancerId", refs={String.class}, tree="[0]")
private Output loadBalancerId;
/**
* @return ID of the load balancer.
*
*/
public Output loadBalancerId() {
return this.loadBalancerId;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public BackendServer(java.lang.String name) {
this(name, BackendServerArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public BackendServer(java.lang.String name, BackendServerArgs 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 BackendServer(java.lang.String name, BackendServerArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:slb/backendServer:BackendServer", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private BackendServer(java.lang.String name, Output id, @Nullable BackendServerState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:slb/backendServer:BackendServer", name, state, makeResourceOptions(options, id), false);
}
private static BackendServerArgs makeArgs(BackendServerArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? BackendServerArgs.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 BackendServer get(java.lang.String name, Output id, @Nullable BackendServerState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new BackendServer(name, id, state, options);
}
}