CollectorRule #
A CollectorRule is a cloud service resource filtering the raw data from the Collector. The Cloud Service resource is created after the raw data is filtered by the CollectorRule.
Package : spaceone.api.inventory_v2.v1
CollectorRule #
CollectorRule Methods:
create #
Creates a new CollectorRule. When creating the cloud service, this method can apply two types of conditions: mapping projects where the cloud service incurred to the Cloud Service, and mapping cloud service accounts to the Cloud Service. By adjusting the condition_policy parameter, the CollectorRule 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 /inventory-v2/v1/collector-rule/create
collector_id (string)
Requiredconditions_policy (ConditionsPolicy)
Requiredactions (CollectorRuleActions)
Requiredname (string)
conditions (CollectorRuleCondition)
Repeatedoptions (CollectorRuleOptions)
tags (Struct)
{
"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"},
"collector_id": "collector-2e39891cbbb5"
}collector_rule_id (string)
Requiredname (string)
Requiredrule_type (RuleType)
Requiredorder (int32)
Requiredconditions (CollectorRuleCondition)
RepeatedRequiredconditions_policy (ConditionsPolicy)
Requiredactions (CollectorRuleActions)
Requiredoptions (CollectorRuleOptions)
Requiredtags (Struct)
Requiredresource_group (ResourceGroup)
Requireddomain_id (string)
Requiredworkspace_id (string)
Requiredcollector_id (string)
Requiredcreated_at (string)
Requiredupdated_at (string)
Required
{
"collector_rule_id": "collector-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"
},
"collector_id": "collector-2e39891cbbb5",
"domain_id": "domain-58010aa2e451",
"created_at": "2022-07-19T10:13:28.335Z"
}update #
Updates a specific CollectorRule. You can make changes in CollectorRule settings, including filtering conditions.
POST /inventory-v2/v1/collector-rule/update
collector_rule_id (string)
Requiredname (string)
conditions (CollectorRuleCondition)
Repeatedconditions_policy (ConditionsPolicy)
actions (CollectorRuleActions)
options (CollectorRuleOptions)
tags (Struct)
{
"collector_rule_id": "collector-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"}
}collector_rule_id (string)
Requiredname (string)
Requiredrule_type (RuleType)
Requiredorder (int32)
Requiredconditions (CollectorRuleCondition)
RepeatedRequiredconditions_policy (ConditionsPolicy)
Requiredactions (CollectorRuleActions)
Requiredoptions (CollectorRuleOptions)
Requiredtags (Struct)
Requiredresource_group (ResourceGroup)
Requireddomain_id (string)
Requiredworkspace_id (string)
Requiredcollector_id (string)
Requiredcreated_at (string)
Requiredupdated_at (string)
Required
{
"collector_rule_id": "collector-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"
},
"collector_id": "collector-2e39891cbbb5",
"domain_id": "domain-58010aa2e451",
"created_at": "2022-07-19T10:13:28.335Z"
}change_order #
Changes the priority order of the CollectorRules to apply. If there are multiple CollectorRules applied in a specific service account, the priority order of the resources is required. This method changes the priority order to apply CollectorRules.
POST /inventory-v2/v1/collector-rule/change-order
ChangeCollectorRuleOrderRequest
collector_rule_id (string)
Requiredorder (int32)
Required
{
"collector_rule_id": "collector-rule-c8055231e212",
"order": 2
}collector_rule_id (string)
Requiredname (string)
Requiredrule_type (RuleType)
Requiredorder (int32)
Requiredconditions (CollectorRuleCondition)
RepeatedRequiredconditions_policy (ConditionsPolicy)
Requiredactions (CollectorRuleActions)
Requiredoptions (CollectorRuleOptions)
Requiredtags (Struct)
Requiredresource_group (ResourceGroup)
Requireddomain_id (string)
Requiredworkspace_id (string)
Requiredcollector_id (string)
Requiredcreated_at (string)
Requiredupdated_at (string)
Required
{
"collector_rule_id": "collector-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"
},
"collector_id": "collector-2e39891cbbb5",
"domain_id": "domain-58010aa2e451",
"created_at": "2022-07-19T10:13:28.335Z"
}delete #
Deletes a specific CollectorRule. You must specify the collector_rule_id of the CollectorRule to delete.
POST /inventory-v2/v1/collector-rule/delete
- collector_rule_id (string)
Required
{
"collector_rule_id": "collector-rule-c8055231e212",
}get #
Gets a specific CollectorRule. Prints detailed information about the CollectorRule, including conditions_policy and conditions applied to Collector.
POST /inventory-v2/v1/collector-rule/get
- collector_rule_id (string)
Required
{
"collector_rule_id": "collector-rule-c8055231e212",
}collector_rule_id (string)
Requiredname (string)
Requiredrule_type (RuleType)
Requiredorder (int32)
Requiredconditions (CollectorRuleCondition)
RepeatedRequiredconditions_policy (ConditionsPolicy)
Requiredactions (CollectorRuleActions)
Requiredoptions (CollectorRuleOptions)
Requiredtags (Struct)
Requiredresource_group (ResourceGroup)
Requireddomain_id (string)
Requiredworkspace_id (string)
Requiredcollector_id (string)
Requiredcreated_at (string)
Requiredupdated_at (string)
Required
{
"collector_rule_id": "collector-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"
},
"collector_id": "collector-2e39891cbbb5",
"domain_id": "domain-58010aa2e451",
"created_at": "2022-07-19T10:13:28.335Z"
}list #
Gets a list of all CollectorRules. You can use a query to get a filtered list of CollectorRules.
POST /inventory-v2/v1/collector-rule/list
query (Query)
collector_rule_id (string)
name (string)
rule_type (RuleType)
workspace_id (string)
collector_id (string)
{
"query": {}
}results (CollectorRuleInfo)
RepeatedRequiredtotal_count (int32)
Required
{
"results": [
{
"collector_rule_id": "collector-rule-c8055231e212",
"name": "match_service_account",
"order": 1,
"conditions_policy": "ALWAYS",
"actions": {
"match_service_account": {
"source": "account",
"target": "data.project_id"
}
},
"options": {
"stop_processing": true
},
"tags": {},
"collector_id": "collector-2e39891cbbb5",
"domain_id": "domain-58010aa2e451",
"created_at": "2022-05-25T16:01:51.858Z"
},
{
"collector_rule_id": "collector-rule-t3345231e167",
"name": "match_service_account",
"order": 1,
"conditions_policy": "ALWAYS",
"actions": {
"match_service_account": {
"source": "account",
"target": "data.account_id"
}
},
"options": {
"stop_processing": true
},
"tags": {},
"collector_id": "collector-7163022d49a1",
"domain_id": "domain-58010aa2e451",
"created_at": "2022-06-03T16:00:54.099Z"
}
],
"total_count": 2
}stat #
POST /inventory-v2/v1/collector-rule/stat
Message #
ChangeCollectorRuleOrderRequest #
collector_rule_id (string)
Requiredorder (int32)
Required
CollectorRuleActions #
change_project (string)
Requiredmatch_project (MatchRule)
Requiredmatch_service_account (MatchRule)
Requiredadd_additional_info (Struct)
Required
CollectorRuleCondition #
key (string)
Requiredvalue (string)
Requiredoperator (string)
Required
CollectorRuleInfo #
collector_rule_id (string)
Requiredname (string)
Requiredrule_type (RuleType)
Requiredorder (int32)
Requiredconditions (CollectorRuleCondition)
RepeatedRequiredconditions_policy (ConditionsPolicy)
Requiredactions (CollectorRuleActions)
Requiredoptions (CollectorRuleOptions)
Requiredtags (Struct)
Requiredresource_group (ResourceGroup)
Requireddomain_id (string)
Requiredworkspace_id (string)
Requiredcollector_id (string)
Requiredcreated_at (string)
Requiredupdated_at (string)
Required
CollectorRuleOptions #
stop_processing (bool)
Required
CollectorRuleQuery #
query (Query)
collector_rule_id (string)
name (string)
rule_type (RuleType)
workspace_id (string)
collector_id (string)
CollectorRuleRequest #
collector_rule_id (string)
Required
CollectorRuleStatQuery #
query (StatisticsQuery)
Required
CollectorRulesInfo #
results (CollectorRuleInfo)
RepeatedRequiredtotal_count (int32)
Required
CreateCollectorRuleRequest #
collector_id (string)
Requiredconditions_policy (ConditionsPolicy)
Requiredactions (CollectorRuleActions)
Requiredname (string)
conditions (CollectorRuleCondition)
Repeatedoptions (CollectorRuleOptions)
tags (Struct)
MatchRule #
source (string)
Requiredtarget (string)
Required
UpdateCollectorRuleRequest #
collector_rule_id (string)
Requiredname (string)
conditions (CollectorRuleCondition)
Repeatedconditions_policy (ConditionsPolicy)
actions (CollectorRuleActions)
options (CollectorRuleOptions)
tags (Struct)