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
from azure.identity import DefaultAzureCredential | |
from azure.keyvault.secrets import SecretClient | |
import logging | |
logging.basicConfig(level=logging.INFO) | |
def get_key_vault_secret(key_vault_name: str, secret_name: str): | |
try: | |
# Authenticate and securely retrieve azure credentials | |
key_vault_uri = f'https://{key_vault_name}.vault.azure.net' |
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
from notify_teams import notify_to_teams | |
from keyvault_helper import get_key_vault_secret | |
kv_secret_name = '' | |
kv_name = '' | |
web_hook_url = get_key_vault_secret(kv_name, kv_secret_name) | |
message = 'Hi, this message is from the Python application that uses the Webhook connector.' | |
notify_to_teams(message, web_hook_url.value, kv_secret_name) |
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
import asyncio | |
import pymsteams | |
loop = asyncio.get_event_loop() | |
def notify_to_teams(message: str, web_hook_url: str, web_hook_name: str): | |
'''This function will notify the message in the Teams channel''' | |
my_teams_message = pymsteams.async_connectorcard(web_hook_url) | |
my_teams_message.title(web_hook_name) |
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
# Set the Execution policy for the current session | |
# Set-ExecutionPolicy -ExecutionPolicy ByPass -Scope Process | |
$containerName = '' | |
$subscriptionid = '' | |
$storageAccName = '' | |
Function GetAllBlobMetadata | |
{ | |
# Connect to your Azure subscription |
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
trigger: | |
branches: | |
include: | |
- master | |
variables: | |
solution: "**/*.sln" | |
buildPlatform: "x86" | |
buildConfiguration: "Release" |
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
trigger: | |
branches: | |
include: | |
- dev | |
variables: | |
solution: "**/*.sln" | |
buildPlatform: "x86" | |
buildConfiguration: "Release" |
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": "http://adaptivecards.io/schemas/adaptive-card.json", | |
"type": "AdaptiveCard", | |
"body": [ | |
{ | |
"type": "TextBlock", | |
"text": "Reminder to edit the On-Call details!", | |
"spacing": "Medium", | |
"horizontalAlignment": "Center", | |
"size": "Large", |
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
{ | |
"count": 1, | |
"value": [ | |
{ | |
"teamMember": { | |
"displayName": "Sibeesh Venu", | |
"url": "", | |
"_links": { | |
"avatar": { | |
"href": "" |
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
var tag = new tblTag { tagName = "jQuery", tagDescription = "This tag is all about jQuery" }; | |
HttpResponseMessage res = await cons.PostAsJsonAsync("api/tblTags", tag); |
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
static async Task MyAPIPost(HttpClient cons) | |
{ | |
using (cons) | |
{ | |
var tag = new tblTag { tagName = "jQuery", tagDescription = "This tag is all about jQuery" }; | |
HttpResponseMessage res = await cons.PostAsJsonAsync("api/tblTags", tag); | |
res.EnsureSuccessStatusCode(); | |
if (res.IsSuccessStatusCode) | |
{ | |
Console.WriteLine("\n"); |