Policy types for @turbot/servicenow-azure

Azure > Resource Group > ServiceNow

URI
tmod:@turbot/servicenow-azure#/policy/types/resourceGroupServiceNow
Targets

Azure > Resource Group > ServiceNow > Configuration Item

Synchronize the data for the Azure > Resource Group based on the policies Azure > Resource Group > ServiceNow > Configuration Item > *

The Configuration Item control is responsible for automatically synchronizing records in a designated ServiceNow table, maintaining an up-to-date reflection of the Azure > Resource Group information within the ServiceNow CMDB.

URI
tmod:@turbot/servicenow-azure#/policy/types/resourceGroupServiceNowConfigurationItem
Valid Value
[
"Skip",
"Check: Archived",
"Check: Deleted",
"Check: Sync",
"Enforce: Archived",
"Enforce: Deleted",
"Enforce: Sync",
"Enforce: Sync, archive on delete"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Archived",
"Check: Deleted",
"Check: Sync",
"Enforce: Archived",
"Enforce: Deleted",
"Enforce: Sync",
"Enforce: Sync, archive on delete"
],
"example": [
"Skip"
],
"default": "Skip"
}

Azure > Resource Group > ServiceNow > Configuration Item > Record

The policy facilitates the accurate representation of cloud resource within the ServiceNow environment, ensuring that critical data is effectively mapped and managed. Attribute of an Azure > Resource Group is systematically mapped to a specific column in a ServiceNow table.

The policy allows enabling organizations to select and map only those attributes that are most relevant to their operational needs. It significantly reduces the manual effort involved in data transfer and minimizes the risk of errors, thereby enhancing the overall efficiency of data management.

URI
tmod:@turbot/servicenow-azure#/policy/types/resourceGroupServiceNowConfigurationItemRecord
Default Template Input
"{\n resource: resourceGroup{\n data\n metadata\n turbot {\n akas\n id\n tags\n title\n }\n }\n}\n"
Default Template
"id: {{ $.resource.data.id | dump | safe }}\nprovisioning_state: {{ $.resource.data.properties.provisioningState | dump | safe }}\nregion: {{ $.resource.data.location | dump | safe }}\nresource_group_name: {{ $.resource.data.name | dump | safe }}\nsubscription_id: {{ $.resource.metadata.azure.subscriptionId | dump | safe }}\ntags: {{ $.resource.turbot.tags | dump | safe }}\ntype: {{ $.resource.data.type | dump | safe }}\n"
Schema
{
"type": "object"
}

Azure > Resource Group > ServiceNow > Configuration Item > Table Definition

This policy specifically allows users to define two key aspects: the name of the ServiceNow table where the Azure > Resource Group data will be stored, and the details of the columns used for archiving purposes.

URI
tmod:@turbot/servicenow-azure#/policy/types/resourceGroupServiceNowConfigurationItemTableDefinition
Default Template Input
[
"{\n serviceNowInstance: resources(filter: \"resourceTypeId:tmod:@turbot/servicenow#/resource/types/instance level:self limit:1\") {\n items {\n turbot {\n id\n }\n }\n }\n}\n",
"{\n tableDefinition: policyValues(filter: \"policyTypeId:tmod:@turbot/servicenow-azure#/policy/types/resourceGroupServiceNowTableDefinition resourceId:{{$.serviceNowInstance.items[0].turbot.id}} level:self\") {\n items {\n value\n }\n }\n applicationScope: policyValues(filter: \"policyTypeId:tmod:@turbot/servicenow#/policy/types/serviceNowApplicationScope resourceId:{{$.serviceNowInstance.items[0].turbot.id}} level:self\") {\n items {\n value\n }\n }\n}\n"
]
Default Template
"tableName: "{%- if $.applicationScope.items | length == 0 or $.tableDefinition.items | length == 0 %} {%- else %}{{$.applicationScope.items[0].value}}_{{$.tableDefinition.items[0].value.table.name | lower}}{% endif %}"\n"
Schema
{
"type": "object",
"additionalProperties": false,
"required": [
"tableName"
],
"properties": {
"tableName": {
"type": "string"
},
"archiveColumns": {
"type": "object"
}
}
}

Azure > Resource Group > ServiceNow > Table

Configure a Table for Azure > Resource Group resource type in ServiceNow via the Azure > Resource Group > ServiceNow > Table > * policies.

URI
tmod:@turbot/servicenow-azure#/policy/types/resourceGroupServiceNowTable
Valid Value
[
"Skip",
"Check: Configured",
"Enforce: Configured"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Configured",
"Enforce: Configured"
],
"example": [
"Skip"
],
"default": "Skip"
}

Azure > Resource Group > ServiceNow > Table > Definition

The policy enables the definition of ServiceNow table properties, including its name and the base table from which it extends, and details the specific columns required for representing Azure > Resource Group data.

URI
tmod:@turbot/servicenow-azure#/policy/types/resourceGroupServiceNowTableDefinition
Schema
{
"type": "object",
"additionalProperties": false,
"required": [
"table",
"columns"
],
"properties": {
"table": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"pattern": "^([0-9a-z_])+$"
},
"label": {
"type": "string"
},
"extendsTable": {
"type": "string",
"pattern": "^([0-9a-z_])+$"
}
}
},
"columns": {
"type": "array",
"description": "An array of columns with their mappings to the CMDB.",
"default": [],
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the column in the table.",
"pattern": "^([0-9a-z_])+$"
},
"label": {
"type": "string",
"description": "The label for the column."
},
"type": {
"description": "The data type of the column.",
"type": "string"
},
"size": {
"type": "integer",
"description": "The length for data type."
}
}
}
}
},
"default": {
"table": {
"name": "guardrails_azure_resourcegroup",
"label": "Azure > Resource Group",
"extendsTable": "cmdb_ci"
},
"columns": [
{
"name": "id",
"label": "ID"
},
{
"name": "provisioning_state",
"label": "Provisioning State"
},
{
"name": "region",
"label": "Region"
},
{
"name": "resource_group_name",
"label": "Name"
},
{
"name": "subscription_id",
"label": "Subscription ID"
},
{
"name": "tags",
"label": "Tags",
"type": "string",
"size": 1000
},
{
"name": "type",
"label": "Type"
}
]
}
}

Azure > Subscription > ServiceNow

URI
tmod:@turbot/servicenow-azure#/policy/types/subscriptionServiceNow
Targets

Azure > Subscription > ServiceNow > Configuration Item

Synchronize the data for the Azure > Subscription based on the policies Azure > Subscription > ServiceNow > Configuration Item > *

The Configuration Item control is responsible for automatically synchronizing records in a designated ServiceNow table, maintaining an up-to-date reflection of the Azure > Subscription information within the ServiceNow CMDB.

URI
tmod:@turbot/servicenow-azure#/policy/types/subscriptionServiceNowConfigurationItem
Valid Value
[
"Skip",
"Check: Archived",
"Check: Deleted",
"Check: Sync",
"Enforce: Archived",
"Enforce: Deleted",
"Enforce: Sync",
"Enforce: Sync, archive on delete"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Archived",
"Check: Deleted",
"Check: Sync",
"Enforce: Archived",
"Enforce: Deleted",
"Enforce: Sync",
"Enforce: Sync, archive on delete"
],
"example": [
"Skip"
],
"default": "Skip"
}

Azure > Subscription > ServiceNow > Configuration Item > Record

The policy facilitates the accurate representation of cloud resource within the ServiceNow environment, ensuring that critical data is effectively mapped and managed. Attribute of an Azure > Subscription is systematically mapped to a specific column in a ServiceNow table.

The policy allows enabling organizations to select and map only those attributes that are most relevant to their operational needs. It significantly reduces the manual effort involved in data transfer and minimizes the risk of errors, thereby enhancing the overall efficiency of data management.

URI
tmod:@turbot/servicenow-azure#/policy/types/subscriptionServiceNowConfigurationItemRecord
Default Template Input
"{\n resource: subscription{\n data\n metadata\n turbot {\n akas\n id\n tags\n title\n }\n }\n}\n"
Default Template
"authorization_source: {{ $.resource.data.authorizationSource | dump | safe }}\ndisplay_name: {{ $.resource.data.displayName | dump | safe }}\nid: {{ $.resource.data.id | dump | safe }}\nmanaged_by_tenants: {{ $.resource.data.managedByTenants | dump | safe }}\nstate: {{ $.resource.data.state | dump | safe }}\nsubscription_id: {{ $.resource.metadata.azure.subscriptionId | dump | safe }}\nsubscription_name: {{ $.resource.data.name | dump | safe }}\nsubscription_policies: {{ $.resource.data.subscriptionPolicies | dump | safe }}\ntenant_id: {{ $.resource.data.tenantId | dump | safe }}\ntype: {{ $.resource.data.type | dump | safe }}\n"
Schema
{
"type": "object"
}

Azure > Subscription > ServiceNow > Configuration Item > Table Definition

This policy specifically allows users to define two key aspects: the name of the ServiceNow table where the Azure > Subscription data will be stored, and the details of the columns used for archiving purposes.

URI
tmod:@turbot/servicenow-azure#/policy/types/subscriptionServiceNowConfigurationItemTableDefinition
Default Template Input
[
"{\n serviceNowInstance: resources(filter: \"resourceTypeId:tmod:@turbot/servicenow#/resource/types/instance level:self limit:1\") {\n items {\n turbot {\n id\n }\n }\n }\n}\n",
"{\n tableDefinition: policyValues(filter: \"policyTypeId:tmod:@turbot/servicenow-azure#/policy/types/subscriptionServiceNowTableDefinition resourceId:{{$.serviceNowInstance.items[0].turbot.id}} level:self\") {\n items {\n value\n }\n }\n applicationScope: policyValues(filter: \"policyTypeId:tmod:@turbot/servicenow#/policy/types/serviceNowApplicationScope resourceId:{{$.serviceNowInstance.items[0].turbot.id}} level:self\") {\n items {\n value\n }\n }\n}\n"
]
Default Template
"tableName: "{%- if $.applicationScope.items | length == 0 or $.tableDefinition.items | length == 0 %} {%- else %}{{$.applicationScope.items[0].value}}_{{$.tableDefinition.items[0].value.table.name | lower}}{% endif %}"\n"
Schema
{
"type": "object",
"additionalProperties": false,
"required": [
"tableName"
],
"properties": {
"tableName": {
"type": "string"
},
"archiveColumns": {
"type": "object"
}
}
}

Azure > Subscription > ServiceNow > Table

Configure a Table for Azure > Subscription resource type in ServiceNow via the Azure > Subscription > ServiceNow > Table > * policies.

URI
tmod:@turbot/servicenow-azure#/policy/types/subscriptionServiceNowTable
Valid Value
[
"Skip",
"Check: Configured",
"Enforce: Configured"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Configured",
"Enforce: Configured"
],
"example": [
"Skip"
],
"default": "Skip"
}

Azure > Subscription > ServiceNow > Table > Definition

The policy enables the definition of ServiceNow table properties, including its name and the base table from which it extends, and details the specific columns required for representing Azure > Subscription data.

URI
tmod:@turbot/servicenow-azure#/policy/types/subscriptionServiceNowTableDefinition
Schema
{
"type": "object",
"additionalProperties": false,
"required": [
"table",
"columns"
],
"properties": {
"table": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"pattern": "^([0-9a-z_])+$"
},
"label": {
"type": "string"
},
"extendsTable": {
"type": "string",
"pattern": "^([0-9a-z_])+$"
}
}
},
"columns": {
"type": "array",
"description": "An array of columns with their mappings to the CMDB.",
"default": [],
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the column in the table.",
"pattern": "^([0-9a-z_])+$"
},
"label": {
"type": "string",
"description": "The label for the column."
},
"type": {
"description": "The data type of the column.",
"type": "string"
},
"size": {
"type": "integer",
"description": "The length for data type."
}
}
}
}
},
"default": {
"table": {
"name": "guardrails_azure_subscription",
"label": "Azure > Subscription",
"extendsTable": "cmdb_ci"
},
"columns": [
{
"name": "authorization_source",
"label": "Authorization Source"
},
{
"name": "display_name",
"label": "Display Name"
},
{
"name": "id",
"label": "ID"
},
{
"name": "managed_by_tenants",
"label": "Managed By Tenants",
"type": "string",
"size": 1000
},
{
"name": "state",
"label": "State"
},
{
"name": "subscription_id",
"label": "Subscription ID"
},
{
"name": "subscription_name",
"label": "Name"
},
{
"name": "subscription_policies",
"label": "Subscription Policies",
"type": "string",
"size": 1000
},
{
"name": "tenant_id",
"label": "Tenant ID"
},
{
"name": "type",
"label": "Type"
}
]
}
}

Azure > Tenant > ServiceNow

URI
tmod:@turbot/servicenow-azure#/policy/types/tenantServiceNow
Targets

Azure > Tenant > ServiceNow > Configuration Item

Synchronize the data for the Azure > Tenant based on the policies Azure > Tenant > ServiceNow > Configuration Item > *

The Configuration Item control is responsible for automatically synchronizing records in a designated ServiceNow table, maintaining an up-to-date reflection of the Azure > Tenant information within the ServiceNow CMDB.

URI
tmod:@turbot/servicenow-azure#/policy/types/tenantServiceNowConfigurationItem
Valid Value
[
"Skip",
"Check: Archived",
"Check: Deleted",
"Check: Sync",
"Enforce: Archived",
"Enforce: Deleted",
"Enforce: Sync",
"Enforce: Sync, archive on delete"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Archived",
"Check: Deleted",
"Check: Sync",
"Enforce: Archived",
"Enforce: Deleted",
"Enforce: Sync",
"Enforce: Sync, archive on delete"
],
"example": [
"Skip"
],
"default": "Skip"
}

Azure > Tenant > ServiceNow > Configuration Item > Record

The policy facilitates the accurate representation of cloud resource within the ServiceNow environment, ensuring that critical data is effectively mapped and managed. Attribute of an Azure > Tenant is systematically mapped to a specific column in a ServiceNow table.

The policy allows enabling organizations to select and map only those attributes that are most relevant to their operational needs. It significantly reduces the manual effort involved in data transfer and minimizes the risk of errors, thereby enhancing the overall efficiency of data management.

URI
tmod:@turbot/servicenow-azure#/policy/types/tenantServiceNowConfigurationItemRecord
Default Template Input
"{\n resource: tenant{\n data\n metadata\n turbot {\n akas\n id\n tags\n title\n }\n }\n}\n"
Default Template
"assigned_plans: {{ $.resource.data.assignedPlans | dump | safe }}\ncountry: {{ $.resource.data.country | dump | safe }}\ncountry_letter_code: {{ $.resource.data.countryLetterCode | dump | safe }}\nid: {{ $.resource.data.id | dump | safe }}\nprovisioned_plans: {{ $.resource.data.provisionedPlans | dump | safe }}\nsecurity_compliance_notification_mails: {{ $.resource.data.securityComplianceNotificationMails | dump | safe }}\ntechnical_notification_mails: {{ $.resource.data.technicalNotificationMails | dump | safe }}\ntenant_name: {{ $.resource.data.displayName | dump | safe }}\ntenant_type: {{ $.resource.data.tenantType | dump | safe }}\nverified_domains: {{ $.resource.data.verifiedDomains | dump | safe }}\n"
Schema
{
"type": "object"
}

Azure > Tenant > ServiceNow > Configuration Item > Table Definition

This policy specifically allows users to define two key aspects: the name of the ServiceNow table where the Azure > Tenant data will be stored, and the details of the columns used for archiving purposes.

URI
tmod:@turbot/servicenow-azure#/policy/types/tenantServiceNowConfigurationItemTableDefinition
Default Template Input
[
"{\n serviceNowInstance: resources(filter: \"resourceTypeId:tmod:@turbot/servicenow#/resource/types/instance level:self limit:1\") {\n items {\n turbot {\n id\n }\n }\n }\n}\n",
"{\n tableDefinition: policyValues(filter: \"policyTypeId:tmod:@turbot/servicenow-azure#/policy/types/tenantServiceNowTableDefinition resourceId:{{$.serviceNowInstance.items[0].turbot.id}} level:self\") {\n items {\n value\n }\n }\n applicationScope: policyValues(filter: \"policyTypeId:tmod:@turbot/servicenow#/policy/types/serviceNowApplicationScope resourceId:{{$.serviceNowInstance.items[0].turbot.id}} level:self\") {\n items {\n value\n }\n }\n}\n"
]
Default Template
"tableName: "{%- if $.applicationScope.items | length == 0 or $.tableDefinition.items | length == 0 %} {%- else %}{{$.applicationScope.items[0].value}}_{{$.tableDefinition.items[0].value.table.name | lower}}{% endif %}"\n"
Schema
{
"type": "object",
"additionalProperties": false,
"required": [
"tableName"
],
"properties": {
"tableName": {
"type": "string"
},
"archiveColumns": {
"type": "object"
}
}
}

Azure > Tenant > ServiceNow > Table

Configure a Table for Azure > Tenant resource type in ServiceNow via the Azure > Tenant > ServiceNow > Table > * policies.

URI
tmod:@turbot/servicenow-azure#/policy/types/tenantServiceNowTable
Valid Value
[
"Skip",
"Check: Configured",
"Enforce: Configured"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Configured",
"Enforce: Configured"
],
"example": [
"Skip"
],
"default": "Skip"
}

Azure > Tenant > ServiceNow > Table > Definition

The policy enables the definition of ServiceNow table properties, including its name and the base table from which it extends, and details the specific columns required for representing Azure > Tenant data.

URI
tmod:@turbot/servicenow-azure#/policy/types/tenantServiceNowTableDefinition
Schema
{
"type": "object",
"additionalProperties": false,
"required": [
"table",
"columns"
],
"properties": {
"table": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"pattern": "^([0-9a-z_])+$"
},
"label": {
"type": "string"
},
"extendsTable": {
"type": "string",
"pattern": "^([0-9a-z_])+$"
}
}
},
"columns": {
"type": "array",
"description": "An array of columns with their mappings to the CMDB.",
"default": [],
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the column in the table.",
"pattern": "^([0-9a-z_])+$"
},
"label": {
"type": "string",
"description": "The label for the column."
},
"type": {
"description": "The data type of the column.",
"type": "string"
},
"size": {
"type": "integer",
"description": "The length for data type."
}
}
}
}
},
"default": {
"table": {
"name": "guardrails_azure_tenant",
"label": "Azure > Tenant",
"extendsTable": "cmdb_ci"
},
"columns": [
{
"name": "assigned_plans",
"label": "Assigned Plans"
},
{
"name": "country",
"label": "Country"
},
{
"name": "country_letter_code",
"label": "Country Letter Code"
},
{
"name": "id",
"label": "ID"
},
{
"name": "provisioned_plans",
"label": "Provisioned Plans"
},
{
"name": "security_compliance_notification_mails",
"label": "Security Compliance Notification Mails"
},
{
"name": "technical_notification_mails",
"label": "Technical Notification Mails"
},
{
"name": "tenant_name",
"label": "Name"
},
{
"name": "tenant_type",
"label": "Tenant Type"
},
{
"name": "verified_domains",
"label": "Verified Domains"
}
]
}
}

ServiceNow > Turbot > Watches > Azure

The policy ensures that ServiceNow records are appropriately managed, and actions are triggered when necessary, to maintain data accuracy and synchronization.

URI
tmod:@turbot/servicenow-azure#/policy/types/watchesAzure
Valid Value
[
"Skip",
"Check: Enabled",
"Check: Disabled",
"Enforce: Enabled",
"Enforce: Disabled"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Enabled",
"Check: Disabled",
"Enforce: Enabled",
"Enforce: Disabled"
],
"example": [
"Skip"
],
"default": "Enforce: Enabled"
}