Bicep 資源定義
帳戶資源類型可以使用目標作業來部署:
- 資源群組 - 請參閱 資源群組部署命令
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
使用範例
Bicep 範例
部署視訊索引子帳戶的基本範例。
param resourceName string = 'acctest0001'
param location string = 'westus'
resource account 'Microsoft.VideoIndexer/accounts@2025-04-01' = {
name: '${resourceName}-vi'
location: location
properties: {
storageServices: {
resourceId: storageAccount.id
userAssignedIdentity: ''
}
}
}
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-05-01' = {
name: '${replace(resourceName, '-', '')}sa'
location: location
sku: {
name: 'Standard_LRS'
}
kind: 'StorageV2'
properties: {
accessTier: 'Hot'
allowBlobPublicAccess: true
allowCrossTenantReplication: false
allowSharedKeyAccess: true
defaultToOAuthAuthentication: false
dnsEndpointType: 'Standard'
encryption: {
keySource: 'Microsoft.Storage'
services: {
queue: {
keyType: 'Service'
}
table: {
keyType: 'Service'
}
}
}
isHnsEnabled: false
isLocalUserEnabled: true
isNfsV3Enabled: false
isSftpEnabled: false
minimumTlsVersion: 'TLS1_2'
networkAcls: {
bypass: 'AzureServices'
defaultAction: 'Allow'
ipRules: []
resourceAccessRules: []
virtualNetworkRules: []
}
publicNetworkAccess: 'Enabled'
supportsHttpsTrafficOnly: true
}
}
resource userAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
name: '${resourceName}-identity'
location: location
}
資源格式
若要建立 Microsoft.VideoIndexer/accounts 資源,請將下列 Bicep 新增至範本。
resource symbolicname 'Microsoft.VideoIndexer/accounts@2024-01-01' = {
identity: {
type: 'string'
userAssignedIdentities: {
{customized property}: {}
}
}
location: 'string'
name: 'string'
properties: {
accountId: 'string'
storageServices: {
resourceId: 'string'
userAssignedIdentity: 'string'
}
}
tags: {
{customized property}: 'string'
}
}
屬性值
Microsoft.VideoIndexer/帳戶
| 名字 | 描述 | 價值 |
|---|---|---|
| 身分識別 | 受控服務識別(系統指派和/或使用者指派的身分識別) | ManagedServiceIdentity |
| 位置 | 資源所在的地理位置 | 字串 (必要) |
| 名字 | 資源名稱 | 字串 約束: 最小長度 = 3 最大長度 = 50 模式 = ^[A-Za-z0-9-]+$ (必要) |
| 性能 | 帳戶屬性清單 | AccountPropertiesForPutRequest |
| 標籤 | 資源標籤 | 標記名稱和值的字典。 請參閱範本中的 標籤 |
AccountPropertiesForPutRequest
| 名字 | 描述 | 價值 |
|---|---|---|
| 帳戶ID | 帳戶的數據平面標識碼。 只有在連接現有的傳統帳戶時,才能設定此設定 | 字串 |
| storage服務 | 記憶體服務詳細數據 | StorageServicesForPutRequest |
ManagedServiceIdentity
| 名字 | 描述 | 價值 |
|---|---|---|
| 型別 | 受控服務識別的類型(允許 SystemAssigned 和 UserAssigned 類型)。 | “無” “系統分配” 'SystemAssigned,UserAssigned' 'UserAssigned' (必要) |
| 使用者指派的身份 | 與資源相關聯的使用者指派身分識別集。 userAssignedIdentities 字典索引鍵的格式為 ARM 資源標識符:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}。 字典值可以是要求中的空白物件({})。 | UserAssignedIdentities |
StorageServicesForPutRequest
| 名字 | 描述 | 價值 |
|---|---|---|
| 資源ID | 記憶體服務資源標識碼 | 字串 |
| 使用者指定身份 | 要用來授與許可權的使用者指派身分識別 | 字串 |
TrackedResourceTags
| 名字 | 描述 | 價值 |
|---|
UserAssignedIdentities
| 名字 | 描述 | 價值 |
|---|
UserAssignedIdentity
| 名字 | 描述 | 價值 |
|---|
ARM 樣本資源定義
帳戶資源類型可以使用目標作業來部署:
使用範例
資源格式
若要建立 Microsoft.VideoIndexer/accounts 資源,請將下列 JSON 新增至範本。
{
"type": "Microsoft.VideoIndexer/accounts",
"apiVersion": "2024-01-01",
"name": "string",
"identity": {
"type": "string",
"userAssignedIdentities": {
"{customized property}": {
}
}
},
"location": "string",
"properties": {
"accountId": "string",
"storageServices": {
"resourceId": "string",
"userAssignedIdentity": "string"
}
},
"tags": {
"{customized property}": "string"
}
}
屬性值
Microsoft.VideoIndexer/帳戶
| 名字 | 描述 | 價值 |
|---|---|---|
| apiVersion | API 版本 | '2024-01-01' |
| 身分識別 | 受控服務識別(系統指派和/或使用者指派的身分識別) | ManagedServiceIdentity |
| 位置 | 資源所在的地理位置 | 字串 (必要) |
| 名字 | 資源名稱 | 字串 約束: 最小長度 = 3 最大長度 = 50 模式 = ^[A-Za-z0-9-]+$ (必要) |
| 性能 | 帳戶屬性清單 | AccountPropertiesForPutRequest |
| 標籤 | 資源標籤 | 標記名稱和值的字典。 請參閱範本中的 標籤 |
| 型別 | 資源類型 | “Microsoft.VideoIndexer/帳戶” |
AccountPropertiesForPutRequest
| 名字 | 描述 | 價值 |
|---|---|---|
| 帳戶ID | 帳戶的數據平面標識碼。 只有在連接現有的傳統帳戶時,才能設定此設定 | 字串 |
| storage服務 | 記憶體服務詳細數據 | StorageServicesForPutRequest |
ManagedServiceIdentity
| 名字 | 描述 | 價值 |
|---|---|---|
| 型別 | 受控服務識別的類型(允許 SystemAssigned 和 UserAssigned 類型)。 | “無” “系統分配” 'SystemAssigned,UserAssigned' 'UserAssigned' (必要) |
| 使用者指派的身份 | 與資源相關聯的使用者指派身分識別集。 userAssignedIdentities 字典索引鍵的格式為 ARM 資源標識符:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}。 字典值可以是要求中的空白物件({})。 | UserAssignedIdentities |
StorageServicesForPutRequest
| 名字 | 描述 | 價值 |
|---|---|---|
| 資源ID | 記憶體服務資源標識碼 | 字串 |
| 使用者指定身份 | 要用來授與許可權的使用者指派身分識別 | 字串 |
TrackedResourceTags
| 名字 | 描述 | 價值 |
|---|
UserAssignedIdentities
| 名字 | 描述 | 價值 |
|---|
UserAssignedIdentity
| 名字 | 描述 | 價值 |
|---|
Terraform (AzAPI 提供者) 資源定義
帳戶資源類型可以使用目標作業來部署:
- 資源團體 關於每個 API 版本變更屬性的清單,請參見 變更日誌。
使用範例
Terraform 範例
部署視訊索引子帳戶的基本範例。
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westus"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "storageAccount" {
type = "Microsoft.Storage/storageAccounts@2023-05-01"
parent_id = azapi_resource.resourceGroup.id
name = "${replace(var.resource_name, "-", "")}sa"
location = var.location
body = {
kind = "StorageV2"
properties = {
accessTier = "Hot"
allowBlobPublicAccess = true
allowCrossTenantReplication = false
allowSharedKeyAccess = true
defaultToOAuthAuthentication = false
dnsEndpointType = "Standard"
encryption = {
keySource = "Microsoft.Storage"
services = {
queue = {
keyType = "Service"
}
table = {
keyType = "Service"
}
}
}
isHnsEnabled = false
isLocalUserEnabled = true
isNfsV3Enabled = false
isSftpEnabled = false
minimumTlsVersion = "TLS1_2"
networkAcls = {
bypass = "AzureServices"
defaultAction = "Allow"
ipRules = []
resourceAccessRules = []
virtualNetworkRules = []
}
publicNetworkAccess = "Enabled"
supportsHttpsTrafficOnly = true
}
sku = {
name = "Standard_LRS"
}
}
}
resource "azapi_resource" "userAssignedIdentity" {
type = "Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31"
parent_id = azapi_resource.resourceGroup.id
name = "${var.resource_name}-identity"
location = var.location
}
resource "azapi_resource" "account" {
type = "Microsoft.VideoIndexer/accounts@2025-04-01"
parent_id = azapi_resource.resourceGroup.id
name = "${var.resource_name}-vi"
location = var.location
identity {
type = "SystemAssigned"
identity_ids = []
}
body = {
properties = {
storageServices = {
resourceId = azapi_resource.storageAccount.id
userAssignedIdentity = ""
}
}
}
}
資源格式
若要建立 Microsoft.VideoIndexer/accounts 資源,請將下列 Terraform 新增至範本。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.VideoIndexer/accounts@2024-01-01"
name = "string"
parent_id = "string"
identity {
type = "string"
identity_ids = [
"string"
]
}
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
accountId = "string"
storageServices = {
resourceId = "string"
userAssignedIdentity = "string"
}
}
}
}
屬性值
Microsoft.VideoIndexer/帳戶
| 名字 | 描述 | 價值 |
|---|---|---|
| 身分識別 | 受控服務識別(系統指派和/或使用者指派的身分識別) | ManagedServiceIdentity |
| 位置 | 資源所在的地理位置 | 字串 (必要) |
| 名字 | 資源名稱 | 字串 約束: 最小長度 = 3 最大長度 = 50 模式 = ^[A-Za-z0-9-]+$ (必要) |
| 性能 | 帳戶屬性清單 | AccountPropertiesForPutRequest |
| 標籤 | 資源標籤 | 標記名稱和值的字典。 |
| 型別 | 資源類型 | “Microsoft.VideoIndexer/accounts@2024-01-01” |
AccountPropertiesForPutRequest
| 名字 | 描述 | 價值 |
|---|---|---|
| 帳戶ID | 帳戶的數據平面標識碼。 只有在連接現有的傳統帳戶時,才能設定此設定 | 字串 |
| storage服務 | 記憶體服務詳細數據 | StorageServicesForPutRequest |
ManagedServiceIdentity
| 名字 | 描述 | 價值 |
|---|---|---|
| 型別 | 受控服務識別的類型(允許 SystemAssigned 和 UserAssigned 類型)。 | “無” “系統分配” 'SystemAssigned,UserAssigned' 'UserAssigned' (必要) |
| 使用者指派的身份 | 與資源相關聯的使用者指派身分識別集。 userAssignedIdentities 字典索引鍵的格式為 ARM 資源標識符:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}。 字典值可以是要求中的空白物件({})。 | UserAssignedIdentities |
StorageServicesForPutRequest
| 名字 | 描述 | 價值 |
|---|---|---|
| 資源ID | 記憶體服務資源標識碼 | 字串 |
| 使用者指定身份 | 要用來授與許可權的使用者指派身分識別 | 字串 |
TrackedResourceTags
| 名字 | 描述 | 價值 |
|---|
UserAssignedIdentities
| 名字 | 描述 | 價值 |
|---|
UserAssignedIdentity
| 名字 | 描述 | 價值 |
|---|