---
sourceDocument: Yokohama IT Operations Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/yokohama/it-operations-management

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama IT Operations Management

ft:clusterId :

    - itom

bundleId :

    - itom

workflow :

    - Technology


---

# Pattern-based targeted discovery

# Pattern-based targeted discovery {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read

Automatically discover the newly provisioned cloud resources and store their information
in the ServiceNow®
ServiceNow®
Configuration Management Database (CMDB) by using pattern-based targeted
discovery.

After the cloud provisions the resources mentioned in the resource template, such as Azure Resource Manager (ARM) or CloudFormation Template (CFT), it sends a
response to the Cloud Provisioning and Governance application. The response contains
information about the provisioned resources. Cloud Provisioning and Governance uses this
information to launch a discovery---called targeted discovery---to discover only the newly
provisioned or modified resources and update their attributes in the appropriate CMDB CI class.

The pattern-based targeted discovery offers an easier alternative to the existing CAPI-based
approach. Cloud Provisioning and Governance uses single-resource-discovery patterns to
discover only the newly provisioned or modified resources. Contrary to the other patterns, the
single-resource-discovery pattern doesn't scan the entire cloud landscape for changes. It only
discovers the newly provisioned or modified resource of a given type.

The Cloud Resource Types \[sn_capi_resource_type\] table stores the one-to-one association
between the resource type and the single-resource-discovery pattern used to discover the
resource. Cloud Provisioning and Governance uses the sn_capi_resource_type table to identify
the appropriate pattern for the given resource type. For more information on patterns, see [Discovery patterns used by ITOM
Visibility](https://servicenow-prod.fluidtopics.net/_qxdmD6N5su6Ad7JOjMRVQ "Service Mapping and Discovery use patterns in their discovery process that cover most industry standard network devices and applications. You can customize these patterns and create new ones.").

In the base system, Cloud Provisioning and Governance supports pattern-based targeted
discovery for a wide variety of resource types. If required, you can use custom patterns that you
created to perform targeted discovery. For more information, see [Associate a resource type with a single-resource-discovery pattern](https://servicenow-prod.fluidtopics.net/2gWabfmYBf3yKM~CXiRSRw#associate-resource-type-with-single-resource-discovery-pattern "Define a one-to-one association between the resource type and the single-resource-discovery pattern in the Cloud Resource Types [sn_capi_resource_type] table. The pattern-based targeted discovery feature uses this information to invoke the appropriate pattern and discover the provisioned resource.").  
Cloud Provisioning and Governance checks the following conditions to invoke the pattern-based targeted discovery:

* The CAPI-based targeted discovery isn't implemented for the resource type.
* The sn_cmp.targeted.disco.patterns system property is set to True.
* The sn_capi_resource_type table contains a one-to-one association between the resource type and the single-resource-discovery pattern.
{#pattern-based-targeted-discovery__ul_amg_vn3_jrb}

For example, If you use CFT to provision an Amazon S3 bucket, Cloud Provisioning and Governance reads the resource type from the cloud response
(AWS::S3::Bucket), and then identifies the appropriate pattern ( AWS S3) from the sn_capi_resource_type table. Then, it invokes the
pattern to discover the newly provisioned Amazon S3 bucket only, and update its
attributes in the appropriate CMDB CI class (Cloud Object
Storage \[cmbd_ci_cloud_object_storage\] table).

If both CAPI-based targeted discovery and pattern-based targeted discovery are implemented for
the resource type, then the system uses CAPI-based targeted discovery.

If both CAPI-based and pattern-based targeted discovery are not implemented for the resource
type, the resource type is classified as a generic cloud resource in the Cloud Resources
\[cmdb_ci_cmp_resource\] table. In such cases, you can create a single-resource-discovery pattern
and associate it with the resource type. For more information, see [Create or customize patterns](https://servicenow-prod.fluidtopics.net/ZaWnPMmnvybQ8YI3j0l7LA "Create or modify a discovery pattern and define its basic attributes.") and [Associate a resource type with a single-resource-discovery pattern](https://servicenow-prod.fluidtopics.net/2gWabfmYBf3yKM~CXiRSRw#associate-resource-type-with-single-resource-discovery-pattern "Define a one-to-one association between the resource type and the single-resource-discovery pattern in the Cloud Resource Types [sn_capi_resource_type] table. The pattern-based targeted discovery feature uses this information to invoke the appropriate pattern and discover the provisioned resource.").
**Related tasks**   

* [Configure a response processor](https://servicenow-prod.fluidtopics.net/WlnPRd2_uJxvMqkkalI6oQ "Configure a response processor to handle responses from datacenters.")
* [Create or extend a CAPI interface](https://servicenow-prod.fluidtopics.net/M_qbUXdy3YyTSG2jb8zr5Q "You can create a new CAPI interface or extend an existing one by adding new operations.")

## Associate a resource type with a single-resource-discovery pattern {#ariaid-title2}

Define a one-to-one association between the resource type and the
single-resource-discovery pattern in the Cloud Resource Types \[sn_capi_resource_type\] table.
The pattern-based targeted discovery feature uses this information to invoke the appropriate
pattern and discover the provisioned resource.

### Before you begin

* Ensure that the Cloud Provisioning and Governance application is deployed.
* Ensure that the latest Discovery and Service Mapping is installed.
* Ensure that the application scope is Cloud API.

{#associate-resource-type-with-single-resource-discovery-pattern__ul_mvw_2nj_jrb}

Role required: sn_cmp.cloud_service_designer or sn_cmp.cloud_admin

### Procedure

1. Navigate to the sn_capi_resource_type table.
2. Select the appropriate resource type record.
3. On the form, fill in the fields.  
   The example values provided in this table establish a one-to-one relationship
   between the AWS::S3::Bucket resource type and its corresponding
   single-resource-discovery pattern (Amazon AWS S3).
   {#associate-resource-type-with-single-resource-discovery-pattern__table_cwg_14j_jrb__entry__2}

   | Field | Description |
   |-|-|
   | Name | Cloud resource type that you want to discover Example: AWS::S3::Bucket |
   | Product | (Optional) Product category Example: AWS Simple Storage Service |
   | CI Class | CMDB CI table name. The system writes the discovered information into this table. Example: Cloud Object Storage \[cmdb_ci_cloud_object_storage\] |
   | Pattern | A single-resource-discovery pattern to discover the resource Example: Amazon AWS S3 |
   | Dependency sequence | (Optional) Order for triggering the pattern. |
   [ ]

   {#associate-resource-type-with-single-resource-discovery-pattern__table_cwg_14j_jrb}
4. Select Update.

