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

FieldData TypeDescription
nameStringDiscovery profile name.
credentialSetStringCredential set to be assigned to the discovery profile.
1. policy

rules

1. filterType
2. key
3. value
4. operator
5. resourceType

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.
AWS example: AUTO_SCALING, CLOUDFRONT, DYNAMO_DB, ANY_DEVICE, ELASTICACHE, ELASTICMAPREDUCE, KINESIS, LAMBDA, LOAD_BALANCER, MACHINE_LEARNING, RDS, REDSHIFT.
Google example: ANY_CLOUD_RESOURCE, ANY_DEVICE, EBS, GCE_CLUSTER, SQL_SERVER, SQL_DATABASE, GCE_TOPIC, GCE_SUBSCRIPTION, GCE_ROUTER, VPN.
2. Unique attribute name to filter the resource type. Example: Name, Region Name, Zone Name, Name.
3. Unique information of the resource.
4. Operating values to filter the resource type. Example: Contains, Not Contains, Equals, Not Equals, Starts with, Ends with, Regex, Is.
5. Resource type to which the discovery profile is attached.

2. schedule
  • patternType
  • pattern
  • startTime
String(Optional) 2. Define the discovery time of resources:
  • Discovery schedule pattern type. Example: HOURLY, DAILY, WEEKLY, MONTHLY, MINUTES.
  • Pattern of the schedule. Example: If pattern type is WEEKLY, then pattern is MON, WED.
  • Define start time of discovery.

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:

FieldDescription
Manage DeviceManaged 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:

ScheduleFieldsDescription
Minutes
  1. patternType: Minutes
  2. pattern: 20
  1. patternType: Discover resources on minutes basis.
  2. pattern: Time in minutes. Example: 20.
Hourly
  1. patternType: Hourly
  2. pattern: 2
  1. patternType: Discover resources on hourly basis.
  2. pattern: Time in hours. Example: 2.
Daily
  1. patternType: DAILY
  2. pattern: 3
  3. startTime: 02
  1. patternType: Discover resources on daily basis
  2. pattern: Number of days. For example, discover resources for every 3 days.
  3. startTime: Time at which the discovery will start. Represented in hours.
Weekly
  1. patternType: WEEKLY
  2. pattern: SUN,MON,TUE,WED,THU,FRI,SAT
  3. startTime : 02
  1. patternType: Discover resources on weekly basis
  2. pattern: Provide the days on which the resources are discovered.
  3. startTime: Time at which the discovery will start. Represented in hours.
MonthlyDay of every month.
  1. patternType: MONTHLY
  2. pattern: 5, 10, 15
  3. startTime: 02
  1. patternType: Discover resources on monthly basis.
  2. pattern: Date on which the resource is discovered every month. Dates range between 1 to 30. Example: Resource is discovered on 5th or 10th of every month.
  3. startTime: Time at which the discovery will start. Represented in hours.
MonthlyWeekday of every month.
  1. patternType: MONTHLY
  2. pattern: FIRST, SUN
  3. startTime: 02
  1. patternType: Discover resources on monthly basis.
  2. pattern: Day on which the device is discovered every month. Example: Resource is discovered on first Sunday of every month.
  3. startTime: Time at which the discovery will start. Represented in hours.

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"
	}
}