blob: 7283df388936a0f1c340c083bf0057842c560293 [file] [edit]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="cloudbilling_v1beta.html">Cloud Billing API</a> . <a href="cloudbilling_v1beta.v1beta.html">v1beta</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#generateInsights">generateInsights(body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Analyzes cost data for a billing account and/or specific projects. Returns a natural language summary and supporting datasets.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>
<div class="method">
<code class="details" id="generateInsights">generateInsights(body=None, x__xgafv=None)</code>
<pre>Analyzes cost data for a billing account and/or specific projects. Returns a natural language summary and supporting datasets.
Args:
body: object, The request body.
The object takes the form of:
{ # Request for GenerateInsights.
&quot;filter&quot;: &quot;A String&quot;, # Optional. Filters cost data by service id. Follows https://google.aip.dev/160 for the filter syntax. eg. filter: &quot;service = &#x27;C7E2-9256-1C43&#x27;&quot;
&quot;overriddenMaxIterationCounts&quot;: 42, # Optional. Overrides the maximum iterations for any selected strategy.
&quot;parents&quot;: [ # Optional. The billing account or projects to analyze.
{ # Specifies a Billing data resource that can be used for authorization to access billing data.
&quot;billingAccount&quot;: &quot;A String&quot;, # Optional. If not provided the billing account currently associated with the resource will be used.
&quot;resource&quot;: &quot;A String&quot;, # Required. Resource name for an entitity that can be used for authorization to access billing data such as `projects/{project}` or `billingAccounts/{billing_account}`
},
],
&quot;prompt&quot;: &quot;A String&quot;, # Required. The natural language prompt from the user.
&quot;userContext&quot;: { # Additional context for personalization (e.g., user persona, role). # Optional. Additional context for personalization (e.g., user persona, role).
&quot;persona&quot;: &quot;A String&quot;, # Optional. The user&#x27;s persona (e.g., FinOps Manager, Developer).
&quot;role&quot;: &quot;A String&quot;, # Optional. The user&#x27;s role (e.g., Billing Admin, Project Owner, etc.).
},
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response for GenerateInsights.
&quot;finalResult&quot;: { # 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.
&quot;dataSets&quot;: [ # Output only. Data sets used to support the insights, suitable for UI rendering (tables/charts).
{ # A dataset used to support an insight, suitable for UI rendering (tables/charts).
&quot;billingData&quot;: { # Encapsulates billing data. # Output only. Actual billing data returned from the Data Mart. Uses the formal message from the Billing Data Service.
&quot;columnInfo&quot;: [ # Information about columns.
{ # Represents a column header.
&quot;column&quot;: &quot;A String&quot;, # Name of the column.
},
],
&quot;rows&quot;: [ # Rows.
{ # Represents a row in the query result.
&quot;values&quot;: [ # Values for a row in the column order.
{ # 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.
&quot;ValueProtoSwitchMustHaveADefault&quot;: True or False, # User code that switches on this oneoff enum must have a default case so builds won&#x27;t break when new fields are added.
&quot;arrayValue&quot;: { # An ordered collection of elements of arbitrary count. # An array of value
&quot;element&quot;: [ # The elements of the array.
# Object with schema name: ValueProto
],
},
&quot;bignumericValue&quot;: &quot;A String&quot;, # Encoded bignumeric value. For the encoding format see documentation for BigNumericValue::SerializeAsProtoBytes().
&quot;boolValue&quot;: True or False, # Primitive for bool.
&quot;bytesValue&quot;: &quot;A String&quot;, # Primitive for bytes.
&quot;dateValue&quot;: 42, # Primitive for date.
&quot;datetimeValue&quot;: { # A datetime value. # primitive for datetime
&quot;bitFieldDatetimeSeconds&quot;: &quot;A String&quot;, # Represents bit field encoding of year/month/day/hour/minute/second. See class DatetimeValue in civil_time.h for details of encoding.
&quot;nanos&quot;: 42, # Non-negative fractions of a second at nanosecond resolution.
},
&quot;doubleValue&quot;: 3.14, # Primitive for double.
&quot;enumValue&quot;: 42, # Tag 11 was used for specifying micros timestamps as int64, now obsolete.
&quot;floatValue&quot;: 3.14, # Primitive for float.
&quot;geographyValue&quot;: &quot;A String&quot;, # Geography encoded using ::stlib::STGeographyEncoder
&quot;int32Value&quot;: 42, # Primitive value for int32.
&quot;int64Value&quot;: &quot;A String&quot;, # Primitive for int64.
&quot;intervalValue&quot;: &quot;A String&quot;, # Encoded interval value. For the encoding format see documentation for IntervalValue::SerializeAsBytes().
&quot;jsonValue&quot;: &quot;A String&quot;, # Tag 22 was used for json value as bytes, now obsolete. Json value represented as a string document.
&quot;mapValue&quot;: { # An unordered mapping from key to value, represented as a collection of map entries. # Encoded map value. See go/googlesql_map.
&quot;entry&quot;: [ # Represents the map entries in the map.
{ # A single entry in a Map, representing the mapping between `key` and `value`.
&quot;key&quot;: # Object with schema name: ValueProto # Represents the serialized map key for the entry.
&quot;value&quot;: # Object with schema name: ValueProto # Represents the serialized map value of the entry.
},
],
},
&quot;numericValue&quot;: &quot;A String&quot;, # Encoded numeric value. For the encoding format see documentation for NumericValue::SerializeAsProtoBytes().
&quot;protoValue&quot;: &quot;A String&quot;, # Stores a serialized protocol message.
&quot;rangeValue&quot;: { # A range of values, bounded by the values &#x27;start&#x27; (inclusive) and &#x27;end&#x27; (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 &#x27;start&#x27; and ending before &#x27;end&#x27;. A &quot;null&quot; 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.
&quot;end&quot;: # Object with schema name: ValueProto # Represents the end of the range.
&quot;start&quot;: # Object with schema name: ValueProto # Represents the start of the range.
},
&quot;stringValue&quot;: &quot;A String&quot;, # Primitive for string.
&quot;structValue&quot;: { # 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
&quot;field&quot;: [ # The fields in the struct
# Object with schema name: ValueProto
],
},
&quot;timeValue&quot;: &quot;A String&quot;, # Bit field encoding of hour/minute/second/nanos. See TimeValue class for details.
&quot;timestampPicoValue&quot;: &quot;A String&quot;, # Encoded timestamp_pico value. For the encoding format see documentation for googlesql::TimestampPico::SerializeAsBytes().
&quot;timestampValue&quot;: &quot;A String&quot;, # primitive for timestamp
&quot;tokenlistValue&quot;: &quot;A String&quot;, # Encoded tokenlist value. copybara:strip_begin(internal-comment) See //search/tokens:token_list. copybara:strip_end
&quot;uint32Value&quot;: 42, # Primitive for uint32.
&quot;uint64Value&quot;: &quot;A String&quot;, # Primitive for uint64.
&quot;uuidValue&quot;: &quot;A String&quot;, # Encoded uuid value. For the encoding format see documentation for UuidValue::SerializeAsBytes().
},
],
},
],
},
&quot;queryInfo&quot;: { # 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.
&quot;columns&quot;: &quot;A String&quot;, # The columns queried.
&quot;filter&quot;: &quot;A String&quot;, # The filter applied to the query.
&quot;groupBy&quot;: &quot;A String&quot;, # The group-by clause applied to the query.
&quot;limit&quot;: 42, # The row limit applied to the query.
&quot;orderBy&quot;: &quot;A String&quot;, # The order-by clause applied to the query.
&quot;parents&quot;: [ # The parents (e.g. projects, billing accounts) queried.
&quot;A String&quot;,
],
&quot;view&quot;: &quot;A String&quot;, # The view queried.
},
&quot;suggestedChart&quot;: { # A suggested chart for the data set, used for UI rendering. # Output only. A suggested chart for the data set, used for UI rendering.
&quot;chartTitle&quot;: &quot;A String&quot;, # The title of the chart.
&quot;chartType&quot;: &quot;A String&quot;, # The type of the chart.
&quot;seriesField&quot;: &quot;A String&quot;, # The field used for the series (e.g., color-coding). Optional, but recommended for time-series data.
&quot;xAxisField&quot;: &quot;A String&quot;, # The field used for the x-axis.
&quot;xAxisLabel&quot;: &quot;A String&quot;, # The label of the x-axis.
&quot;yAxisField&quot;: &quot;A String&quot;, # The field used for the y-axis.
&quot;yAxisLabel&quot;: &quot;A String&quot;, # The label of the y-axis.
},
},
],
&quot;fullAnalysis&quot;: &quot;A String&quot;, # Output only. Contains the full natural language analysis, including thoughts, reasoning, and references.
&quot;insights&quot;: [ # Output only. A list of discrete insights gleaned from the data.
{ # e.g. insight: title: &quot;Cost Increase (The Explanation)&quot; description: &quot;Your cost increase was driven by Vertex AI Online Prediction in us-central1...&quot; severity: INFO
&quot;description&quot;: &quot;A String&quot;, # Output only. The description of the insight.
&quot;severity&quot;: &quot;A String&quot;, # Output only. The severity of the insight, used for UI rendering (e.g., color-coding).
&quot;title&quot;: &quot;A String&quot;, # Output only. The title of the insight.
},
],
&quot;interopLinks&quot;: [ # Output only. Links to interoperable tools (e.g., pre-filtered Cost Reports or BQE queries).
{ # A link to interoperable tools (e.g., pre-filtered Cost Reports, BQE queries).
&quot;label&quot;: &quot;A String&quot;, # Output only. The label of the link, suitable for UI rendering.
&quot;linkType&quot;: &quot;A String&quot;, # Output only. The type of the interop link, e.g., &quot;COST_REPORT&quot;, &quot;BQE_QUERY&quot;, etc.
&quot;url&quot;: &quot;A String&quot;, # Output only. The URL of the link.
},
],
&quot;suggestedQueries&quot;: [ # Output only. A list of suggested follow-up queries for the user.
{ # A suggested follow-up query for the user.
&quot;query&quot;: &quot;A String&quot;, # The natural language query.
},
],
&quot;summary&quot;: &quot;A String&quot;, # Output only. The full natural language summary (re-sent for consistency).
},
&quot;rejection&quot;: { # Encapsulates details about why a request was rejected. # Output only. The request was rejected (e.g. out of scope).
&quot;displayMessage&quot;: &quot;A String&quot;, # Output only. A user-facing message explaining the rejection.
&quot;reason&quot;: &quot;A String&quot;, # Output only. The reason for the rejection.
},
&quot;summaryChunk&quot;: &quot;A String&quot;, # Output only. A chunk of the natural language summary (customer-facing). The UI can append these chunks to provide a real-time &quot;typing&quot; effect.
&quot;thoughtChunk&quot;: &quot;A String&quot;, # Output only. A chunk of the agent&#x27;s internal reasoning process. The UI can use this to render a &quot;Thinking...&quot; log or status.
}</pre>
</div>
</body></html>