Log Profiles - List

List the log profiles.

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles?api-version=2016-03-01

URI Parameters

Name In Required Type Description
subscriptionId
path True

string

minLength: 1

The ID of the target subscription.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Responses

Name Type Description
200 OK

LogProfileCollection

Azure operation completed successfully.

Other Status Codes

Microsoft.Common.ErrorResponse

An unexpected error response.

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

List log profiles

Sample request

GET https://management.azure.com/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/providers/Microsoft.Insights/logprofiles?api-version=2016-03-01

Sample response

{
  "value": [
    {
      "name": "default",
      "type": "",
      "id": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/providers/microsoft.insights/logprofiles/default",
      "location": "",
      "properties": {
        "categories": [
          "Delete",
          "Write",
          "Action"
        ],
        "locations": [
          "global"
        ],
        "retentionPolicy": {
          "days": 3,
          "enabled": true
        },
        "serviceBusRuleId": "",
        "storageAccountId": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/JohnKemTest/providers/Microsoft.Storage/storageAccounts/johnkemtest8162"
      },
      "tags": null
    },
    {
      "name": "default2",
      "type": "",
      "id": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/providers/microsoft.insights/logprofiles/default2",
      "location": "",
      "properties": {
        "categories": [
          "Delete",
          "Write",
          "Action"
        ],
        "locations": [
          "global"
        ],
        "retentionPolicy": {
          "days": 15,
          "enabled": true
        },
        "serviceBusRuleId": "",
        "storageAccountId": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/JohnKemTest/providers/Microsoft.Storage/storageAccounts/johnkemtest8165"
      },
      "tags": null
    }
  ]
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

LogProfileCollection

Represents a collection of log profiles.

LogProfileResource

The log profile resource.

Microsoft.Common.ErrorResponse

Describes the format of Error response.

Microsoft.Common.RetentionPolicy

Specifies the retention policy for the log.

systemData

Metadata pertaining to creation and last modification of the resource.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

LogProfileCollection

Represents a collection of log profiles.

Name Type Description
nextLink

string

the URL to get the next set of results.

value

LogProfileResource[]

the values of the log profiles.

LogProfileResource

The log profile resource.

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

location

string

The geo-location where the resource lives

name

string

The name of the resource

properties.categories

string[]

the categories of the logs. These categories are created as is convenient to the user. Some values are: 'Write', 'Delete', and/or 'Action.'

properties.locations

string[]

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.

properties.retentionPolicy

Microsoft.Common.RetentionPolicy

the retention policy for the events in the log.

properties.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}'.

properties.storageAccountId

string

the resource id of the storage account to which you would like to send the Activity Log.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

Resource tags.

type

string

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

Microsoft.Common.ErrorResponse

Describes the format of Error response.

Name Type Description
code

string

Error code

message

string

Error message indicating why the operation failed.

Microsoft.Common.RetentionPolicy

Specifies the retention policy for the log.

Name Type Description
days

integer (int32)

minimum: 0

the number of days for the retention in days. A value of 0 will retain the events indefinitely.

enabled

boolean

a value indicating whether the retention policy is enabled.

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.