Skip to content

Instantly share code, notes, and snippets.

using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.ServiceBus;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using System;
using System.IO;
namespace PacodelaCruz.AzureFunctions.Logging
{
/// <summary>
/// Contains constants and enums for consistent structured logging
/// </summary>
internal static class LoggingConstants
{
// Template for consisted structured logging accross multiple functions, each field is described below:
// EventDescription is a short description of the Event being logged.
// EntityType: Business Entity Type being processed: e.g. Order, Shipment, etc.
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using PacodelaCruz.DurableFunctions.AsyncHttpApi.Models;
using System.IO;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.Extensions.Logging;
using System.Threading.Tasks;
namespace PacodelaCruz.DurableFunctions.AsyncHttpApi
{
public static class GetStatus
@pacodelacruz
pacodelacruz / AzureCli.sh
Last active July 25, 2018 02:13
Azure CLI Snippets
az provider show --namespace Microsoft.Cache --query "resourceTypes[?resourceType=='Redis'].apiVersions | [0]"
az provider show --namespace Microsoft.ServiceBus --query "resourceTypes[?resourceType=='namespaces'].apiVersions | [0]"
az provider show --namespace Microsoft.ServiceBus --query "resourceTypes[?resourceType=='namespaces/topics/'].apiVersions | [0]"
az provider show --namespace Microsoft.ServiceBus --query "resourceTypes[?resourceType=='namespaces/topics'].apiVersions | [0]"
az provider show --namespace Microsoft.Web --query "resourceTypes[?resourceType=='connections'].apiVersions | [0]"
az provider show --namespace Microsoft.OperationalInsights --query "resourceTypes[?resourceType=='workspaces'].apiVersions | [0]"
az provider show --namespace Microsoft.OperationsManagement --query "resourceTypes[?resourceType=='solutions'].apiVersions | [0]"
az provider show --namespace Microsoft.Logic --query "resourceTypes[?resourceType=='integrationAccounts/maps
'].apiVersions | [0]"
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;
using PacodelaCruz.DurableFunctions.AsyncHttpApi.Models;
using System.Threading.Tasks;
namespace PacodelaCruz.DurableFunctions.AsyncHttpApi
{
public static class ProcessSubmission
{
/// <summary>
using System;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Auth;
using System;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.Azure.WebJobs.Host;
using Newtonsoft.Json;
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...;EndpointSuffix=core.windows.net",
"AzureWebJobsDashboard": "DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...;EndpointSuffix=core.windows.net",
"Blob:StorageConnection": "DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...;EndpointSuffix=core.windows.net",
"Blob:StorageBasePath": "https://...blob.core.windows.net/",
"Workflow:Timeout": "5",
"Workflow:MeansOfApproval": "Slack",
"Slack:ApprovalUrl": "https://hooks.slack.com/services/...",
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...;EndpointSuffix=core.windows.net",
"AzureWebJobsDashboard": "DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...;EndpointSuffix=core.windows.net",
"AzureWebJobsSendGridApiKey": "SG...",
"Function:BasePath": "https://...azurewebsites.net/",
"Blob:StorageConnection": "DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...;EndpointSuffix=core.windows.net",
"Blob:StorageBasePath": "https://...blob.core.windows.net/",
"SendGrid:From": "...@...com.au",