diff --git a/billing/v1/billing.proto b/billing/v1/billing.proto index ff6e5993..9f8cee92 100644 --- a/billing/v1/billing.proto +++ b/billing/v1/billing.proto @@ -1074,6 +1074,14 @@ service Billing { }; } + // Lists available cloud services and their associated SKUs for a given vendor. + // Use this to retrieve service codes and names that can be referenced in exclude service settings. + rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { + option (google.api.http) = { + get: "/v1/{vendor}/services" + }; + } + // Link accounts to a billing group in bulk from a CSV file. // Returns a long-running operation. Poll status via the Operations service (GET /ops/v1/{name}). rpc BulkLinkAccount(BulkLinkAccountRequest) returns (protos.Operation) { @@ -3677,6 +3685,37 @@ message ListExcludeServicesResponse { repeated ExcludeServiceEntry entries = 1; } +// Represents a single service with its associated names and SKUs. +message ServiceItem { + // Service ID. + string id = 1; + + // Service code. + string code = 2; + + // List of display names for this service. + repeated string names = 3; + + // List of SKU codes under this service. + repeated string skus = 4; +} + +message ListServicesRequest { + // Required. Cloud vendor (e.g., "gcp"). Bound from the URL path. + string vendor = 1; + + // Optional. Service code to filter by. + // Example values: "6F81-5844-456A" (Cloud Storage), "95FF-2EF5-5EA1" (Compute Engine), + // "152E-C115-5142" (Cloud SQL). + // Use ListServices without this field to retrieve all available service codes. + string code = 2; +} + +message ListServicesResponse { + // List of services. + repeated ServiceItem data = 1; +} + message BulkLinkAccountRequest { // Required. The cloud vendor for all accounts in this CSV. // Must be one of: aws, azure, gcp. diff --git a/openapiv2/apidocs.swagger.json b/openapiv2/apidocs.swagger.json index 9d4ed4df..6c2ae448 100644 --- a/openapiv2/apidocs.swagger.json +++ b/openapiv2/apidocs.swagger.json @@ -22148,6 +22148,45 @@ ] } }, + "/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.", + "operationId": "Billing_ListServices", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListServicesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "vendor", + "description": "Required. Cloud vendor (e.g., \"gcp\"). Bound from the URL path.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "code", + "description": "Optional. Service code to filter by.\nExample values: \"6F81-5844-456A\" (Cloud Storage), \"95FF-2EF5-5EA1\" (Compute Engine),\n\"152E-C115-5142\" (Cloud SQL).\nUse ListServices without this field to retrieve all available service codes.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Billing" + ] + } + }, "/v1/{vendor}/services/{costGroupId}": { "get": { "summary": "Get list of supported services", @@ -45635,6 +45674,19 @@ }, "description": "Response message for the Iam.ListRoles rpc." }, + "v1ListServicesResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ServiceItem" + }, + "description": "List of services." + } + } + }, "v1ListSharedResourcesResponse": { "type": "object", "properties": { @@ -47950,6 +48002,34 @@ }, "description": "ServiceDiscountsExport resource definition." }, + "v1ServiceItem": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Service ID." + }, + "code": { + "type": "string", + "description": "Service code." + }, + "names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of display names for this service." + }, + "skus": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of SKU codes under this service." + } + }, + "description": "Represents a single service with its associated names and SKUs." + }, "v1ServiceSummary": { "type": "object", "properties": {