URL
PUT https://{api-url}/api/v2/tenants/{tenantId}/policies/discovery
Sample URLs
For AWS:
https://{api-url}/api/v2/tenants/client_105261/policies/discovery
For Google:
https://{api-url}/api/v2/tenants/client_105261/policies/discovery
https://{api-url}/api/v2/tenants/msp_261/policies/discovery
Parameters
Field | Data Type | Description |
---|---|---|
name | String | Discovery profile name. |
credentialSet | String | Credential set to be assigned to the discovery profile. |
1. policy rules 1. filterType | String | (Optional) 1. Set of functions formed together as a policy and attached with the discovery profile. Rules to filter the resources to which the discovery profile is attached: 1. Filtered resource type. |
2. schedule
| String | (Optional) 2. Define the discovery time of resources:
|
Status code
200 OK
Google Filter Criteria
Filter criteria for Google discovery profile
To filter the resources attached to the Google discovery profile is attached, provide the filter type:
"rules": [{
"filterType": "ANY_CLOUD_RESOURCE"
}]
Filter criteria for specific resources
To attach Google discovery profile to specific resources, provide the resource type:
"rules": [{
"filterType": "ANY_DEVICE"
},
{
"filterType": "EBS"
},
{
"filterType": "GCE_CLUSTER"
},
{
"filterType": "SQL_SERVER"
},
{
"filterType": "SQL_DATABASE"
},
{
"filterType": "GCE_TOPIC"
},
{
"filterType": "GCE_SUBSCRIPTION"
},
{
"filterType": "GCE_ROUTER"
},
{
"filterType": "VPN"
}
]
Resource filters
To filter resources with their unique attributes and attach the Google discovery profile to the filtered resources, provide the unique attributes of the resources:
"rules": [{
"key": "Name",
"operator": "Contains",
"value": "Linux",
"resourceType": "DEVICE"
},
{
"key": "Region Name",
"operator": "Not Contains",
"value": "ASIA",
"resourceType": "GCE_ROUTER"
},
{
"key": "Name",
"operator": "Regex",
"value": "^Cluster",
"resourceType": "GCE_TOPIC"
},
{
"key": "Name",
"operator": "Contains",
"value": "Network",
"resourceType": "GCE_SUBSCRIPTION"
}
]
Supported actions in Google discovery profile
Use the following supported action on the discovered resources:
Field | Description |
---|---|
Manage Device | Managed resource collects metrics, creates jobs, scripts, updates anti-virus and launches consoles. |
"actions": [{
"action": "MANAGE DEVICE"
}]
Discovery schedule
Schedule the discovery with a specific pattern of hourly, daily, weekly and monthly basis. This example demonstrates HOURLY and pattern 2:
Schedule | Fields | Description |
---|---|---|
Minutes |
|
|
Hourly |
|
|
Daily |
|
|
Weekly |
|
|
MonthlyDay of every month. |
|
|
MonthlyWeekday of every month. |
|
|
To schedule discovery, provide one of these patterns and pattern types:
To use a minutes pattern:
"schedule": {
"patternType": "MINUTES",
"pattern": "20"
}
To use an hourly pattern:
"schedule": {
"patternType": "HOURLY",
"pattern": "2"
}
To use a daily pattern:
"schedule": {
"patternType": "DAILY",
"pattern": "3",
"startTime": "02"
}
To use a weekly pattern:
"schedule": {
"patternType": "WEEKLY",
"pattern": "SUN,MON,TUE,WED,THU,FRI,SAT",
"startTime": "02"
}
To use a monthly pattern on a specific day of every month:
"schedule": {
"patternType": "MONTHLY",
"pattern": "5,10,15",
"startTime": "02"
}
To use a monthly pattern on a specific weekday of every month:
"schedule": {
"patternType": "MONTHLY",
"pattern": "FIRST,SUN",
"startTime": "02"
}
AWS Basic discovery profile
Update a basic AWS discovery profile with credentials to administer the management of discovered resources:
Sample request
[{
"name": "AWS Basic Discovery profile",
"credentialSet": "AWS_1"
}]
Sample response
[
{
"id": 109,
"name": "AWS Basic Discovery profile",
"credentialSet": "AWS_1",
"credential": {
"credentialName": "AWS_1",
"accountId": "***********"
}
}
]
AWS discovery profile with discovery schedule
Update an AWS discovery profile with a schedule to define the discovery time of resources:
Sample request
[{
"name": "AWS discovery profile with schedule",
"credentialSet": "AWS AWS Integration",
"schedule": {
"patternType": "MINUTES",
"pattern": "30",
"startTime": "00:30:00"
}
}]
Sample response
[{
"id": 120,
"name": "AWS discovery profile with schedule",
"installedIntegrationId": "INTG-5de40426-6edb-4f40-9274-d8827b683e40",
"credentialSet": "AWS AWS Integration",
"credential": {
"credentialName": "AWS AWS Integration",
"accountId": "*********"
},
"policy": {
"id": 1621,
"uid": "POLICY-35a98317-cd21-4f81-aad9-331e8e8cca0e",
"name": "AWS discovery profile with schedule",
"matchType": "ANY",
"rules": [
{
"id": 2061,
"filterType": "ANY_CLOUD_RESOURCE"
}
],
"actions": [],
"entityType": "ALL"
},
"schedule": {
"patternType": "MINUTES",
"pattern": "30",
"startTime": "00:30:00"
}
}]
AWS discovery profile with policy
Update an AWS discovery profile with a policy to define specific actions performed on the discovered resources:
Sample request
[{
"id": 110,
"name": "AWS discovery profile with policy",
"credentialSet": "AWS_AWSIntegration",
"policy": {
"entityType": "ALL",
"matchType": "ANY",
"rules": [{
"filterType": "ANY_CLOUD_RESOURCE"
}],
"actions": [{
"action": "MANAGE DEVICE",
"items": []
},
{
"action": "STREAM AWS ALERTS",
"items": [{
"item": "https://cloudwatch-url"
}]
}
]
}
}]
Sample response
[{
"id": 110,
"name": "AWS discovery profile with policy",
"credentialSet": "AWS_AWSIntegration",
"credential": {
"credentialName": "AWS_AWSIntegration",
"accountId": "***********"
},
"policy": {
"id": 136,
"name": "AWS discovery profile with policy",
"entityType": "ALL",
"matchType": "ANY",
"rules": [{
"filterType": "ANY_CLOUD_RESOURCE"
}],
"actions": [{
"action": "MANAGE DEVICE",
"items": []
},
{
"action": "STREAM AWS ALERTS",
"items": [{
"item": "https://cloudwatch-url",
"parameters": {},
"instances": {}
}]
}
],
"executionOrder": 0
}
}]
AWS discovery profile with schedule and policy
Update AWS discovery profile with schedule and policy to schedule discovery of resources and define actions performed on the discovered devices:
Sample request
[{
"name": "AWS discovery profile with schedule and policy",
"credentialSet": "AWS AWS Integration",
"schedule": {
"patternType": "MINUTES",
"pattern": "30",
"startTime": "00:30:00"
},
"policy": {
"name": "AWS discovery profile with schedule and policy",
"entityType": "ALL",
"matchType": "ANY",
"rules": [{
"filterType": "ANY_CLOUD_RESOURCE"
}]
}
}]
Sample response
[
{
"id": 59,
"name": "AWS discovery profile with schedule and policy",
"installedIntegrationId": "INTG-5de40426-6edb-4f40-9274-d8827b683e40",
"credentialSet": "AWS AWS Integration",
"credential": {
"credentialName": "AWS AWS Integration",
"accountId": "************"
},
"policy": {
"id": 1620,
"uid": "POLICY-d6e78267-ccbb-41a8-9766-c8311299da98",
"name": "AWS discovery profile with schedule and policy",
"matchType": "ANY",
"rules": [
{
"id": 2060,
"filterType": "ANY_CLOUD_RESOURCE"
}
],
"actions": [],
"entityType": "ALL"
},
"schedule": {
"patternType": "MINUTES",
"pattern": "30",
"startTime": "00:30:00"
}
}
]
AWS discovery profile with credentials, schedule, and policy
Update an AWS discovery profile with credentials, schedule, and policy to administer the management of resources, schedule discovery of resources, and define specific actions performed on the discovered resources:
Sample request
[{
"id": 510,
"name": "AWS_profile",
"credential": {
"credentialType": "AWS",
"AccountNumber": "*************",
"AccessKey": "*****************",
"SecurityKey": "***************"
},
"policy": {
"id": 736,
"name": "AWS_profile",
"entityType": "ALL",
"matchType": "ANY",
"rules": [{
"filterType": "ANY_CLOUD_RESOURCE"
}],
"actions": [{
"action": "MANAGE DEVICE",
"items": []
}],
"executionOrder": 0
},
"schedule": {
"patternType": "MINUTES",
"pattern": "30",
"startTime": "00:30:00"
}
}]
Sample response
[{
"id": 510,
"name": "AWS_profile",
"credentialSet": "AWS_Integration",
"credential": {
"credentialName": "AWS_Integration",
"accountId": "************"
},
"policy": {
"id": 736,
"name": "AWS_profile",
"entityType": "ALL",
"matchType": "ANY",
"rules": [{
"filterType": "ANY_CLOUD_RESOURCE"
}],
"actions": [{
"action": "MANAGE DEVICE",
"items": []
}],
"executionOrder": 0
},
"schedule": {
"patternType": "MINUTES",
"pattern": "30",
"startTime": "00:30:00"
}
}]
Google basic discovery profile
Update a basic Google discovery profile with credentials to administer the management of discovered resources:
Sample request
[{
"id": 963,
"name": "Google Basic Discovery profile",
"credentialSet": "Google GOOGLEIntegration"
}]
Sample response
[{
"id": 963,
"name": "Google Basic Discovery profile",
"credentialSet": "Google GOOGLEIntegration",
"credential": {
"credentialName": "Google GOOGLEIntegration",
"accountId": "GCE-integration"
}
}]
Google discovery profile with schedule and policy
Update a Google discovery profile with schedule and policy to schedule discovery of resources and define actions performed on the discovered devices:
Sample request
[{
"id": "963",
"name": "Google",
"credentialSet": "Google GOOGLEIntegration",
"policy": {
"id": 822,
"name": "GOOGLE",
"resourceType": "ALL",
"matchType": "ANY",
"rules": [{
"filterType": "ANY_CLOUD_RESOURCE"
}],
"actions": [{
"action": "MANAGE DEVICE",
"items": []
}],
"executionOrder": 0
},
"schedule": {
"patternType": "MINUTES",
"pattern": "30",
"startTime": "00:30:00"
}
}]
Sample response
{
"id": "963",
"name": "Google",
"installedIntegrationId": "INTG-8abf482f-1423-18b7-4578-be47080aaa72",
"credentialSet": "Google GOOGLEIntegration",
"credential": {
"credentialName": "Google GOOGLEIntegration",
"accountId": "gce-integration"
},
"policy": {
"id": 822,
"name": "GOOGLE",
"resourceType": "ALL",
"matchType": "ANY",
"rules": [{
"id": 18821,
"filterType": "ANY_CLOUD_RESOURCE"
}],
"actions": [{
"action": "MANAGE DEVICE",
"items": []
}]
},
"schedule": {
"patternType": "HOURLY",
"pattern": "2",
"startTime": "02:00:00"
}
}
Google discovery profile with credentials, schedule, and policy
Update a Google discovery profile with credentials, schedule, and policy to administer the management of resources, schedule discovery of resources, and define specific actions performed on the discovered resources:
Certificate attachment must be encoded with base64 and can be provided in ServiceAccountManagementCertificate.
Sample request
[{
"id": "963",
"name": "Google",
"credential": {
"credentialType": "Google",
"ServiceAccountEmail": "************",
"ProjectId": "***********",
"ServiceAccountManagementCertificate": "MIIJqAIBAzCCCWIGCSqGSIb3DQEHAaCCCVMEgglPMIIJSzCCBXAGCSqGSIb3DQEHAaCCBWEEggVdMIIFWTCCBVUGCyqGSIb3DQEMCgECoIIE+jCCBPYwnEjqWWqTFyUbIAM/EKB3HLK3AgIEAA==",
"ManagementCertificatePassPhrase": "**********"
},
"policy": {
"id": 822,
"name": "GOOGLE",
"resourceType": "ALL",
"matchType": "ANY",
"rules": [{
"filterType": "ANY_CLOUD_RESOURCE"
}],
"actions": [{
"action": "MANAGE DEVICE",
"items": []
}],
"executionOrder": 0
},
"schedule": {
"patternType": "MINUTES",
"pattern": "30",
"startTime": "00:30:00"
}
}]
Sample response
{
"id": 963,
"name": "Google",
"installedIntegrationId": "INTG-8abf482f-1423-18b7-4578-be47080aaa72",
"credentialSet": "Google GOOGLEIntegration",
"credential": {
"credentialName": "Google GOOGLEIntegration",
"accountId": "gce-integration"
},
"policy": {
"id": 822,
"name": "GOOGLE",
"resourceType": "ALL",
"matchType": "ANY",
"rules": [{
"filterType": "ANY_CLOUD_RESOURCE"
}],
"actions": [{
"action": "MANAGE DEVICE",
"items": []
}],
"executionOrder": 0
},
"schedule": {
"patternType": "MINUTES",
"pattern": "30",
"startTime": "00:30:00"
}
}