| 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="cloudbilling_v1beta.html">Cloud Billing API</a> . <a href="cloudbilling_v1beta.v1beta.html">v1beta</a></h1> |
| 76 |
<h2>Instance Methods</h2> |
| 77 |
<p class="toc_element"> |
| 78 |
<code><a href="#close">close()</a></code></p> |
| 79 |
<p class="firstline">Close httplib2 connections.</p> |
| 80 |
<p class="toc_element"> |
| 81 |
<code><a href="#generateInsights">generateInsights(body=None, x__xgafv=None)</a></code></p> |
| 82 |
<p class="firstline">Analyzes cost data for a billing account and/or specific projects. Returns a natural language summary and supporting datasets.</p> |
| 83 |
<h3>Method Details</h3> |
| 84 |
<div class="method"> |
| 85 |
<code class="details" id="close">close()</code> |
| 86 |
<pre>Close httplib2 connections.</pre> |
| 87 |
</div> |
| 88 |
|
| 89 |
<div class="method"> |
| 90 |
<code class="details" id="generateInsights">generateInsights(body=None, x__xgafv=None)</code> |
| 91 |
<pre>Analyzes cost data for a billing account and/or specific projects. Returns a natural language summary and supporting datasets. |
| 92 |
|
| 93 |
Args: |
| 94 |
body: object, The request body. |
| 95 |
The object takes the form of: |
| 96 |
|
| 97 |
{ # Request for GenerateInsights. |
| 98 |
"filter": "A String", # Optional. Filters cost data by service id. Follows https://google.aip.dev/160 for the filter syntax. eg. filter: "service = 'C7E2-9256-1C43'" |
| 99 |
"overriddenMaxIterationCounts": 42, # Optional. Overrides the maximum iterations for any selected strategy. |
| 100 |
"parents": [ # Optional. The billing account or projects to analyze. |
| 101 |
{ # Specifies a Billing data resource that can be used for authorization to access billing data. |
| 102 |
"billingAccount": "A String", # Optional. If not provided the billing account currently associated with the resource will be used. |
| 103 |
"resource": "A String", # Required. Resource name for an entitity that can be used for authorization to access billing data such as `projects/{project}` or `billingAccounts/{billing_account}` |
| 104 |
}, |
| 105 |
], |
| 106 |
"prompt": "A String", # Required. The natural language prompt from the user. |
| 107 |
"userContext": { # Additional context for personalization (e.g., user persona, role). # Optional. Additional context for personalization (e.g., user persona, role). |
| 108 |
"persona": "A String", # Optional. The user's persona (e.g., FinOps Manager, Developer). |
| 109 |
"role": "A String", # Optional. The user's role (e.g., Billing Admin, Project Owner, etc.). |
| 110 |
}, |
| 111 |
} |
| 112 |
|
| 113 |
x__xgafv: string, V1 error format. |
| 114 |
Allowed values |
| 115 |
1 - v1 error format |
| 116 |
2 - v2 error format |
| 117 |
|
| 118 |
Returns: |
| 119 |
An object of the form: |
| 120 |
|
| 121 |
{ # Response for GenerateInsights. |
| 122 |
"finalResult": { # Encapsulates all structured data and the completed summary. # Output only. The final structured results and metadata. Usually sent as the final message in the stream. |
| 123 |
"dataSets": [ # Output only. Data sets used to support the insights, suitable for UI rendering (tables/charts). |
| 124 |
{ # A dataset used to support an insight, suitable for UI rendering (tables/charts). |
| 125 |
"billingData": { # Encapsulates billing data. # Output only. Actual billing data returned from the Data Mart. Uses the formal message from the Billing Data Service. |
| 126 |
"columnInfo": [ # Information about columns. |
| 127 |
{ # Represents a column header. |
| 128 |
"column": "A String", # Name of the column. |
| 129 |
}, |
| 130 |
], |
| 131 |
"rows": [ # Rows. |
| 132 |
{ # Represents a row in the query result. |
| 133 |
"values": [ # Values for a row in the column order. |
| 134 |
{ # This is a copy of storage/googlesql/public/value.proto. ValueProto represents the serialized form of the googlesql::Value. The intention is to support multiple languages including Java and C++, so we must be sensitive to the distinction between Java Strings and byte arrays or ByteStrings. We also want to support use-cases which do not want to serialize a copy of the GoogleSQL type for every instance (which might be very repetitive). Therefore, unlike googlesql::Value, ValueProto does not carry full type information with every instance, and can only be fully interpreted with an associated TypeProto. |
| 135 |
"ValueProtoSwitchMustHaveADefault": True or False, # User code that switches on this oneoff enum must have a default case so builds won't break when new fields are added. |
| 136 |
"arrayValue": { # An ordered collection of elements of arbitrary count. # An array of value |
| 137 |
"element": [ # The elements of the array. |
| 138 |
# Object with schema name: ValueProto |
| 139 |
], |
| 140 |
}, |
| 141 |
"bignumericValue": "A String", # Encoded bignumeric value. For the encoding format see documentation for BigNumericValue::SerializeAsProtoBytes(). |
| 142 |
"boolValue": True or False, # Primitive for bool. |
| 143 |
"bytesValue": "A String", # Primitive for bytes. |
| 144 |
"dateValue": 42, # Primitive for date. |
| 145 |
"datetimeValue": { # A datetime value. # primitive for datetime |
| 146 |
"bitFieldDatetimeSeconds": "A String", # Represents bit field encoding of year/month/day/hour/minute/second. See class DatetimeValue in civil_time.h for details of encoding. |
| 147 |
"nanos": 42, # Non-negative fractions of a second at nanosecond resolution. |
| 148 |
}, |
| 149 |
"doubleValue": 3.14, # Primitive for double. |
| 150 |
"enumValue": 42, # Tag 11 was used for specifying micros timestamps as int64, now obsolete. |
| 151 |
"floatValue": 3.14, # Primitive for float. |
| 152 |
"geographyValue": "A String", # Geography encoded using ::stlib::STGeographyEncoder |
| 153 |
"int32Value": 42, # Primitive value for int32. |
| 154 |
"int64Value": "A String", # Primitive for int64. |
| 155 |
"intervalValue": "A String", # Encoded interval value. For the encoding format see documentation for IntervalValue::SerializeAsBytes(). |
| 156 |
"jsonValue": "A String", # Tag 22 was used for json value as bytes, now obsolete. Json value represented as a string document. |
| 157 |
"mapValue": { # An unordered mapping from key to value, represented as a collection of map entries. # Encoded map value. See go/googlesql_map. |
| 158 |
"entry": [ # Represents the map entries in the map. |
| 159 |
{ # A single entry in a Map, representing the mapping between `key` and `value`. |
| 160 |
"key": # Object with schema name: ValueProto # Represents the serialized map key for the entry. |
| 161 |
"value": # Object with schema name: ValueProto # Represents the serialized map value of the entry. |
| 162 |
}, |
| 163 |
], |
| 164 |
}, |
| 165 |
"numericValue": "A String", # Encoded numeric value. For the encoding format see documentation for NumericValue::SerializeAsProtoBytes(). |
| 166 |
"protoValue": "A String", # Stores a serialized protocol message. |
| 167 |
"rangeValue": { # A range of values, bounded by the values 'start' (inclusive) and 'end' (exclusive). A range has an element type, and values must be of this element type. A range is contiguous, ie it contains all values of the given element type starting at 'start' and ending before 'end'. A "null" value on start or end represents an unbounded start or end value respectively. Start and end values must always be present. # Encoded range value. See go/googlesql_range. |
| 168 |
"end": # Object with schema name: ValueProto # Represents the end of the range. |
| 169 |
"start": # Object with schema name: ValueProto # Represents the start of the range. |
| 170 |
}, |
| 171 |
"stringValue": "A String", # Primitive for string. |
| 172 |
"structValue": { # A collection of fields. The count, order, and type of the fields is determined by the type associated with this value. # A struct of values |
| 173 |
"field": [ # The fields in the struct |
| 174 |
# Object with schema name: ValueProto |
| 175 |
], |
| 176 |
}, |
| 177 |
"timeValue": "A String", # Bit field encoding of hour/minute/second/nanos. See TimeValue class for details. |
| 178 |
"timestampPicoValue": "A String", # Encoded timestamp_pico value. For the encoding format see documentation for googlesql::TimestampPico::SerializeAsBytes(). |
| 179 |
"timestampValue": "A String", # primitive for timestamp |
| 180 |
"tokenlistValue": "A String", # Encoded tokenlist value. copybara:strip_begin(internal-comment) See //search/tokens:token_list. copybara:strip_end |
| 181 |
"uint32Value": 42, # Primitive for uint32. |
| 182 |
"uint64Value": "A String", # Primitive for uint64. |
| 183 |
"uuidValue": "A String", # Encoded uuid value. For the encoding format see documentation for UuidValue::SerializeAsBytes(). |
| 184 |
}, |
| 185 |
], |
| 186 |
}, |
| 187 |
], |
| 188 |
}, |
| 189 |
"queryInfo": { # A local representation of the query used to fetch the data. This is used instead of the raw QueryBillingDataRequest to avoid pulling in Cloud Policy Enforcement (CPE) resource_type annotations into the response payload, which causes ESF validation failures. # Output only. The query used to fetch this data. |
| 190 |
"columns": "A String", # The columns queried. |
| 191 |
"filter": "A String", # The filter applied to the query. |
| 192 |
"groupBy": "A String", # The group-by clause applied to the query. |
| 193 |
"limit": 42, # The row limit applied to the query. |
| 194 |
"orderBy": "A String", # The order-by clause applied to the query. |
| 195 |
"parents": [ # The parents (e.g. projects, billing accounts) queried. |
| 196 |
"A String", |
| 197 |
], |
| 198 |
"view": "A String", # The view queried. |
| 199 |
}, |
| 200 |
"suggestedChart": { # A suggested chart for the data set, used for UI rendering. # Output only. A suggested chart for the data set, used for UI rendering. |
| 201 |
"chartTitle": "A String", # The title of the chart. |
| 202 |
"chartType": "A String", # The type of the chart. |
| 203 |
"seriesField": "A String", # The field used for the series (e.g., color-coding). Optional, but recommended for time-series data. |
| 204 |
"xAxisField": "A String", # The field used for the x-axis. |
| 205 |
"xAxisLabel": "A String", # The label of the x-axis. |
| 206 |
"yAxisField": "A String", # The field used for the y-axis. |
| 207 |
"yAxisLabel": "A String", # The label of the y-axis. |
| 208 |
}, |
| 209 |
}, |
| 210 |
], |
| 211 |
"fullAnalysis": "A String", # Output only. Contains the full natural language analysis, including thoughts, reasoning, and references. |
| 212 |
"insights": [ # Output only. A list of discrete insights gleaned from the data. |
| 213 |
{ # e.g. insight: title: "Cost Increase (The Explanation)" description: "Your cost increase was driven by Vertex AI Online Prediction in us-central1..." severity: INFO |
| 214 |
"description": "A String", # Output only. The description of the insight. |
| 215 |
"severity": "A String", # Output only. The severity of the insight, used for UI rendering (e.g., color-coding). |
| 216 |
"title": "A String", # Output only. The title of the insight. |
| 217 |
}, |
| 218 |
], |
| 219 |
"interopLinks": [ # Output only. Links to interoperable tools (e.g., pre-filtered Cost Reports or BQE queries). |
| 220 |
{ # A link to interoperable tools (e.g., pre-filtered Cost Reports, BQE queries). |
| 221 |
"label": "A String", # Output only. The label of the link, suitable for UI rendering. |
| 222 |
"linkType": "A String", # Output only. The type of the interop link, e.g., "COST_REPORT", "BQE_QUERY", etc. |
| 223 |
"url": "A String", # Output only. The URL of the link. |
| 224 |
}, |
| 225 |
], |
| 226 |
"suggestedQueries": [ # Output only. A list of suggested follow-up queries for the user. |
| 227 |
{ # A suggested follow-up query for the user. |
| 228 |
"query": "A String", # The natural language query. |
| 229 |
}, |
| 230 |
], |
| 231 |
"summary": "A String", # Output only. The full natural language summary (re-sent for consistency). |
| 232 |
}, |
| 233 |
"rejection": { # Encapsulates details about why a request was rejected. # Output only. The request was rejected (e.g. out of scope). |
| 234 |
"displayMessage": "A String", # Output only. A user-facing message explaining the rejection. |
| 235 |
"reason": "A String", # Output only. The reason for the rejection. |
| 236 |
}, |
| 237 |
"summaryChunk": "A String", # Output only. A chunk of the natural language summary (customer-facing). The UI can append these chunks to provide a real-time "typing" effect. |
| 238 |
"thoughtChunk": "A String", # Output only. A chunk of the agent's internal reasoning process. The UI can use this to render a "Thinking..." log or status. |
| 239 |
}</pre> |
| 240 |
</div> |
| 241 |
|
| 242 |
</body></html> |