Skip to content
datastudyguides

AI-200 · 3.2.1 · Connect to and consume Azure services

Functions triggers and bindings

Build serverless APIs, including implementing triggers and bindings

One trigger starts each Azure Function; bring data in or send it out, while SDK clients handle interactions that need more control.

Trigger starts, bindings connect

Azure Functions model with exactly one trigger starting the function and input and output bindings moving data between the function and Azure services.

Every function has exactly one trigger. move data in or out without requiring full SDK plumbing. Not every service supports every direction, so choose the binding type the integration actually provides.

Build an HTTP API

@app.route(route="orders/{order_id}", methods=["POST"])
@app.service_bus_queue_output(
    arg_name="msg", queue_name="orders-out", connection="SB_CONN"
)
def submit(req: func.HttpRequest, msg: func.Out[str]):
    order_id = req.route_params["order_id"]
    msg.set(order_id)
    return func.HttpResponse("queued", status_code=202)

Route values are in req.route_params; query-string values are in req.params.

Know the HTTP authorization levels

Anonymous needs no Functions key. Function is the default and accepts a function or host key. Admin requires the master key. Keys can be sent in code or x-functions-key, and local Core Tools do not enforce them.

Move long work off the request

An HTTP-triggered function must answer within 230 seconds. For longer work, return 202 Accepted with a status location and queue the processing for another function.

Key points

  • One trigger: every function starts from exactly one event source
  • : declarative input or output links; supported directions differ by service
  • Python v2: decorators declare routes, triggers, and bindings
  • Route values: `req.route_params`; query string values: `req.params`
  • HTTP auth: function is default; admin requires the master key
  • Long HTTP work: return 202 and process asynchronously before 230 seconds

Click an underlined term for a one-line explanation, or see them all in the glossary .

Exam trap

Route values are not function arguments. In the Python v2 model, read them from `req.route_params` and query-string values from `req.params`.

Sources · 3 Microsoft Learn pages Show ▾

Checked on October 4, 2026. Report a problem

Go deeper on Microsoft Learn

Checked against Microsoft Learn on October 4, 2026. Report a problem with this card

How well do you know this?