Share via


Microsoft.AppPlatform Spring/monitoringSettings

Remarks

Note: Azure Spring Apps Monitoring Settings (Microsoft.AppPlatform/Spring/monitoringSettings) is now deprecated and will be retired on 2028-05-31. See https://aka.ms/asaretirement for more information.

Bicep resource definition

The Spring/monitoringSettings resource type can be deployed with operations that target:

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

Resource format

To create a Microsoft.AppPlatform/Spring/monitoringSettings resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.AppPlatform/Spring/monitoringSettings@2024-05-01-preview' = {
  parent: resourceSymbolicName
  name: 'default'
  properties: {
    appInsightsAgentVersions: {}
    appInsightsInstrumentationKey: 'string'
    appInsightsSamplingRate: int
    error: {
      code: 'string'
      message: 'string'
    }
    traceEnabled: bool
  }
}

Property Values

Microsoft.AppPlatform/Spring/monitoringSettings

Name Description Value
name The resource name 'default' (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: Spring
properties Properties of the Monitoring Setting resource MonitoringSettingProperties

ApplicationInsightsAgentVersions

Name Description Value

Error

Name Description Value
code The code of error. string
message The message of error. string

MonitoringSettingProperties

Name Description Value
appInsightsAgentVersions Indicates the versions of application insight agent ApplicationInsightsAgentVersions
appInsightsInstrumentationKey Target application insight instrumentation key, null or whitespace include empty will disable monitoringSettings string
appInsightsSamplingRate Indicates the sampling rate of application insight agent, should be in range [0.0, 100.0] int

Constraints:
Min value = 0
Max value = 100
error Error when apply Monitoring Setting changes. Error
traceEnabled Indicates whether enable the trace functionality, which will be deprecated since api version 2020-11-01-preview. Please leverage appInsightsInstrumentationKey to indicate if monitoringSettings enabled or not bool

Usage Examples

Azure Quickstart Samples

The following Azure Quickstart templates contain Bicep samples for deploying this resource type.

Bicep File Description
Deploy a simple Azure Spring Apps microservice application This template deploys a simple Azure Spring Apps microservice application to run on Azure.

ARM template resource definition

The Spring/monitoringSettings resource type can be deployed with operations that target:

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

Resource format

To create a Microsoft.AppPlatform/Spring/monitoringSettings resource, add the following JSON to your template.

{
  "type": "Microsoft.AppPlatform/Spring/monitoringSettings",
  "apiVersion": "2024-05-01-preview",
  "name": "string",
  "properties": {
    "appInsightsAgentVersions": {
    },
    "appInsightsInstrumentationKey": "string",
    "appInsightsSamplingRate": "int",
    "error": {
      "code": "string",
      "message": "string"
    },
    "traceEnabled": "bool"
  }
}

Property Values

Microsoft.AppPlatform/Spring/monitoringSettings

Name Description Value
apiVersion The api version '2024-05-01-preview'
name The resource name 'default' (required)
properties Properties of the Monitoring Setting resource MonitoringSettingProperties
type The resource type 'Microsoft.AppPlatform/Spring/monitoringSettings'

ApplicationInsightsAgentVersions

Name Description Value

Error

Name Description Value
code The code of error. string
message The message of error. string

MonitoringSettingProperties

Name Description Value
appInsightsAgentVersions Indicates the versions of application insight agent ApplicationInsightsAgentVersions
appInsightsInstrumentationKey Target application insight instrumentation key, null or whitespace include empty will disable monitoringSettings string
appInsightsSamplingRate Indicates the sampling rate of application insight agent, should be in range [0.0, 100.0] int

Constraints:
Min value = 0
Max value = 100
error Error when apply Monitoring Setting changes. Error
traceEnabled Indicates whether enable the trace functionality, which will be deprecated since api version 2020-11-01-preview. Please leverage appInsightsInstrumentationKey to indicate if monitoringSettings enabled or not bool

Usage Examples

Azure Quickstart Templates

The following Azure Quickstart templates deploy this resource type.

Template Description
Deploy a simple Azure Spring Apps microservice application

Deploy to Azure
This template deploys a simple Azure Spring Apps microservice application to run on Azure.

Terraform (AzAPI provider) resource definition

The Spring/monitoringSettings resource type can be deployed with operations that target:

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

Resource format

To create a Microsoft.AppPlatform/Spring/monitoringSettings resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.AppPlatform/Spring/monitoringSettings@2024-05-01-preview"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      appInsightsAgentVersions = {
      }
      appInsightsInstrumentationKey = "string"
      appInsightsSamplingRate = int
      error = {
        code = "string"
        message = "string"
      }
      traceEnabled = bool
    }
  }
}

Property Values

Microsoft.AppPlatform/Spring/monitoringSettings

Name Description Value
name The resource name 'default' (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: Spring
properties Properties of the Monitoring Setting resource MonitoringSettingProperties
type The resource type "Microsoft.AppPlatform/Spring/monitoringSettings@2024-05-01-preview"

ApplicationInsightsAgentVersions

Name Description Value

Error

Name Description Value
code The code of error. string
message The message of error. string

MonitoringSettingProperties

Name Description Value
appInsightsAgentVersions Indicates the versions of application insight agent ApplicationInsightsAgentVersions
appInsightsInstrumentationKey Target application insight instrumentation key, null or whitespace include empty will disable monitoringSettings string
appInsightsSamplingRate Indicates the sampling rate of application insight agent, should be in range [0.0, 100.0] int

Constraints:
Min value = 0
Max value = 100
error Error when apply Monitoring Setting changes. Error
traceEnabled Indicates whether enable the trace functionality, which will be deprecated since api version 2020-11-01-preview. Please leverage appInsightsInstrumentationKey to indicate if monitoringSettings enabled or not bool

Usage Examples

Terraform Samples

A basic example of deploying Spring Cloud Monitoring Settings.

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" "Spring" {
  type      = "Microsoft.AppPlatform/Spring@2023-05-01-preview"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      zoneRedundant = false
    }
    sku = {
      name = "S0"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_update_resource" "monitoringSetting" {
  type      = "Microsoft.AppPlatform/Spring/monitoringSettings@2023-05-01-preview"
  parent_id = azapi_resource.Spring.id
  name      = "default"
  body = {
    properties = {
      traceEnabled = false
    }
  }
  response_export_values = ["*"]
}