我正在尝试更新托管在托管 Azure Analysis Service 实例(版本 16.0.101.19)上的表格模型(兼容性 1500)中的角色。此角色的成员是一个安全组,因此通过其 Azure AD 对象 ID 引用它。我想要做的是更新角色以添加描述属性,我可以在其中提供组的友好显示名称。
下面是当前脚本的副本,我在其中尝试添加描述属性。
{
"createOrReplace": {
"object": {
"database": "Test",
"role": "Processor"
},
"role": {
"name": "Processor",
"modelPermission": "administrator",
"members": [
{
"memberName": "obj:zzzzzzz@zzzzzzzzzzzz",
"identityProvider": "AzureAD",
"description": "This is really security group A"
}
]
}
}
}
不幸的是,当我尝试通过 SSMS 执行脚本时,这会导致以下错误。
The JSON DDL request failed with the following error: <ccon>Cannot de-serialize Model Role. Error: Unrecognized JSON property: description. Check path 'members[0].description', line 14, position 18..</ccon>
我原以为这是一个简单的更新,但显然我误解了一些东西。
根据doc,没有“描述”属性,但有一个名称/值对的“注释”集合。
{
"description": "ExternalModelRoleMember object of Tabular Object Model (TOM)",
"type": "object",
"properties": {
"memberName": {
"type": "string"
},
"memberId": {
"type": "string"
},
"identityProvider": {
"type": "string"
},
"memberType": {
"enum": [
"auto",
"user",
"group"
]
},
"annotations": {
"type": "array",
"items": {
"description": "Annotation object of Tabular Object Model (TOM)",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"additionalProperties": false
}
}
},