Microsoft. ContainerService managedClusters/trustedAccessRoleBindings 2025-08-01

تعريف مورد Bicep

يمكن نشر نوع المورد managedClusters/trustedAccessRoleBindings مع العمليات التي تستهدف:

  • مجموعات الموارد - راجع أوامر نشر مجموعة الموارد

للحصول على قائمة بالخصائص التي تم تغييرها في كل إصدار من إصدارات واجهة برمجة التطبيقات، راجع سجل التغيير .

أمثلة الاستخدام

عينات Bicep

مثال أساسي لنشر ربط دور الوصول الموثوق به لنظام مجموعة Kubernetes.

param resourceName string = 'acctest0001'
param location string = 'westus'

resource vault 'Microsoft.KeyVault/vaults@2023-02-01' = {
  name: 'kv${resourceName}'
  location: location
  properties: {
    accessPolicies: []
    createMode: 'default'
    enableRbacAuthorization: false
    enabledForDeployment: false
    enabledForDiskEncryption: false
    enabledForTemplateDeployment: false
    publicNetworkAccess: 'Enabled'
    sku: {
      family: 'A'
      name: 'standard'
    }
    softDeleteRetentionInDays: 7
    tenantId: tenant().tenantId
  }
}

resource workspace 'Microsoft.MachineLearningServices/workspaces@2024-04-01' = {
  name: 'mlw-${resourceName}'
  location: location
  sku: {
    name: 'Basic'
    tier: 'Basic'
  }
  kind: 'Default'
  properties: {
    applicationInsights: component.id
    keyVault: vault.id
    publicNetworkAccess: 'Enabled'
    storageAccount: storageAccount.id
    v1LegacyMode: false
  }
}

resource managedCluster 'Microsoft.ContainerService/managedClusters@2025-02-01' = {
  name: 'aks-${resourceName}'
  location: location
  sku: {
    name: 'Base'
    tier: 'Free'
  }
  properties: {
    addonProfiles: {}
    agentPoolProfiles: [
      {
        count: 1
        enableAutoScaling: false
        enableEncryptionAtHost: false
        enableFIPS: false
        enableNodePublicIP: false
        enableUltraSSD: false
        kubeletDiskType: ''
        mode: 'System'
        name: 'default'
        nodeLabels: {}
        osDiskType: 'Managed'
        osType: 'Linux'
        scaleDownMode: 'Delete'
        tags: {}
        type: 'VirtualMachineScaleSets'
        upgradeSettings: {
          drainTimeoutInMinutes: 0
          maxSurge: '10%'
          nodeSoakDurationInMinutes: 0
        }
        vmSize: 'Standard_B2s'
      }
    ]
    apiServerAccessProfile: {
      disableRunCommand: false
      enablePrivateCluster: false
      enablePrivateClusterPublicFQDN: false
    }
    autoUpgradeProfile: {
      nodeOSUpgradeChannel: 'NodeImage'
      upgradeChannel: 'none'
    }
    azureMonitorProfile: {
      metrics: {
        enabled: false
      }
    }
    disableLocalAccounts: false
    dnsPrefix: 'aks-${resourceName}'
    enableRBAC: true
    kubernetesVersion: ''
    metricsProfile: {
      costAnalysis: {
        enabled: false
      }
    }
    nodeResourceGroup: ''
    securityProfile: {}
    servicePrincipalProfile: {
      clientId: 'msi'
    }
    supportPlan: 'KubernetesOfficial'
  }
}

resource trustedAccessRoleBinding 'Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings@2025-02-01' = {
  name: 'tarb-${resourceName}'
  parent: managedCluster
  properties: {
    roles: [
      'Microsoft.MachineLearningServices/workspaces/mlworkload'
    ]
    sourceResourceId: workspace.id
  }
}

resource component 'Microsoft.Insights/components@2020-02-02' = {
  name: 'ai-${resourceName}'
  location: location
  kind: 'web'
  properties: {
    Application_Type: 'web'
    DisableIpMasking: false
    DisableLocalAuth: false
    ForceCustomerStorageForProfiler: false
    RetentionInDays: 90
    SamplingPercentage: 100
    publicNetworkAccessForIngestion: 'Enabled'
    publicNetworkAccessForQuery: 'Enabled'
  }
}

resource storageAccount 'Microsoft.Storage/storageAccounts@2023-05-01' = {
  name: 'st${resourceName}'
  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
  }
}

تنسيق المورد

لإنشاء مورد Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings، أضف Bicep التالي إلى القالب الخاص بك.

resource symbolicname 'Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings@2025-08-01' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    roles: [
      'string'
    ]
    sourceResourceId: 'string'
  }
}

قيم الخصائص

Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings

الاسم الوصف القيمة‬
اسم اسم المورد string

Constraints:
الحد الأدنى للطول = 1
الحد الأقصى للطول = 24
النمط = ^([A-Za-z0-9-])+$ (مطلوب)
الوالد في Bicep، يمكنك تحديد المورد الأصل لمورد تابع. تحتاج فقط إلى إضافة هذه الخاصية عند الإعلان عن المورد التابع خارج المورد الأصل.

لمزيد من المعلومات، راجع مورد تابع خارج المورد الأصل.
اسم رمزي للمورد من النوع: managedClusters
خصائص خصائص ربط دور الوصول الموثوق به TrustedAccessRoleBindingProperties (مطلوب)

TrustedAccessRoleBindingProperties

الاسم الوصف القيمة‬
ادوار قائمة الأدوار المراد ربطها، كل عنصر هو اسم دور مؤهل لنوع المورد. على سبيل المثال: 'Microsoft.MachineLearningServices/workspaces/reader'. string[] (مطلوبة)
sourceResourceId معرف مورد ARM لمورد المصدر الذي تم تكوين الوصول الموثوق به له. سلسلة (مطلوب)

تعريف مورد قالب ARM

يمكن نشر نوع المورد managedClusters/trustedAccessRoleBindings مع العمليات التي تستهدف:

أمثلة الاستخدام

تنسيق المورد

لإنشاء مورد Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings، أضف JSON التالي إلى القالب الخاص بك.

{
  "type": "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings",
  "apiVersion": "2025-08-01",
  "name": "string",
  "properties": {
    "roles": [ "string" ],
    "sourceResourceId": "string"
  }
}

قيم الخصائص

Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings

الاسم الوصف القيمة‬
apiVersion إصدار واجهة برمجة التطبيقات '2025-08-01'
اسم اسم المورد string

Constraints:
الحد الأدنى للطول = 1
الحد الأقصى للطول = 24
النمط = ^([A-Za-z0-9-])+$ (مطلوب)
خصائص خصائص ربط دور الوصول الموثوق به TrustedAccessRoleBindingProperties (مطلوب)
النوع نوع المورد 'Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings'

TrustedAccessRoleBindingProperties

الاسم الوصف القيمة‬
ادوار قائمة الأدوار المراد ربطها، كل عنصر هو اسم دور مؤهل لنوع المورد. على سبيل المثال: 'Microsoft.MachineLearningServices/workspaces/reader'. string[] (مطلوبة)
sourceResourceId معرف مورد ARM لمورد المصدر الذي تم تكوين الوصول الموثوق به له. سلسلة (مطلوب)

تعريف مورد Terraform (موفر AzAPI)

يمكن نشر نوع المورد managedClusters/trustedAccessRoleBindings مع العمليات التي تستهدف:

  • مجموعات الموارد للحصول على قائمة بالخصائص المتغيرة في كل إصدار من واجهة برمجة التطبيقات، انظر سجل التغيير.

أمثلة الاستخدام

عينات Terraform

مثال أساسي لنشر ربط دور الوصول الموثوق به لنظام مجموعة Kubernetes.

terraform {
  required_providers {
    azapi = {
      source = "Azure/azapi"
    }
  }
}

provider "azapi" {
  skip_provider_registration = false
}

data "azapi_client_config" "current" {}

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" "component" {
  type      = "Microsoft.Insights/components@2020-02-02"
  parent_id = azapi_resource.resourceGroup.id
  name      = "ai-${var.resource_name}"
  location  = var.location
  body = {
    kind = "web"
    properties = {
      Application_Type                = "web"
      DisableIpMasking                = false
      DisableLocalAuth                = false
      ForceCustomerStorageForProfiler = false
      RetentionInDays                 = 90
      SamplingPercentage              = 100
      publicNetworkAccessForIngestion = "Enabled"
      publicNetworkAccessForQuery     = "Enabled"
    }
  }
}

resource "azapi_resource" "vault" {
  type      = "Microsoft.KeyVault/vaults@2023-02-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = "kv${var.resource_name}"
  location  = var.location
  body = {
    properties = {
      accessPolicies               = []
      createMode                   = "default"
      enableRbacAuthorization      = false
      enabledForDeployment         = false
      enabledForDiskEncryption     = false
      enabledForTemplateDeployment = false
      publicNetworkAccess          = "Enabled"
      sku = {
        family = "A"
        name   = "standard"
      }
      softDeleteRetentionInDays = 7
      tenantId                  = data.azapi_client_config.current.tenant_id
    }
  }
}

resource "azapi_resource" "managedCluster" {
  type      = "Microsoft.ContainerService/managedClusters@2025-02-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = "aks-${var.resource_name}"
  location  = var.location
  identity {
    type         = "SystemAssigned"
    identity_ids = []
  }
  body = {
    properties = {
      addonProfiles = {}
      agentPoolProfiles = [{
        count                  = 1
        enableAutoScaling      = false
        enableEncryptionAtHost = false
        enableFIPS             = false
        enableNodePublicIP     = false
        enableUltraSSD         = false
        kubeletDiskType        = ""
        mode                   = "System"
        name                   = "default"
        nodeLabels             = {}
        osDiskType             = "Managed"
        osType                 = "Linux"
        scaleDownMode          = "Delete"
        tags                   = {}
        type                   = "VirtualMachineScaleSets"
        upgradeSettings = {
          drainTimeoutInMinutes     = 0
          maxSurge                  = "10%"
          nodeSoakDurationInMinutes = 0
        }
        vmSize = "Standard_B2s"
      }]
      apiServerAccessProfile = {
        disableRunCommand              = false
        enablePrivateCluster           = false
        enablePrivateClusterPublicFQDN = false
      }
      autoUpgradeProfile = {
        nodeOSUpgradeChannel = "NodeImage"
        upgradeChannel       = "none"
      }
      azureMonitorProfile = {
        metrics = {
          enabled = false
        }
      }
      disableLocalAccounts = false
      dnsPrefix            = "aks-${var.resource_name}"
      enableRBAC           = true
      kubernetesVersion    = ""
      metricsProfile = {
        costAnalysis = {
          enabled = false
        }
      }
      nodeResourceGroup = ""
      securityProfile   = {}
      servicePrincipalProfile = {
        clientId = "msi"
      }
      supportPlan = "KubernetesOfficial"
    }
    sku = {
      name = "Base"
      tier = "Free"
    }
  }
}

resource "azapi_resource" "storageAccount" {
  type      = "Microsoft.Storage/storageAccounts@2023-05-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = "st${var.resource_name}"
  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" "workspace" {
  type      = "Microsoft.MachineLearningServices/workspaces@2024-04-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = "mlw-${var.resource_name}"
  location  = var.location
  identity {
    type         = "SystemAssigned"
    identity_ids = []
  }
  body = {
    kind = "Default"
    properties = {
      applicationInsights = azapi_resource.component.id
      keyVault            = azapi_resource.vault.id
      publicNetworkAccess = "Enabled"
      storageAccount      = azapi_resource.storageAccount.id
      v1LegacyMode        = false
    }
    sku = {
      name = "Basic"
      tier = "Basic"
    }
  }
}

resource "azapi_resource" "trustedAccessRoleBinding" {
  type      = "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings@2025-02-01"
  parent_id = azapi_resource.managedCluster.id
  name      = "tarb-${var.resource_name}"
  body = {
    properties = {
      roles            = ["Microsoft.MachineLearningServices/workspaces/mlworkload"]
      sourceResourceId = azapi_resource.workspace.id
    }
  }
}

تنسيق المورد

لإنشاء مورد Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings، أضف Terraform التالي إلى القالب الخاص بك.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings@2025-08-01"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      roles = [
        "string"
      ]
      sourceResourceId = "string"
    }
  }
}

قيم الخصائص

Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings

الاسم الوصف القيمة‬
اسم اسم المورد string

Constraints:
الحد الأدنى للطول = 1
الحد الأقصى للطول = 24
النمط = ^([A-Za-z0-9-])+$ (مطلوب)
parent_id معرف المورد الأصل لهذا المورد. معرف المورد من النوع: managedClusters
خصائص خصائص ربط دور الوصول الموثوق به TrustedAccessRoleBindingProperties (مطلوب)
النوع نوع المورد "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings@2025-08-01"

TrustedAccessRoleBindingProperties

الاسم الوصف القيمة‬
ادوار قائمة الأدوار المراد ربطها، كل عنصر هو اسم دور مؤهل لنوع المورد. على سبيل المثال: 'Microsoft.MachineLearningServices/workspaces/reader'. string[] (مطلوبة)
sourceResourceId معرف مورد ARM لمورد المصدر الذي تم تكوين الوصول الموثوق به له. سلسلة (مطلوب)