Monitoring Settings - Update Patch

Update the Monitoring Setting.

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default?api-version=2023-12-01

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

serviceName
path True

string

The name of the Service resource.

Regex pattern: ^[a-z][a-z0-9-]*[a-z0-9]$

subscriptionId
path True

string

Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

api-version
query True

string

The API version to use for this operation.

Request Body

Name Type Description
properties

MonitoringSettingProperties

Properties of the Monitoring Setting resource

Responses

Name Type Description
200 OK

MonitoringSettingResource

Success. The response describes the updated Monitoring Setting.

202 Accepted

MonitoringSettingResource

Accepted. The response indicates the exiting Monitoring Setting is now updating and contains a Location header to query the operation result.

Other Status Codes

CloudError

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

MonitoringSettings_UpdatePatch

Sample request

PATCH https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/monitoringSettings/default?api-version=2023-12-01

{
  "properties": {
    "traceEnabled": true,
    "appInsightsInstrumentationKey": "00000000-0000-0000-0000-000000000000",
    "appInsightsSamplingRate": 10
  }
}

Sample response

Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2023-12-01
Azure-AsyncOperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000/Spring/default?api-version=2023-12-01
{
  "properties": {
    "provisioningState": "Updating",
    "traceEnabled": true,
    "appInsightsInstrumentationKey": "00000000-0000-0000-0000-000000000000",
    "appInsightsSamplingRate": 10,
    "appInsightsAgentVersions": {
      "java": "3.0.0"
    }
  },
  "systemData": {
    "createdBy": "sample-user",
    "createdByType": "User",
    "createdAt": "2021-08-11T03:16:03.944Z",
    "lastModifiedBy": "sample-user",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2021-08-11T03:17:03.944Z"
  },
  "type": "Microsoft.AppPlatform/Spring/monitoringSettings",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/monitoringSettings/default",
  "name": "default"
}
{
  "properties": {
    "provisioningState": "Succeeded",
    "traceEnabled": true,
    "appInsightsInstrumentationKey": "00000000-0000-0000-0000-000000000000",
    "appInsightsSamplingRate": 10,
    "appInsightsAgentVersions": {
      "java": "3.0.0"
    }
  },
  "systemData": {
    "createdBy": "sample-user",
    "createdByType": "User",
    "createdAt": "2021-08-11T03:16:03.944Z",
    "lastModifiedBy": "sample-user",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2021-08-11T03:17:03.944Z"
  },
  "type": "Microsoft.AppPlatform/Spring/monitoringSettings",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/monitoringSettings/default",
  "name": "default"
}

Definitions

Name Description
applicationInsightsAgentVersions

Application Insights agent versions properties payload

CloudError

An error response from the service.

CloudErrorBody

An error response from the service.

createdByType

The type of identity that created the resource.

Error

The error code compose of code and message.

lastModifiedByType

The type of identity that last modified the resource.

MonitoringSettingProperties

Monitoring Setting properties payload

MonitoringSettingResource

Monitoring Setting resource

MonitoringSettingState

State of the Monitoring Setting.

SystemData

Metadata pertaining to creation and last modification of the resource.

applicationInsightsAgentVersions

Application Insights agent versions properties payload

Name Type Description
java

string

Indicates the version of application insight java agent

CloudError

An error response from the service.

Name Type Description
error

CloudErrorBody

An error response from the service.

CloudErrorBody

An error response from the service.

Name Type Description
code

string

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

details

CloudErrorBody[]

A list of additional details about the error.

message

string

A message describing the error, intended to be suitable for display in a user interface.

target

string

The target of the particular error. For example, the name of the property in error.

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

Error

The error code compose of code and message.

Name Type Description
code

string

The code of error.

message

string

The message of error.

lastModifiedByType

The type of identity that last modified the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

MonitoringSettingProperties

Monitoring Setting properties payload

Name Type Description
appInsightsAgentVersions

applicationInsightsAgentVersions

Indicates the versions of application insight agent

appInsightsInstrumentationKey

string

Target application insight instrumentation key, null or whitespace include empty will disable monitoringSettings

appInsightsSamplingRate

number

Indicates the sampling rate of application insight agent, should be in range [0.0, 100.0]

error

Error

Error when apply Monitoring Setting changes.

provisioningState

MonitoringSettingState

State of the Monitoring Setting.

traceEnabled

boolean

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

MonitoringSettingResource

Monitoring Setting resource

Name Type Description
id

string

Fully qualified resource Id for the resource.

name

string

The name of the resource.

properties

MonitoringSettingProperties

Properties of the Monitoring Setting resource

systemData

SystemData

Metadata pertaining to creation and last modification of the resource.

type

string

The type of the resource.

MonitoringSettingState

State of the Monitoring Setting.

Name Type Description
Failed

string

NotAvailable

string

Succeeded

string

Updating

string

SystemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource modification (UTC).

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

lastModifiedByType

The type of identity that last modified the resource.