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.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/v1/collector/create
name (string)
Requiredplugin_info (PluginInfo)
Requiredresource_group (ResourceGroup)
Requiredschedule (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)
Requiredname (string)
Requiredprovider (string)
Requiredcapability (Struct)
Requiredsecret_filter (SecretFilter)
Requiredplugin_info (PluginInfo)
Requiredschedule (Scheduled)
Requiredtags (Struct)
Requiredresource_group (ResourceGroup)
Requireddomain_id (string)
Requiredworkspace_id (string)
Requiredcreated_at (string)
Requiredlast_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",
"capability": {
"supported_schema": [
"aws_access_key"
]
},
"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/v1/collector/update
collector_id (string)
Requiredname (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)
Requiredname (string)
Requiredprovider (string)
Requiredcapability (Struct)
Requiredsecret_filter (SecretFilter)
Requiredplugin_info (PluginInfo)
Requiredschedule (Scheduled)
Requiredtags (Struct)
Requiredresource_group (ResourceGroup)
Requireddomain_id (string)
Requiredworkspace_id (string)
Requiredcreated_at (string)
Requiredlast_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",
"capability": {
"supported_schema": [
"aws_access_key"
]
},
"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/v1/collector/update-plugin
collector_id (string)
Requiredname (string)
Requiredprovider (string)
Requiredcapability (Struct)
Requiredsecret_filter (SecretFilter)
Requiredplugin_info (PluginInfo)
Requiredschedule (Scheduled)
Requiredtags (Struct)
Requiredresource_group (ResourceGroup)
Requireddomain_id (string)
Requiredworkspace_id (string)
Requiredcreated_at (string)
Requiredlast_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",
"capability": {
"supported_schema": [
"aws_access_key"
]
},
"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/v1/collector/verify-plugin
delete #
Deletes a specific Collector. You must specify the collector_id of the Collector to delete.
POST /inventory/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/v1/collector/get
collector_id (string)
Requiredname (string)
Requiredprovider (string)
Requiredcapability (Struct)
Requiredsecret_filter (SecretFilter)
Requiredplugin_info (PluginInfo)
Requiredschedule (Scheduled)
Requiredtags (Struct)
Requiredresource_group (ResourceGroup)
Requireddomain_id (string)
Requiredworkspace_id (string)
Requiredcreated_at (string)
Requiredlast_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",
"capability": {
"supported_schema": [
"aws_access_key"
]
},
"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/v1/collector/list
query (Query)
Requiredcollector_id (string)
Requiredname (string)
Requiredsecret_filter_state (State)
Requiredschedule_state (State)
Requiredworkspace_id (string)
Requiredplugin_id (string)
Required
{
"query": {}
}results (CollectorInfo)
RepeatedRequiredtotal_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",
"capability": {
"supported_schema": [
"aws_access_key"
]
},
"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",
"capability": {
"supported_schema": [
"aws_access_key"
]
},
"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/v1/collector/stat
collect #
POST /inventory/v1/collector/collect
Message #
CollectRequest #
collector_id (string)
Requiredsecret_id (string)
CollectorInfo #
collector_id (string)
Requiredname (string)
Requiredprovider (string)
Requiredcapability (Struct)
Requiredsecret_filter (SecretFilter)
Requiredplugin_info (PluginInfo)
Requiredschedule (Scheduled)
Requiredtags (Struct)
Requiredresource_group (ResourceGroup)
Requireddomain_id (string)
Requiredworkspace_id (string)
Requiredcreated_at (string)
Requiredlast_collected_at (string)
Required
CollectorQuery #
query (Query)
Requiredcollector_id (string)
Requiredname (string)
Requiredsecret_filter_state (State)
Requiredschedule_state (State)
Requiredworkspace_id (string)
Requiredplugin_id (string)
Required
CollectorRequest #
collector_id (string)
Required
CollectorStatQuery #
query (StatisticsQuery)
Required
CollectorsInfo #
results (CollectorInfo)
RepeatedRequiredtotal_count (int32)
Required
CreateCollectorRequest #
name (string)
Requiredplugin_info (PluginInfo)
Requiredresource_group (ResourceGroup)
Requiredschedule (Scheduled)
provider (string)
secret_filter (SecretFilter)
tags (Struct)
workspace_id (string)
PluginInfo #
plugin_id (string)
Requiredversion (string)
Requiredoptions (Struct)
Requiredmetadata (Struct)
Requiredupgrade_mode (UpgradeMode)
Required
Scheduled #
state (ScheduledState)
Requiredhours (int32)
RepeatedRequired
SecretFilter #
state (SecretFilterState)
Requiredsecrets (string)
RepeatedRequiredservice_accounts (string)
RepeatedRequiredschemas (string)
RepeatedRequiredexclude_secrets (string)
RepeatedRequiredexclude_service_accounts (string)
RepeatedRequiredexclude_schemas (string)
RepeatedRequired
UpdateCollectorRequest #
collector_id (string)
Requiredname (string)
schedule (Scheduled)
secret_filter (SecretFilter)
tags (Struct)
UpdatePluginRequest #
collector_id (string)
Requiredversion (string)
options (Struct)
upgrade_mode (UpgradeMode)
VerifyPluginRequest #
collector_id (string)
Requiredsecret_id (string)