- HTTP request
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- SignalFilter
- DatabaseResourceGroup
- IssueCount
- Try it!
v1beta.queryDatabaseResourceGroups returns paginated results of database groups.
HTTP request
POST https://databasecenter.googleapis.com/v1beta:queryDatabaseResourceGroups
The URL uses gRPC Transcoding syntax.
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "parent": string, "filter": string, "signalTypeGroups": [ { object ( |
| Fields | |
|---|---|
parent |
Required. Parent can be a project, a folder, or an organization. The search is limited to the resources within the The allowed values are:
|
filter |
Optional. The expression to filter resources. The following fields are filterable: * fullResourceName * resourceType * container * product.type * product.engine * product.version * location * labels * resourceCategory * machineConfig.cpu_count * machineConfig.memory_size_bytes * machineConfig.shard_count * resourceName * tags * backupdrConfig.backupdr_managed * edition The expression is a list of zero or more restrictions combined via logical operators Example: |
signalTypeGroups[] |
Optional. Groups of signal types that are requested. |
signalFilters[] |
Optional. Filters based on signals. The list will be ORed together and then ANDed with the |
orderBy |
Optional. A field that specifies the sort order of the results. The following fields are sortable: * fullResourceName * product.type * product.engine * product.version * container * issueCount * machineConfig.vcpu_count * machineConfig.memory_size_bytes * machineConfig.shard_count * resourceName * issueSeverity * signalType * location * resourceType * instance_type * edition * metrics.p99_cpu_utilization * metrics.p95_cpu_utilization * metrics.current_storage_used_bytes * metrics.node_count * metrics.processing_unit_count * metrics.current_memory_used_bytes * metrics.peak_storage_utilization * metrics.peak_number_connections * metrics.peak_memory_utilization The default order is ascending. Add "DESC" after the field name to indicate descending order. Add "ASC" after the field name to indicate ascending order. It only supports a single field at a time. For example: More explicitly, |
pageSize |
Optional. If unspecified, at most 50 resource groups will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
pageToken |
Optional. A page token, received from a previous |
Response body
QueryDatabaseResourceGroupsResponse represents the response message containing a list of resource groups.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"resourceGroups": [
{
object ( |
| Fields | |
|---|---|
resourceGroups[] |
List of database resource groups that pass the filter. |
nextPageToken |
A token that can be sent as |
unreachable[] |
Unordered list. List of unreachable regions from where data could not be retrieved. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the parent resource:
databasecenter.databaseGroups.list
For more information, see the IAM documentation.
SignalFilter
A filter for Signals.
If signalType is left unset, all signals should be returned. For example, the following filter returns all issues. signal_filter: { signalStatus: SIGNAL_STATUS_ISSUE; }
Another example, the following filter returns issues of the given type: signal_filter: { type: SIGNAL_TYPE_NO_PROMOTABLE_REPLICA signalStatus: ISSUE }
If signalStatus is left unset or set to SIGNAL_STATE_UNSPECIFIED, an error should be returned.
| JSON representation |
|---|
{ "signalType": enum ( |
| Fields | |
|---|---|
signalType |
Optional. Represents the type of the Signal for which the filter is for. |
signalStatus |
Optional. Represents the status of the Signal for which the filter is for. |
DatabaseResourceGroup
DatabaseResourceGroup represents all resources that serve a common data set. It is considered notionally as a single entity, powered by any number of units of compute and storage.
| JSON representation |
|---|
{ "rootResources": [ { object ( |
| Fields | |
|---|---|
rootResources[] |
A database resource that serves as a root of the group of database resources. It is repeated just in case we have the concept of multiple roots in the future, however, it will only be populated with a single value for now. |
signalGroups[] |
The filtered signal groups and the count of issues associated with the resources that have been filtered in. |
IssueCount
Count of issues for a group of signals.
| JSON representation |
|---|
{ "displayName": string, "issueCount": integer } |
| Fields | |
|---|---|
displayName |
Title of a signal group corresponding to the request. |
issueCount |
The count of the number of issues associated with those resources that are explicitly filtered in by the filters present in the request. A signal is an issue when its SignalStatus field is set to SIGNAL_STATUS_ISSUE. |