Collector #
A Collector is a plugin instance collecting cloud resources. A Collector can collect the resource data manually or by a pre-set schedule.
Package : spaceone.api.inventory_v2.v1
Collector #
Collector Methods:
create #
Creates a new Collector with information of the plugin to use. Information of the plugin includes version
, provider
, and upgrade_mode
.
POST /inventory-v2/v1/collector/create
name (string)
Required
plugin_info (PluginInfo)
Required
resource_group (ResourceGroup)
Required
schedule (Scheduled)
provider (string)
secret_filter (SecretFilter)
tags (Struct)
workspace_id (string)
{
"name": "AWS Collector",
"plugin_info": {
"plugin_id": "plugin-30d21ef75a5d",
"version": "1.13.13",
"options": {},
"metadata": {
"filter_format": [],
"supported_schedules": [
"hours"
],
"supported_resource_type": [
"inventory.CloudService",
"inventory.CloudServiceType",
"inventory.Region"
],
"supported_features": [
"garbage_collection"
]
},
"upgrade_mode": "AUTO"
},
"schedule": {
"state": "ENABLED",
"hours": [0, 6, 12, 18]
},
"secret_filter": {
"state": "ENABLED",
"secrets": ["secret-xxx", "secret-yyy"],
"service_accounts": ["sa-xxx", "sa-yyy"],
"schemas": ["schema-xxx", "schema-yyy"]
},
"tags": {
"type": "test"
},
}
collector_id (string)
Required
name (string)
Required
provider (string)
Required
secret_filter (SecretFilter)
Required
plugin_info (PluginInfo)
Required
schedule (Scheduled)
Required
tags (Struct)
Required
resource_group (ResourceGroup)
Required
domain_id (string)
Required
workspace_id (string)
Required
created_at (string)
Required
updated_at (string)
Required
last_collected_at (string)
Required
{
"collector_id": "collector-2c0847644f39",
"name": "AWS Collector",
"plugin_info": {
"plugin_id": "plugin-30d21ef75a5d",
"version": "1.13.13",
"options": {},
"metadata": {
"supported_schedules": [
"hours"
],
"supported_resource_type": [
"inventory.CloudService",
"inventory.CloudServiceType",
"inventory.Region"
],
"filter_format": [],
"supported_features": [
"garbage_collection"
]
},
"upgrade_mode": "AUTO"
},
"tags": {
"type": "test"
},
"created_at": "2022-06-17T06:33:27.195Z",
"domain_id": "domain-58010aa2e451",
"provider": "aws",
"schedule": {
"state": "ENABLED",
"hours": [0, 6, 12, 18]
},
"secret_filter": {
"state": "ENABLED",
"secrets": ["secret-xxx", "secret-yyy"],
"service_accounts": ["sa-xxx", "sa-yyy"],
"schemas": ["schema-xxx", "schema-yyy"]
},
"last_collected_at": "2022-06-17T06:33:27.195Z"
}
update #
Updates a specific Collector. You can make changes in Collector settings, including name
and tags
.
POST /inventory-v2/v1/collector/update
collector_id (string)
Required
name (string)
schedule (Scheduled)
secret_filter (SecretFilter)
tags (Struct)
{
"collector_id": "collector-2c0847644f39",
"name": "New AWS Collector",
"plugin_info": {
"plugin_id": "plugin-30d21ef75a5d",
"version": "1.14.0",
"provider": "aws",
"upgrade_mode": "MANUAL"
},
"schedule": {
"state": "ENABLED",
"hours": [0, 6, 12, 18]
},
"secret_filter": {
"state": "ENABLED",
"secrets": ["secret-xxx", "secret-yyy"],
"service_accounts": ["sa-xxx", "sa-yyy"],
"schemas": ["schema-xxx", "schema-yyy"]
},
"tags": {
"a": "b"
}
}
collector_id (string)
Required
name (string)
Required
provider (string)
Required
secret_filter (SecretFilter)
Required
plugin_info (PluginInfo)
Required
schedule (Scheduled)
Required
tags (Struct)
Required
resource_group (ResourceGroup)
Required
domain_id (string)
Required
workspace_id (string)
Required
created_at (string)
Required
updated_at (string)
Required
last_collected_at (string)
Required
{
"collector_id": "collector-2c0847644f39",
"name": "AWS Collector",
"plugin_info": {
"plugin_id": "plugin-30d21ef75a5d",
"version": "1.13.13",
"options": {},
"metadata": {
"supported_schedules": [
"hours"
],
"supported_resource_type": [
"inventory.CloudService",
"inventory.CloudServiceType",
"inventory.Region"
],
"filter_format": [],
"supported_features": [
"garbage_collection"
]
},
"upgrade_mode": "AUTO"
},
"tags": {
"type": "test"
},
"created_at": "2022-06-17T06:33:27.195Z",
"domain_id": "domain-58010aa2e451",
"provider": "aws",
"schedule": {
"state": "ENABLED",
"hours": [0, 6, 12, 18]
},
"secret_filter": {
"state": "ENABLED",
"secrets": ["secret-xxx", "secret-yyy"],
"service_accounts": ["sa-xxx", "sa-yyy"],
"schemas": ["schema-xxx", "schema-yyy"]
},
"last_collected_at": "2022-06-17T06:33:27.195Z"
}
update_plugin #
Updates the plugin of a specific Collector. This method resets the plugin data in the Collector to update the metadata
.
POST /inventory-v2/v1/collector/update-plugin
collector_id (string)
Required
name (string)
Required
provider (string)
Required
secret_filter (SecretFilter)
Required
plugin_info (PluginInfo)
Required
schedule (Scheduled)
Required
tags (Struct)
Required
resource_group (ResourceGroup)
Required
domain_id (string)
Required
workspace_id (string)
Required
created_at (string)
Required
updated_at (string)
Required
last_collected_at (string)
Required
{
"collector_id": "collector-2c0847644f39",
"name": "AWS Collector",
"plugin_info": {
"plugin_id": "plugin-30d21ef75a5d",
"version": "1.13.13",
"options": {},
"metadata": {
"supported_schedules": [
"hours"
],
"supported_resource_type": [
"inventory.CloudService",
"inventory.CloudServiceType",
"inventory.Region"
],
"filter_format": [],
"supported_features": [
"garbage_collection"
]
},
"upgrade_mode": "AUTO"
},
"tags": {
"type": "test"
},
"created_at": "2022-06-17T06:33:27.195Z",
"domain_id": "domain-58010aa2e451",
"provider": "aws",
"schedule": {
"state": "ENABLED",
"hours": [0, 6, 12, 18]
},
"secret_filter": {
"state": "ENABLED",
"secrets": ["secret-xxx", "secret-yyy"],
"service_accounts": ["sa-xxx", "sa-yyy"],
"schemas": ["schema-xxx", "schema-yyy"]
},
"last_collected_at": "2022-06-17T06:33:27.195Z"
}
verify_plugin #
Verifies the plugin of a specific Collector. This method validates the plugin data, version
and endpoint
.
POST /inventory-v2/v1/collector/verify-plugin
delete #
Deletes a specific Collector. You must specify the collector_id
of the Collector to delete.
POST /inventory-v2/v1/collector/delete
get #
Gets a specific Collector. Prints detailed information about the Collector, including its state, basic information, and the plugin information used for cloud resource collection.
POST /inventory-v2/v1/collector/get
collector_id (string)
Required
name (string)
Required
provider (string)
Required
secret_filter (SecretFilter)
Required
plugin_info (PluginInfo)
Required
schedule (Scheduled)
Required
tags (Struct)
Required
resource_group (ResourceGroup)
Required
domain_id (string)
Required
workspace_id (string)
Required
created_at (string)
Required
updated_at (string)
Required
last_collected_at (string)
Required
{
"collector_id": "collector-2c0847644f39",
"name": "AWS Collector",
"plugin_info": {
"plugin_id": "plugin-30d21ef75a5d",
"version": "1.13.13",
"options": {},
"metadata": {
"supported_schedules": [
"hours"
],
"supported_resource_type": [
"inventory.CloudService",
"inventory.CloudServiceType",
"inventory.Region"
],
"filter_format": [],
"supported_features": [
"garbage_collection"
]
},
"upgrade_mode": "AUTO"
},
"tags": {
"type": "test"
},
"created_at": "2022-06-17T06:33:27.195Z",
"domain_id": "domain-58010aa2e451",
"provider": "aws",
"schedule": {
"state": "ENABLED",
"hours": [0, 6, 12, 18]
},
"secret_filter": {
"state": "ENABLED",
"secrets": ["secret-xxx", "secret-yyy"],
"service_accounts": ["sa-xxx", "sa-yyy"],
"schemas": ["schema-xxx", "schema-yyy"]
},
"last_collected_at": "2022-06-17T06:33:27.195Z"
}
list #
Gets a list of all Collectors. You can use a query to get a filtered list of Collectors.
POST /inventory-v2/v1/collector/list
query (Query)
Required
collector_id (string)
Required
name (string)
Required
secret_filter_state (State)
Required
schedule_state (State)
Required
workspace_id (string)
Required
plugin_id (string)
Required
{
"query": {}
}
results (CollectorInfo)
Repeated
Required
total_count (int32)
Required
{
"results": [
{
"collector_id": "collector-2c0847644f39",
"name": "AWS Collector",
"plugin_info": {
"plugin_id": "plugin-30d21ef75a5d",
"version": "1.13.13",
"options": {},
"metadata": {
"supported_schedules": [
"hours"
],
"supported_resource_type": [
"inventory.CloudService",
"inventory.CloudServiceType",
"inventory.Region"
],
"filter_format": [],
"supported_features": [
"garbage_collection"
]
},
"upgrade_mode": "AUTO"
},
"tags": {
"type": "test"
},
"created_at": "2022-06-17T06:33:27.195Z",
"domain_id": "domain-58010aa2e451",
"provider": "aws",
"schedule": {
"state": "ENABLED",
"hours": [0, 6, 12, 18]
},
"secret_filter": {
"state": "ENABLED",
"secrets": ["secret-xxx", "secret-yyy"],
"service_accounts": ["sa-xxx", "sa-yyy"],
"schemas": ["schema-xxx", "schema-yyy"]
},
"last_collected_at": "2022-06-17T06:33:27.195Z"
},
{
"collector_id": "collector-2c0847644f39",
"name": "AWS Collector",
"plugin_info": {
"plugin_id": "plugin-30d21ef75a5d",
"version": "1.13.13",
"options": {},
"metadata": {
"supported_schedules": [
"hours"
],
"supported_resource_type": [
"inventory.CloudService",
"inventory.CloudServiceType",
"inventory.Region"
],
"filter_format": [],
"supported_features": [
"garbage_collection"
]
},
"upgrade_mode": "AUTO"
},
"tags": {
"type": "test"
},
"created_at": "2022-06-17T06:33:27.195Z",
"domain_id": "domain-58010aa2e451",
"provider": "aws",
"schedule": {
"state": "ENABLED",
"hours": [0, 6, 12, 18]
},
"secret_filter": {
"state": "ENABLED",
"secrets": ["secret-xxx", "secret-yyy"],
"service_accounts": ["sa-xxx", "sa-yyy"],
"schemas": ["schema-xxx", "schema-yyy"]
},
"last_collected_at": "2022-06-17T06:33:27.195Z"
}
],
"total_count": 2
}
stat #
POST /inventory-v2/v1/collector/stat
collect #
POST /inventory-v2/v1/collector/collect
Message #
CollectRequest #
collector_id (string)
Required
secret_id (string)
CollectorInfo #
collector_id (string)
Required
name (string)
Required
provider (string)
Required
secret_filter (SecretFilter)
Required
plugin_info (PluginInfo)
Required
schedule (Scheduled)
Required
tags (Struct)
Required
resource_group (ResourceGroup)
Required
domain_id (string)
Required
workspace_id (string)
Required
created_at (string)
Required
updated_at (string)
Required
last_collected_at (string)
Required
CollectorQuery #
query (Query)
Required
collector_id (string)
Required
name (string)
Required
secret_filter_state (State)
Required
schedule_state (State)
Required
workspace_id (string)
Required
plugin_id (string)
Required
CollectorRequest #
collector_id (string)
Required
CollectorStatQuery #
query (StatisticsQuery)
Required
CollectorsInfo #
results (CollectorInfo)
Repeated
Required
total_count (int32)
Required
CreateCollectorRequest #
name (string)
Required
plugin_info (PluginInfo)
Required
resource_group (ResourceGroup)
Required
schedule (Scheduled)
provider (string)
secret_filter (SecretFilter)
tags (Struct)
workspace_id (string)
PluginInfo #
plugin_id (string)
Required
version (string)
Required
options (Struct)
Required
metadata (Struct)
Required
upgrade_mode (UpgradeMode)
Required
Scheduled #
state (ScheduledState)
Required
hours (int32)
Repeated
Required
SecretFilter #
state (SecretFilterState)
Required
secrets (string)
Repeated
Required
service_accounts (string)
Repeated
Required
schemas (string)
Repeated
Required
exclude_secrets (string)
Repeated
Required
exclude_service_accounts (string)
Repeated
Required
exclude_schemas (string)
Repeated
Required
UpdateCollectorRequest #
collector_id (string)
Required
name (string)
schedule (Scheduled)
secret_filter (SecretFilter)
tags (Struct)
UpdatePluginRequest #
collector_id (string)
Required
version (string)
options (Struct)
upgrade_mode (UpgradeMode)
VerifyPluginRequest #
collector_id (string)
Required
secret_id (string)