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
$functionAppBaseUri = "https://$functionAppName.azurewebsites.net/admin" | |
$functionName = "test1" | |
$functionKeysEndpoint = "/functions/$functionName/keys" | |
$functionKeysUri = $functionAppBaseUri + $functionKeysEndpoint | |
$adminTokenHeader = @{ "Authorization" = "Bearer " + $adminBearerToken } | |
$functionKeys = Invoke-RestMethod -Method Get -Uri $functionKeysUri -Headers $adminTokenHeader |
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
$hostKeysEndpoint = "/host/keys" | |
$hostKeysUri = $functionAppBaseUri + $hostKeysEndpoint | |
$hostKeys = Invoke-RestMethod -Method Get -Uri $hostKeysUri -Headers $adminTokenHeader |
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
$masterKeyEndpoint = "/host/systemkeys/_master" | |
$masterKeyUri = $functionAppBaseUri + $masterKeyEndpoint | |
$masterKey = Invoke-RestMethod -Method Get -Uri $masterKeyUri -Headers $adminTokenHeader |
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
{ | |
"variables": { | |
"applicationInsights": { | |
"name": "my-application-insights" | |
}, | |
"resourceId": "[resourceId('Microsoft.Insights/components', variables('applicationInsights').name)]", | |
"apiVersion": "[providers('Microsoft.Insights', 'components').apiVersions[0]]" | |
}, | |
"resources": [], | |
"outputs": { |
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
Get-AzureRmProviderOperation -OperationSearchString "Microsoft.DocumentDB/*" ` | |
| Where-Object { $_.Operation -like "*list*" } ` | |
| Format-Table Operation |
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
Invoke-AzureRmResourceAction ` | |
-ResourceGroupName "RESOURCE_GROUP_NAME" ` | |
-ResourceType "Microsoft.DocumentDB/databaseAccounts" ` | |
-ResourceName "COSMOS_DB_ACCOUNT_NAME" ` | |
-Action listKeys ` | |
-Force |
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
{ | |
"variables": { | |
"cosmosDbAccount": { | |
"name": "my-cosmos-db" | |
}, | |
"resourceId": "[resourceId('Microsoft.DocumentDB/databaseAccounts', variables('cosmosDbAccount').name)]", | |
"apiVersion": "[providers('Microsoft.DocumentDB', 'databaseAccounts').apiVersions[0]]" | |
}, | |
"resources": [], | |
"outputs": { |
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
Get-AzureRmProviderOperation -OperationSearchString "Microsoft.ServiceBus/*" ` | |
| Where-Object { $_.Operation -like "*list*" } ` | |
| Format-Table Operation |
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
Invoke-AzureRmResourceAction ` | |
-ResourceGroupName "RESOURCE_GROUP_NAME" ` | |
-ResourceType "Microsoft.ServiceBus/namespaces/authorizationRules" ` | |
-ResourceName "SERVICE_BUS_NAMESPACE_NAME/RootManageSharedAccessKey" ` | |
-Action listKeys ` | |
-Force |
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
{ | |
"variables": { | |
"serviceBus": { | |
"name": "my-service-bus", | |
"sasKeyName": "RootManageSharedAccessKey" | |
}, | |
"resourceId1": "[resourceId('Microsoft.ServiceBus/namespaces', variables('serviceBus').name)]", | |
"resourceId2": "[resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', variables('serviceBus').name, variables('serviceBus').sasKeyName)]", | |
"apiVersion": "[providers('Microsoft.ServiceBus', 'namespaces').apiVersions[0]]" | |
}, |