---
title: "PATCH /subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}"
method: PATCH
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}"
---

# PATCH /subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}

`PATCH /subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}`

Updates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method.

## Path parameters

- `logProfileName` string, required

## Parameters

- `../../../../../common-types/resource-management/v2/types.json#/components/parameters/SubscriptionIdParameter` — unresolved $ref
- `../../../../../common-types/resource-management/v2/types.json#/components/parameters/ApiVersionParameter` — unresolved $ref

## Request body

- LogProfileResourcePatch — The log profile resource for patch operations.
  - `tags` unknown
  - `properties` LogProfileProperties — The log profile properties.
    - `storageAccountId` string — the resource id of the storage account to which you would like to send the Activity Log.
    - `serviceBusRuleId` string — The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming the Activity Log. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'.
    - `locations` string[], required — List of regions for which Activity Log events should be stored or streamed. It is a comma separated list of valid ARM locations including the 'global' location.
    - `categories` string[], required — the categories of the logs. These categories are created as is convenient to the user. Some values are: 'Write', 'Delete', and/or 'Action.'
    - `retentionPolicy` RetentionPolicy, required — Specifies the retention policy for the log.
      - `enabled` boolean, required — a value indicating whether the retention policy is enabled.
      - `days` integer, required — the number of days for the retention in days. A value of 0 will retain the events indefinitely.

## Response `200`

An existing log profile was successfully updated.

- LogProfileResource — An azure resource object
  - `id` string — Azure resource Id
  - `name` string — Azure resource name
  - `type` string — Azure resource type
  - `location` string, required — Resource location
  - `tags` unknown

## Other responses

- `default` — Error response describing why the operation failed.

## Changes

- **2021-07-05** (2016-03-01) `426b4f00c847` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/azure/apis/monitormanagementclient-8/changes/subscriptions/:subscriptionId/providers/Microsoft.Insights/logprofiles/:logProfileName/patch.md)

---

[API](https://skmtc.dev/azure/apis/monitormanagementclient-8.md) · [All operations](https://skmtc.dev/azure/apis/monitormanagementclient-8/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/monitormanagementclient-8/revisions/426b4f00c847/schema)
