Definitions for @turbot/azure-mysql

flexibleServer

{
"type": "object",
"properties": {
"name": {
"$ref": "#/definitions/flexibleServerName"
},
"tags": {
"$ref": "azure#/definitions/tags"
},
"id": {
"type": "string"
},
"location": {
"type": "string"
},
"sku": {
"type": "object"
},
"administratorLogin": {
"type": "string"
},
"administratorLoginPassword": {
"type": "string"
},
"auditLogEnabled": {
"type": "string"
},
"auditLogEvents": {
"type": "string"
},
"availabilityZone": {
"type": "string"
},
"backup": {
"type": "object"
},
"createMode": {
"type": "string"
},
"dataEncryption": {
"type": "object"
},
"fullyQualifiedDomainName": {
"type": "string"
},
"highAvailability": {
"type": "object"
},
"maintenanceWindow": {
"type": "object"
},
"network": {
"type": "object"
},
"replicaCapacity": {
"type": "integer"
},
"replicationRole": {
"type": "string"
},
"restorePointInTime": {
"type": "string"
},
"sourceServerResourceId": {
"type": "string"
},
"state": {
"type": "string"
},
"storage": {
"type": "object"
},
"systemData": {
"type": "object",
"properties": {
"createdAt": {
"$ref": "turbot#/definitions/isoTimestamp"
}
}
},
"tlsVersion": {
"type": "string"
},
"version": {
"type": "string"
},
"type": {
"type": "string"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/flexibleServerAka"
}
},
"title": {
"$ref": "#/definitions/flexibleServerName"
},
"tags": {
"$ref": "azure#/definitions/tags"
},
"custom": {
"type": "object",
"properties": {
"createTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"azure": {
"$ref": "azure#/definitions/azureMetadata"
}
}
}
}
}
},
"additionalProperties": true,
"tests": [
{
"description": "Base - All valid Properties",
"input": {
"name": "test01",
"id": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/test/providers/Microsoft.DBforMySQL/flexibleServers/niharika",
"location": "eastus",
"tags": {
"ting": "tong"
},
"sku": {
"name": "GP_Gen5_2",
"tier": "GeneralPurpose",
"capacity": 2,
"family": "Gen5"
},
"turbot": {
"akas": [
"azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/dev/providers/Microsoft.DBforMySQL/flexibleServers/test01"
],
"title": "test01",
"tags": {
"ting": "tong"
},
"custom": {
"azure": {
"subscriptionId": "9e3548cf-17e2-4751-b87e-b72bdd2c77f7",
"resourceGroupName": "dev"
}
}
}
}
},
{
"description": "Invalid - Name is missing",
"input": {
"turbot": {
"akas": [
"azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/dev/providers/Microsoft.DBforMySQL/flexibleServers/test01"
],
"title": "test",
"custom": {
"azure": {
"subscriptionId": "9e3548cf-17e2-4751-b87e-b72bdd2c77f7",
"resourceGroupName": "dev"
}
}
}
},
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/azure-mysql#/definitions/flexibleServer",
"modUri": "tmod:@turbot/azure-mysql"
}
}

flexibleServerAka

{
"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.DBforMySQL/flexibleServers/(?!-.*$).*([a-zA-Z0-9-]+)([a-z0-9]){1,63}$",
"tests": [
{
"descritpion": "base case",
"input": "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/dev/providers/Microsoft.DBforMySQL/flexibleServers/test01"
},
{
"description": "invalid - Wrong Account id",
"input": "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2chkjfhhdshfkndjfjkdsjh77f7/resourceGroups/dev/providers/Microsoft.DBforMySQL/flexibleServers/test01",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/azure-mysql#/definitions/flexibleServerAka",
"modUri": "tmod:@turbot/azure-mysql"
}
}

flexibleServerName

{
"type": "string",
"pattern": "^^(?!-.*$).*([a-zA-Z0-9-]+)([a-z0-9]){1,63}$",
"tests": [
{
"descritpion": "base case",
"input": "test-04"
},
{
"description": "invalid - Hyphen can use first",
"input": "-test",
"expected": false
},
{
"description": "invalid - Hyphen can not be at last position",
"input": "test-",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/azure-mysql#/definitions/flexibleServerName",
"modUri": "tmod:@turbot/azure-mysql"
}
}

flexibleServerServiceNow

{
"defaultColumns": {
"region": {
"column": "enabled",
"path": "data.location"
},
"resource_group": {
"type": "string",
"size": 200,
"column": "enabled",
"path": "metadata.azure.resourceGroupName"
},
"subscription_id": {
"column": "enabled",
"label": "Subscription ID",
"path": "metadata.azure.subscriptionId"
},
"id": {
"column": "enabled",
"label": "ID"
},
"availability_zone": {
"column": "enabled"
},
"backup_retention_days": {
"column": "enabled",
"path": "data.backup.backupRetentionDays"
},
"fully_qualified_domain_name": {
"column": "enabled"
},
"geo_redundant_backup": {
"column": "enabled",
"path": "data.backup.geoRedundantBackup"
},
"high_availability": {
"column": "enabled",
"type": "string",
"size": 1000
},
"maintenance_window": {
"column": "enabled",
"type": "string",
"size": 1000
},
"mysql_flexible_server_name": {
"column": "enabled",
"path": "data.name"
},
"network": {
"column": "enabled",
"type": "string",
"size": 1000
},
"replica_capacity": {
"column": "enabled"
},
"replication_role": {
"column": "enabled"
},
"sku_name": {
"column": "enabled",
"path": "data.sku.name",
"label": "SKU Name"
},
"sku_tier": {
"column": "enabled",
"path": "data.sku.tier",
"label": "SKU Tier"
},
"state": {
"column": "enabled",
"label": "State"
},
"storage_auto_grow": {
"column": "enabled",
"path": "data.storage.autoGrow",
"label": "Storage Auto Grow"
},
"storage_iops": {
"column": "enabled",
"path": "data.storage.iops",
"label": "Storage IOPS"
},
"storage_size_gb": {
"column": "enabled",
"path": "data.storage.storageSizeGB",
"label": "Storage Size GB"
},
"storage_sku": {
"column": "enabled",
"path": "data.storage.storageSku",
"label": "Storage SKU"
},
"tags": {
"column": "enabled",
"type": "string",
"size": 1000
},
"type": {
"column": "enabled"
},
"version": {
"column": "enabled"
}
},
".turbot": {
"uri": "tmod:@turbot/azure-mysql#/definitions/flexibleServerServiceNow",
"modUri": "tmod:@turbot/azure-mysql"
}
}

mySql

{
"allOf": [
{
"$ref": "turbot#/definitions/service"
},
{
"type": "object",
"properties": {
"name": {
"const": "MySql"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/mySqlAka"
}
},
"title": {
"const": "MySql"
},
"custom": {
"type": "object",
"properties": {
"azure": {
"$ref": "azure#/definitions/azureMetadata"
}
}
}
}
}
},
"required": [
"name",
"turbot"
],
"additionalProperties": true,
"tests": [
{
"description": "Base - All valid Properties",
"input": {
"name": "MySql",
"turbot": {
"akas": [
"azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/providers/Microsoft.DBforMySQL/mysql"
],
"title": "MySql",
"custom": {
"azure": {
"subscriptionId": "9e3548cf-17e2-4751-b87e-b72bdd2c77f7"
}
}
}
}
},
{
"description": "Invalid - Incorrect name",
"input": {
"name": "Compute",
"turbot": {
"akas": [
"azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/providers/Microsoft.DBforMySQL/mysql"
],
"title": "MySql",
"custom": {
"azure": {
"subscriptionId": "9e3548cf-17e2-4751-b87e-b72bdd2c77f7"
}
}
}
},
"expected": false
},
{
"description": "Invalid - Service name missing",
"input": {
"turbot": {
"akas": [
"azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/providers/Microsoft.DBforMySQL/mysql"
],
"title": "PostgreSQL",
"custom": {
"azure": {
"subscriptionId": "9e3548cf-17e2-4751-b87e-b72bdd2c77f7"
}
}
}
},
"expected": false
}
]
}
],
".turbot": {
"uri": "tmod:@turbot/azure-mysql#/definitions/mySql",
"modUri": "tmod:@turbot/azure-mysql"
}
}

mySqlAka

{
"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.DBforMySQL/mysql",
"tests": [
{
"descritpion": "base case",
"input": "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/providers/Microsoft.DBforMySQL/mysql"
},
{
"description": "invalid - account ID too long",
"input": "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7jfhsjkds/providers/Microsoft.DBforMySQL/mysql",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/azure-mysql#/definitions/mySqlAka",
"modUri": "tmod:@turbot/azure-mysql"
}
}

server

{
"type": "object",
"properties": {
"name": {
"$ref": "#/definitions/serverName"
},
"tags": {
"$ref": "azure#/definitions/tags"
},
"id": {
"type": "string"
},
"location": {
"type": "string"
},
"sku": {
"type": "object"
},
"administratorLogin": {
"type": "string"
},
"version": {
"type": "string"
},
"sslEnforcement": {
"type": "string"
},
"userVisibleState": {
"type": "string"
},
"fullyQualifiedDomainName": {
"type": "string"
},
"earliestRestoreDate": {
"type": "string"
},
"storageProfile": {
"type": "object"
},
"replicationRole": {
"type": "string"
},
"masterServerId": {
"type": "string"
},
"replicaCapacity": {
"type": "integer"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/serverAka"
}
},
"title": {
"$ref": "#/definitions/serverName"
},
"tags": {
"$ref": "azure#/definitions/tags"
},
"custom": {
"type": "object",
"properties": {
"createTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"azure": {
"$ref": "azure#/definitions/azureMetadata"
}
}
}
}
}
},
"additionalProperties": true,
"tests": [
{
"description": "Base - All valid Properties",
"input": {
"name": "test01",
"id": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/test/providers/Microsoft.DBforMySQL/servers/partha-mysqlserver",
"location": "eastus",
"tags": {
"ting": "tong"
},
"sku": {
"name": "GP_Gen5_2",
"tier": "GeneralPurpose",
"capacity": 2,
"family": "Gen5"
},
"administratorLogin": "partha",
"version": "5.7",
"sslEnforcement": "Enabled",
"userVisibleState": "Ready",
"fullyQualifiedDomainName": "partha-mysqlserver.mysql.database.azure.com",
"earliestRestoreDate": "2019-08-29T18:30:16.080Z",
"storageProfile": {
"backupRetentionDays": 7,
"geoRedundantBackup": "Disabled",
"storageMB": 5120,
"storageAutoGrow": "Enabled"
},
"replicationRole": "None",
"masterServerId": "",
"replicaCapacity": 5,
"turbot": {
"akas": [
"azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/dev/providers/Microsoft.DBforMySQL/servers/test01"
],
"title": "test01",
"tags": {
"ting": "tong"
},
"custom": {
"azure": {
"subscriptionId": "9e3548cf-17e2-4751-b87e-b72bdd2c77f7",
"resourceGroupName": "dev"
}
}
}
}
},
{
"description": "Invalid - Name is missing",
"input": {
"turbot": {
"akas": [
"azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/dev/providers/Microsoft.DBforMySQL/servers/test01"
],
"title": "test",
"custom": {
"azure": {
"subscriptionId": "9e3548cf-17e2-4751-b87e-b72bdd2c77f7",
"resourceGroupName": "dev"
}
}
}
}
},
{
"description": "Invalid - Service name missing",
"input": {
"turbot": {
"akas": [
"azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/dev/providers/Microsoft.DBforMySQL/servers/test-02"
],
"title": "test-02",
"custom": {
"azure": {
"subscriptionId": "9e3548cf-17e2-4751-b87e-b72bdd2c77f7",
"resourceGroupName": "dev"
}
}
}
}
}
],
".turbot": {
"uri": "tmod:@turbot/azure-mysql#/definitions/server",
"modUri": "tmod:@turbot/azure-mysql"
}
}

serverAka

{
"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.DBforMySQL/servers/(?!-.*$).*([a-zA-Z0-9-]+)([a-z0-9]){1,63}$",
"tests": [
{
"descritpion": "base case",
"input": "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/dev/providers/Microsoft.DBforMySQL/servers/test01"
},
{
"description": "invalid - Wrong Account id",
"input": "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2chkjfhhdshfkndjfjkdsjh77f7/resourceGroups/dev/providers/Microsoft.Search/searchServices/test01",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/azure-mysql#/definitions/serverAka",
"modUri": "tmod:@turbot/azure-mysql"
}
}

serverName

{
"type": "string",
"pattern": "^^(?!-.*$).*([a-zA-Z0-9-]+)([a-z0-9]){1,63}$",
"tests": [
{
"descritpion": "base case",
"input": "test-04"
},
{
"description": "invalid - Hyphen can use first",
"input": "-test",
"expected": false
},
{
"description": "invalid - Hyphen can not be at last position",
"input": "test-",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/azure-mysql#/definitions/serverName",
"modUri": "tmod:@turbot/azure-mysql"
}
}

serverServiceNow

{
"defaultColumns": {
"administrator_login": {
"column": "enabled"
},
"backup_retention_days": {
"column": "enabled",
"type": "integer",
"path": "data.storageProfile.backupRetentionDays"
},
"earliest_restore_date": {
"column": "enabled",
"path": "data.earliestRestoreDate"
},
"fully_qualified_domain_name": {
"column": "enabled"
},
"geo_redundant_backup": {
"column": "enabled",
"path": "data.storageProfile.geoRedundantBackup"
},
"id": {
"column": "enabled",
"label": "ID"
},
"master_server_id": {
"column": "enabled",
"label": "Master Server ID"
},
"region": {
"column": "enabled",
"path": "data.location"
},
"replica_capacity": {
"column": "enabled",
"type": "integer"
},
"replication_role": {
"column": "enabled"
},
"resource_group": {
"type": "string",
"size": 200,
"column": "enabled",
"path": "metadata.azure.resourceGroupName"
},
"server_name": {
"column": "enabled",
"path": "data.name"
},
"sku_capacity": {
"column": "enabled",
"path": "data.sku.capacity",
"label": "SKU Capacity"
},
"sku_family": {
"column": "enabled",
"path": "data.sku.family",
"label": "SKU Family"
},
"sku_name": {
"column": "enabled",
"path": "data.sku.name",
"label": "SKU Name"
},
"sku_size": {
"column": "enabled",
"path": "data.sku.size",
"label": "SKU Size"
},
"sku_tier": {
"column": "enabled",
"path": "data.sku.tier",
"label": "SKU Tier"
},
"ssl_enforcement": {
"column": "enabled",
"label": "SSL Enforcement"
},
"storage_auto_grow": {
"column": "enabled",
"path": "data.storageProfile.storageAutogrow"
},
"storage_mb": {
"column": "enabled",
"label": "Storage MB",
"path": "data.storageProfile.storageMB"
},
"subscription_id": {
"column": "enabled",
"label": "Subscription ID",
"path": "metadata.azure.subscriptionId"
},
"tags": {
"column": "enabled",
"type": "string",
"size": 1000
},
"type": {
"column": "enabled"
},
"user_visible_state": {
"column": "enabled"
},
"version": {
"column": "enabled"
}
},
".turbot": {
"uri": "tmod:@turbot/azure-mysql#/definitions/serverServiceNow",
"modUri": "tmod:@turbot/azure-mysql"
}
}