Get the log profile for a subscription in Azure Monitor REST API

 

Updated: September 26, 2016

See common parameters and header for headers and parameters that are used by all requests related to log profiles.

MethodRequest URI
GEThttps://management.azure.com/subscriptions/{subscription-id}/providers/microsoft.insights/logprofiles/default?api-version={api-version}

JSON

{
  "properties": {
    "storageAccountId": "/subscriptions/6983c752-c9b8-48dd-b4d4-da739beb7e98/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/armlogs1",
    "serviceBusRuleId": "/subscriptions/6983c752-c9b8-48dd-b4d4-da739beb7e98/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.ServiceBus/namespaces/myNamespace/RootManageSharedAccessKey",
    "locations": [
      "eastus",
      "westus"
    ],
    "categories": [
      "Write",
      "Delete",
      "Action"
    ],
    "retentionPolicy": {
      "enabled": true,
      "days": 1
    }
  }
}

Element nameTypeDescription
storageAccountIdstringThe resource ID of the storage account to which you would like to send the Activity Log
serviceBusRuleIdstringThe 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}”.
locationsArray of stringsList of regions for which Activity Log events should be stored or streamed.
categoriesArray of stringsMust be "Write", "Delete", and/or "Action." Describes the operation types that will be stored or streamed.
retentionPolicyJSON blobDescribes the retention policy for events in the log. Used for storage account option only.
enabledbooleanDescribes whether a retention policy is enabled.
daysIntNumber of days to retain the events. A value of 0 will retain the events indefinitely. Used for storage account option only.

Status code 200

CAPS is using GitHub Flavored Markdown(GFM) which is one of the most popular Markdown flavor. Lets' learn how to make your customized document with below rules.

View the Markdown BasicsView the Github Flavored MarkdownView the Online sample.

When you are authoring your Markdown content in CAPS, you could get help from different ways:

  • Use Alt + F1 in IE or F1 in Chrome to open Command Palette
  • Use Ctrl + space at any place to open insert.
  • Use authoring tool bar on the top of the editor to help create your content
  • Paragraph Paragraphs in Markdown are just one or more lines of consecutive text followed by one or more blank lines.

    On July 2, an alien ship entered Earth's orbit and deployed several dozen saucer-shaped "destroyer" spacecraft, each 15 miles (24 km) wide.
    
    On July 3, the Black Knights, a squadron of Marine Corps F/A-18 Hornets, participated 
    
    
  • Headings
    You can either you header dropdown list provided in the authoring toolbar, or manually add '---' or '===' in the next line under your section title. You can also create a heading by adding one or more # symbols before your heading text. The number of # you use will determine the size of the heading.

    ## The second largest heading (an <h2> tag)
    …
    ###### The 6th largest heading (an <h6> tag)
    
    
  • Block quotes You can indicate block quotes with a >.

    In the words of Abraham Lincoln:
    
    > Pardon my French
    > Second line of the quote
    
    
  • Styling text You can make your text Bold or italic

    **This text will be bold**
    *This text will be italic*  
    
    

    You can also use authoring toolbar to achieve this

  • Lists You can add an unordered list by preceding list items with * or -

    * Item
    * Item
    * Item
    
    - Item
    - Item
    - Item  
    
    

    You can add ordered list by preceding list items with a number

    1. Item 1
    2. Item 2
    3. Item 3  
    
    

    You can create nested lists by indenting list items by two spaces.

    1. Item 1
      1. A corollary to the above item.
      2. Yet another point to consider.
    2. Item 2
      * A corollary that does not need to be ordered.
        * This is indented four spaces, because it's two spaces further than the item above.
        * You might want to consider making a new list.
    3. Item 3 
    
    

    You can also use authoring toolbar to achieve this

  • Code formatting You can use triple ticks (```) to format text as its own distinct block. Check out this neat program I wrote:

    ```
    x = 0
    x = 2 + 2
    what is x
    ```
    
    
  • Insert Links You can create an inline link by wrapping link text in brackets [Link Label], and then wrapping the link in parentheses (http://URL). Bing.com

    You can also create a link to an existing topic in CAPS with the authoring toolbar

  • Insert Image You can reference a online image from external resource by using ![Image Label], and then wrapping the image resource url in parentheses (http://ImageURL)

    You can also insert an image from CAPS with the authoring toolbar

You can create tables by assembling a list of words and dividing them with hyphens - (for the first row), and then separating each column with a pipe |:

First HeaderSecond Header
Content CellContent Cell
Content CellContent Cell

You can also include inline Markdown format syntax such as links, bold, italics, or strike through:

NameDescription
HelpDisplay the help window.
CloseCloses a window

You can have more formatting control by including colons : within the header row, you can define text to be left-aligned, right-aligned, or center-aligned:

Left-AlignedCenter AlignedRight Aligned
col 3 issome wordy text$1600
col 2 iscentered$12
zebra stripesare neat$1

A colon on the left-most side indicates a left-aligned column; a colon on the right-most side indicates a right-aligned column; a colon on both sides indicates a center-aligned column.

You can use a subset of HTML within your content. A full list of our supported tags and attributes can be found here

Show: