get Database Instances
Use this data source to get information about a list of Cloud SQL instances in a project. You can also apply some filters over this list to get a more filtered list of Cloud SQL instances.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.sql.SqlFunctions;
import com.pulumi.gcp.sql.inputs.GetDatabaseInstancesArgs;
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 qa = SqlFunctions.getDatabaseInstances(GetDatabaseInstancesArgs.builder()
.project("test-project")
.build());
}
}
Return
A collection of values returned by getDatabaseInstances.
Parameters
A collection of arguments for invoking getDatabaseInstances.
Return
A collection of values returned by getDatabaseInstances.
Parameters
To filter out the Cloud SQL instances which are of the specified database version.
The ID of the project in which the resources belong. If it is not provided, the provider project is used.
To filter out the Cloud SQL instances which are located in the specified region.
To filter out the Cloud SQL instances based on the current serving state of the database instance. Supported values include SQL_INSTANCE_STATE_UNSPECIFIED
, RUNNABLE
, SUSPENDED
, PENDING_DELETE
, PENDING_CREATE
, MAINTENANCE
, FAILED
.
To filter out the Cloud SQL instances based on the tier(or machine type) of the database instances.
To filter out the Cloud SQL instances which are located in the specified zone. This zone refers to the Compute Engine zone that the instance is currently serving from.
See also
Return
A collection of values returned by getDatabaseInstances.
Parameters
Builder for com.pulumi.gcp.sql.kotlin.inputs.GetDatabaseInstancesPlainArgs.