Added to Microsoft.Sql the schema for specifiying an Azure AD administrator for the Sql Azure server

This commit is contained in:
rcabr 2017-03-24 11:02:39 -04:00
Родитель d51b166e31
Коммит c96ab508fd
2 изменённых файлов: 80 добавлений и 5 удалений

Просмотреть файл

@ -11,13 +11,13 @@ Welcome to contribute to template deployment schemas, please send pull request t
1. [tools\validateJSON.js](https://github.com/Azure/azure-resource-manager-schemas/blob/master/tools/validateJSON.js) and [ResourceMetaSchema.json](https://github.com/Azure/azure-resource-manager-schemas/blob/master/tools/ResourceMetaSchema.json):
The script uses the ResourceMetaSchema.json to do some basic checks against the new/updated schema file.
**Usage:**
Node validateJSON.js \<schema file path\> ResourceMetaSchema.json \<shcema folder path\>
`Node validateJSON.js \<schema file path\> ResourceMetaSchema.json \<schema folder path\>`
**Sample:**
Node validateJSON.js ..\schemas\2015-08-01\Microsoft.Compute.json ResourceMetaSchema.json ..\schemas\
`Node validateJSON.js ..\schemas\2015-08-01\Microsoft.Compute.json ResourceMetaSchema.json ..\schemas\`
2. [tools\runSchemaTests.js](https://github.com/Azure/azure-resource-manager-schemas/blob/master/tools/runSchemaTests.js)
The script uses all test JSON files under [tests](https://github.com/Azure/azure-resource-manager-schemas/tree/master/tests) folder to test against the schema files.
**Usage:**
Node runSchemaTests.js
`Node runSchemaTests.js`
---
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

Просмотреть файл

@ -58,12 +58,13 @@
{
"oneOf": [
{ "$ref": "#/resourceDefinitions/databasesChild" },
{ "$ref": "#/resourceDefinitions/firewallrulesChild" }
{ "$ref": "#/resourceDefinitions/firewallrulesChild" },
{ "$ref": "#/resourceDefinitions/administratorsChild" }
]
}
]
},
"description": "Microsoft.Sql/servers: Child resources to define databases and firewall rules."
"description": "Microsoft.Sql/servers: Child resources to define databases, firewall rules, and Azure AD administrators."
}
},
"required": [
@ -169,6 +170,54 @@
"properties"
],
"description": "Microsoft.Sql/firewallrules"
},
"administratorsChild": {
"type": "object",
"properties": {
"type": {
"enum": [
"administrators"
]
},
"apiVersion": {
"enum": [
"2014-04-01-preview"
]
},
"properties": {
"$ref": "#/definitions/administratorsBase"
}
},
"required": [
"type",
"apiVersion",
"properties"
],
"description": "Microsoft.Sql/administratorsChild"
},
"administrators": {
"type": "object",
"properties": {
"type": {
"enum": [
"Microsoft.Sql/servers/administrators"
]
},
"apiVersion": {
"enum": [
"2014-04-01-preview"
]
},
"properties": {
"$ref": "#/definitions/administratorsBase"
}
},
"required": [
"type",
"apiVersion",
"properties"
],
"description": "Microsoft.Sql/administrators"
}
},
"definitions": {
@ -384,6 +433,32 @@
"description": "Microsoft.Sql/server/firewallrules: starting IP address"
}
}
},
"administratorsBase": {
"type": "object",
"properties": {
"administratorType": {
"type": "string",
"minLength": 1,
"description": "Set to 'ActiveDirectory'"
},
"login": {
"type": "string",
"minLength": 1,
"description": "The name of the Azure AD object that will be the administrator. For example: 'MyAdminGroup'"
},
"sid": {
"type": "string",
"minLength": 1,
"description": "The Object ID of the Azure AD object that will be the administrator."
},
"tenantId": {
"type": "string",
"minLength": 1,
"description": "The Tenant Id that the administrator Azure AD object belongs to."
}
}
}
}
}