-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: ImMin5 <[email protected]>
- Loading branch information
Showing
3 changed files
with
129 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
111 changes: 111 additions & 0 deletions
111
proto/spaceone/api/cost_analysis/v1/data_source_account.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
// A DataSourceAccount is a resource that for routing cost data from a specific account to a workspace, project, service account. | ||
syntax = "proto3"; | ||
|
||
package spaceone.api.cost_analysis.v1; | ||
|
||
option go_package = "github.com/cloudforet-io/api/dist/go/spaceone/api/cost_analysis/v1"; | ||
|
||
import "google/protobuf/empty.proto"; | ||
import "google/protobuf/struct.proto"; | ||
import "google/api/annotations.proto"; | ||
import "spaceone/api/core/v2/query.proto"; | ||
|
||
|
||
service DataSourceAccount { | ||
// Update a DataSourceAccount with the specified DataSourceAccount ID related to the DataSource. | ||
rpc update (UpdateDataSourceAccountRequest) returns (DataSourceAccountInfo) { | ||
option (google.api.http) = { | ||
post: "/cost-analysis/v1/data-source-account/update" | ||
body: "*" | ||
}; | ||
} | ||
|
||
rpc reset (ResetDataSourceAccountRequest) returns (DataSourceAccountsInfo) { | ||
option (google.api.http) = { | ||
post: "/cost-analysis/v1/data-source-account/reset" | ||
body: "*" | ||
}; | ||
} | ||
|
||
// Get a DataSourceAccount with the specified DataSourceAccount ID related to the DataSource. | ||
rpc get (DataSourceAccountRequest) returns (DataSourceAccountInfo) { | ||
option (google.api.http) = { | ||
post: "/cost-analysis/v1/data-source-account/get" | ||
body: "*" | ||
}; | ||
} | ||
|
||
rpc list (DataSourceAccountQuery) returns (DataSourceAccountsInfo) { | ||
option (google.api.http) = { | ||
post: "/cost-analysis/v1/data-source-account/list" | ||
body: "*" | ||
}; | ||
} | ||
|
||
rpc stat (DataSourceAccountStatQuery) returns (google.protobuf.Struct) { | ||
option (google.api.http) = { | ||
post: "/cost-analysis/v1/data-source-account/stat" | ||
body: "*" | ||
}; | ||
} | ||
} | ||
|
||
message UpdateDataSourceAccountRequest{ | ||
string data_source_id = 1; | ||
// account_id is the unique identifier of each CSP account.(e.g. Azure Tenant ID) | ||
string account_id = 2; | ||
// +optional | ||
string workspace_id = 21; | ||
// +optional | ||
string project_id = 22; | ||
// +optional | ||
string service_account_id = 23; | ||
} | ||
|
||
message ResetDataSourceAccountRequest { | ||
string data_source_account_id = 1; | ||
} | ||
|
||
message DataSourceAccountRequest { | ||
string data_source_account_id = 1; | ||
string account_id = 2; | ||
} | ||
|
||
|
||
message DataSourceAccountQuery { | ||
// +optional | ||
spaceone.api.core.v2.Query query = 1; | ||
// +optional | ||
string data_source_id = 2; | ||
// +optional | ||
string account_id = 3; | ||
// +optional | ||
string workspace_id = 21; | ||
// +optional | ||
string project_id = 22; | ||
// +optional | ||
string service_account_id = 23; | ||
} | ||
|
||
message DataSourceAccountInfo { | ||
string account_id = 1; | ||
string data_source_id = 2; | ||
string name = 3; | ||
bool is_sync = 4; | ||
string domain_id = 21; | ||
string workspace_id = 22; | ||
string project_id = 23; | ||
string service_account_id = 24; | ||
string created_at = 31; | ||
string updated_at = 32; | ||
} | ||
|
||
message DataSourceAccountsInfo { | ||
repeated DataSourceAccountInfo results = 1; | ||
int32 total_count = 2; | ||
|
||
} | ||
|
||
message DataSourceAccountStatQuery { | ||
spaceone.api.core.v2.StatisticsQuery query = 1; | ||
} |