Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions cost/v1/cost.proto
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,13 @@ service Cost {
};
}

// Synchronously checks billing readiness without triggering an export, email, or long-running operation.
rpc GetInvoiceReadiness(GetInvoiceReadinessRequest) returns (GetInvoiceReadinessResponse) {
option (google.api.http) = {
get: "/v1/{vendor}/reports/invoicereadiness"
};
}

// Get the utilization details for an organization (or MSP).
rpc GetUtilization(GetUtilizationRequest) returns (GetUtilizationResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -1905,6 +1912,26 @@ message AwsExportReportOptions {
map<string, Columns> columns_by_query = 5;
}

// Request message for GetInvoiceReadiness.
message GetInvoiceReadinessRequest {
// Optional. Cloud vendor.
// Accepted values: "aws", "gcp", "azure".
// If empty, defaults to "aws" for backward compatibility.
string vendor = 1;
Comment thread
kitkatchoco2002 marked this conversation as resolved.
Outdated

// Required. Billing month in YYYY-MM format.
string month = 2;
Comment thread
Copilot marked this conversation as resolved.
Outdated
}

// Response message for GetInvoiceReadiness.
message GetInvoiceReadinessResponse {
// True if all usage for the requested month has an invoice ID (billing is finalized).
bool ready = 1;

// Human-readable explanation when ready is false. Empty when ready is true.
string reason = 2;
}

// Request message for GetUtilization
message GetUtilizationRequest {
// Required. At the moment, only `aws` is supported.
Expand Down
53 changes: 53 additions & 0 deletions openapiv2/apidocs.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -21636,6 +21636,45 @@
]
}
},
"/v1/{vendor}/reports/invoicereadiness": {
"get": {
"summary": "Synchronously checks whether billing is finalized for a given vendor and month,\nwithout triggering an export job. Backed by the same readiness check ExportReport\nruns internally for the reserveshield report type; has no side effects (no export,\nno email, no long-running operation).",
"operationId": "Cost_GetInvoiceReadiness",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1GetInvoiceReadinessResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "vendor",
"description": "Optional. Cloud vendor.\nAccepted values: \"aws\", \"gcp\", \"azure\".\nIf empty, defaults to \"aws\" for backward compatibility.",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "month",
"description": "Required. Billing month in YYYY-MM format.",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"Cost"
]
}
},
"/v1/{vendor}/services": {
"get": {
"summary": "Lists available cloud services and their associated SKUs for a given vendor.\nUse this to retrieve service codes and names that can be referenced in exclude service settings.",
Expand Down Expand Up @@ -41945,6 +41984,20 @@
},
"description": "Response message for GetInvoiceDisplaySettings rpc."
},
"v1GetInvoiceReadinessResponse": {
"type": "object",
"properties": {
"ready": {
"type": "boolean",
"description": "True if all usage for the requested month has an invoice ID (billing is finalized)."
},
"reason": {
"type": "string",
"description": "Human-readable explanation when ready is false. Empty when ready is true."
}
},
"description": "Response message for GetInvoiceReadiness."
},
"v1GetMSPDefaultMetaResponse": {
"type": "object",
"properties": {
Expand Down
Loading