| 1 |
<html><body> |
| 2 |
<style> |
| 3 |
|
| 4 |
body, h1, h2, h3, div, span, p, pre, a { |
| 5 |
margin: 0; |
| 6 |
padding: 0; |
| 7 |
border: 0; |
| 8 |
font-weight: inherit; |
| 9 |
font-style: inherit; |
| 10 |
font-size: 100%; |
| 11 |
font-family: inherit; |
| 12 |
vertical-align: baseline; |
| 13 |
} |
| 14 |
|
| 15 |
body { |
| 16 |
font-size: 13px; |
| 17 |
padding: 1em; |
| 18 |
} |
| 19 |
|
| 20 |
h1 { |
| 21 |
font-size: 26px; |
| 22 |
margin-bottom: 1em; |
| 23 |
} |
| 24 |
|
| 25 |
h2 { |
| 26 |
font-size: 24px; |
| 27 |
margin-bottom: 1em; |
| 28 |
} |
| 29 |
|
| 30 |
h3 { |
| 31 |
font-size: 20px; |
| 32 |
margin-bottom: 1em; |
| 33 |
margin-top: 1em; |
| 34 |
} |
| 35 |
|
| 36 |
pre, code { |
| 37 |
line-height: 1.5; |
| 38 |
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 |
} |
| 40 |
|
| 41 |
pre { |
| 42 |
margin-top: 0.5em; |
| 43 |
} |
| 44 |
|
| 45 |
h1, h2, h3, p { |
| 46 |
font-family: Arial, sans serif; |
| 47 |
} |
| 48 |
|
| 49 |
h1, h2, h3 { |
| 50 |
border-bottom: solid #CCC 1px; |
| 51 |
} |
| 52 |
|
| 53 |
.toc_element { |
| 54 |
margin-top: 0.5em; |
| 55 |
} |
| 56 |
|
| 57 |
.firstline { |
| 58 |
margin-left: 2 em; |
| 59 |
} |
| 60 |
|
| 61 |
.method { |
| 62 |
margin-top: 1em; |
| 63 |
border: solid 1px #CCC; |
| 64 |
padding: 1em; |
| 65 |
background: #EEE; |
| 66 |
} |
| 67 |
|
| 68 |
.details { |
| 69 |
font-weight: bold; |
| 70 |
font-size: 14px; |
| 71 |
} |
| 72 |
|
| 73 |
</style> |
| 74 |
|
| 75 |
<h1><a href="databasecenter_v1beta.html">Database Center API</a> . <a href="databasecenter_v1beta.folders.html">folders</a></h1> |
| 76 |
<h2>Instance Methods</h2> |
| 77 |
<p class="toc_element"> |
| 78 |
<code><a href="#aggregateQueryStats">aggregateQueryStats(parent, body=None, x__xgafv=None)</a></code></p> |
| 79 |
<p class="firstline">AggregateQueryStats provides database resource query execution statistics.</p> |
| 80 |
<p class="toc_element"> |
| 81 |
<code><a href="#aggregateQueryStats_next">aggregateQueryStats_next()</a></code></p> |
| 82 |
<p class="firstline">Retrieves the next page of results.</p> |
| 83 |
<p class="toc_element"> |
| 84 |
<code><a href="#close">close()</a></code></p> |
| 85 |
<p class="firstline">Close httplib2 connections.</p> |
| 86 |
<h3>Method Details</h3> |
| 87 |
<div class="method"> |
| 88 |
<code class="details" id="aggregateQueryStats">aggregateQueryStats(parent, body=None, x__xgafv=None)</code> |
| 89 |
<pre>AggregateQueryStats provides database resource query execution statistics. |
| 90 |
|
| 91 |
Args: |
| 92 |
parent: string, Required. Parent can be a project, a folder, or an organization. The search is limited to the resources within the `parent`. The allowed values are: * projects/{PROJECT_ID} (e.g., "projects/foo-bar") * projects/{PROJECT_NUMBER} (e.g., "projects/12345678") * folders/{FOLDER_NUMBER} (e.g., "folders/1234567") * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456") (required) |
| 93 |
body: object, The request body. |
| 94 |
The object takes the form of: |
| 95 |
|
| 96 |
{ # AggregateQueryStatsRequest represents the input to the AggregateQueryStats method. |
| 97 |
"filter": "A String", # Optional. The expression to filter resources. Supported fields are: `full_resource_name`, `resource_type`, `container`, `product.type`, `product.engine`, `product.version`, `location`, `labels`, `issues`, fields of availability_info, data_protection_info,'resource_name', etc. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. When `AND` and `OR` are both used in the expression, parentheses must be appropriately used to group the combinations. Example: `location="us-east1"` Example: `container="projects/123" OR container="projects/456"` Example: `(container="projects/123" OR container="projects/456") AND location="us-east1"` Additional specific fields for query stats are: `metric_window`, `query_hash`, `normalized_query`. Example: `metric_window="LAST_ONE_DAY"` (Possible values for `metric_window` are: `LAST_ONE_DAY`, `LAST_ONE_WEEK`, `LAST_TWO_WEEKS`) Example: `query_hash="12345678"` Example: `normalized_query="SELECT * FROM table"` |
| 98 |
"orderBy": "A String", # Optional. The expression to order the results by. Example: `order_by="execution_count"` Example: `order_by="execution_count desc"` Supported order by fields are `execution_count`, `rows_processed`, `total_cpu_time`, `avg_cpu_time`. |
| 99 |
"pageSize": 42, # Optional. If unspecified, at most 100 query stats will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| 100 |
"pageToken": "A String", # Optional. A page token, received from a previous `AggregateQueryStatsRequest` call. Provide this to retrieve the subsequent page. All parameters except page_token should match the parameters in the call that provided the page token. |
| 101 |
} |
| 102 |
|
| 103 |
x__xgafv: string, V1 error format. |
| 104 |
Allowed values |
| 105 |
1 - v1 error format |
| 106 |
2 - v2 error format |
| 107 |
|
| 108 |
Returns: |
| 109 |
An object of the form: |
| 110 |
|
| 111 |
{ # The response message containing relevant query stats for database resources. |
| 112 |
"nextPageToken": "A String", # A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| 113 |
"queryStats": [ # List of query stats where each group contains stats for resources having a particular combination of relevant query stats. |
| 114 |
{ # QueryStatsInfo contains the aggregated and detailed query stats for a particular combination of relevant query stats for queries having same normalized query. |
| 115 |
"aggregatedQueryStats": { # QueryStats contains the stats for a particular combination of query_hash, query_string and resource_type. # Aggregated query stats for the resources for same normalized query. |
| 116 |
"inefficientQueryInfo": { # Metadata about inefficient query signal info for a database resource. # Information about inefficient query. |
| 117 |
"database": "A String", # Name of the database where index is required. For example, "db1", which is the name of the database present in the instance. |
| 118 |
"impactedQueriesCount": "A String", # Count of queries to be impacted if index is applied |
| 119 |
"sqlIndexStatement": "A String", # SQL statement of the index. Based on the ddl type, this will be either CREATE INDEX or DROP INDEX. |
| 120 |
"storageCostBytes": "A String", # Cost of additional disk usage in bytes |
| 121 |
"table": "A String", # Name of the table where index is required |
| 122 |
}, |
| 123 |
"normalizedQuery": "A String", # The query string is normalized query without any PII data. |
| 124 |
"queryHash": "A String", # The query hash of the query. |
| 125 |
"queryMetrics": { # QueryMetrics contains the metrics related to the query execution. # Metrics related to the query performance. |
| 126 |
"avgCpuTime": "A String", # The average execution period of the query across all runs. |
| 127 |
"executionCount": "A String", # The number of times the query was executed. |
| 128 |
"metricsWindow": "A String", # The window over which the metrics are aggregated. |
| 129 |
"rowsProcessed": "A String", # The average number of rows processed by the query across all runs. |
| 130 |
"totalCpuTime": "A String", # The total CPU time consumed by the query across all runs. |
| 131 |
}, |
| 132 |
"resourceIds": [ # The resource ids for which the query stats are collected. |
| 133 |
{ # ResourceId contains the identifier for a database resource, including the full resource name, resource type, and product. |
| 134 |
"fullResourceName": "A String", # The full resource name of the resource. |
| 135 |
"product": { # Product specification for databasecenter resources. # The product of the resource, including the type, engine, and version. |
| 136 |
"engine": "A String", # Optional. The specific engine that the underlying database is running. |
| 137 |
"minorVersion": "A String", # Optional. Minor version of the underlying database engine. Example values: For MySQL, it could be "8.0.35", "5.7.25" etc. For PostgreSQL, it could be "14.4", "15.5" etc. |
| 138 |
"type": "A String", # Optional. Type of specific database product. It could be CloudSQL, AlloyDB etc.. |
| 139 |
"version": "A String", # Optional. Version of the underlying database engine. Example values: For MySQL, it could be "8.0", "5.7" etc. For Postgres, it could be "14", "15" etc. |
| 140 |
}, |
| 141 |
"resourceType": "A String", # The type of the resource. sqladmin.googleapis.com/Instance alloydb.googleapis.com/Cluster alloydb.googleapis.com/Instance |
| 142 |
}, |
| 143 |
], |
| 144 |
"resourceType": "A String", # The type of the resource. sqladmin.googleapis.com/Instance alloydb.googleapis.com/Cluster alloydb.googleapis.com/Instance |
| 145 |
}, |
| 146 |
"queryStats": [ # List of query stats for the resources in the group. This stats is stats at resource level for the resources having same normalized query. |
| 147 |
{ # QueryStats contains the stats for a particular combination of query_hash, query_string and resource_type. |
| 148 |
"inefficientQueryInfo": { # Metadata about inefficient query signal info for a database resource. # Information about inefficient query. |
| 149 |
"database": "A String", # Name of the database where index is required. For example, "db1", which is the name of the database present in the instance. |
| 150 |
"impactedQueriesCount": "A String", # Count of queries to be impacted if index is applied |
| 151 |
"sqlIndexStatement": "A String", # SQL statement of the index. Based on the ddl type, this will be either CREATE INDEX or DROP INDEX. |
| 152 |
"storageCostBytes": "A String", # Cost of additional disk usage in bytes |
| 153 |
"table": "A String", # Name of the table where index is required |
| 154 |
}, |
| 155 |
"normalizedQuery": "A String", # The query string is normalized query without any PII data. |
| 156 |
"queryHash": "A String", # The query hash of the query. |
| 157 |
"queryMetrics": { # QueryMetrics contains the metrics related to the query execution. # Metrics related to the query performance. |
| 158 |
"avgCpuTime": "A String", # The average execution period of the query across all runs. |
| 159 |
"executionCount": "A String", # The number of times the query was executed. |
| 160 |
"metricsWindow": "A String", # The window over which the metrics are aggregated. |
| 161 |
"rowsProcessed": "A String", # The average number of rows processed by the query across all runs. |
| 162 |
"totalCpuTime": "A String", # The total CPU time consumed by the query across all runs. |
| 163 |
}, |
| 164 |
"resourceIds": [ # The resource ids for which the query stats are collected. |
| 165 |
{ # ResourceId contains the identifier for a database resource, including the full resource name, resource type, and product. |
| 166 |
"fullResourceName": "A String", # The full resource name of the resource. |
| 167 |
"product": { # Product specification for databasecenter resources. # The product of the resource, including the type, engine, and version. |
| 168 |
"engine": "A String", # Optional. The specific engine that the underlying database is running. |
| 169 |
"minorVersion": "A String", # Optional. Minor version of the underlying database engine. Example values: For MySQL, it could be "8.0.35", "5.7.25" etc. For PostgreSQL, it could be "14.4", "15.5" etc. |
| 170 |
"type": "A String", # Optional. Type of specific database product. It could be CloudSQL, AlloyDB etc.. |
| 171 |
"version": "A String", # Optional. Version of the underlying database engine. Example values: For MySQL, it could be "8.0", "5.7" etc. For Postgres, it could be "14", "15" etc. |
| 172 |
}, |
| 173 |
"resourceType": "A String", # The type of the resource. sqladmin.googleapis.com/Instance alloydb.googleapis.com/Cluster alloydb.googleapis.com/Instance |
| 174 |
}, |
| 175 |
], |
| 176 |
"resourceType": "A String", # The type of the resource. sqladmin.googleapis.com/Instance alloydb.googleapis.com/Cluster alloydb.googleapis.com/Instance |
| 177 |
}, |
| 178 |
], |
| 179 |
}, |
| 180 |
], |
| 181 |
"unreachable": [ # Unordered list. List of unreachable regions from where data could not be retrieved. |
| 182 |
"A String", |
| 183 |
], |
| 184 |
}</pre> |
| 185 |
</div> |
| 186 |
|
| 187 |
<div class="method"> |
| 188 |
<code class="details" id="aggregateQueryStats_next">aggregateQueryStats_next()</code> |
| 189 |
<pre>Retrieves the next page of results. |
| 190 |
|
| 191 |
Args: |
| 192 |
previous_request: The request for the previous page. (required) |
| 193 |
previous_response: The response from the request for the previous page. (required) |
| 194 |
|
| 195 |
Returns: |
| 196 |
A request object that you can call 'execute()' on to request the next |
| 197 |
page. Returns None if there are no more items in the collection. |
| 198 |
</pre> |
| 199 |
</div> |
| 200 |
|
| 201 |
<div class="method"> |
| 202 |
<code class="details" id="close">close()</code> |
| 203 |
<pre>Close httplib2 connections.</pre> |
| 204 |
</div> |
| 205 |
|
| 206 |
</body></html> |