Microsoft.Authorization roleDefinitions

Bicep 資源定義

roleDefinitions 資源類型是 延伸模組資源,這表示您可以將它套用至另一個資源。

scope使用此資源上的 屬性來設定此資源的範圍。 請參閱 在 Bicep 中設定擴充功能資源的範圍

roleDefinitions 資源的有效部署範圍包括:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

備註

如需建立角色指派和定義的指引,請參閱 使用 Bicep 建立 Azure RBAC 資源

資源格式

若要建立 Microsoft.Authorization/roleDefinitions 資源,請將下列 Bicep 新增至範本。

resource symbolicname 'Microsoft.Authorization/roleDefinitions@2022-04-01' = {
  name: 'string'
  scope: resourceSymbolicName
  properties: {
    assignableScopes: [
      'string'
    ]
    description: 'string'
    permissions: [
      {
        actions: [
          'string'
        ]
        dataActions: [
          'string'
        ]
        notActions: [
          'string'
        ]
        notDataActions: [
          'string'
        ]
      }
    ]
    roleName: 'string'
    type: 'string'
  }
}

屬性值

roleDefinitions

名稱 描述
NAME 資源名稱 需要字串 ()

字元限制:36

合法字元:
必須是全域唯一識別碼 (GUID)。

資源名稱在租用戶中必須是唯一的。
範圍 在與部署範圍不同的範圍內建立擴充資源時,請使用 。 目標資源

針對 Bicep,請將此屬性設定為資源的符號名稱,以套用 延伸模組資源
properties 角色定義屬性。 RoleDefinitionProperties

RoleDefinitionProperties

名稱 描述
assignableScopes 角色定義可指派的範圍。 string[]
description 角色定義描述。 字串
權限 角色定義許可權。 Permission[]
roleName 角色名稱。 字串
type 角色類型。 字串

權限

名稱 描述
動作 允許的動作。 string[]
dataActions 允許的數據動作。 string[]
notActions 拒絕的動作。 string[]
notDataActions 拒絕的數據動作。 string[]

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
適用於 Azure 上的 IBM Cloud Tools for Data

部署至 Azure
此範本會在 Azure 上部署 Openshift 叢集,其中包含所有必要的資源、基礎結構,然後部署 IBM Cloud 在 Data 上,以及使用者選擇的附加元件。
部署 SAP ILM 存放區的記憶體帳戶

部署至 Azure
Microsoft Azure 儲存體 帳戶現在可以當做 ILM 存放區使用,以保存 SAP ILM 系統的封存盤案和附件。 ILM 存放區是滿足 SAP ILM 相容記憶體系統需求的元件。 您可以使用 WebDAV 介面標準將封存盤案儲存在儲存媒體中,同時使用 SAP ILM 保留管理規則。 如需 SAP ILM 存放區的詳細資訊,請參閱 SAP 說明入口網站
使用 Azure Windows 基準的 Azure Image Builder

部署至 Azure
建立 Azure Image Builder 環境,並建置已套用最新 Windows 匯報 和 Azure Windows 基準的 Windows Server 映射。
設定開發箱服務

部署至 Azure
此範本會根據 Dev Box 快速入門指南建立所有 Dev Box 系統管理員資源。 您可以檢視所有已建立的資源,或直接移至 DevPortal.microsoft.com 以建立您的第一個 Dev Box。
透過訂用帳戶層級部署建立新的角色定義

部署至 Azure
此範本是訂用帳戶層級範本,將在訂用帳戶範圍建立角色定義。

ARM 範本資源定義

roleDefinitions 資源類型是 延伸模組資源,這表示您可以將它套用至另一個資源。

scope使用此資源上的 屬性來設定此資源的範圍。 請參閱 在ARM範本中設定擴充功能資源的範圍

roleDefinitions 資源的有效部署範圍如下:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

備註

如需建立角色指派和定義的指引,請參閱 使用 Bicep 建立 Azure RBAC 資源

資源格式

若要建立 Microsoft.Authorization/roleDefinitions 資源,請將下列 JSON 新增至您的範本。

{
  "type": "Microsoft.Authorization/roleDefinitions",
  "apiVersion": "2022-04-01",
  "name": "string",
  "scope": "string",
  "properties": {
    "assignableScopes": [ "string" ],
    "description": "string",
    "permissions": [
      {
        "actions": [ "string" ],
        "dataActions": [ "string" ],
        "notActions": [ "string" ],
        "notDataActions": [ "string" ]
      }
    ],
    "roleName": "string",
    "type": "string"
  }
}

屬性值

roleDefinitions

名稱 描述
類型 資源類型 'Microsoft.Authorization/roleDefinitions'
apiVersion 資源 API 版本 '2022-04-01'
NAME 資源名稱 字串 (必要)

字元限制:36

合法字元:
必須是全域唯一識別碼 (GUID)。

資源名稱在租用戶中必須是唯一的。
範圍 在與部署範圍不同的範圍建立擴充資源時,請使用 。 目標資源

針對 JSON,請將值設定為要套用 擴充資源 的資源完整名稱。
properties 角色定義屬性。 RoleDefinitionProperties

RoleDefinitionProperties

名稱 描述
assignableScopes 角色定義可指派的範圍。 string[]
description 角色定義描述。 字串
權限 角色定義許可權。 Permission[]
roleName 角色名稱。 字串
type 角色類型。 字串

權限

名稱 描述
動作 允許的動作。 string[]
dataActions 允許的數據動作。 string[]
notActions 拒絕的動作。 string[]
notDataActions 拒絕的數據動作。 string[]

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
適用於 Azure 上的 IBM Cloud Pipeline for Data

部署至 Azure
此範本會在 Azure 上部署 Openshift 叢集,其中包含所有必要的資源、基礎結構,然後部署 IBM Cloud Anchor for Data,以及使用者所選擇的附加元件。
部署 SAP ILM 存放區的記憶體帳戶

部署至 Azure
Microsoft Azure 儲存體 帳戶現在可以當做 ILM 存放區來保存 SAP ILM 系統的封存盤案和附件。 ILM 存放區是滿足 SAP ILM 相容記憶體系統需求的元件。 您可以使用 WebDAV 介面標準將封存盤案儲存在儲存媒體中,同時使用 SAP ILM 保留管理規則。 如需 SAP ILM 存放區的詳細資訊,請參閱 SAP 說明入口網站
使用 Azure Windows 基準的 Azure Image Builder

部署至 Azure
建立 Azure Image Builder 環境並建置 Windows Server 映射,並套用最新的 Windows 匯報 和 Azure Windows 基準。
設定開發箱服務

部署至 Azure
此範本會根據 Dev Box 快速入門指南建立所有 Dev Box 系統管理員資源。 您可以檢視所有已建立的資源,或直接移至 DevPortal.microsoft.com,以建立您的第一個開發箱。
透過訂用帳戶層級部署建立新的角色定義

部署至 Azure
此範本是訂用帳戶層級範本,將在訂用帳戶範圍建立角色定義。

Terraform (AzAPI 提供者) 資源定義

roleDefinitions 資源類型是 延伸模組資源,這表示您可以將它套用至另一個資源。

parent_id使用此資源上的 屬性來設定此資源的範圍。

roleDefinitions 資源的有效部署範圍如下:

  • 資源群組
  • 訂用帳戶
  • 管理群組

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.Authorization/roleDefinitions 資源,請將下列 Terraform 新增至範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Authorization/roleDefinitions@2022-04-01"
  name = "string"
  parent_id = "string"
  body = jsonencode({
    properties = {
      assignableScopes = [
        "string"
      ]
      description = "string"
      permissions = [
        {
          actions = [
            "string"
          ]
          dataActions = [
            "string"
          ]
          notActions = [
            "string"
          ]
          notDataActions = [
            "string"
          ]
        }
      ]
      roleName = "string"
      type = "string"
    }
  })
}

屬性值

roleDefinitions

名稱 描述
類型 資源類型 “Microsoft.Authorization/roleDefinitions@2022-04-01”
NAME 資源名稱 需要字串 ()

字元限制:36

合法字元:
必須是全域唯一識別碼 (GUID)。

資源名稱在租用戶中必須是唯一的。
parent_id 要套用此擴充功能資源的資源標識碼。 需要字串 ()
properties 角色定義屬性。 RoleDefinitionProperties

RoleDefinitionProperties

名稱 描述
assignableScopes 角色定義可指派的範圍。 string[]
description 角色定義描述。 字串
權限 角色定義許可權。 Permission[]
roleName 角色名稱。 字串
type 角色類型。 字串

權限

名稱 描述
動作 允許的動作。 string[]
dataActions 允許的數據動作。 string[]
notActions 拒絕的動作。 string[]
notDataActions 拒絕的數據動作。 string[]