Definitions for @turbot/azure-sql
- database
- databaseServiceNow
- elasticPool
- elasticPoolServiceNow
- firewallIp
- firewallIpRange
- server
- serverServiceNow
- sql
- sqlAka
- sqlDatabaseAka
- sqlDatabaseId
- sqlDatabaseName
- sqlDatabaseThreatDetectionPolicy
- sqlDatabaseVulnerabilityAssessment
- sqlElasticPoolAka
- sqlElasticPoolId
- sqlElasticPoolName
- sqlServerAka
- sqlServerId
- sqlServerName
- sqlServerSecurityAlertPolicy
- sqlServerVulnerabilityAssessment
database
{ "type": "object", "properties": { "name": { "$ref": "#/definitions/sqlDatabaseName" }, "id": { "$ref": "#/definitions/sqlDatabaseId" }, "tags": { "$ref": "azure#/definitions/tags" }, "location": { "type": "string" }, "sku": { "type": "object" }, "kind": { "type": "string" }, "collation": { "type": "string" }, "maxSizeBytes": { "type": "integer" }, "status": { "type": "string" }, "databaseId": { "type": "string" }, "creationDate": { "type": "string" }, "currentServiceObjectiveName": { "type": "string" }, "requestedServiceObjectiveName": { "type": "string" }, "defaultSecondaryLocation": { "type": "string" }, "catalogCollation": { "type": "string" }, "zoneRedundant": { "type": "boolean" }, "licenseType": { "type": "string" }, "maxLogSizeBytes": { "type": "integer" }, "earliestRestoreDate": { "type": "string" }, "readScale": { "type": "string" }, "currentSku": { "type": "object" }, "transparentDataEncryption": { "type": "object" }, "databaseThreatDetectionPolicy": { "$ref": "#/definitions/sqlDatabaseThreatDetectionPolicy" }, "databaseVulnerabilityAssessment": { "$ref": "#/definitions/sqlDatabaseVulnerabilityAssessment" }, "databaseBlobAuditingPolicy": { "type": "object", "properties": { "state": { "type": "string" }, "storageEndpoint": { "type": "string" }, "retentionDays": { "type": "number" } } }, "turbot": { "type": "object", "properties": { "title": { "$ref": "#/definitions/sqlDatabaseName" }, "akas": { "type": "array", "items": { "$ref": "#/definitions/sqlDatabaseAka" } }, "tags": { "$ref": "azure#/definitions/tags" }, "custom": { "type": "object", "properties": { "serverName": { "$ref": "#/definitions/sqlServerName" }, "azure": { "$ref": "azure#/definitions/azureMetadata" }, "createTimestamp": { "$ref": "turbot#/definitions/isoTimestamp" } } } } } }, "tests": [ { "description": "all properties given", "input": { "name": "testdb", "id": "/subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/test/providers/Microsoft.Sql/servers/testserver0012/databases/testdb", "location": "eastus", "tags": { "ting": "tong" }, "sku": { "name": "GP_Gen5", "tier": "GeneralPurpose", "family": "Gen5", "capacity": 2 }, "kind": "v12.0,user,vcore", "collation": "SQL_Latin1_General_CP1_CI_AS", "maxSizeBytes": 1073741824, "status": "Online", "databaseId": "c5d365a1-b37b-4e5c-abb5-f1659cda75d0", "creationDate": "2019-08-26T14:11:56.837Z", "currentServiceObjectiveName": "GP_Gen5_2", "requestedServiceObjectiveName": "GP_Gen5_2", "defaultSecondaryLocation": "westus", "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", "zoneRedundant": false, "licenseType": "LicenseIncluded", "maxLogSizeBytes": 321912832, "earliestRestoreDate": "2019-08-26T14:12:52.297Z", "readScale": "Disabled", "currentSku": { "name": "GP_Gen5", "tier": "GeneralPurpose", "family": "Gen5", "capacity": 2 }, "transparentDataEncryption": { "id": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/test/providers/Microsoft.Sql/servers/partha-server/databases/parthadb29/transparentDataEncryption/current", "name": "current", "type": "Microsoft.Sql/servers/databases/transparentDataEncryption", "location": "East US", "status": "Disabled" }, "turbot": { "title": "testdb", "tags": { "ting": "tong" }, "akas": [ "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/test/providers/Microsoft.Sql/servers/testserver0012/databases/testdb" ], "custom": { "serverName": "testserver0012", "azure": { "subscriptionId": "9e3548cf-17e2-4751-b87e-b72bdd2c77f7", "regionName": "centralindia", "resourceGroupName": "test" } } } } }, { "description": "invalid - missing subscriptionId", "input": { "azure": { "resourceGroupName": "adytest" }, "serverName": "testsever", "name": "testdb", "title": "testsever" } } ], ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/database", "modUri": "tmod:@turbot/azure-sql" }}
databaseServiceNow
{ "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" }, "collation": { "column": "enabled" }, "database_id": { "column": "enabled", "label": "Database ID" }, "default_secondary_location": { "column": "enabled" }, "max_size_bytes": { "column": "enabled" }, "requested_service_objective_name": { "column": "enabled" }, "status": { "column": "enabled" }, "tags": { "column": "enabled", "type": "string", "size": 1000 }, "transparent_data_encryption": { "column": "enabled", "type": "string", "size": 1000 }, "type": { "column": "enabled" }, "zone_redundant": { "column": "enabled", "type": "boolean" } }, ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/databaseServiceNow", "modUri": "tmod:@turbot/azure-sql" }}
elasticPool
{ "type": "object", "properties": { "name": { "$ref": "#/definitions/sqlElasticPoolName" }, "id": { "$ref": "#/definitions/sqlElasticPoolId" }, "tags": { "$ref": "azure#/definitions/tags" }, "location": { "type": "string" }, "sku": { "type": "object" }, "kind": { "type": "string" }, "state": { "type": "string" }, "creationDate": { "type": "string" }, "maxSizeBytes": { "type": "integer" }, "perDatabaseSettings": { "type": "object" }, "zoneRedundant": { "type": "boolean" }, "licenseType": { "type": "string" }, "turbot": { "type": "object", "properties": { "title": { "$ref": "#/definitions/sqlElasticPoolName" }, "tags": { "$ref": "azure#/definitions/tags" }, "akas": { "type": "array", "items": { "$ref": "#/definitions/sqlElasticPoolAka" } }, "custom": { "type": "object", "properties": { "createTimestamp": { "$ref": "turbot#/definitions/isoTimestamp" }, "serverName": { "$ref": "#/definitions/sqlServerName" }, "azure": { "$ref": "azure#/definitions/azureMetadata" } } } } } }, "additionalProperties": true, "tests": [ { "description": "all properties given", "input": { "name": "test-pool1", "id": "/subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/test/providers/Microsoft.Sql/servers/test01-venu/elasticPools/test-pool01", "location": "eastus", "tags": { "timon": "pumba" }, "sku": { "name": "GP_Gen4", "tier": "GeneralPurpose", "family": "Gen4", "capacity": 1 }, "kind": "vcore,pool", "state": "Ready", "creationDate": "2019-07-06T16:43:22.350Z", "maxSizeBytes": 1073741824, "perDatabaseSettings": { "minCapacity": 0, "maxCapacity": 1 }, "zoneRedundant": false, "licenseType": "LicenseIncluded", "turbot": { "title": "test-pool1", "tags": { "timon": "pumba" }, "akas": [ "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/test/providers/Microsoft.Sql/servers/test01-venu/elasticPools/test-pool01" ], "custom": { "createTimestamp": "2019-07-05T14:25:04.637Z", "serverName": "test01-venu", "azure": { "subscriptionId": "9e3548cf-17e2-4751-b87e-b72bdd2c77f7", "regionName": "centralindia", "resourceGroupName": "test" } } } } } ], ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/elasticPool", "modUri": "tmod:@turbot/azure-sql" }}
elasticPoolServiceNow
{ "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" }, "elastic_pool_name": { "column": "enabled", "path": "data.name" }, "state": { "column": "enabled" }, "tags": { "column": "enabled", "type": "string", "size": 1000 }, "type": { "column": "enabled" }, "zone_redundant": { "column": "enabled", "type": "boolean" } }, ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/elasticPoolServiceNow", "modUri": "tmod:@turbot/azure-sql" }}
firewallIp
{ "type": "string", "pattern": "\\b(?!(?:10\\.|172\\.(?:1[6-9]|2[0-9]|3[0-2])\\.|192\\.168\\.))((?:(?:2(?:[0-4][0-9]|5[0-5])|[0-1]?[0-9]?[0-9])\\.){3}(?:(?:2(?:[0-4][0-9]|5[0-5])|[0-1]?[0-9]?[0-9])))($|/([0-9]|[1-2][0-9]|3[0])$)\\b", "tests": [ { "input": "90.123.233.2/30" }, { "input": "34.192.235.43" }, { "input": "127.0.0.11" }, { "description": "Invalid - Not a valid IP address", "input": "267.32.0.12", "expected": false }, { "description": "Invalid - Private IP", "input": "192.168.1.0", "expected": false }, { "description": "Invalid - prefix must be smaller than or equal to 30.", "input": "182.168.0.0/31", "expected": false } ], ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/firewallIp", "modUri": "tmod:@turbot/azure-sql" }}
firewallIpRange
{ "type": "object", "properties": { "startIpAddress": { "type": "string", "pattern": "\\b(?!(?:10\\.|172\\.(?:1[6-9]|2[0-9]|3[0-2])\\.|192\\.168\\.))((?:(?:2(?:[0-4][0-9]|5[0-5])|[0-1]?[0-9]?[0-9])\\.){3}(?:(?:2(?:[0-4][0-9]|5[0-5])|[0-1]?[0-9]?[0-9])))($|/([0-9]|[1-2][0-9]|3[0])$)\\b", "tests": [ { "input": "90.123.233.2/30" }, { "input": "34.192.235.43" }, { "input": "127.0.0.11" }, { "description": "Invalid - Not a valid IP address", "input": "267.32.0.12", "expected": false }, { "description": "Invalid - Private IP", "input": "192.168.1.0", "expected": false }, { "description": "Invalid - prefix must be smaller than or equal to 30.", "input": "182.168.0.0/31", "expected": false } ], ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/firewallIp", "modUri": "tmod:@turbot/azure-sql" } }, "endIpAddress": { "type": "string", "pattern": "\\b(?!(?:10\\.|172\\.(?:1[6-9]|2[0-9]|3[0-2])\\.|192\\.168\\.))((?:(?:2(?:[0-4][0-9]|5[0-5])|[0-1]?[0-9]?[0-9])\\.){3}(?:(?:2(?:[0-4][0-9]|5[0-5])|[0-1]?[0-9]?[0-9])))($|/([0-9]|[1-2][0-9]|3[0])$)\\b", "tests": [ { "input": "90.123.233.2/30" }, { "input": "34.192.235.43" }, { "input": "127.0.0.11" }, { "description": "Invalid - Not a valid IP address", "input": "267.32.0.12", "expected": false }, { "description": "Invalid - Private IP", "input": "192.168.1.0", "expected": false }, { "description": "Invalid - prefix must be smaller than or equal to 30.", "input": "182.168.0.0/31", "expected": false } ], ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/firewallIp", "modUri": "tmod:@turbot/azure-sql" } } }, "tests": [ { "input": { "startIpAddress": "45.127.45.223", "endIpAddress": "45.64.0.0" } } ], ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/firewallIpRange", "modUri": "tmod:@turbot/azure-sql" }}
server
{ "type": "object", "properties": { "name": { "$ref": "#/definitions/sqlServerName" }, "id": { "$ref": "#/definitions/sqlServerId" }, "tags": { "$ref": "azure#/definitions/tags" }, "location": { "type": "string" }, "kind": { "type": "string" }, "administratorLogin": { "type": "string" }, "version": { "type": "string" }, "state": { "type": "string" }, "fullyQualifiedDomainName": { "type": "string" }, "auditPolicy": { "type": "object", "properties": { "state": { "type": "string" }, "storageEndpoint": { "type": "string" }, "retentionDays": { "type": "number" } } }, "serverSecurityAlertPolicy": { "$ref": "#/definitions/sqlServerSecurityAlertPolicy" }, "serverVulnerabilityAssessment": { "$ref": "#/definitions/sqlServerVulnerabilityAssessment" }, "encryptionProtector": { "type": "object" }, "firewallRules": { "type": "array" }, "turbot": { "type": "object", "properties": { "title": { "$ref": "#/definitions/sqlServerName" }, "tags": { "$ref": "azure#/definitions/tags" }, "akas": { "type": "array", "items": { "$ref": "#/definitions/sqlServerAka" } }, "custom": { "type": "object", "properties": { "createTimestamp": { "$ref": "turbot#/definitions/isoTimestamp" }, "azure": { "$ref": "azure#/definitions/azureMetadata" } } } } } }, "additionalProperties": true, "tests": [ { "description": "Valid - All properties given", "input": { "name": "test0001", "id": "/subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/test/providers/Microsoft.Sql/servers/test0012", "location": "southindia", "tags": { "environment": "Production" }, "kind": "v12.0", "administratorLogin": "parth", "version": "12.0", "state": "Ready", "fullyQualifiedDomainName": "test-parth.database.windows.net", "auditPolicy": { "id": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/parthtestrg/providers/Microsoft.Sql/servers/test-parth/auditingSettings/Default", "name": "Default", "type": "Microsoft.Sql/servers/auditingSettings", "state": "Disabled", "storageEndpoint": "", "retentionDays": 0, "auditActionsAndGroups": [], "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", "isStorageSecondaryKeyInUse": false, "isAzureMonitorTargetEnabled": false }, "serverSecurityAlertPolicy": { "id": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/parthtestrg/providers/Microsoft.Sql/servers/test-parth/securityAlertPolicies/Default", "name": "Default", "type": "Microsoft.Sql/servers/securityAlertPolicies", "state": "Disabled", "disabledAlerts": [ "" ], "emailAddresses": [ "" ], "emailAccountAdmins": false, "storageEndpoint": "", "storageAccountAccessKey": "", "retentionDays": 0, "creationTime": "0001-01-01T00:00:00.000Z" }, "serverAzureADAdministrator": {}, "encryptionProtector": { "id": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/parthtestrg/providers/Microsoft.Sql/servers/test-parth/encryptionProtector/current", "name": "current", "type": "Microsoft.Sql/servers/encryptionProtector", "kind": "servicemanaged", "serverKeyName": "ServiceManaged", "serverKeyType": "ServiceManaged" }, "firewallRules": [], "turbot": { "title": "test0001", "tags": { "environment": "Production" }, "akas": [ "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/test/providers/Microsoft.Sql/servers/test0012" ], "custom": { "azure": { "subscriptionId": "9e3548cf-17e2-4751-b87e-b72bdd2c77f7", "regionName": "centralindia", "resourceGroupName": "test" } } } } }, { "description": "Invalid - id details missing", "input": { "name": "test0001", "turbot": { "title": "test0001", "akas": [ "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/test/providers/Microsoft.Sql/servers/test0012" ], "custom": { "azure": { "subscriptionId": "9e3548cf-17e2-4751-b87e-b72bdd2c77f7", "regionName": "centralindia", "resourceGroupName": "test" } } } } }, { "description": "Invalid - servername missing", "input": { "id": "/subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/test/providers/Microsoft.Sql/servers/test0012", "turbot": { "title": "test0001", "akas": [ "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/test/providers/Microsoft.Sql/servers/test0012" ], "custom": { "azure": { "subscriptionId": "9e3548cf-17e2-4751-b87e-b72bdd2c77f7", "regionName": "centralindia", "resourceGroupName": "test" } } } } } ], ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/server", "modUri": "tmod:@turbot/azure-sql" }}
serverServiceNow
{ "defaultColumns": { "administrator_login": { "column": "enabled" }, "encryption_protector": { "column": "enabled", "type": "string", "size": 1000 }, "firewall_rules": { "column": "enabled", "type": "string", "size": 1000 }, "fully_qualified_domain_name": { "column": "enabled" }, "id": { "column": "enabled", "label": "ID" }, "region": { "column": "enabled", "path": "data.location" }, "resource_group": { "type": "string", "size": 200, "column": "enabled", "path": "metadata.azure.resourceGroupName" }, "server_name": { "column": "enabled", "path": "data.name" }, "server_audit_policy": { "column": "enabled", "path": "data.auditPolicy", "type": "string", "size": 1000 }, "server_azure_ad_administrator": { "column": "enabled", "label": "Server Azure AD Administrator", "path": "data.serverAzureADAdministrator", "type": "string", "size": 1000 }, "server_security_alert_policy": { "column": "enabled", "type": "string", "size": 1000 }, "server_vulnerability_assessment": { "column": "enabled", "type": "string", "size": 1000 }, "state": { "column": "enabled" }, "subscription_id": { "column": "enabled", "label": "Subscription ID", "path": "metadata.azure.subscriptionId" }, "tags": { "column": "enabled", "label": "Tags", "type": "string", "size": 1000 }, "type": { "column": "enabled" }, "version": { "column": "enabled" } }, ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/serverServiceNow", "modUri": "tmod:@turbot/azure-sql" }}
sql
{ "allOf": [ { "$ref": "turbot#/definitions/service" }, { "type": "object", "properties": { "name": { "const": "SQL" }, "namespace": { "const": "Microsoft.Sql" }, "registrationState": { "type": "string" }, "turbot": { "type": "object", "properties": { "akas": { "type": "array", "items": { "$ref": "#/definitions/sqlAka" } }, "title": { "const": "SQL" }, "custom": { "type": "object", "properties": { "azure": { "$ref": "azure#/definitions/azureMetadata" } } } } } }, "required": [ "name", "turbot" ], "additionalProperties": true, "tests": [ { "description": "All details provided", "input": { "name": "SQL", "turbot": { "akas": [ "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/providers/Microsoft.Sql/services/sql" ], "title": "SQL", "custom": { "azure": { "subscriptionId": "9e3548cf-17e2-4751-b87e-b72bdd2c77f7" } } } } }, { "description": "Invalid - Name is not as declared", "input": { "name": "mysql", "turbot": { "akas": [ "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/providers/Microsoft.Sql/services/sql" ], "title": "SQL", "custom": { "azure": { "subscriptionId": "9e3548cf-17e2-4751-b87e-b72bdd2c77f7" } } } }, "expected": false }, { "description": "Invalid - Service name missing", "input": { "turbot": null, "akas": [ "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/providers/Microsoft.Sql/services/sql" ], "title": "SQL", "custom": { "azure": { "subscriptionId": "9e3548cf-17e2-4751-b87e-b72bdd2c77f7" } } }, "expected": false } ] } ], ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/sql", "modUri": "tmod:@turbot/azure-sql" }}
sqlAka
{ "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.Sql/services/sql$", "tests": [ { "description": "base", "input": "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/providers/Microsoft.Sql/services/sql" }, { "description": "invalid service name", "input": "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/providers/Microsoft.MySql/services/sql", "expected": false }, { "description": "invalid subscription id", "input": "azure:///subscriptions/9e3548cf-17e2-4751-12345-b72bdd2c77f7/providers/Microsoft.Sql/services/sql", "expected": false } ], ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/sqlAka", "modUri": "tmod:@turbot/azure-sql" }}
sqlDatabaseAka
{ "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.Sql/servers/([a-z0-9]|[a-z0-9][a-z0-9-]{0,61}[a-z0-9])/databases/[a-zA-Z0-9-]{1,128}$", "tests": [ { "description": "base", "input": "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/test/providers/Microsoft.Sql/servers/test0012/databases/test01" }, { "description": "invalid service name", "input": "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/test/providers/Microsoft.MySql/servers/test0012/databases/test01", "expected": false }, { "description": "invalid subscription id", "input": "azure:///subscriptions/9e3548cf-17e2-4751-12345-b72bdd2c77f700/resourceGroups/test/providers/Microsoft.Sql/servers/test0012/databases/test01", "expected": false } ], ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/sqlDatabaseAka", "modUri": "tmod:@turbot/azure-sql" }}
sqlDatabaseId
{ "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.Sql/servers/([a-z0-9]|[a-z0-9][a-z0-9-]{0,61}[a-z0-9])/databases/[a-zA-Z0-9-]{1,128}$", "tests": [ { "description": "base", "input": "/subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/test/providers/Microsoft.Sql/servers/test0012/databases/test01" }, { "description": "invalid service name", "input": "/subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/test/providers/Microsoft.MySql/servers/test0012/databases/test01", "expected": false }, { "description": "invalid subscription id", "input": "/subscriptions/9e3548cf-17e2-4751-12345-b72bdd2c77f700/resourceGroups/test/providers/Microsoft.Sql/servers/test0012/databases/test01", "expected": false } ], ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/sqlDatabaseId", "modUri": "tmod:@turbot/azure-sql" }}
sqlDatabaseName
{ "type": "string", "pattern": "^[a-zA-Z0-9-]{1,128}$", "tests": [ { "input": "foo" }, { "input": "0cho5" }, { "description": "invalid - too short", "input": "", "expected": false }, { "description": "invalid - too long", "input": "abcvgderfgabcvgderfgabcvgderfgabcvgderfgabcvgderfgabcvgderfgabcvgderfgabcvgderfgabcvgderfgabcvgderfgabcvgderfgabcvgderfgabcvgderfg", "expected": false }, { "description": "invalid - can't end with '.'", "input": "Test.", "expected": false } ], ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/sqlDatabaseName", "modUri": "tmod:@turbot/azure-sql" }}
sqlDatabaseThreatDetectionPolicy
{ "type": "object", "properties": { "storageAccountAccessKey": { "type": "string" }, "state": { "type": "string" }, "storageEndpoint": { "type": "string" }, "retentionDays": { "type": "number" }, "emailAccountAdmins": { "type": "string" }, "emailAddresses": { "type": "string" }, "disabledAlerts": { "type": "string" } }, "additionalProperties": true, "tests": [ { "description": "base", "input": { "creationTime": "2020-05-08T14:09:18.183Z", "disabledAlerts": [ "" ], "emailAccountAdmins": true, "emailAddresses": [ "" ], "id": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/subham_rg/providers/Microsoft.Sql/servers/testsecure/securityAlertPolicies/Default", "name": "Default", "retentionDays": 0, "state": "Enabled", "storageAccountAccessKey": "", "storageEndpoint": "https://testsqlsecure.blob.core.windows.net/", "type": "Microsoft.Sql/servers/securityAlertPolicies" } } ], ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/sqlDatabaseThreatDetectionPolicy", "modUri": "tmod:@turbot/azure-sql" }}
sqlDatabaseVulnerabilityAssessment
{ "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string" }, "storageContainerPath": { "type": "string" }, "recurringScans": { "type": "object", "properties": { "isEnabled": { "type": "boolean" }, "emailSubscriptionAdmins": { "type": "boolean" }, "emails": { "type": "array" } } } }, "tests": [ { "description": "base", "input": { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", "name": "default", "type": "Microsoft.Sql/servers/vulnerabilityAssessments", "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", "recurringScans": { "isEnabled": true, "emailSubscriptionAdmins": false, "emails": [] } } } ], ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/sqlDatabaseVulnerabilityAssessment", "modUri": "tmod:@turbot/azure-sql" }}
sqlElasticPoolAka
{ "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.Sql/servers/([a-z0-9]|[a-z0-9][a-z0-9-]{0,61}[a-z0-9])/elasticPools/[a-zA-Z0-9_.-]*$", "tests": [ { "description": "base", "input": "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/test/providers/Microsoft.Sql/servers/test01-venu/elasticPools/test-pool01" }, { "description": "invalid service name", "input": "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/test/providers/Microsoft.MySql/servers/test01-venu/elastic-pool/test-pool01", "expected": false }, { "description": "invalid subscription id", "input": "azure:///subscriptions/9e3548cf-17e2-4751-b87e0-b72bdd2c77f700/resourceGroups/test/providers/Microsoft.Sql/servers/test01-venu/elasticPools/test-pool01", "expected": false } ], ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/sqlElasticPoolAka", "modUri": "tmod:@turbot/azure-sql" }}
sqlElasticPoolId
{ "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.Sql/servers/([a-z0-9]|[a-z0-9][a-z0-9-]{0,61}[a-z0-9])/elasticPools/[a-zA-Z0-9_.-]*$", "tests": [ { "description": "base", "input": "/subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/test/providers/Microsoft.Sql/servers/test01-venu/elasticPools/test-pool01" }, { "description": "invalid service name", "input": "/subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/test/providers/Microsoft.MySql/servers/test01-venu/elastic-pool/test-pool01", "expected": false }, { "description": "invalid subscription id", "input": "/subscriptions/9e3548cf-17e2-4751-b87e0-b72bdd2c77f700/resourceGroups/test/providers/Microsoft.Sql/servers/test01-venu/elasticPools/test-pool01", "expected": false } ], ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/sqlElasticPoolId", "modUri": "tmod:@turbot/azure-sql" }}
sqlElasticPoolName
{ "type": "string", "minLength": 1, "maxLength": 128, ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/sqlElasticPoolName", "modUri": "tmod:@turbot/azure-sql" }}
sqlServerAka
{ "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_.-]{0,89}[A-Za-z0-9_-]/providers/Microsoft.Sql/servers/([a-z0-9]|[a-z0-9][a-z0-9-]{0,61}[a-z0-9])$", "tests": [ { "description": "base", "input": "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/test/providers/Microsoft.Sql/servers/test0012" }, { "description": "invalid service name", "input": "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/test/providers/Microsoft.MySql/servers/test", "expected": false } ], ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/sqlServerAka", "modUri": "tmod:@turbot/azure-sql" }}
sqlServerId
{ "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.Sql/servers/([a-z0-9]|[a-z0-9][a-z0-9-]{0,61}[a-z0-9])$", "tests": [ { "description": "base", "input": "/subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/test/providers/Microsoft.Sql/servers/test0012" }, { "description": "invalid service name", "input": "//subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/test/providers/Microsoft.MySql/servers/test", "expected": false } ], ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/sqlServerId", "modUri": "tmod:@turbot/azure-sql" }}
sqlServerName
{ "type": "string", "pattern": "^([a-z0-9]|[a-z0-9][a-z0-9-]{0,61}[a-z0-9])$", "tests": [ { "input": "a" }, { "input": "a-a" }, { "description": "invalid - too short", "input": "", "expected": false }, { "description": "invalid - too long", "input": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzjklmnopqrstuvwxyzabcdefghijklmnopqrstuv", "expected": false }, { "description": "invalid - no spaces", "input": "Test me please", "expected": false } ], ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/sqlServerName", "modUri": "tmod:@turbot/azure-sql" }}
sqlServerSecurityAlertPolicy
{ "type": "object", "properties": { "storageAccountAccessKey": { "type": "string" }, "state": { "type": "string" }, "storageEndpoint": { "type": "string" }, "retentionDays": { "type": "number" }, "emailAccountAdmins": { "type": "boolean" }, "emailAddresses": { "type": "array" }, "disabledAlerts": { "type": "array" } }, "additionalProperties": true, "tests": [ { "description": "base", "input": { "creationTime": "2020-05-08T14:09:18.183Z", "disabledAlerts": [ "" ], "emailAccountAdmins": true, "emailAddresses": [ "" ], "id": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/subham_rg/providers/Microsoft.Sql/servers/testsecure/securityAlertPolicies/Default", "name": "Default", "retentionDays": 0, "state": "Enabled", "storageAccountAccessKey": "", "storageEndpoint": "https://testsqlsecure.blob.core.windows.net/", "type": "Microsoft.Sql/servers/securityAlertPolicies" } } ], ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/sqlServerSecurityAlertPolicy", "modUri": "tmod:@turbot/azure-sql" }}
sqlServerVulnerabilityAssessment
{ "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string" }, "storageContainerPath": { "type": "string" }, "recurringScans": { "type": "object", "properties": { "isEnabled": { "type": "boolean" }, "emailSubscriptionAdmins": { "type": "boolean" }, "emails": { "type": "array" } } } }, "tests": [ { "description": "base", "input": { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", "name": "default", "type": "Microsoft.Sql/servers/vulnerabilityAssessments", "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", "recurringScans": { "isEnabled": true, "emailSubscriptionAdmins": false, "emails": [] } } } ], ".turbot": { "uri": "tmod:@turbot/azure-sql#/definitions/sqlServerVulnerabilityAssessment", "modUri": "tmod:@turbot/azure-sql" }}