get Server Groups
This data source provides the Alb Server Groups of the current Alibaba Cloud user.
NOTE: Available since v1.131.0.
Example Usage
Basic Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.alb.AlbFunctions;
import com.pulumi.alicloud.alb.inputs.GetServerGroupsArgs;
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 ids = AlbFunctions.getServerGroups();
ctx.export("albServerGroupId1", ids.applyValue(getServerGroupsResult -> getServerGroupsResult.groups()[0].id()));
final var nameRegex = AlbFunctions.getServerGroups(GetServerGroupsArgs.builder()
.nameRegex("^my-ServerGroup")
.build());
ctx.export("albServerGroupId2", nameRegex.applyValue(getServerGroupsResult -> getServerGroupsResult.groups()[0].id()));
}
}
Return
A collection of values returned by getServerGroups.
Parameters
A collection of arguments for invoking getServerGroups.
Return
A collection of values returned by getServerGroups.
See also
Parameters
Default to false
. Set it to true
can output more details about resource attributes.
A list of Server Group IDs.
A regex string to filter results by Server Group name.
File name where to save data source results (after running pulumi preview
).
The ID of the resource group.
The server group ids.
The name of the resource.
The status of the resource.
A map of tags assigned to the group.
The ID of the VPC that you want to access.
Return
A collection of values returned by getServerGroups.
See also
Parameters
Builder for com.pulumi.alicloud.alb.kotlin.inputs.GetServerGroupsPlainArgs.