Skip to content

Commit

Permalink
feat: change cost fields
Browse files Browse the repository at this point in the history
  • Loading branch information
whdalsrnt committed Aug 31, 2023
1 parent 72874a5 commit be6d556
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 27 deletions.
23 changes: 6 additions & 17 deletions proto/spaceone/api/cost_analysis/plugin/cost.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ service Cost {
rpc get_data (GetDataRequest) returns (stream CostsInfo) {}
}

//{
//
//}
message GetDataRequest {
google.protobuf.Struct options = 1;
google.protobuf.Struct secret_data = 2;
Expand All @@ -26,26 +23,18 @@ message GetDataRequest {

message CostInfo {
float cost = 1;
string currency = 2;
float usage_quantity = 3;
float usage_quantity = 2;
string usage_unit = 3;
string provider = 4;
string region_code = 5;
string category = 6;
string product = 7;
string account = 8;
string usage_type = 9;
string resource_group = 10;
string resource = 11;
string product = 6;
string usage_type = 7;
string resource = 8;
google.protobuf.Struct tags = 12;
google.protobuf.Struct additional_info = 13;
string billed_at = 14;
float usd_cost = 15;
string usage_unit = 16;
string billed_date = 21;
}

//{
//
//}
message CostsInfo {
repeated CostInfo results = 1;
}
29 changes: 19 additions & 10 deletions proto/spaceone/api/cost_analysis/v1/cost.proto
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ message CreateCostRequest {
string project_id = 32;
string data_source_id = 33;
string domain_id = 34;
// +optional
string billed_at = 41;
string billed_date = 41;
}

//{
Expand Down Expand Up @@ -152,6 +151,12 @@ message CostQuery {
// +optional
string data_source_id = 13;
string domain_id = 14;
// +optional
string billed_year = 21;
// +optional
string billed_month = 22;
// +optional
string billed_date = 23;
}


Expand All @@ -172,8 +177,9 @@ message CostQuery {
// },
// "data_source_id": "ds-fcba92ca73b1"
// "domain_id": "domain-58010aa2e451",
// "billed_at": "2022-07-19T09:44:27.326Z",
// "created_at": "2022-07-19T09:44:27.373Z"
// "billed_year": "2022",
// "billed_month": "2022-07",
// "billed_date": "2022-07-19"
//}
message CostInfo {
string cost_id = 1;
Expand All @@ -192,8 +198,9 @@ message CostInfo {
string project_id = 32;
string data_source_id = 33;
string domain_id = 34;
string billed_at = 41;
string created_at = 42;
string billed_year = 41;
string billed_month = 42;
string billed_date = 43;
}

//{
Expand All @@ -215,8 +222,9 @@ message CostInfo {
// },
// "data_source_id": "ds-fcba92ca73b1"
// "domain_id": "domain-58010aa2e451",
// "billed_at": "2022-07-19T09:44:27.326Z",
// "created_at": "2022-07-19T09:44:27.373Z"
// "billed_year": "2022",
// "billed_month": "2022-07",
// "billed_date": "2022-07-19"
// },
// {
// "cost_id": "cost-1d5e1b0dbf82",
Expand All @@ -232,8 +240,9 @@ message CostInfo {
// "tags": {},
// "data_source_id": "ds-fcba92ca73b1",
// "domain_id": "domain-58010aa2e451",
// "billed_at": "2021-01-01T00:00:00.000Z",
// "created_at": "2022-04-06T13:49:39.675Z"
// "billed_year": "2022",
// "billed_month": "2022-07",
// "billed_date": "2022-07-20"
// }
// ],
// "total_count": 307066
Expand Down

0 comments on commit be6d556

Please sign in to comment.