Definitions for @turbot/azure-dns

dns

{
"allOf": [
{
"$ref": "turbot#/definitions/service"
},
{
"type": "object",
"properties": {
"name": {
"const": "DNS"
},
"namespace": {
"const": "Microsoft.Network"
},
"registrationState": {
"type": "string"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/dnsAka"
}
},
"title": {
"const": "DNS"
},
"custom": {
"type": "object",
"properties": {
"azure": {
"$ref": "azure#/definitions/azureMetadata"
}
}
}
}
}
},
"required": [
"name",
"turbot"
],
"additionalProperties": true,
"tests": [
{
"description": "All details provided",
"input": {
"name": "DNS",
"turbot": {
"akas": [
"azure:///subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/providers/Microsoft.Network/services/dns"
],
"title": "DNS",
"custom": {
"azure": {
"subscriptionId": "3510ae4d-530b-497d-8f30-53b9616fc6c1"
}
}
}
}
},
{
"description": "Invalid - Name is not as declared",
"input": {
"name": "dnszone",
"turbot": {
"akas": [
"azure:///subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/providers/Microsoft.Network/services/dns"
],
"title": "DNS",
"custom": {
"azure": {
"subscriptionId": "3510ae4d-530b-497d-8f30-53b9616fc6c1"
}
}
}
},
"expected": false
},
{
"description": "Invalid - Service name missing",
"input": {
"turbot": {
"akas": [
"azure:///subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/providers/Microsoft.Network/services/dns"
]
},
"title": "DNS",
"custom": {
"azure": {
"subscriptionId": "3510ae4d-530b-497d-8f30-53b9616fc6c1"
}
}
},
"expected": false
}
]
}
],
".turbot": {
"uri": "tmod:@turbot/azure-dns#/definitions/dns",
"modUri": "tmod:@turbot/azure-dns"
}
}

dnsAka

{
"type": "string",
"pattern": "^azure:///subscriptions/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/providers/Microsoft.Network/services/dns$",
"tests": [
{
"description": "base",
"input": "azure:///subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/providers/Microsoft.Network/services/dns"
},
{
"description": "invalid service name",
"input": "azure:///subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/providers/Microsoft.MySql/services/dns",
"expected": false
},
{
"description": "invalid subscription id",
"input": "azure:///subscriptions/jhdgf/providers/Microsoft.Network/services/dns",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/azure-dns#/definitions/dnsAka",
"modUri": "tmod:@turbot/azure-dns"
}
}

recordSet

{
"type": "object",
"properties": {
"name": {
"$ref": "#/definitions/recordSetName"
},
"id": {
"$ref": "#/definitions/recordSetId"
},
"tags": {
"$ref": "azure#/definitions/tagsTemplateTagList"
},
"etag": {
"type": "string"
},
"tTL": {
"type": "integer"
},
"fqdn": {
"type": "string"
},
"provisioningState": {
"type": "string"
},
"targetResource": {
"type": "object"
},
"aRecords": {
"type": "array"
},
"turbot": {
"type": "object",
"properties": {
"title": {
"$ref": "#/definitions/recordSetName"
},
"tags": {
"$ref": "azure#/definitions/tags"
},
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/recordSetAka"
}
},
"custom": {
"type": "object",
"properties": {
"createTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"zoneName": {
"$ref": "#/definitions/zoneName"
},
"recordType": {
"type": "string"
},
"azure": {
"$ref": "azure#/definitions/azureMetadata"
}
}
}
}
}
},
"additionalProperties": true,
"tests": [
{
"description": "Valid - All properties given",
"input": {
"name": "abtestrs",
"id": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/dztest/providers/Microsoft.Network/dnszones/dztest.com/A/abtestrs",
"etag": "53ee8a5b-bc3d-409c-a386-c85616f69d26",
"metadata": {
"company": "turbot"
},
"tTL": 3600,
"fqdn": "rstest.dztest.com.",
"provisioningState": "Succeeded",
"targetResource": {},
"aRecords": [],
"turbot": {
"title": "abtestrs",
"akas": [
"azure:///subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/dztest/providers/Microsoft.Network/dnszones/dztest.com/A/abtestrs"
],
"tags": {
"company": "turbot"
},
"custom": {
"zoneName": "dztest.com",
"azure": {
"subscriptionId": "3510ae4d-530b-497d-8f30-53b9616fc6c1",
"resourceGroupName": "dztest"
}
}
}
}
},
{
"description": "invalid - required field name missing",
"input": {
"title": "abtestrs",
"azure": {
"subscriptionId": "3510ae4d-530b-497d-8f30-53b9616fc6c1",
"resourceGroupName": "dztest"
}
}
}
],
".turbot": {
"uri": "tmod:@turbot/azure-dns#/definitions/recordSet",
"modUri": "tmod:@turbot/azure-dns"
}
}

recordSetAka

{
"type": "string",
"pattern": "^azure:///subscriptions/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/resourceGroups/[A-Za-z0-9-_().]*[A-Za-z0-9-_()]/providers/Microsoft.Network/dnszones/([a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{1,34}/(A|AAAA|CNAME|MX|NS|SRV|TXT|PTR|SOA)/[A-Za-z0-9-_@]{1,63}$",
"tests": [
{
"description": "base case",
"input": "azure:///subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/dztest/providers/Microsoft.Network/dnszones/dztest.com/A/abtestrs"
},
{
"description": "invalid - subscription info missing",
"input": "providers/microsoft.network/dnszones/testdz.com",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/azure-dns#/definitions/recordSetAka",
"modUri": "tmod:@turbot/azure-dns"
}
}

recordSetId

{
"type": "string",
"pattern": "^/subscriptions/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/resourceGroups/[A-Za-z0-9-_().]*[A-Za-z0-9-_()]/providers/Microsoft.Network/dnszones/([a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{1,34}/(A|AAAA|CNAME|MX|NS|SRV|TXT|PTR|SOA)/[A-Za-z0-9-_@]{1,63}$",
"tests": [
{
"description": "base",
"input": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/dztest/providers/Microsoft.Network/dnszones/dztest.com/A/abtestrs"
},
{
"description": "invalid record type name",
"input": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/test/providers/Microsoft.Network/dnszone/dztest.com/XX/abtestrs",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/azure-dns#/definitions/recordSetId",
"modUri": "tmod:@turbot/azure-dns"
}
}

recordSetName

{
"type": "string",
"pattern": "[A-Za-z0-9-_@]{1,63}$",
"tests": [
{
"description": "base case",
"input": "abtestrs"
},
{
"description": "invalid - can not contain $",
"input": "dns.com12$",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/azure-dns#/definitions/recordSetName",
"modUri": "tmod:@turbot/azure-dns"
}
}

recordSetServiceNow

{
"defaultColumns": {
"a_records": {
"type": "string",
"size": 1000,
"column": "enabled"
},
"id": {
"label": "ID",
"column": "enabled"
},
"provisioning_state": {
"column": "enabled"
},
"region": {
"column": "enabled",
"path": "data.location"
},
"resource_group": {
"column": "enabled",
"label": "Resource Group",
"path": "metadata.azure.resourceGroupName"
},
"subscription_id": {
"column": "enabled",
"label": "Subscription ID",
"path": "metadata.azure.subscriptionId"
},
"tags": {
"column": "enabled",
"type": "string",
"size": 1000,
"path": "metadata.tags"
},
"target_resource": {
"type": "string",
"size": 1000,
"column": "enabled"
},
"ttl": {
"column": "enabled",
"label": "TTL",
"type": "integer",
"path": "data.tTL"
}
},
".turbot": {
"uri": "tmod:@turbot/azure-dns#/definitions/recordSetServiceNow",
"modUri": "tmod:@turbot/azure-dns"
}
}

zone

{
"type": "object",
"properties": {
"name": {
"$ref": "#/definitions/zoneName"
},
"id": {
"$ref": "#/definitions/zoneId"
},
"tags": {
"$ref": "azure#/definitions/tags"
},
"location": {
"type": "string"
},
"etag": {
"type": "string"
},
"maxNumberOfRecordSets": {
"type": "integer"
},
"numberOfRecordSets": {
"type": "integer"
},
"nameServers": {
"type": "array"
},
"zoneType": {
"type": "string"
},
"turbot": {
"type": "object",
"properties": {
"title": {
"$ref": "#/definitions/zoneName"
},
"tags": {
"$ref": "azure#/definitions/tags"
},
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/zoneAka"
}
},
"custom": {
"type": "object",
"properties": {
"createTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"azure": {
"$ref": "azure#/definitions/azureMetadata"
}
}
}
}
}
},
"additionalProperties": true,
"tests": [
{
"description": "Valid - All properties given",
"input": {
"name": "testdz.com",
"id": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/dztest/providers/Microsoft.Network/dnszones/testdz.com",
"location": "global",
"tags": {},
"etag": "00000004-0000-0000-22d0-de00c951d501",
"maxNumberOfRecordSets": 10000,
"numberOfRecordSets": 2,
"nameServers": [
"ns1-03.azure-dns.com.",
"ns2-03.azure-dns.net.",
"ns3-03.azure-dns.org.",
"ns4-03.azure-dns.info."
],
"zoneType": "Public",
"turbot": {
"title": "testdz.com",
"akas": [
"azure:///subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/dztest/providers/Microsoft.Network/dnszones/testdz.com"
],
"custom": {
"azure": {
"subscriptionId": "3510ae4d-530b-497d-8f30-53b9616fc6c1",
"resourceGroupName": "dztest"
}
}
}
}
},
{
"description": "invalid - required field name missing",
"input": {
"title": "testdz.com",
"azure": {
"subscriptionId": "3510ae4d-530b-497d-8f30-53b9616fc6c1",
"resourceGroupName": "dztest"
}
}
}
],
".turbot": {
"uri": "tmod:@turbot/azure-dns#/definitions/zone",
"modUri": "tmod:@turbot/azure-dns"
}
}

zoneAka

{
"type": "string",
"pattern": "^azure:///subscriptions/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/resourceGroups/[A-Za-z0-9-_().]*[A-Za-z0-9-_()]/providers/Microsoft.Network/dnszones/([a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,34}$",
"tests": [
{
"description": "base case",
"input": "azure:///subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/dztest/providers/Microsoft.Network/dnszones/testdz.com"
},
{
"description": "invalid - subscription info missing",
"input": "providers/microsoft.network/dnszones/testdz.com",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/azure-dns#/definitions/zoneAka",
"modUri": "tmod:@turbot/azure-dns"
}
}

zoneId

{
"type": "string",
"pattern": "^/subscriptions/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/resourceGroups/[A-Za-z0-9_.-]{0,89}[A-Za-z0-9_-]/providers/Microsoft.Network/dnszones/([a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,34}$",
"tests": [
{
"description": "base",
"input": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/dztest/providers/Microsoft.Network/dnszones/testdz.com"
},
{
"description": "invalid service name",
"input": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/test/providers/Microsoft.Network/dnszone/testdz.com",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/azure-dns#/definitions/zoneId",
"modUri": "tmod:@turbot/azure-dns"
}
}

zoneName

{
"type": "string",
"pattern": "^([a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,34}$",
"tests": [
{
"description": "base case",
"input": "testag.com"
},
{
"description": "invalid - should have a period",
"input": "dns",
"expected": false
},
{
"description": "invalid - can not contain number at last",
"input": "dns.com123",
"expected": false
},
{
"description": "invalid - can not contain underscore",
"input": "dns_zone.com",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/azure-dns#/definitions/zoneName",
"modUri": "tmod:@turbot/azure-dns"
}
}

zoneServiceNow

{
"defaultColumns": {
"id": {
"column": "enabled",
"label": "ID"
},
"max_number_of_record_sets": {
"column": "enabled",
"label": "Max Number Of Record Sets"
},
"max_number_of_records_per_record_set": {
"column": "enabled",
"label": "Max Number Of Records Per Record Set"
},
"name_servers": {
"column": "enabled",
"label": "Name Servers",
"type": "string",
"size": 1000
},
"number_of_record_sets": {
"column": "enabled",
"label": "Number Of Record Sets"
},
"region": {
"column": "enabled",
"label": "Region",
"path": "data.location"
},
"resource_group": {
"column": "enabled",
"label": "Resource Group",
"path": "metadata.azure.resourceGroupName",
"size": 200
},
"subscription_id": {
"column": "enabled",
"label": "Subscription ID",
"path": "metadata.azure.subscriptionId"
},
"tags": {
"column": "enabled",
"label": "Tags",
"type": "string",
"size": 1000
},
"type": {
"column": "enabled",
"label": "Type"
},
"zone_name": {
"column": "enabled",
"label": "Zone Name",
"path": "data.name"
},
"zone_type": {
"column": "enabled",
"label": "Zone Type"
}
},
".turbot": {
"uri": "tmod:@turbot/azure-dns#/definitions/zoneServiceNow",
"modUri": "tmod:@turbot/azure-dns"
}
}