Microsoft.Insights privateLinkScopes/scopedResources

Bicep resource definition

The privateLinkScopes/scopedResources resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Usage Examples

Bicep Samples

A basic example of deploying Azure Monitor Private Link Scoped Service.

param resourceName string = 'acctest0001'
param location string = 'westeurope'

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

resource privateLinkScope 'Microsoft.Insights/privateLinkScopes@2019-10-17-preview' = {
  name: resourceName
  location: 'Global'
  properties: {}
}

resource scopedResource 'Microsoft.Insights/privateLinkScopes/scopedResources@2019-10-17-preview' = {
  name: resourceName
  parent: privateLinkScope
  properties: {
    linkedResourceId: component.id
  }
}

Resource format

To create a Microsoft.Insights/privateLinkScopes/scopedResources resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Insights/privateLinkScopes/scopedResources@2023-06-01-preview' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    kind: 'string'
    linkedResourceId: 'string'
    subscriptionLocation: 'string'
  }
}

Property Values

Microsoft.Insights/privateLinkScopes/scopedResources

Name Description Value
name The resource name string (required)
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: privateLinkScopes
properties Resource properties. ScopedResourceProperties

ScopedResourceProperties

Name Description Value
kind The kind of scoped Azure monitor resource. 'Metrics'
'Resource'
linkedResourceId The resource id of the scoped Azure monitor resource. string
subscriptionLocation The location of a scoped subscription. Only needs to be specified for metric dataplane subscriptions. string

ARM template resource definition

The privateLinkScopes/scopedResources resource type can be deployed with operations that target:

Usage Examples

Resource format

To create a Microsoft.Insights/privateLinkScopes/scopedResources resource, add the following JSON to your template.

{
  "type": "Microsoft.Insights/privateLinkScopes/scopedResources",
  "apiVersion": "2023-06-01-preview",
  "name": "string",
  "properties": {
    "kind": "string",
    "linkedResourceId": "string",
    "subscriptionLocation": "string"
  }
}

Property Values

Microsoft.Insights/privateLinkScopes/scopedResources

Name Description Value
apiVersion The api version '2023-06-01-preview'
name The resource name string (required)
properties Resource properties. ScopedResourceProperties
type The resource type 'Microsoft.Insights/privateLinkScopes/scopedResources'

ScopedResourceProperties

Name Description Value
kind The kind of scoped Azure monitor resource. 'Metrics'
'Resource'
linkedResourceId The resource id of the scoped Azure monitor resource. string
subscriptionLocation The location of a scoped subscription. Only needs to be specified for metric dataplane subscriptions. string

Terraform (AzAPI provider) resource definition

The privateLinkScopes/scopedResources resource type can be deployed with operations that target:

  • Resource groups For a list of changed properties in each API version, see change log.

Usage Examples

Terraform Samples

A basic example of deploying Azure Monitor Private Link Scoped Service.

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 = "westeurope"
}

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      = 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"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "privateLinkScope" {
  type      = "Microsoft.Insights/privateLinkScopes@2019-10-17-preview"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = "Global"
  body = {
    properties = {
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "scopedResource" {
  type      = "Microsoft.Insights/privateLinkScopes/scopedResources@2019-10-17-preview"
  parent_id = azapi_resource.privateLinkScope.id
  name      = var.resource_name
  body = {
    properties = {
      linkedResourceId = azapi_resource.component.id
    }
  }
  schema_validation_enabled = false
  ignore_casing             = true
  response_export_values    = ["*"]
}

Resource format

To create a Microsoft.Insights/privateLinkScopes/scopedResources resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Insights/privateLinkScopes/scopedResources@2023-06-01-preview"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      kind = "string"
      linkedResourceId = "string"
      subscriptionLocation = "string"
    }
  }
}

Property Values

Microsoft.Insights/privateLinkScopes/scopedResources

Name Description Value
name The resource name string (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: privateLinkScopes
properties Resource properties. ScopedResourceProperties
type The resource type "Microsoft.Insights/privateLinkScopes/scopedResources@2023-06-01-preview"

ScopedResourceProperties

Name Description Value
kind The kind of scoped Azure monitor resource. 'Metrics'
'Resource'
linkedResourceId The resource id of the scoped Azure monitor resource. string
subscriptionLocation The location of a scoped subscription. Only needs to be specified for metric dataplane subscriptions. string