Share via


Summary Logs - Create Or Update

Creates or updates Log Analytics workspace Summary rules.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/summaryLogs/{summaryLogsName}?api-version=2025-07-01

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string (uuid)

The ID of the target subscription. The value must be an UUID.

summaryLogsName
path True

string

pattern: [^/]+

The name of the summary logs. Must not contain '/'.

workspaceName
path True

string

minLength: 4
maxLength: 63
pattern: ^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$

The name of the workspace.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Body

Name Type Description
properties.description

string

The description of the Summary rule.

properties.displayName

string

The display name of the Summary rule.

properties.ruleDefinition

RuleDefinition

Rule definition parameters.

properties.ruleType

RuleTypeEnum

SummaryRules rule type: User.

Responses

Name Type Description
200 OK

SummaryLogs

OK response definition.

Headers

  • Azure-AsyncOperation: string
  • Location: string
201 Created

SummaryLogs

OK response definition.

Headers

  • Azure-AsyncOperation: string
  • Location: string
Other Status Codes

ErrorResponse

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

SummaryLogsUpsert

Sample request

PUT https://management.azure.com/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/oiautorest6685/providers/Microsoft.OperationalInsights/workspaces/oiautorest6685/summaryLogs/summarylogs1?api-version=2025-07-01

{
  "properties": {
    "ruleType": "User",
    "ruleDefinition": {
      "query": "MyTable_CL",
      "binSize": 180,
      "binDelay": 10,
      "binStartTime": "2020-02-03T04:05:06Z"
    }
  }
}

Sample response

Azure-AsyncOperation: https://management.azure.com/subscriptions/11111111-1111-1111-1111-111111111111/providers/Microsoft.OperationalInsights/locations/eastus/operationstatuses/62e4d893-d233-4005-988e-a428d9f77076?api-version=2025-07-01
Location: https://management.azure.com/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/oiautorest6685/providers/Microsoft.OperationalInsights/workspaces/oiautorest6685/summarylogs/summarylogs1/operationresults/7fb7ae54-18a3-44ed-9604-139df1c7568e?api-version=2025-07-01
{
  "systemData": {
    "createdBy": "22222222-2222-2222-2222-222222222222",
    "createdAt": "2020-02-03T04:05:06Z"
  },
  "properties": {
    "ruleType": "User",
    "ruleDefinition": {
      "query": "MyTable_CL",
      "binSize": 180,
      "binDelay": 10,
      "binStartTime": "2024-02-03T04:00:00Z"
    },
    "provisioningState": "Updating",
    "isActive": false
  },
  "id": "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/oiautorest6685/providers/Microsoft.OperationalInsights/workspaces/oiautorest6685/summaryLogs/summarylogs1",
  "name": "summarylogs1"
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/11111111-1111-1111-1111-111111111111/providers/Microsoft.OperationalInsights/locations/eastus/operationstatuses/62e4d893-d233-4005-988e-a428d9f77076?api-version=2025-07-01
Location: https://management.azure.com/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/oiautorest6685/providers/Microsoft.OperationalInsights/workspaces/oiautorest6685/summarylogs/summarylogs1/operationresults/7fb7ae54-18a3-44ed-9604-139df1c7568e?api-version=2025-07-01
{
  "systemData": {
    "createdBy": "22222222-2222-2222-2222-222222222222",
    "createdAt": "2020-02-03T04:05:06Z"
  },
  "properties": {
    "ruleType": "User",
    "ruleDefinition": {
      "query": "MyTable_CL",
      "binSize": 180,
      "binDelay": 10,
      "binStartTime": "2020-02-03T04:05:06Z"
    },
    "provisioningState": "Updating",
    "isActive": false
  },
  "id": "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/oiautorest6685/providers/Microsoft.OperationalInsights/workspaces/oiautorest6685/summaryLogs/summarylogs1",
  "name": "summarylogs1"
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ProvisioningStateEnum

Summary rule is in provisioning state. If set to 'updating' or 'deleting', indicates a resource lock due to an ongoing operation, preventing any update to the Summary rule until the operation is complete.

RuleDefinition

Rule definition parameters.

RuleTypeEnum

SummaryRules rule type: User.

StatusCodeEnum

Indicates the reason for rule deactivation.

SummaryLogs

Workspace data summary rules definition.

systemData

Metadata pertaining to creation and last modification of the resource.

TimeSelectorEnum

The time cursor used in Summary rules bins processing, e.g. TimeGenerated.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

ProvisioningStateEnum

Summary rule is in provisioning state. If set to 'updating' or 'deleting', indicates a resource lock due to an ongoing operation, preventing any update to the Summary rule until the operation is complete.

Value Description
Updating

Summary rules is still being built and updated. The resource is currently locked for changes until the procedure is complete.

Succeeded

Summary rules state is stable and without changes. The resource is unlocked and open for new updates.

Deleting

Summary rules state is deleting. The resource is currently locked for changes until the procedure is complete.

Failed

Summary rules state is stable and without changes.

Canceled

Summary rules state is stable and without changes.

RuleDefinition

Rule definition parameters.

Name Type Description
binDelay

integer (int32)

The minimum delay in seconds before bin processing.

binSize

integer (int32)

Scheduled window in minutes. Allowed values: 20, 30, 60, 120, 180, 360, 720, 1440.

binStartTime

string (date-time)

The start time (UTC) when Summary rule execution starts.

destinationTable

string

The destination table used for the Summary rule results.

query

string

Summary rule query.

timeSelector

TimeSelectorEnum

The time cursor used in Summary rules bins processing, e.g. TimeGenerated.

RuleTypeEnum

SummaryRules rule type: User.

Value Description
User

User defined summary rule. This is the definition for rules created and defined by users.

StatusCodeEnum

Indicates the reason for rule deactivation.

Value Description
UserAction

Summary rule stop originated from a user action (Stop was called).

DataPlaneError

Summary rule stop was caused due to data plane related error.

SummaryLogs

Workspace data summary rules definition.

Name Type Description
id

string (arm-id)

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

The name of the resource

properties.description

string

The description of the Summary rule.

properties.displayName

string

The display name of the Summary rule.

properties.isActive

boolean

Indicates if Summary rule is active. If not, Summary rule execution stops.

properties.provisioningState

ProvisioningStateEnum

Summary rule is in provisioning state. If set to 'updating' or 'deleting', indicates a resource lock due to an ongoing operation, preventing any update to the Summary rule until the operation is complete.

properties.ruleDefinition

RuleDefinition

Rule definition parameters.

properties.ruleType

RuleTypeEnum

SummaryRules rule type: User.

properties.statusCode

StatusCodeEnum

Indicates the reason for rule deactivation.

systemData

systemData

Metadata pertaining to creation and last modification of the resource.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

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 (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

TimeSelectorEnum

The time cursor used in Summary rules bins processing, e.g. TimeGenerated.

Value Description
TimeGenerated

TimeGenerated.