Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
26 changes: 26 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,25 @@ message AwsExportReportOptions {
map<string, Columns> columns_by_query = 5;
}

// Request message for GetInvoiceReadiness.
message GetInvoiceReadinessRequest {
// Required. Bound from the URL path, so it cannot be empty/omitted.
// Accepted values: "aws", "gcp", "azure".
string vendor = 1;

// Required. Billing month in YYYY-MM format.
string month = 2 [(google.api.field_behavior) = REQUIRED];
}

// 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 billing readiness without triggering an export, email, or 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": "Required. Bound from the URL path, so it cannot be empty/omitted.\nAccepted values: \"aws\", \"gcp\", \"azure\".",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "month",
"description": "Required. Billing month in YYYY-MM format.",
"in": "query",
"required": true,
"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