Policy types for @turbot/servicenow-azure-sqlvirtualmachine

Azure > SQL Virtual Machine Service > SQL Virtual Machine > ServiceNow

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

Azure > SQL Virtual Machine Service > SQL Virtual Machine > ServiceNow > Configuration Item

Synchronize the data for the Azure > SQL Virtual Machine Service > SQL Virtual Machine based on the policies Azure > SQL Virtual Machine Service > SQL Virtual Machine > 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 > SQL Virtual Machine Service > SQL Virtual Machine information within the ServiceNow CMDB.

URI
tmod:@turbot/servicenow-azure-sqlvirtualmachine#/policy/types/sqlVirtualMachineServiceNowConfigurationItem
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 > SQL Virtual Machine Service > SQL Virtual Machine > 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 > SQL Virtual Machine Service > SQL Virtual Machine 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-sqlvirtualmachine#/policy/types/sqlVirtualMachineServiceNowConfigurationItemRecord
Default Template Input
"{\n resource: sqlVirtualMachine{\n data\n metadata\n turbot {\n akas\n id\n tags\n title\n }\n }\n}\n"
Default Template
"auto_backup_settings: {{ $.resource.data.autoBackupSettings | dump | safe }}\nauto_patching_settings: {{ $.resource.data.autoPatchingSettings | dump | safe }}\ncloud_environment: {{ $.resource.data.cloudEnvironment | dump | safe }}\nid: {{ $.resource.data.id | dump | safe }}\nidentity: {{ $.resource.data.identity | dump | safe }}\nkey_vault_credential_settings: {{ $.resource.data.keyVaultCredentialSettings | dump | safe }}\nprovisioning_state: {{ $.resource.data.provisioningState | dump | safe }}\nregion: {{ $.resource.data.location | dump | safe }}\nresource_group: {{ $.resource.metadata.azure.resourceGroupName | dump | safe }}\nserver_configurations_management_settings: {{ $.resource.data.serverConfigurationsManagementSettings | dump | safe }}\nsql_image_offer: {{ $.resource.data.sqlImageOffer | dump | safe }}\nsql_image_sku: {{ $.resource.data.sqlImageSku | dump | safe }}\nsql_management: {{ $.resource.data.sqlManagement | dump | safe }}\nsql_server_license_type: {{ $.resource.data.sqlServerLicenseType | dump | safe }}\nsql_virtual_machine_group_resource_id: {{ $.resource.data.sqlVirtualMachineGroupResourceId | dump | safe }}\nsql_virtualm_machine_name: {{ $.resource.data.name | dump | safe }}\nstorage_configuration_settings: {{ $.resource.data.storageConfigurationSettings | dump | safe }}\nsubscription_id: {{ $.resource.metadata.azure.subscriptionId | dump | safe }}\ntags: {{ $.resource.turbot.tags | dump | safe }}\ntype: {{ $.resource.data.type | dump | safe }}\nvirtual_machine_resource_id: {{ $.resource.data.virtualMachineResourceId | dump | safe }}\nwsfc_domain_credentials: {{ $.resource.data.wsfcDomainCredentials | dump | safe }}\n"
Schema
{
"type": "object"
}

Azure > SQL Virtual Machine Service > SQL Virtual Machine > ServiceNow > Configuration Item > Table Definition

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

URI
tmod:@turbot/servicenow-azure-sqlvirtualmachine#/policy/types/sqlVirtualMachineServiceNowConfigurationItemTableDefinition
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-sqlvirtualmachine#/policy/types/sqlVirtualMachineServiceNowTableDefinition 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 > SQL Virtual Machine Service > SQL Virtual Machine > ServiceNow > Table

Configure a Table for Azure > SQL Virtual Machine Service > SQL Virtual Machine resource type in ServiceNow via the Azure > SQL Virtual Machine Service > SQL Virtual Machine > ServiceNow > Table > * policies.

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

Azure > SQL Virtual Machine Service > SQL Virtual Machine > 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 > SQL Virtual Machine Service > SQL Virtual Machine data.

URI
tmod:@turbot/servicenow-azure-sqlvirtualmachine#/policy/types/sqlVirtualMachineServiceNowTableDefinition
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_sqlvirtualmachine_sqlvirtualmachine",
"label": "Azure > SQL Virtual Machine Service > SQL Virtual Machine",
"extendsTable": "cmdb_ci"
},
"columns": [
{
"name": "auto_backup_settings",
"label": "Auto Backup Settings",
"type": "string",
"size": 1000
},
{
"name": "auto_patching_settings",
"label": "Auto Patching Settings",
"type": "string",
"size": 1000
},
{
"name": "cloud_environment",
"label": "Cloud Environment"
},
{
"name": "id",
"label": "ID"
},
{
"name": "identity",
"label": "Identity",
"type": "string",
"size": 1000
},
{
"name": "key_vault_credential_settings",
"label": "Key Vault Credential Settings",
"type": "string",
"size": 1000
},
{
"name": "provisioning_state",
"label": "Provisioning State"
},
{
"name": "region",
"label": "Region"
},
{
"name": "resource_group",
"label": "Resource Group"
},
{
"name": "server_configurations_management_settings",
"label": "Server Configurations Management Settings",
"type": "string",
"size": 1000
},
{
"name": "sql_image_offer",
"label": "SQL Image Offer"
},
{
"name": "sql_image_sku",
"label": "SQL Image Sku"
},
{
"name": "sql_management",
"label": "SQL Management"
},
{
"name": "sql_server_license_type",
"label": "SQL Server License Type"
},
{
"name": "sql_virtual_machine_group_resource_id",
"label": "SQL Virtual Machine Group Resource ID"
},
{
"name": "sql_virtualm_machine_name",
"label": "Name"
},
{
"name": "storage_configuration_settings",
"label": "Storage Configuration Settings",
"type": "string",
"size": 1000
},
{
"name": "subscription_id",
"label": "Subscription ID"
},
{
"name": "tags",
"label": "Tags",
"type": "string",
"size": 1000
},
{
"name": "type",
"label": "Type"
},
{
"name": "virtual_machine_resource_id",
"label": "Virtual Machine Resource ID"
},
{
"name": "wsfc_domain_credentials",
"label": "Wsfc Domain Credentials",
"type": "string",
"size": 1000
}
]
}
}