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
@override | |
public onListViewUpdated(event: IListViewCommandSetListViewUpdatedParameters): void { | |
const commandOne: Command = this.tryGetCommand('COMMAND_ONE'); | |
const commandTwo: Command = this.tryGetCommand('COMMAND_TWO); | |
const commandThree: Command = this.tryGetCommand('COMMAND_THREE'); | |
// Hide commands by default | |
commandOne.visible = false; | |
commandTwo.visible = false; | |
commandThree.visible = false; |
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
{ | |
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": {}, | |
"functions": [], | |
"variables": {}, | |
"resources": [ | |
{ | |
"name": "deploy-soft-delete-and-purge-protection", | |
"type": "Microsoft.Authorization/policyDefinitions", |
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
- task: PowerShell@2 | |
inputs: | |
targetType: inline | |
script: | | |
$systemAccessToken = $env:SYSTEM_ACCESSTOKEN | |
$pipelineDefinitionId = $env:PIPELINE_DEFINITION_ID | |
$projectBaseUrl = $env:PROJECT_BASE_URL | |
$uri = "$($projectBaseUrl)/_apis/build/builds?api-version=5.1&definitions=$($pipelineDefinitionId)&queryOrder=queueTimeDescending&`$top=1" | |
$headers = @{"Authorization" = "Bearer $systemAccessToken"} |
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
{ | |
"properties": { | |
"createdDate": { | |
"type": "string" | |
}, | |
"detailedMessage": { | |
"type": "object" | |
}, | |
"eventType": { | |
"type": "string" |
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
[Reflection.Assembly]::LoadWithPartialName("System.Web")| out-null | |
$URI="[ADD_YOUR_EVENT_HUB_NAMESPACE].servicebus.windows.net/myeventhub" | |
$Access_Policy_Name="RootManageSharedAccessKey" | |
$Access_Policy_Key="[ROOT_MANAGED_SHARED_ACCESS_KEY]" | |
#Added $UntilTokenExpireInSeconds instead of the 300 seconds example from docs.microsoft.com | |
$UntilTokenExpireInSeconds = 60*60*24*365 | |
$Expires=([DateTimeOffset]::Now.ToUnixTimeSeconds())+$UntilTokenExpireInSeconds | |
$SignatureString=[System.Web.HttpUtility]::UrlEncode($URI)+ "`n" + [string]$Expires | |
$HMAC = New-Object System.Security.Cryptography.HMACSHA256 | |
$HMAC.key = [Text.Encoding]::ASCII.GetBytes($Access_Policy_Key) |