Policy types for @turbot/servicenow-gcp-datapipeline

GCP > Datapipeline > Pipeline > ServiceNow

URI
tmod:@turbot/servicenow-gcp-datapipeline#/policy/types/pipelineServiceNow
Targets

GCP > Datapipeline > Pipeline > ServiceNow > Configuration Item

Synchronize the data for the GCP > Datapipeline > Pipeline based on the policies GCP > Datapipeline > Pipeline > 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 GCP > Datapipeline > Pipeline information within the ServiceNow CMDB.

URI
tmod:@turbot/servicenow-gcp-datapipeline#/policy/types/pipelineServiceNowConfigurationItem
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"
}

GCP > Datapipeline > Pipeline > 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 GCP > Datapipeline > Pipeline 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-gcp-datapipeline#/policy/types/pipelineServiceNowConfigurationItemRecord
Default Template Input
"{\n resource: pipeline{\n data\n metadata\n turbot {\n akas\n id\n tags\n title\n }\n }\n}\n"
Default Template
"creation_timestamp: {{ $.resource.data.createTime | dump | safe }}\ndisplay_name: {{ $.resource.data.displayName | dump | safe }}\nlast_update_time: {{ $.resource.data.lastUpdateTime | dump | safe }}\npipeline_name: {{ $.resource.data.name | dump | safe }}\nproject: {{ $.resource.metadata.gcp.projectId | dump | safe }}\nregion: {{ $.resource.metadata.gcp.regionName | dump | safe }}\nschedule_info: {{ $.resource.data.scheduleInfo | dump | safe }}\nscheduler_service_account_email: {{ $.resource.data.schedulerServiceAccountEmail | dump | safe }}\nstate: {{ $.resource.data.state | dump | safe }}\ntype: {{ $.resource.data.type | dump | safe }}\nworkload: {{ $.resource.data.workload | dump | safe }}\n"
Schema
{
"type": "object"
}

GCP > Datapipeline > Pipeline > ServiceNow > Configuration Item > Table Definition

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

URI
tmod:@turbot/servicenow-gcp-datapipeline#/policy/types/pipelineServiceNowConfigurationItemTableDefinition
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-gcp-datapipeline#/policy/types/pipelineServiceNowTableDefinition 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"
}
}
}

GCP > Datapipeline > Pipeline > ServiceNow > Table

Configure a Table for GCP > Datapipeline > Pipeline resource type in ServiceNow via the GCP > Datapipeline > Pipeline > ServiceNow > Table > * policies.

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

GCP > Datapipeline > Pipeline > 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 GCP > Datapipeline > Pipeline data.

URI
tmod:@turbot/servicenow-gcp-datapipeline#/policy/types/pipelineServiceNowTableDefinition
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_gcp_datapipeline_pipeline",
"label": "GCP > Datapipeline > Pipeline",
"extendsTable": "cmdb_ci"
},
"columns": [
{
"name": "creation_timestamp",
"label": "Creation Timestamp"
},
{
"name": "display_name",
"label": "Display Name"
},
{
"name": "last_update_time",
"label": "Last Update Time"
},
{
"name": "pipeline_name",
"label": "Name"
},
{
"name": "project",
"label": "Project"
},
{
"name": "region",
"label": "Region"
},
{
"name": "schedule_info",
"label": "Schedule Info",
"type": "string",
"size": 1000
},
{
"name": "scheduler_service_account_email",
"label": "Scheduler Service Account Email",
"type": "string"
},
{
"name": "state",
"label": "State"
},
{
"name": "type",
"label": "Type"
},
{
"name": "workload",
"label": "Workload",
"type": "string",
"size": 1000
}
]
}
}