Skip to content

Commit

Permalink
feat: add provider_filter to BudgetUsageInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
whdalsrnt committed Sep 12, 2023
1 parent cb9b28b commit d24dda8
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
14 changes: 14 additions & 0 deletions proto/spaceone/api/cost_analysis/v1/budget.proto
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,13 @@ message BudgetQuery {
// }
// ],
// "currency": "USD",
// "provider_filter": {
// "state": "ENABLED",
// "providers": [
// "aws",
// "google_cloud"
// ]
// },
// "time_unit": "MONTHLY",
// "start": "2022-01",
// "end": "2022-12",
Expand Down Expand Up @@ -392,6 +399,13 @@ message BudgetInfo {
// }
// ],
// "currency": "USD",
// "provider_filter": {
// "state": "ENABLED",
// "providers": [
// "aws",
// "google_cloud"
// ]
// },
// "time_unit": "MONTHLY",
// "start": "2022-01",
// "end": "2022-12",
Expand Down
42 changes: 42 additions & 0 deletions proto/spaceone/api/cost_analysis/v1/budget_usage.proto
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ service BudgetUsage {
}
}

message BudgetUsageProviderFilter {
enum State {
STATE_NONE = 0;
ENABLED = 1;
DISABLED = 2;
}

State state = 1;
repeated string providers = 2;
}

//{
// "query": {}
//}
Expand All @@ -51,13 +62,33 @@ message BudgetUsageQuery {
string domain_id = 11;
}

//{
// "budget_id": "budget-abb377eb9e8b",
// "name": "Cloudforet-Budget3",
// "date": "2022-01",
// "cost": 7671.164,
// "limit": 10000.0,
// "currency": "USD",
// "provider_filter": {
// "state": "ENABLED",
// "providers": [
// "aws",
// "google_cloud"
// ]
// },
// "project_id": "project-1b2b3b4b5b6b",
// "data_source_id": "data-source-1b2b3b4b5b6b",
// "domain_id": "domain-58010aa2e451",
// "updated_at": "2022-07-19T04:26:08.099Z"
//}
message BudgetUsageInfo {
string budget_id = 1;
string name = 2;
string date = 3;
float cost = 5;
float limit = 6;
string currency = 7;
BudgetUsageProviderFilter provider_filter = 8;
string project_id = 11;
string project_group_id = 12;
string data_source_id = 13;
Expand All @@ -74,6 +105,13 @@ message BudgetUsageInfo {
// "cost": 7671.164,
// "limit": 10000.0,
// "currency": "USD",
// "provider_filter": {
// "state": "ENABLED",
// "providers": [
// "aws",
// "google_cloud"
// ]
// },
// "project_id": "project-1b2b3b4b5b6b",
// "data_source_id": "data-source-1b2b3b4b5b6b",
// "domain_id": "domain-58010aa2e451",
Expand All @@ -86,6 +124,10 @@ message BudgetUsageInfo {
// "cost": 5931.771,
// "limit": 11000.0,
// "currency": "USD",
// "provider_filter": {
// "state": "DISABLED",
// "providers": []
// },
// "project_id": "project-1b2b3b4b5b6b",
// "data_source_id": "data-source-1b2b3b4b5b6b",
// "domain_id": "domain-58010aa2e451",
Expand Down

0 comments on commit d24dda8

Please sign in to comment.