Instant Download Hands-on Azure Functions with C#: Build Function as a Service (FaaS) Solutions 1st Edition Ashirwad Satapathi PDF All Chapters
Instant Download Hands-on Azure Functions with C#: Build Function as a Service (FaaS) Solutions 1st Edition Ashirwad Satapathi PDF All Chapters
com
https://ebookmeta.com/product/hands-on-azure-functions-with-
c-build-function-as-a-service-faas-solutions-1st-edition-
ashirwad-satapathi/
OR CLICK BUTTON
DOWNLOAD NOW
Abhishek Mishra
Mumbai, Maharashtra, India
This work is subject to copyright. All rights are solely and exclusively
licensed by the Publisher, whether the whole or part of the material is
concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in
any other physical way, and transmission or information storage and
retrieval, electronic adaptation, computer software, or by similar or
dissimilar methodology now known or hereafter developed.
The publisher, the authors and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.
This Apress imprint is published by the registered company APress
Media, LLC part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY
10004, U.S.A.
This book is dedicated to my father, Mr. Upendra Satapathi, and mother,
Mrs. Sabita Panigrahi, for supporting me through each and every phase
of my life. Without your support I wouldn’t have been able to complete
this book.
—Ashirwad Satapathi
This book is dedicated to my super dad, Mr. Balabhardra Mishra, and
loving mom, Mrs. Pragyan Mishra.
—Abhishek Mishra
Introduction
Azure Functions is a function as a service (FaaS) offering on the Azure
Platform. In this book, you will explore Azure Functions in detail and
learn how to work with Azure Functions using a practical and example-
based approach that will help you grasp the subject with ease.
The book will start with the essential topics. You will learn how to
set up the application development environment for Azure Functions.
Then you will get example-based steps for building a serverless
solution using a combination of bindings and triggers in C#. The book
will then dive into areas that will help you learn how to create custom
bindings, connect with various data sources, ingest telemetry data for
Azure Functions into Application Insights, and learn various ways to
deploy the functions to the Azure environment.
You will also explore advanced areas such as running Azure
Functions in an Azure Kubernetes Service cluster using Kubernetes
Event Driven Autoscaling (KEDA). You will learn the DevOps way of
working with Azure Functions using Azure DevOps, as well as the best
practices you should follow while using Azure Functions.
This book provides production-like scenarios and provides labs that
will deliver the right set of hands-on experience. The practical approach
in the book will help you gain deep proficiency in the subject.
This book is intended for experienced developers, cloud architects,
and tech enthusiasts looking forward to building scalable and efficient
serverless solutions using Azure Functions. Anyone having a prior
experience with C# and knowing the Azure basics can use this book to
start their journey in building serverless solutions with Azure
Functions.
Acknowledgments
We would like to thank the Apress team for giving us the opportunity to
work on this book. Also thanks to the technical reviewer and the editors
for helping us deliver this manuscript.
Table of Contents
Chapter 1:Introduction to Azure Functions
Structure of the Chapter
Objectives
Introduction to Azure Functions
Introduction to Serverless
Azure WebJobs vs.Azure Functions
Advantages and Disadvantages of Azure Functions
Hosting Plans for Azure Functions
Consumption Plan
Premium Plan
Dedicated Plan
Use Cases for Azure Functions
Summary
Chapter 2:Build Your First Azure Function
Structure of the Chapter
Objectives
Create Functions Using the Azure Portal
Create Functions Locally Using the Command Line
Create Functions Using Visual Studio Code
Create Functions Using Visual Studio
Summary
Chapter 3:What Are Triggers and Bindings?
Structure of the Chapter
Objectives
Introduction to Triggers and Bindings
Supported Triggers and Bindings
Trigger and Binding Use Cases
Use Case:An Azure function gets triggered when a message
arrives in a queue, and the processed message is put into
another queue
Use Case:A scheduled job picks up images for Blob Storage
at a particular time interval and then processes and stores
them back in the Blob Storage
Use Case:An HTTP call invokes an Azure function to execute
some business logic
Use Case:An event grid can invoke an Azure function to
send an email with event data
Use Case:RabbitMQ triggers an Azure function that
processes the message sent by RabbitMQ and puts the
processed message in Azure Cosmos DB
Implement Triggers and Bindings for Azure Functions
Summary
Chapter 4:OTP Mailer with Queue Storage Trigger and SendGrid
Binding
Structure of the Chapter
Objectives
Getting Started with a Queue Storage Trigger and Use Cases
Build a Sample Application Using a Queue Storage Trigger
Getting Started with a SendGrid Output Binding and Use Cases
Build a Sample Application Using the SendGrid Output Binding
Create an OTP Mailer Using a Queue Storage Trigger and
SendGrid Output Binding
Summary
Chapter 5:Build a Report Generator with a Timer Trigger and Blob
Storage Bindings
Structure of the Chapter
Objectives
Getting Started with Timer Triggers and Use Cases
Build a Sample Application Using a Timer Trigger
Getting Started with Blob Storage Bindings and Use Cases
Build a Sample Function Using a Blob Storage Binding
Create a Report Generator Using a Blob Storage Binding and
Timer Trigger
Summary
Chapter 6:To-Do API with an HTTP Trigger and a Table Storage
Binding
Structure of the Chapter
Objectives
Getting Started with HTTP Triggers and Use Cases
Build a Sample Application Using an HTTP Trigger
Routing in HTTP-Triggered Azure Functions
Getting Started with Table Storage Bindings and Use Cases
Build a Sample Application Using a Table Storage Binding
Create a To-Do API with an HTTP Trigger and a Table Storage
Binding
Summary
Chapter 7:Creating Custom Bindings for Azure Functions
Structure of the Chapter
Objectives
Introduction to Custom Bindings
Use Cases for Custom Bindings
Build a Custom Binding for Azure Functions
Create an Azure Function
Implement the Binding Attribute Class
Implement the Binding Logic Class
Implement the Binding Extension Class
Implement the Binding Startup Class
Incorporate the Binding in the Azure Function
Summary
Chapter 8:Building Serverless APIs Using Azure Functions and
Azure SQL
Structure of the Chapter
Objectives
Problem Statement
Creating an Azure SQL Database Instance in the Azure Portal
Building Serverless APIs for the Proof of Concept
Testing the Serverless APIs for the Proof of Concept
Summary
Chapter 9:Serverless API Using Azure Functions and Azure
Cosmos DB
Structure of the Chapter
Objectives
Introduction to Azure Cosmos DB and Its Use Cases
Getting Started with Azure Function Cosmos DB Triggers by
Building a Simple Application
Build an HTTP-Triggered Azure Function to Perform CRUD
Operations on Azure Cosmos DB Using Bindings
Leverage the Azure Cosmos DB SDK to Interact with Cosmos DB
from Azure Functions
Summary
Chapter 10:Enabling Application Insights and Azure Monitor
Structure of the Chapter
Objectives
Enable Logging Using Application Insights
Perform Diagnostics for Azure Functions
Monitor Azure Functions and Create Alerts
Restrict the Number of Scaling Instances for the Azure Function
App
Summary
Chapter 11:Storing Function Secrets in Azure Key Vault
Structure of the Chapter
Objective
Getting Started with Azure Key Vault
Create an Azure Key Vault in the Azure Portal
Store Secrets in Key Vault
Create an Azure Function in the Azure Portal
Add an Access Policy for Azure Key Vault
Summary
Chapter 12:Authentication and Authorization Using Azure Active
Directory
Structure of the Chapter
Objectives
What Is Azure Active Directory?
What Are Authentication and Authorization?
Implement Authentication and Authentication for Azure
Functions Using Azure Active Directory
Summary
Chapter 13:Securing Azure Functions with API Management
Structure of the Chapter
Objectives
What Is the API Management Service?
Advantages of Using the API Management Service
Integrate API Management with Azure Functions
Summary
Chapter 14:Deploying Your Azure Functions Using IDEs
Structure of the Chapter
Objective
Deploy an Azure Function to Azure Using Visual Studio 2019
What Are Deployment Slots?
Deploy an Azure Function to Deployment Slots
Deploy an Azure Function to Azure Using VS Code
Summary
Chapter 15:Deploying Your Azure Functions Using a CI/CD
Pipeline with Azure DevOps
Structure of the Chapter
Objectives
What Is Azure DevOps?
Create a Project in Azure DevOps
Create a Build Pipeline in Azure DevOps and Enable Continuous
Integration
Create a Release Pipeline in Azure DevOps and Enable
Continuous Delivery
Summary
Chapter 16:Running Azure Functions in Containers
Structure of the Chapter
Objectives
Getting Started with Containers and AKS
What Is Serverless Kubernetes and KEDA in Azure?
Containerize Azure Functions and Push Them to the Azure
Container Registry
Deploy the Containerized Azure Functions in AKS Using KEDA
Summary
Chapter 17:Adding Cognitive Capabilities to Your Azure Functions
Structure of the Chapter
Objective
Getting Started with Azure Cognitive Services
Getting Started with Azure Text Analytics
Create an Azure Text Analytics Resource in the Azure Portal
Build a Serverless API to Analyze Feedback Using Sentiment
Analysis
Test the FeedbackAnalyzerFunction Using Postman
Build a Language-Based Document Classifier Serverless
Solution
Test the Language-Based Document Classifier Function
Summary
Chapter 18:Introduction to Azure Durable Functions
Structure of the Chapter
Objectives
Getting Started with Azure Durable Functions
Benefits of Azure Durable Functions
Application Patterns
Fan-Out and Fan-In
Function Chaining
Async HTTP APIs
Monitoring
Human Interaction
Aggregator
Implement an Azure Durable Function
Summary
Chapter 19:Integrating Azure Functions in a Logic Apps Workflow
Structure of the Chapter
Objective
Getting Started with Azure Logic Apps
Create an Azure Logic Apps Solution in the Azure Portal
Add Azure Functions in Logic Apps Workflows
Summary
Chapter 20:Best Practices and Pitfalls to Avoid
Structure of the Chapter
Objectives
Design Guidelines and Best Practices
Decide to Use Functions or Not for Your Scenario
Choose the Correct Programing Language
Choice of Hosting Plan
Other documents randomly have
different content
Daisy Fleabane. Erigeron Philadelphicus.
Found in July and August, chiefly along walls and fences, although
occasionally in fields.
The stout and sturdy stalk, which grows to be sometimes 4 feet
high, is branching and leafy, tough-fibred, round and smooth. Of a
rich, light green color.
The large and long leaf is so deeply cleft into many narrow,
oblong divisions, and the margin is so regularly toothed, that it bears
the appearance of a curly feather; the vigorous curving midrib is an
important feature; its texture is coarse, and it is pungently odorous.
The color is a full, rich, dark green.
The flowers are very small, of a strong, full yellow, tending slightly
toward green; packed tightly into a flat head, like a button with a
little dent in the middle. The heads, enclosed in a shallow, yellow-
green leafy cup, are set on slender, light green stems, and arranged
in large, loose terminal clusters.
Growing in thickly-settled communities the Tansy plant forms a
well known member of the roadside tenantry with its noble dark
foliage, luxuriant and usually free from blight, and strong stalks
topped profusely by the flower clusters, whose yellow is toned to a
remarkable harmony with green. On a hot day the smell of the Tansy
may be perceived at a considerable distance. “In the spring time are
made with the leaves hereof, newly sprung up, and with eggs, cakes
or Tansies, which be pleasant in taste, and goode for the stomacke,”
says Gerarde, and echoes of rules for Tansy-cakes come to us from
the records of early New England house-wives.
TANSY: Tanacetum vulgare.
Black-Eyed Susan. Rudbeckia hirta.
Cone Flower.
Coreopsis.
“Yellow Daisy.”
Golden Jerusalem (N. H.)
Found in sunny meadows and grass fields during July and August
in great profusion.
The stalk (from 1 to 2 feet high) is very erect, sometimes bears
branches, and is sparingly leafy; it is strong-fibred, coarse-textured,
and hairy. The color, light green, is often brownish near the foot.
The leaf is long and narrow, with a fine-pointed tip, and an entire
margin; the texture is loose, and the surface rough. The color is
yellow-green. It slightly clasps the stalk. The leaves are arranged
sparsely and alternately.
The minute flowers, of a rich, deep purple-brown color, are packed
smoothly and closely in a cone-shaped head, the base of which is
surrounded by a single row of 12 or 15 rays; these rays are over an
inch long, and are sometimes one-half wide, they are blunt-pointed
with a notched top, their texture is silken and faintly shows the
veins, and their color is of a noble full yellow. The head is set upon a
mat made of a double row of overlapping, small, green parts, and is
borne singly on the summit of the stalk, or branch.
A ruthless invader of mowing lots where it makes a brilliant patch
of color that may be discerned from afar, the farmer wages war on
this handsome flower. It is not unusual to find it indulging in odd
variations upon the established habit of blossoming, such as
doubling the rows of rays, or with two or three heads bunched
together, or set atop of one another.
BLACK-EYED SUSAN:
Rudbeckia hirta.
Thoroughwort. Eupatorium perfoliatum.
Boneset.
Found in rich moist soil, along the edges of woods and shaded
roads, in August and September.
The stalk (from 2 to 4 feet high) branches a little, and is leafy; it is
large, strong, fine-fibred, and smooth. In color, pale green, tinged
with dull purple.
The leaf is large, broadly oval, taper-pointed, and widest at the
base, with 3 marked ribs, a coarsely toothed margin, a thin texture,
and smooth surface. The leaves are set on short stems, and are
placed opposite each other on the stalk. The color is green.
The minute flowers, and projecting pistils, are white; and grouped
in small heads, enclosed in vase-shaped cups of green, on short
stems. The heads are arranged in close, rather flat-topped clusters
on the top of the stalk, and springing from the angles of the upper
leaves.
This plant comes into bloom in company with its next of kin, Joe
Pye and Boneset; it thrives well under cultivation, and certainly is
worthy of a better name than “Snake-root,”—which is, perhaps, the
reason it is so generally known by “Eupatorium,” the generic name it
shares with so many others. It is much frequented by some small
creature who leaves a pale labyrinthine trail etched on the broad
surface of its leaves.
EUPATORIUM: E.
ageratoides.