This file contains hidden or 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
<!-- | |
IMPORTANT: | |
- Policy elements can appear only within the <inbound>, <outbound>, <backend> section elements. | |
- To apply a policy to the incoming request (before it is forwarded to the backend service), place a corresponding policy element within the <inbound> section element. | |
- To apply a policy to the outgoing response (before it is sent back to the caller), place a corresponding policy element within the <outbound> section element. | |
- To add a policy, place the cursor at the desired insertion point and select a policy from the sidebar. | |
- To remove a policy, delete the corresponding policy statement from the policy document. | |
- Position the <base> element within a section element to inherit all policies from the corresponding section element in the enclosing scope. | |
- Remove the <base> element to prevent inheriting policies from the corresponding section element in the enclosing scope. | |
- Policies are applied in the order of their appearance, from the top down. |
This file contains hidden or 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
using namespace System.Net | |
# Input bindings are passed in via param block. | |
param($Request, $TriggerMetadata) | |
# Write to the Azure Functions log stream. | |
Write-Host "PowerShell HTTP trigger function processed a request." | |
$status = [HttpStatusCode]::OK | |
try { | |
$response = (Invoke-WebRequest -uri https://ifconfig.me/ip).Content |
This file contains hidden or 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
resources: | |
- repo: self | |
pool: | |
name: Hosted | |
steps: | |
- task: AzureResourceGroupDeployment@2 | |
displayName: >- | |
Azure Deployment: Deploy API products | |
inputs: | |
azureSubscription: <service connection> |
This file contains hidden or 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
<policies> | |
<inbound> | |
<set-backend-service base-url="*** add your wcf relay address here ***" /> | |
<cache-lookup-value key="@("relaytoken")" variable-name="relaytoken" /> | |
<choose> | |
<when condition="@(!context.Variables.ContainsKey("relaytoken"))"> | |
<set-variable name="resourceUri" value="@(context.Request.Url.ToString())" /> | |
<!-- an accessKey entry must exist in NameValue --> | |
<set-variable name="accessKey" value="{{accessKey}}" /> |
This file contains hidden or 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
param([string] $subscriptioname, [string] $resourcegroup, [string]$state) | |
Get-AzureRmSubscription -SubscriptionName $subscriptioname | Select-AzureRmSubscription | |
Find-AzureRmResource -ResourceGroupNameContains $resourcegroup -ResourceType Microsoft.Logic/workflows | ForEach-Object {Set-AzureRmLogicApp -ResourceGroupName $_.ResourceGroupName -Name $_.Name -State $state -Force} |