Policy types for @turbot/servicenow-azure-apimanagement

Azure > API Management > API Management Service > ServiceNow

URI
tmod:@turbot/servicenow-azure-apimanagement#/policy/types/apiManagementServiceServiceNow
Targets

Azure > API Management > API Management Service > ServiceNow > Configuration Item

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

URI
tmod:@turbot/servicenow-azure-apimanagement#/policy/types/apiManagementServiceServiceNowConfigurationItem
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 > API Management > API Management Service > 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 > API Management > API Management Service 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-apimanagement#/policy/types/apiManagementServiceServiceNowConfigurationItemRecord
Default Template Input
"{\n resource: apiManagementService{\n data\n metadata\n turbot {\n akas\n id\n tags\n title\n }\n }\n}\n"
Default Template
"additional_locations: {{ $.resource.data.additionalLocations | dump | safe }}\napi_management_name: {{ $.resource.data.apiManagementName | dump | safe }}\ncreated_at_utc: {{ $.resource.data.createdAtUtc | dump | safe }}\ncustom_properties: {{ $.resource.data.customProperties | dump | safe }}\ngateway_regional_url: {{ $.resource.data.gatewayRegionalUrl | dump | safe }}\ngateway_url: {{ $.resource.data.gatewayUrl | dump | safe }}\nhostname_configurations: {{ $.resource.data.hostnameConfigurations | dump | safe }}\nid: {{ $.resource.data.id | dump | safe }}\nmanagement_api_url: {{ $.resource.data.managementApiUrl | dump | safe }}\nnotification_sender_email: {{ $.resource.data.notificationSenderEmail | dump | safe }}\nportal_url: {{ $.resource.data.portalUrl | dump | safe }}\nprivate_ip_addresses: {{ $.resource.data.privateIPAddresses | dump | safe }}\nprovisioning_state: {{ $.resource.data.provisioningState | dump | safe }}\npublic_ip_addresses: {{ $.resource.data.publicIPAddresses | dump | safe }}\npublisher_email: {{ $.resource.data.publisherEmail | dump | safe }}\npublisher_name: {{ $.resource.data.publisherName | dump | safe }}\nregion: {{ $.resource.metadata.azure.regionName | dump | safe }}\nresource_group: {{ $.resource.metadata.azure.resourceGroupName | dump | safe }}\nscm_url: {{ $.resource.data.scmUrl | dump | safe }}\nsku_capacity: {{ $.resource.data.sku.capacity | dump | safe }}\nsku_name: {{ $.resource.data.sku.name | dump | safe }}\nsubscription_id: {{ $.resource.metadata.azure.subscriptionId | dump | safe }}\ntags: {{ $.resource.turbot.tags | dump | safe }}\ntype: {{ $.resource.data.type | dump | safe }}\nvirtual_network_type: {{ $.resource.data.virtualNetworkType | dump | safe }}\n"
Schema
{
"type": "object"
}

Azure > API Management > API Management Service > ServiceNow > Configuration Item > Table Definition

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

URI
tmod:@turbot/servicenow-azure-apimanagement#/policy/types/apiManagementServiceServiceNowConfigurationItemTableDefinition
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-apimanagement#/policy/types/apiManagementServiceServiceNowTableDefinition 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 > API Management > API Management Service > ServiceNow > Table

Configure a Table for Azure > API Management > API Management Service resource type in ServiceNow via the Azure > API Management > API Management Service > ServiceNow > Table > * policies.

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

Azure > API Management > API Management Service > 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 > API Management > API Management Service data.

URI
tmod:@turbot/servicenow-azure-apimanagement#/policy/types/apiManagementServiceServiceNowTableDefinition
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_apimanagement_apimanagementservice",
"label": "Azure > API Management > API Management Service",
"extendsTable": "cmdb_ci"
},
"columns": [
{
"name": "additional_locations",
"label": "Additional Locations",
"type": "string",
"size": 1000
},
{
"name": "api_management_name",
"label": "API Management Name"
},
{
"name": "created_at_utc",
"label": "Created At UTC"
},
{
"name": "custom_properties",
"label": "Custom Properties",
"type": "string",
"size": 1000
},
{
"name": "gateway_regional_url",
"label": "Gateway Regional URL"
},
{
"name": "gateway_url",
"label": "Gateway URL"
},
{
"name": "hostname_configurations",
"label": "Hostname Configurations",
"type": "string",
"size": 1000
},
{
"name": "id",
"label": "ID"
},
{
"name": "management_api_url",
"label": "Management Api URL"
},
{
"name": "notification_sender_email",
"label": "Notification Sender Email"
},
{
"name": "portal_url",
"label": "Portal URL"
},
{
"name": "private_ip_addresses",
"label": "Private IP Addresses",
"type": "string",
"size": 1000
},
{
"name": "provisioning_state",
"label": "Provisioning State"
},
{
"name": "public_ip_addresses",
"label": "Public IP Addresses",
"type": "string",
"size": 1000
},
{
"name": "publisher_email",
"label": "Publisher Email"
},
{
"name": "publisher_name",
"label": "Publisher Name"
},
{
"name": "region",
"label": "Region"
},
{
"name": "resource_group",
"label": "Resource Group",
"type": "string",
"size": 200
},
{
"name": "scm_url",
"label": "SCM URL"
},
{
"name": "sku_capacity",
"label": "SKU Capacity"
},
{
"name": "sku_name",
"label": "SKU Name"
},
{
"name": "subscription_id",
"label": "Subscription ID"
},
{
"name": "tags",
"label": "Tags",
"type": "string",
"size": 1000
},
{
"name": "type",
"label": "Type"
},
{
"name": "virtual_network_type",
"label": "Virtual Network Type"
}
]
}
}