This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$uri = "https://management.azure.com/subscriptions/$($SubscriptionId)/resourceGroups/$($ResourceGroupName)/providers/Microsoft.OperationalInsights/workspaces/$($WorkspaceName)/providers/Microsoft.SecurityInsights/automationRules?api-version=$($apiVersion)" | |
Write-Verbose -Verbose $uri | |
$automationRules = Invoke-RestMethod $uri -Method 'GET' -Headers $headers | |
while ($null -ne $automationRules.nextLink) | |
{ | |
$nextLink = $automationRules.nextLink | |
Write-Verbose -Verbose "Next link found, getting next page" | |
$nextPageAutomationRules = Invoke-RestMethod $nextLink -Method 'GET' -Headers $headers | |
$automationRules.value += $nextPageAutomationRules.value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Remember to provide adequate logging with context.log, context.warn, context.error. The function should be written in javascript. The function will be deployed to Azure Functions. You should strive not to use dependencies where possible. The function should be written in a way that it can be easily tested, maintained and extended upon. Do not hallucinate, keep your responses short, provide full code. | |
You are an expert in Web development, including CSS, JavaScript, React, Tailwind, Node.JS and Hugo / Markdown.Don't apologise unnecessarily. Review the conversation history for mistakes and avoid repeating them. | |
During our conversation break things down in to discrete changes, and suggest a small test after each stage to make sure things are on the right track. | |
Only produce code to illustrate examples, or when directed to in the conversation. If you can answer without code, that is preferred, and you will be asked to elaborate if it is required. | |
Request clarification for anything unclear or ambiguous. |