DataSourceRule #
A DataSourceRule is a resource filtering the raw data from the DataSource. The Cost resource is created after the raw data is filtered by the DataSourceRule.
Package : spaceone.api.cost_analysis.v1
DataSourceRule #
DataSourceRule Methods:
create #
Creates a new DataSourceRule. When creating the resource, this method can apply two types of conditions: mapping projects where the cost incurred to the Cost, and mapping cloud service accounts to the Cost. By adjusting the condition_policy parameter, the DataSourceRule can be applied when all conditions are met, applied when any of the conditions are met, or always applied regardless of whether the conditions are met.
POST /cost-analysis/v1/data-source-rule/create
data_source_id (string)
Requiredconditions_policy (ConditionsPolicy)
Requiredactions (DataSourceRuleActions)
Requiredresource_group (ResourceGroup)
Requiredworkspace_id (string)
Requiredname (string)
conditions (DataSourceRuleCondition)
Repeatedoptions (DataSourceRuleOptions)
tags (Struct)
{
"data_source_id": "ds-c96609f5afeb",
"name": "match_service_account_test",
"conditions_policy": "ALWAYS",
"actions": {
"match_service_account": {"source": "account", "target": "data.project_id"}
},
"options": {"stop_processing": true},
"tags": {"b": "c", "a": "b"}
}data_source_rule_id (string)
Requiredname (string)
Requiredrule_type (RuleType)
Requiredorder (int32)
Requiredconditions (DataSourceRuleCondition)
RepeatedRequiredconditions_policy (ConditionsPolicy)
Requiredactions (DataSourceRuleActions)
Requiredoptions (DataSourceRuleOptions)
Requiredtags (Struct)
Requiredresource_group (ResourceGroup)
Requireddomain_id (string)
Requiredworkspace_id (string)
Requireddata_source_id (string)
Requiredcreated_at (string)
Required
{
"data_source_rule_id": "rule-c8055231e212",
"name": "match_service_account_test",
"order": 2,
"conditions_policy": "ALWAYS",
"actions": {
"match_service_account": {
"source": "account",
"target": "data.project_id"
}
},
"options": {
"stop_processing": true
},
"tags": {
"a": "b",
"b": "c"
},
"data_source_id": "ds-c96609f5afeb",
"domain_id": "domain-58010aa2e451",
"created_at": "2022-07-19T10:13:28.335Z"
}update #
Updates a specific DataSourceRule. You can make changes in DataSourceRule settings, including filtering conditions. If the parameter is_default is true, only Admin type User can use this method.
POST /cost-analysis/v1/data-source-rule/update
data_source_rule_id (string)
Requiredname (string)
conditions (DataSourceRuleCondition)
Repeatedconditions_policy (ConditionsPolicy)
actions (DataSourceRuleActions)
options (DataSourceRuleOptions)
tags (Struct)
{
"data_source_rule_id": "rule-c8055231e212",
"name": "match_service_account_test",
"conditions_policy": "ALWAYS",
"actions": {
"match_service_account": {
"source": "account",
"target": "data.project_id"
}
},
"options": {
"stop_processing": true
},
"tags": {"b": "c", "a": "b"}
}data_source_rule_id (string)
Requiredname (string)
Requiredrule_type (RuleType)
Requiredorder (int32)
Requiredconditions (DataSourceRuleCondition)
RepeatedRequiredconditions_policy (ConditionsPolicy)
Requiredactions (DataSourceRuleActions)
Requiredoptions (DataSourceRuleOptions)
Requiredtags (Struct)
Requiredresource_group (ResourceGroup)
Requireddomain_id (string)
Requiredworkspace_id (string)
Requireddata_source_id (string)
Requiredcreated_at (string)
Required
{
"data_source_rule_id": "rule-c8055231e212",
"name": "match_service_account_test",
"order": 2,
"conditions_policy": "ALWAYS",
"actions": {
"match_service_account": {
"source": "account",
"target": "data.project_id"
}
},
"options": {
"stop_processing": true
},
"tags": {
"a": "b",
"b": "c"
},
"data_source_id": "ds-c96609f5afeb",
"domain_id": "domain-58010aa2e451",
"created_at": "2022-07-19T10:13:28.335Z"
}change_order #
Changes the priority order of the DataSourceRules to apply. If there are multiple DataSourceRules applied in a specific service account, the priority order of the resources is requried. This method changes the priority order to apply DataSourceRules.
POST /cost-analysis/v1/data-source-rule/change-order
ChangeDataSourceRuleOrderRequest
data_source_rule_id (string)
Requiredorder (int32)
Required
{
"data_source_rule_id": "rule-c8055231e212",
"order": 2
}data_source_rule_id (string)
Requiredname (string)
Requiredrule_type (RuleType)
Requiredorder (int32)
Requiredconditions (DataSourceRuleCondition)
RepeatedRequiredconditions_policy (ConditionsPolicy)
Requiredactions (DataSourceRuleActions)
Requiredoptions (DataSourceRuleOptions)
Requiredtags (Struct)
Requiredresource_group (ResourceGroup)
Requireddomain_id (string)
Requiredworkspace_id (string)
Requireddata_source_id (string)
Requiredcreated_at (string)
Required
{
"data_source_rule_id": "rule-c8055231e212",
"name": "match_service_account_test",
"order": 2,
"conditions_policy": "ALWAYS",
"actions": {
"match_service_account": {
"source": "account",
"target": "data.project_id"
}
},
"options": {
"stop_processing": true
},
"tags": {
"a": "b",
"b": "c"
},
"data_source_id": "ds-c96609f5afeb",
"domain_id": "domain-58010aa2e451",
"created_at": "2022-07-19T10:13:28.335Z"
}delete #
Deletes a specific DataSourceRule. You must specify the data_source_rule_id of the DataSourceRule to delete. If the parameter is_default is true, only Admin type User can use this method.
POST /cost-analysis/v1/data-source-rule/delete
- data_source_rule_id (string)
Required
{
"data_source_rule_id": "rule-22fab02f6b51"
}get #
Gets a specific DataSourceRule. Prints detailed information about the DataSourceRule, including conditions_policy and conditions applied to DataSources.
POST /cost-analysis/v1/data-source-rule/get
- data_source_rule_id (string)
Required
{
"data_source_rule_id": "rule-22fab02f6b51"
}data_source_rule_id (string)
Requiredname (string)
Requiredrule_type (RuleType)
Requiredorder (int32)
Requiredconditions (DataSourceRuleCondition)
RepeatedRequiredconditions_policy (ConditionsPolicy)
Requiredactions (DataSourceRuleActions)
Requiredoptions (DataSourceRuleOptions)
Requiredtags (Struct)
Requiredresource_group (ResourceGroup)
Requireddomain_id (string)
Requiredworkspace_id (string)
Requireddata_source_id (string)
Requiredcreated_at (string)
Required
{
"data_source_rule_id": "rule-c8055231e212",
"name": "match_service_account_test",
"order": 2,
"conditions_policy": "ALWAYS",
"actions": {
"match_service_account": {
"source": "account",
"target": "data.project_id"
}
},
"options": {
"stop_processing": true
},
"tags": {
"a": "b",
"b": "c"
},
"data_source_id": "ds-c96609f5afeb",
"domain_id": "domain-58010aa2e451",
"created_at": "2022-07-19T10:13:28.335Z"
}list #
Gets a list of all DataSourceRules. You can use a query to get a filtered list of DataSourceRules.
POST /cost-analysis/v1/data-source-rule/list
query (Query)
data_source_rule_id (string)
name (string)
rule_type (RuleType)
workspace_id (string)
data_source_id (string)
{
"query": {}
}results (DataSourceRuleInfo)
RepeatedRequiredtotal_count (int32)
Required
{
"results": [
{
"data_source_rule_id": "rule-22fab02f6b51",
"name": "match_service_account",
"order": 1,
"conditions_policy": "ALWAYS",
"actions": {
"match_service_account": {
"source": "account",
"target": "data.project_id"
}
},
"options": {
"stop_processing": true
},
"tags": {},
"data_source_id": "ds-c96609f5afeb",
"domain_id": "domain-58010aa2e451",
"created_at": "2022-05-25T16:01:51.858Z"
},
{
"data_source_rule_id": "rule-188d366e9817",
"name": "match_service_account",
"order": 1,
"conditions_policy": "ALWAYS",
"actions": {
"match_service_account": {
"source": "account",
"target": "data.account_id"
}
},
"options": {
"stop_processing": true
},
"tags": {},
"data_source_id": "ds-fcba92ca73b1",
"domain_id": "domain-58010aa2e451",
"created_at": "2022-06-03T16:00:54.099Z"
}
],
"total_count": 2
}stat #
POST /cost-analysis/v1/data-source-rule/stat
Message #
ChangeDataSourceRuleOrderRequest #
data_source_rule_id (string)
Requiredorder (int32)
Required
CreateDataSourceRuleRequest #
data_source_id (string)
Requiredconditions_policy (ConditionsPolicy)
Requiredactions (DataSourceRuleActions)
Requiredresource_group (ResourceGroup)
Requiredworkspace_id (string)
Requiredname (string)
conditions (DataSourceRuleCondition)
Repeatedoptions (DataSourceRuleOptions)
tags (Struct)
DataSourceRuleActions #
match_service_account (MatchRule)
Requiredmatch_project (MatchRule)
Requiredchange_project (string)
Requiredmatch_workspace (MatchRule)
Requiredadd_additional_info (Struct)
Required
DataSourceRuleCondition #
key (string)
Requiredvalue (string)
Requiredoperator (string)
Required
DataSourceRuleInfo #
data_source_rule_id (string)
Requiredname (string)
Requiredrule_type (RuleType)
Requiredorder (int32)
Requiredconditions (DataSourceRuleCondition)
RepeatedRequiredconditions_policy (ConditionsPolicy)
Requiredactions (DataSourceRuleActions)
Requiredoptions (DataSourceRuleOptions)
Requiredtags (Struct)
Requiredresource_group (ResourceGroup)
Requireddomain_id (string)
Requiredworkspace_id (string)
Requireddata_source_id (string)
Requiredcreated_at (string)
Required
DataSourceRuleOptions #
stop_processing (bool)
Required
DataSourceRuleQuery #
query (Query)
data_source_rule_id (string)
name (string)
rule_type (RuleType)
workspace_id (string)
data_source_id (string)
DataSourceRuleRequest #
data_source_rule_id (string)
Required
DataSourceRuleStatQuery #
query (StatisticsQuery)
Required
DataSourceRulesInfo #
results (DataSourceRuleInfo)
RepeatedRequiredtotal_count (int32)
Required
MatchRule #
source (string)
Requiredtarget (string)
Requiredall_workspaces (bool)
Required
UpdateDataSourceRuleRequest #
data_source_rule_id (string)
Requiredname (string)
conditions (DataSourceRuleCondition)
Repeatedconditions_policy (ConditionsPolicy)
actions (DataSourceRuleActions)
options (DataSourceRuleOptions)
tags (Struct)