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


---

# Cloud Configuration Governance scripting reference

# Cloud Configuration Governance scripting reference {#ariaid-title1}

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

Cloud Configuration Governance provides several objects and variables that you can use
to create script-based policies and CI finder mapping scripts.

## Scripting reference for the Cloud Configuration Governance policies {#ccg-scripting-reference__section_kyj_jbf_ktb}

{#ccg-scripting-reference__table_mjy_3jk_hsb__entry__3}

| Name | Description | Schema |
|:-|:-|:-|
| `configSettings` | Represents the configuration data imported from the cloud. | [ { "config_key":"configuration_key", "type":"data_type", "value":"configuration_value" }, ... ] |
| `current` | Represents the current glide record object for the select resource type. | It contains the following fields: * Name: Name of the resource * Type: Resource type * Identifier: Unique identifier of the cloud resource * Details: Cloud resource-specific details {#ccg-scripting-reference__ul_oxy_lrk_hsb} |
| `resourceInformation` | Resource record and its attributes. | [ { "attribute": "Attribute name", "tableName" : "Referenced table", "documentId": "Referenced record", }, ... ] |
| `auditResult` | Audit details that must be written to the Configuration Management Database (CMDB). | { "details": "Violation definition "' "severity": "severity of the violation", "auditViolationName": "Violation name" }; |
[Table 1. Cloud Configuration Governance objects]

{#ccg-scripting-reference__table_mjy_3jk_hsb} {#ccg-scripting-reference__table_pjy_trk_hsb__entry__3}

| Name | Data type | Description |
|:-|:-|:-|
| `answer` | Boolean | Variable to specify whether the policy reports the violation or not. * `true`: Report the violation. Create the auditResult object to create a custom audit result record in the CMDB. If you do not create an audit result object, Cloud Configuration Governance reports the violation as per the violation definition specified in the policy. * `false`: Do not report the violation. {#ccg-scripting-reference__ul_d5m_xrk_hsb} |
| `violatingConfigSettings` | JSON | Reason of the policy violation. Syntax { "config_key": "value" }; |
[Table 2. Cloud Configuration Governance variables]

{#ccg-scripting-reference__table_pjy_trk_hsb}

## Scripting reference for the CI finder mapping script {#ccg-scripting-reference__section_mhw_4bf_ktb}

{#ccg-scripting-reference__table_n3s_1cf_ktb__entry__3}

| Name | Description | Schema |
|-|-|-|
| `attributes` | A map containing the resource attribute key and attribute value from the Resource Attribute table for the given resource. | { "LogicalDatacenter": "Referenced record", "ServiceAccount": "Referenced record" } |
[Table 3. Cloud Configuration Governance objects]

{#ccg-scripting-reference__table_n3s_1cf_ktb} {#ccg-scripting-reference__table_kxd_dcf_ktb__entry__3}

| Name | Data type | Description |
|-|-|-|
| `Name` | String | Name of the resource. |
| `identifier` | Resource record | Identifier of the Cloud Configuration Governance resource record. |
| `type` | Resource record | Resource type of the Cloud Configuration Governance resource resource. |
| `answer` | JSON | CI class with which the resource needs to be mapped. The `answer` contains the following information: * `sysId` of the CI class. * `tableName` of the CI class. {#ccg-scripting-reference__ul_gjg_njf_ktb} If the CI finder mapping fails to identify the CI class, set this variable to `null`. Syntax { sysId: "value", tableName: "value" } |
[Table 4. Cloud Configuration Governance variables]

{#ccg-scripting-reference__table_kxd_dcf_ktb}

