Policy types for @turbot/servicenow-aws-cloudwatch
- AWS > CloudWatch > Alarm > ServiceNow
- AWS > CloudWatch > Alarm > ServiceNow > Configuration Item
- AWS > CloudWatch > Alarm > ServiceNow > Configuration Item > Record
- AWS > CloudWatch > Alarm > ServiceNow > Configuration Item > Table Definition
- AWS > CloudWatch > Alarm > ServiceNow > Table
- AWS > CloudWatch > Alarm > ServiceNow > Table > Definition
AWS > CloudWatch > Alarm > ServiceNow
tmod:@turbot/servicenow-aws-cloudwatch#/policy/types/alarmServiceNow
AWS > CloudWatch > Alarm > ServiceNow > Configuration Item
Synchronize the data for the AWS > CloudWatch > Alarm
based on the policies AWS > CloudWatch > Alarm > 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 AWS > CloudWatch > Alarm
information within the ServiceNow CMDB.
tmod:@turbot/servicenow-aws-cloudwatch#/policy/types/alarmServiceNowConfigurationItem
[ "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"}
AWS > CloudWatch > Alarm > 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 AWS > CloudWatch > Alarm
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-aws-cloudwatch#/policy/types/alarmServiceNowConfigurationItemRecord
"{\n resource: alarm{\n data\n metadata\n turbot {\n akas\n id\n tags\n title\n }\n }\n}\n"
"account_id: {{ $.resource.metadata.aws.accountId | dump | safe }}\nactions_enabled: {{ $.resource.data.ActionsEnabled | dump | safe }}\nalarm_configuration_updated_timestamp: {{ $.resource.data.AlarmConfigurationUpdatedTimestamp | dump | safe }}\nalarm_description: {{ $.resource.data.AlarmDescription | dump | safe }}\nalarm_name: {{ $.resource.data.AlarmName | dump | safe }}\narn: {{ $.resource.data.AlarmArn | dump | safe }}\ncomparison_operator: {{ $.resource.data.ComparisonOperator | dump | safe }}\ndatapoints_to_alarm: {{ $.resource.data.DatapointsToAlarm | dump | safe }}\ndimensions: {{ $.resource.data.Dimensions | dump | safe }}\ninsufficient_data_actions: {{ $.resource.data.InsufficientDataActions | dump | safe }}\nmetric_name: {{ $.resource.data.MetricName | dump | safe }}\nmetrics: {{ $.resource.data.Metrics | dump | safe }}\nnamespace: {{ $.resource.data.Namespace | dump | safe }}\nok_actions: {{ $.resource.data.OkActions | dump | safe }}\nperiod: {{ $.resource.data.Period | dump | safe }}\nregion: {{ $.resource.metadata.aws.regionName | dump | safe }}\nstate_reason: {{ $.resource.data.StateReason | dump | safe }}\nstate_reason_data: {{ $.resource.data.StateReasonData | dump | safe }}\nstate_updated_timestamp: {{ $.resource.data.StateUpdatedTimestamp | dump | safe }}\nstate_value: {{ $.resource.data.StateValue | dump | safe }}\nstatistic: {{ $.resource.data.Statistic | dump | safe }}\ntags: {{ $.resource.turbot.tags | dump | safe }}\nthreshold: {{ $.resource.data.Threshold | dump | safe }}\nthreshold_metric_id: {{ $.resource.data.ThresholdMetricId | dump | safe }}\ntreat_missing_data: {{ $.resource.data.TreatMissingData | dump | safe }}\nunit: {{ $.resource.data.Unit | dump | safe }}\n"
{ "type": "object"}
AWS > CloudWatch > Alarm > ServiceNow > Configuration Item > Table Definition
This policy specifically allows users to define two key aspects: the name of the ServiceNow table where the AWS > CloudWatch > Alarm
data will be stored, and the details of the columns used for archiving purposes.
tmod:@turbot/servicenow-aws-cloudwatch#/policy/types/alarmServiceNowConfigurationItemTableDefinition
[ "{\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-aws-cloudwatch#/policy/types/alarmServiceNowTableDefinition 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" } }}
AWS > CloudWatch > Alarm > ServiceNow > Table
Configure a Table for AWS > CloudWatch > Alarm
resource type in ServiceNow via the AWS > CloudWatch > Alarm > ServiceNow > Table > *
policies.
tmod:@turbot/servicenow-aws-cloudwatch#/policy/types/alarmServiceNowTable
[ "Skip", "Check: Configured", "Enforce: Configured"]
{ "type": "string", "enum": [ "Skip", "Check: Configured", "Enforce: Configured" ], "example": [ "Skip" ], "default": "Skip"}
AWS > CloudWatch > Alarm > 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 AWS > CloudWatch > Alarm data.
tmod:@turbot/servicenow-aws-cloudwatch#/policy/types/alarmServiceNowTableDefinition
{ "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_aws_cloudwatch_alarm", "label": "AWS > CloudWatch > Alarm", "extendsTable": "cmdb_ci" }, "columns": [ { "name": "account_id", "label": "Account ID" }, { "name": "actions_enabled", "label": "Actions Enabled", "type": "boolean" }, { "name": "alarm_configuration_updated_timestamp", "label": "Alarm Configuration Updated Timestamp" }, { "name": "alarm_description", "label": "Alarm Description" }, { "name": "alarm_name", "label": "Alarm Name" }, { "name": "arn", "label": "ARN" }, { "name": "comparison_operator", "label": "Comparison Operator" }, { "name": "datapoints_to_alarm", "label": "Datapoints To Alarm" }, { "name": "dimensions", "label": "Dimensions", "type": "string", "size": 1000 }, { "name": "insufficient_data_actions", "label": "Insufficient Data Actions", "type": "string", "size": 1000 }, { "name": "metric_name", "label": "Metric Name" }, { "name": "metrics", "label": "Metrics", "type": "string", "size": 1000 }, { "name": "namespace", "label": "Namespace" }, { "name": "ok_actions", "label": "Ok Actions", "type": "string", "size": 1000 }, { "name": "period", "label": "Period" }, { "name": "region", "label": "Region" }, { "name": "state_reason", "label": "State Reason" }, { "name": "state_reason_data", "label": "State Reason Data", "type": "string", "size": 1000 }, { "name": "state_updated_timestamp", "label": "State Updated Timestamp" }, { "name": "state_value", "label": "State Value" }, { "name": "statistic", "label": "Statistic" }, { "name": "tags", "label": "Tags", "type": "string", "size": 1000 }, { "name": "threshold", "label": "Threshold" }, { "name": "threshold_metric_id", "label": "Threshold Metric ID" }, { "name": "treat_missing_data", "label": "Treat Missing Data" }, { "name": "unit", "label": "Unit" } ] }}