Policy types for @turbot/servicenow-gcp-scheduler
- GCP > Scheduler > Job > ServiceNow
- GCP > Scheduler > Job > ServiceNow > Configuration Item
- GCP > Scheduler > Job > ServiceNow > Configuration Item > Record
- GCP > Scheduler > Job > ServiceNow > Configuration Item > Table Definition
- GCP > Scheduler > Job > ServiceNow > Table
- GCP > Scheduler > Job > ServiceNow > Table > Definition
GCP > Scheduler > Job > ServiceNow
tmod:@turbot/servicenow-gcp-scheduler#/policy/types/jobServiceNow
GCP > Scheduler > Job > ServiceNow > Configuration Item
Synchronize the data for the GCP > Scheduler > Job
based on the policies GCP > Scheduler > Job > 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 > Scheduler > Job
information within the ServiceNow CMDB.
tmod:@turbot/servicenow-gcp-scheduler#/policy/types/jobServiceNowConfigurationItem
[ "Skip", "Check: Archived", "Check: Deleted", "Check: Sync", "Enforce: Archived", "Enforce: Deleted", "Enforce: Sync", "Enforce: Sync, archive on delete"]
{ "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 > Scheduler > Job > 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 > Scheduler > Job
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.
tmod:@turbot/servicenow-gcp-scheduler#/policy/types/jobServiceNowConfigurationItemRecord
"{\n resource: job{\n data\n metadata\n turbot {\n akas\n id\n tags\n title\n }\n }\n}\n"
"attempt_deadline: {{ $.resource.data.attemptDeadline | dump | safe }}\ndescription: {{ $.resource.data.description | dump | safe }}\njob_name: {{ $.resource.data.name | dump | safe }}\njob_schedule: {{ $.resource.data.jobSchedule | dump | safe }}\nlast_attempt_time: {{ $.resource.data.lastAttemptTime | dump | safe }}\nlegacy_app_engine_cron: {{ $.resource.data.legacyAppEngineCron | dump | safe }}\nproject_id: {{ $.resource.data.projectId | dump | safe }}\nretry_config: {{ $.resource.data.retryConfig | dump | safe }}\nschedule_time: {{ $.resource.data.scheduleTime | dump | safe }}\nstate: {{ $.resource.data.state | dump | safe }}\nstatus: {{ $.resource.data.status | dump | safe }}\ntime_zone: {{ $.resource.data.timeZone | dump | safe }}\nuser_update_time: {{ $.resource.data.userUpdateTime | dump | safe }}\n"
{ "type": "object"}
GCP > Scheduler > Job > ServiceNow > Configuration Item > Table Definition
This policy specifically allows users to define two key aspects: the name of the ServiceNow table where the GCP > Scheduler > Job
data will be stored, and the details of the columns used for archiving purposes.
tmod:@turbot/servicenow-gcp-scheduler#/policy/types/jobServiceNowConfigurationItemTableDefinition
[ "{\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-scheduler#/policy/types/jobServiceNowTableDefinition 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"]
"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"
{ "type": "object", "additionalProperties": false, "required": [ "tableName" ], "properties": { "tableName": { "type": "string" }, "archiveColumns": { "type": "object" } }}
GCP > Scheduler > Job > ServiceNow > Table
Configure a Table for GCP > Scheduler > Job
resource type in ServiceNow via the GCP > Scheduler > Job > ServiceNow > Table > *
policies.
tmod:@turbot/servicenow-gcp-scheduler#/policy/types/jobServiceNowTable
[ "Skip", "Check: Configured", "Enforce: Configured"]
{ "type": "string", "enum": [ "Skip", "Check: Configured", "Enforce: Configured" ], "example": [ "Skip" ], "default": "Skip"}
GCP > Scheduler > Job > 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 > Scheduler > Job
data.
tmod:@turbot/servicenow-gcp-scheduler#/policy/types/jobServiceNowTableDefinition
{ "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_scheduler_job", "label": "GCP > Scheduler > Job", "extendsTable": "cmdb_ci" }, "columns": [ { "name": "attempt_deadline", "label": "Attempt Deadline" }, { "name": "description", "label": "Description" }, { "name": "job_name", "label": "Name" }, { "name": "job_schedule", "label": "Job Schedule" }, { "name": "last_attempt_time", "label": "Last Attempt Time" }, { "name": "legacy_app_engine_cron", "label": "Legacy App Engine Cron" }, { "name": "project_id", "label": "Project Id" }, { "name": "retry_config", "label": "Retry Config" }, { "name": "schedule_time", "label": "Schedule Time" }, { "name": "state", "label": "State", "type": "string", "size": 1000 }, { "name": "status", "label": "Status" }, { "name": "time_zone", "label": "Time Zone" }, { "name": "user_update_time", "label": "User Update Time" } ] }}