get Server
Use this data source to access information about an existing PostgreSQL Azure Database Server.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.postgresql.PostgresqlFunctions;
import com.pulumi.azure.postgresql.inputs.GetServerArgs;
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 example = PostgresqlFunctions.getServer(GetServerArgs.builder()
.name("postgresql-server-1")
.resourceGroupName("api-rg-pro")
.build());
ctx.export("postgresqlServerId", example.applyValue(getServerResult -> getServerResult.id()));
}
}
Content copied to clipboard
Return
A collection of values returned by getServer.
Parameters
argument
A collection of arguments for invoking getServer.
Return
A collection of values returned by getServer.
See also
Parameters
name
The name of the PostgreSQL Server.
resource Group Name
Specifies the name of the Resource Group where the PostgreSQL Server exists.
Return
A collection of values returned by getServer.
See also
Parameters
argument
Builder for com.pulumi.azure.postgresql.kotlin.inputs.GetServerPlainArgs.