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
113 changes: 113 additions & 0 deletions billing/v1/billing.proto
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,36 @@ service Billing {
body: "*"
};
}

// Create Exclude Service Entry
rpc CreateExcludeServiceEntry(CreateExcludeServiceEntryRequest) returns (CreateExcludeServiceEntryResponse) {
option (google.api.http) = {
post: "/v1/billinggroups/exclude-service-settings"
body: "*"
};
}

// Update Exclude Service Entry
rpc UpdateExcludeServiceEntry(UpdateExcludeServiceEntryRequest) returns (UpdateExcludeServiceEntryResponse) {
option (google.api.http) = {
put: "/v1/billinggroups/exclude-service-settings"
body: "*"
};
}

// Delete Exclude Service Entry
rpc DeleteExcludeServiceEntry(DeleteExcludeServiceEntryRequest) returns (DeleteExcludeServiceEntryResponse) {
option (google.api.http) = {
delete: "/v1/billinggroups/exclude-service-settings"
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This DELETE endpoint identifies the resource solely via query parameters. Most existing DELETEs in this API use path parameters for the resource identifier (e.g., /v1/billinggroups/child/{internalId}), which makes the target of the delete unambiguous in routing/logging and in generated clients. Consider revising the HTTP mapping to include the entry’s identifying fields in the path (or otherwise make the delete target explicit), instead of relying on optional query params.

Suggested change
delete: "/v1/billinggroups/exclude-service-settings"
delete: "/v1/billinggroups/exclude-service-settings/{internalId}"

Copilot uses AI. Check for mistakes.
};
}

// List Exclude Service Entries
rpc ListExcludeServices(ListExcludeServicesRequest) returns (ListExcludeServicesResponse) {
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ListExcludeServices / ListExcludeServicesRequest / ListExcludeServicesResponse reads like it lists cloud services, but the API is modeled around ExcludeServiceEntry and the OpenAPI summary also says “List Exclude Service Entries”. Consider renaming the RPC and request/response types to ListExcludeServiceEntries... (or similar) to match the rest of the CRUD naming (Create/Update/DeleteExcludeServiceEntry) and reduce ambiguity for API consumers.

Suggested change
rpc ListExcludeServices(ListExcludeServicesRequest) returns (ListExcludeServicesResponse) {
rpc ListExcludeServiceEntries(ListExcludeServicesRequest) returns (ListExcludeServicesResponse) {

Copilot uses AI. Check for mistakes.
option (google.api.http) = {
get: "/v1/billinggroups/exclude-service-settings"
};
}
}

message BillingGroup {
Expand Down Expand Up @@ -3367,3 +3397,86 @@ message BulkCreateBillingGroupError {
// Error message.
string message = 3;
}

message ExcludeServiceEntry {
// MSP (Managed Service Provider) ID.
string msp_id = 1;
// Cloud vendor (e.g., "aws", "gcp").
string vendor = 2;
// Payer/account ID.
string payer_id = 3;
// Cloud service name.
string service = 4;
// Product or SKU code.
string product = 5;
// List of payer IDs excepted from exclusion.
repeated string except_payer_id = 6;
Comment on lines +3401 to +3413
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The newly added messages use snake_case field names (msp_id, payer_id, except_payer_id, error_message), but the surrounding proto file consistently uses lowerCamelCase field names (e.g., billingGroupId, internalId, groupId). For consistency (and to avoid mixing styles within the same API surface), consider renaming the new fields to match the existing convention.

Copilot uses AI. Check for mistakes.
// Action performed (e.g., "added", "updated", "deleted").
string action = 7;
// Operation status (e.g., "success", "error").
string status = 8;
// Optional error message if operation failed.
string error_message = 9;
}
message CreateExcludeServiceEntryRequest {
// MSP (Managed Service Provider) ID. Partition key for the exclude service entry.
string msp_id = 1;
// Cloud vendor (e.g., "aws", "gcp").
string vendor = 2;
// Payer/account ID to exclude. Use "all" or "*" to apply to all accounts.
string payer_id = 3;
// Cloud service name (e.g., "EC2", "BigQuery").
string service = 4;
// Product or SKU code (used for GCP or detailed exclusions).
string product = 5;
// List of payer IDs to be excepted from exclusion (used when payer_id is "all").
repeated string except_payer_id = 6;
}
message CreateExcludeServiceEntryResponse {
// The created exclude service entry.
ExcludeServiceEntry entry = 1;
}
message UpdateExcludeServiceEntryRequest {
// MSP (Managed Service Provider) ID. Partition key for the exclude service entry.
string msp_id = 1;
// Cloud vendor (e.g., "aws", "gcp").
string vendor = 2;
// Payer/account ID to update. Use "all" or "*" to apply to all accounts.
string payer_id = 3;
// Cloud service name (e.g., "EC2", "BigQuery").
string service = 4;
// Product or SKU code (used for GCP or detailed exclusions).
string product = 5;
// List of payer IDs to be excepted from exclusion (used when payer_id is "all").
repeated string except_payer_id = 6;
}
message UpdateExcludeServiceEntryResponse {
// The updated exclude service entry.
ExcludeServiceEntry entry = 1;
}
message DeleteExcludeServiceEntryRequest {
// MSP (Managed Service Provider) ID. Partition key for the exclude service entry.
string msp_id = 1;
// Cloud vendor (e.g., "aws", "gcp").
string vendor = 2;
// Payer/account ID to delete. Use "all" or "*" to apply to all accounts.
string payer_id = 3;
// Cloud service name (e.g., "EC2", "BigQuery").
string service = 4;
// Product or SKU code (used for GCP or detailed exclusions).
string product = 5;
}
message DeleteExcludeServiceEntryResponse {
// The deleted exclude service entry (or just status).
ExcludeServiceEntry entry = 1;
}
message ListExcludeServicesRequest {
// MSP (Managed Service Provider) ID. Partition key for the exclude service entries.
string msp_id = 1;
// Cloud vendor (e.g., "aws", "gcp"). If empty, returns all vendors for the MSP.
string vendor = 2;
}
message ListExcludeServicesResponse {
// List of all exclude service entries for the request.
repeated ExcludeServiceEntry entries = 1;
}
Loading
Loading