Policy types for @turbot/servicenow-aws-ec2

AWS > EC2 > Instance > ServiceNow

URI
tmod:@turbot/servicenow-aws-ec2#/policy/types/instanceServiceNow
Category
Targets

AWS > EC2 > Instance > ServiceNow > Configuration Item

Synchronize the data for the AWS > EC2 > Instance based on the policies AWS > EC2 > Instance > ServiceNow > Configuration Item > *

The policy ensures that AWS > EC2 > Instance data is automatically synchronized as Configuration Items (CIs) in a designated ServiceNow table, maintaining an up-to-date reflection of the AWS > EC2 > Instance information within the ServiceNow CMDB.

URI
tmod:@turbot/servicenow-aws-ec2#/policy/types/instanceServiceNowConfigurationItem
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"
}

AWS > EC2 > Instance > 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 > EC2 > Instance 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-aws-ec2#/policy/types/instanceServiceNowConfigurationItemRecord
Default Template Input
"{\n resource: instance{\n data\n metadata\n turbot {\n akas\n id\n tags\n title\n }\n }\n}\n"
Default Template
"account_id: {{ $.resource.metadata.aws.accountId | dump | safe }}\nami_launch_index: {{ $.resource.data.AmiLaunchIndex | dump | safe }}\narchitecture: {{ $.resource.data.Architecture | dump | safe }}\narn: {{ $.resource.data.Arn | dump | safe }}\ninstance_id: {{ $.resource.data.InstanceId | dump | safe }}\ninstance_type: {{ $.resource.data.InstanceType | dump | safe }}\nkey_name: {{ $.resource.data.KeyName | dump | safe }}\nlaunch_time: {{ $.resource.data.LaunchTime | dump | safe }}\nnetwork_interfaces: {{ $.resource.data.NetworkInterfaces | dump | safe }}\nplacement_availability_zone: {{ $.resource.data.PlacementAvailabilityZone | dump | safe }}\nprivate_ip_address: {{ $.resource.data.PrivateIpAddress | dump | safe }}\npublic_dns_name: {{ $.resource.data.PublicDnsName | dump | safe }}\npublic_ip_address: {{ $.resource.data.PublicIpAddress | dump | safe }}\nregion: {{ $.resource.metadata.aws.regionName | dump | safe }}\nsecurity_groups: {{ $.resource.data.SecurityGroups | dump | safe }}\nsubnet_id: {{ $.resource.data.SubnetId | dump | safe }}\ntags: {{ $.resource.turbot.tags | dump | safe }}\nvirtualization_type: {{ $.resource.data.VirtualizationType | dump | safe }}\nvpc_id: {{ $.resource.data.VpcId | dump | safe }}\n"
Schema
{
"type": "object"
}

AWS > EC2 > Instance > ServiceNow > Configuration Item > Table Definition

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

URI
tmod:@turbot/servicenow-aws-ec2#/policy/types/instanceServiceNowConfigurationItemTableDefinition
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-aws-ec2#/policy/types/instanceServiceNowTableDefinition 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"
}
}
}

AWS > EC2 > Instance > ServiceNow > Table

Configure a table for AWS > EC2 > Instance resource type in ServiceNow via the AWS > EC2 > Instance > ServiceNow > Table > * policies.

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

AWS > EC2 > Instance > 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 > EC2 > Instance data.

URI
tmod:@turbot/servicenow-aws-ec2#/policy/types/instanceServiceNowTableDefinition
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_aws_ec2_instance",
"label": "AWS > EC2 > Instance",
"extendsTable": "cmdb_ci"
},
"columns": [
{
"name": "account_id",
"label": "Account ID"
},
{
"name": "ami_launch_index",
"label": "AMI Launch Index",
"type": "integer"
},
{
"name": "architecture",
"label": "Architecture"
},
{
"name": "arn",
"label": "ARN"
},
{
"name": "instance_id",
"label": "Instance ID"
},
{
"name": "instance_type",
"label": "Instance Type"
},
{
"name": "key_name",
"label": "Key Name"
},
{
"name": "launch_time",
"label": "Launch Time"
},
{
"name": "network_interfaces",
"label": "Network Interfaces",
"type": "string",
"size": 1000
},
{
"name": "placement_availability_zone",
"label": "Placement Availability Zone"
},
{
"name": "private_ip_address",
"label": "Private Ip Address"
},
{
"name": "public_dns_name",
"label": "Public DNS Name"
},
{
"name": "public_ip_address",
"label": "Public IP Address"
},
{
"name": "region",
"label": "Region"
},
{
"name": "security_groups",
"label": "Security Groups",
"type": "string",
"size": 1000
},
{
"name": "subnet_id",
"label": "Subnet ID"
},
{
"name": "tags",
"label": "Tags",
"type": "string",
"size": 1000
},
{
"name": "virtualization_type",
"label": "Virtualization Type"
},
{
"name": "vpc_id",
"label": "VPC ID"
}
]
}
}

AWS > EC2 > Snapshot > ServiceNow

URI
tmod:@turbot/servicenow-aws-ec2#/policy/types/snapshotServiceNow
Category
Targets

AWS > EC2 > Snapshot > ServiceNow > Configuration Item

Synchronize the data for the AWS > EC2 > Snapshot based on the policies AWS > EC2 > Snapshot > ServiceNow > Configuration Item > *

The policy ensures that AWS > EC2 > Snapshot data is automatically synchronized as Configuration Items (CIs) in a designated ServiceNow table, maintaining an up-to-date reflection of the AWS > EC2 > Snapshot information within the ServiceNow CMDB.

URI
tmod:@turbot/servicenow-aws-ec2#/policy/types/snapshotServiceNowConfigurationItem
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"
}

AWS > EC2 > Snapshot > 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 > EC2 > Snapshot 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-aws-ec2#/policy/types/snapshotServiceNowConfigurationItemRecord
Default Template Input
"{\n resource: snapshot{\n data\n metadata\n turbot {\n akas\n id\n tags\n title\n }\n }\n}\n"
Default Template
"account_id: {{ $.resource.metadata.aws.accountId | dump | safe }}\narn: {{ $.resource.turbot.akas[0] | dump | safe }}\ndescription: {{ $.resource.data.Description | dump | safe }}\nencrypted: {{ $.resource.data.Encrypted | dump | safe }}\nkms_key_id: {{ $.resource.data.KmsKeyId | dump | safe }}\nowner_alias: {{ $.resource.data.OwnerAlias | dump | safe }}\nowner_id: {{ $.resource.data.OwnerId | dump | safe }}\nprogress: {{ $.resource.data.Progress | dump | safe }}\nregion: {{ $.resource.metadata.aws.regionName | dump | safe }}\nsnapshot_id: {{ $.resource.data.SnapshotId | dump | safe }}\nstart_time: {{ $.resource.data.StartTime | dump | safe }}\nstate: {{ $.resource.data.State | dump | safe }}\ntags: {{ $.resource.turbot.tags | dump | safe }}\nvolume_id: {{ $.resource.data.VolumeId | dump | safe }}\nvolume_size: {{ $.resource.data.VolumeSize | dump | safe }}\n"
Schema
{
"type": "object"
}

AWS > EC2 > Snapshot > ServiceNow > Configuration Item > Table Definition

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

URI
tmod:@turbot/servicenow-aws-ec2#/policy/types/snapshotServiceNowConfigurationItemTableDefinition
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-aws-ec2#/policy/types/snapshotServiceNowTableDefinition 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"
}
}
}

AWS > EC2 > Snapshot > ServiceNow > Table

Configure a table for AWS > EC2 > Snapshot resource type in ServiceNow via the AWS > EC2 > Snapshot > ServiceNow > Table > * policies.

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

AWS > EC2 > Snapshot > 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 > EC2 > Snapshot data.

URI
tmod:@turbot/servicenow-aws-ec2#/policy/types/snapshotServiceNowTableDefinition
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_aws_ec2_snapshot",
"label": "AWS > EC2 > Snapshot",
"extendsTable": "cmdb_ci"
},
"columns": [
{
"name": "account_id",
"label": "Account ID"
},
{
"name": "arn",
"label": "ARN"
},
{
"name": "description",
"label": "Description"
},
{
"name": "encrypted",
"label": "Encrypted",
"type": "boolean"
},
{
"name": "kms_key_id",
"label": "Kms Key ID"
},
{
"name": "owner_alias",
"label": "Owner Alias"
},
{
"name": "owner_id",
"label": "Owner ID"
},
{
"name": "progress",
"label": "Progress"
},
{
"name": "region",
"label": "Region"
},
{
"name": "snapshot_id",
"label": "Snapshot ID"
},
{
"name": "start_time",
"label": "Start Time"
},
{
"name": "state",
"label": "State"
},
{
"name": "tags",
"label": "Tags",
"type": "string",
"size": 1000
},
{
"name": "volume_id",
"label": "Volume ID"
},
{
"name": "volume_size",
"label": "Volume Size"
}
]
}
}

AWS > EC2 > Volume > ServiceNow

URI
tmod:@turbot/servicenow-aws-ec2#/policy/types/volumeServiceNow
Category
Targets

AWS > EC2 > Volume > ServiceNow > Configuration Item

Synchronize the data for the AWS > EC2 > Volume based on the policies AWS > EC2 > Volume > ServiceNow > Configuration Item > *

The policy ensures that AWS > EC2 > Volume data is automatically synchronized as Configuration Items (CIs) in a designated ServiceNow table, maintaining an up-to-date reflection of the AWS > EC2 > Volume information within the ServiceNow CMDB.

URI
tmod:@turbot/servicenow-aws-ec2#/policy/types/volumeServiceNowConfigurationItem
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"
}

AWS > EC2 > Volume > 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 > EC2 > Volume 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-aws-ec2#/policy/types/volumeServiceNowConfigurationItemRecord
Default Template Input
"{\n resource: volume{\n data\n metadata\n turbot {\n akas\n id\n tags\n title\n }\n }\n}\n"
Default Template
"account_id: {{ $.resource.metadata.aws.accountId | dump | safe }}\narn: {{ $.resource.turbot.akas[0] | dump | safe }}\nattachments: {{ $.resource.data.Attachments | dump | safe }}\navailability_zone: {{ $.resource.data.AvailabilityZone | dump | safe }}\ncreate_time: {{ $.resource.data.CreateTime | dump | safe }}\nencrypted: {{ $.resource.data.Encrypted | dump | safe }}\niops: {{ $.resource.data.Iops | dump | safe }}\nkms_key_id: {{ $.resource.data.KmsKeyId | dump | safe }}\nmulti_attach_enabled: {{ $.resource.data.MultiAttachEnabled | dump | safe }}\nregion: {{ $.resource.metadata.aws.regionName | dump | safe }}\nsize: {{ $.resource.data.Size | dump | safe }}\nsnapshot_id: {{ $.resource.data.SnapshotId | dump | safe }}\nstate: {{ $.resource.data.State | dump | safe }}\ntags: {{ $.resource.turbot.tags | dump | safe }}\nvolume_id: {{ $.resource.data.VolumeId | dump | safe }}\nvolume_type: {{ $.resource.data.VolumeType | dump | safe }}\n"
Schema
{
"type": "object"
}

AWS > EC2 > Volume > ServiceNow > Configuration Item > Table Definition

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

URI
tmod:@turbot/servicenow-aws-ec2#/policy/types/volumeServiceNowConfigurationItemTableDefinition
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-aws-ec2#/policy/types/volumeServiceNowTableDefinition 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"
}
}
}

AWS > EC2 > Volume > ServiceNow > Table

Configure a table for AWS > EC2 > Volume resource type in ServiceNow via the AWS > EC2 > Volume > ServiceNow > Table > * policies.

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

AWS > EC2 > Volume > 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 > EC2 > Volume data.

URI
tmod:@turbot/servicenow-aws-ec2#/policy/types/volumeServiceNowTableDefinition
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_aws_ec2_volume",
"label": "AWS > EC2 > Volume",
"extendsTable": "cmdb_ci"
},
"columns": [
{
"name": "account_id",
"label": "Account ID"
},
{
"name": "arn",
"label": "ARN"
},
{
"name": "attachments",
"label": "Attachments",
"type": "string",
"size": 1000
},
{
"name": "availability_zone",
"label": "Availability Zone"
},
{
"name": "create_time",
"label": "Create Time"
},
{
"name": "encrypted",
"label": "Encrypted",
"type": "boolean"
},
{
"name": "iops",
"label": "IOPS"
},
{
"name": "kms_key_id",
"label": "Kms Key ID"
},
{
"name": "multi_attach_enabled",
"label": "Multi Attach Enabled",
"type": "boolean"
},
{
"name": "region",
"label": "Region"
},
{
"name": "size",
"label": "Size"
},
{
"name": "snapshot_id",
"label": "Snapshot ID"
},
{
"name": "state",
"label": "State"
},
{
"name": "tags",
"label": "Tags",
"type": "string",
"size": 1000
},
{
"name": "volume_id",
"label": "Volume ID"
},
{
"name": "volume_type",
"label": "Volume Type"
}
]
}
}