getBackendServers

This data source provides the server load balancer backend servers related to a server load balancer..

NOTE: Available in 1.53.0+

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.slb.SlbFunctions;
import com.pulumi.alicloud.slb.inputs.GetBackendServersArgs;
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 sampleDs = SlbFunctions.getBackendServers(GetBackendServersArgs.builder()
.loadBalancerId(alicloud_slb_load_balancer.sample_slb().id())
.build());
ctx.export("firstSlbBackendServerId", sampleDs.applyValue(getBackendServersResult -> getBackendServersResult.backendServers()[0].id()));
}
}

Return

A collection of values returned by getBackendServers.

Parameters

argument

A collection of arguments for invoking getBackendServers.


suspend fun getBackendServers(ids: List<String>? = null, loadBalancerId: String, outputFile: String? = null): GetBackendServersResult

Return

A collection of values returned by getBackendServers.

See also

Parameters

ids

List of attached ECS instance IDs.

loadBalancerId

ID of the SLB with attachments.

outputFile

File name where to save data source results (after running pulumi preview).


Return

A collection of values returned by getBackendServers.

See also

Parameters

argument

Builder for com.pulumi.alicloud.slb.kotlin.inputs.GetBackendServersPlainArgs.