Roles オブジェクト (TMSL)
適用対象:
SQL Server 2016 以降 Analysis Services
Azure Analysis Services
Power BI Premium
権限のコレクションを指定するモデルのロールを定義します。 ロールのメンバーシップは、Windows セキュリティプリンシパルで構成されます。 特定のオブジェクトへのアクセスを制限するために、ロールにフィルターを設定できます。
オブジェクトの定義
すべてのオブジェクトには、名前、型、説明、プロパティコレクション、注釈など、共通のプロパティセットがあります。 ロール オブジェクトには、次のプロパティもあります。
modelPermission
データベースに対する権限のスコープを確立します。 有効な値は none です。
read、
読み取り
更新
および管理者です。
members
メンバーは、メンバー名と ID の両方で構成されます。ここで、member name は Windows セキュリティプリンシパルの別名またはフレンドリ名で、ID はセキュリティ識別子です。 ロールの定義には両方とも指定されています。
テーブルアクセス許可
テーブル権限は、DAX 式を使用して定義された権限を持つ名前付きオブジェクトです。 このプロパティは省略可能で、セキュリティフィルターを適用するために使用されます。
使用
ロール オブジェクトは、 Alter command (tmsl)、 Create command (tmsl)、 createorreplace コマンド (tmsl)、および Delete コマンド (tmsl)で使用されます。
ロールオブジェクトはモデルのプロパティですが、モデルとデータベース間の一対一のマッピングを指定して、データベースオブジェクトのプロパティとして指定することもできます。
ロールオブジェクトを作成、置換、または変更する場合は、オブジェクト定義のすべての読み取り/書き込みプロパティを指定します。 読み取り/書き込みプロパティの省略は削除と見なされます。
完全な構文
モデルのロールオブジェクトのスキーマ表現を以下に示します。
"roles": {
"type": "array",
"items": {
"description": "ModelRole object of Tabular Object Model (TOM)",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"modelPermission": {
"enum": [
"none",
"read",
"readRefresh",
"refresh",
"administrator"
]
},
"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
}
},
"members": {
"type": "array",
"items": {
"anyOf": [
{
"description": "WindowsModelRoleMember object of Tabular Object Model (TOM)",
"type": "object",
"properties": {
"memberName": {
"type": "string"
},
"memberId": {
"type": "string"
},
"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
}
}
},
"additionalProperties": false
},
{
"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
}
}
},
"additionalProperties": false
}
]
}
},
"tablePermissions": {
"type": "array",
"items": {
"description": "TablePermission object of Tabular Object Model (TOM)",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"filterExpression": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"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
}
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
}