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
public static class BinaryDataHttpTrigger | |
{ | |
[FunctionName(nameof(BinaryDataHttpTrigger.RunByteArray))] | |
[OpenApiOperation(operationId: "run.bytearray", tags: new[] { "bytearray" }, ...)] | |
[OpenApiSecurity("function_key", SecuritySchemeType.ApiKey, Name = "code", In = OpenApiSecurityLocationType.Query)] | |
[OpenApiRequestBody(contentType: "text/plain", bodyType: typeof(byte[]), ...)] | |
[OpenApiResponseWithBody(statusCode: HttpStatusCode.OK, contentType: "image/png", bodyType: typeof(byte[]), ...)] |
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
public static class ApiKeyInQueryAuthFlowHttpTrigger | |
{ | |
[FunctionName(nameof(ApiKeyInQueryAuthFlowHttpTrigger))] | |
[OpenApiOperation(operationId: "apikey.query", tags: new[] { "apikey" }, Summary = "API Key authentication code flow via querystring", Description = "This shows the API Key authentication code flow via querystring", Visibility = OpenApiVisibilityType.Important)] | |
[OpenApiSecurity("apikeyquery_auth", | |
SecuritySchemeType.ApiKey, | |
In = OpenApiSecurityLocationType.Query, | |
Name = "code")] |
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
https://<azure_static_webapp>.azurestaticapps.net/.auth/login/aad |
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
public static class DefaultHttpTrigger | |
{ | |
[FunctionName("DefaultHttpTrigger")] | |
[OpenApiOperation(operationId: "greeting", tags: new[] { "greeting" }, Summary = "Greetings", Description = "This shows a welcome message.", Visibility = OpenApiVisibilityType.Important)] | |
[OpenApiSecurity("function_key", SecuritySchemeType.ApiKey, Name = "code", In = OpenApiSecurityLocationType.Query)] | |
[OpenApiParameter("name", Type = typeof(string), In = ParameterLocation.Query, Visibility = OpenApiVisibilityType.Important)] | |
[OpenApiResponseWithBody(statusCode: HttpStatusCode.OK, contentType: "application/json", bodyType: typeof(Greeting), Summary = "The response", Description = "This returns the response")] | |
public static async Task<IActionResult> Run( |
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
name: On Team Page Requested | |
on: | |
workflow_dispatch: | |
inputs: | |
teamName: | |
description: The name of team | |
required: true | |
default: Team_HackaLearn | |
content: |
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
public static void Main() | |
{ | |
var host = new HostBuilder() | |
// 👇👇👇👇👇 Remove this line below 👇👇👇👇👇 | |
.ConfigureFunctionsWorkerDefaults() | |
// 👆👆👆👆👆 Remove this line above 👆👆👆👆👆 | |
.Build(); | |
host.Run(); | |
} |
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
public async Task<IActionResult> CreateRoutineAsync( | |
[HttpTrigger(AuthorizationLevel.Function, HttpVerbs.Post, Route = "routines")] HttpRequest req, | |
ExecutionContext context, | |
ILogger log) | |
{ | |
var request = await req.ToRequestMessageAsync<RoutineRequestMessage>().ConfigureAwait(false); | |
var @interface = request.Interface; | |
var correlationId = request.CorrelationId; | |
var spanId = request.SpanId; |
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
// Decorators for OpenAPI | |
[OpenApiOperation(operationId: "CreateRoutine", tags: new[] { "publisher", "routine" }, Summary = "Create a new routine", Description = "This creates a new routine", Visibility = OpenApiVisibilityType.Important)] | |
[OpenApiSecurity("function_key", SecuritySchemeType.ApiKey, Name = "x-functions-key", In = OpenApiSecurityLocationType.Header, Description = "API key to execute this endpoint")] | |
[OpenApiRequestBody(contentType: ContentTypes.ApplicationJson, bodyType: typeof(RoutineRequestMessage), Required = true, Example = typeof(RoutineRequestMessageExample), Description = "The request message payload for a routine")] | |
[OpenApiResponseWithBody(statusCode: HttpStatusCode.OK, contentType: ContentTypes.ApplicationJson, bodyType: typeof(RoutineResponseMessage), Example = typeof(RoutineResponseMessageExample), Summary = "200 response", Description = "This returns the response of 'OK'")] | |
[OpenApiResponseWithBody(statusCode: HttpStatusCode.InternalServerError, contentType: ContentTypes.Application |
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
# Bicep CLI | |
bicep build azuredeploy.bicep | |
# Azure CLI | |
az bicep build --file azuredeploy.bicep |
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
Install-Module -Name AzureAD ` | |
-Scope AllUsers -Repository PSGallery ` | |
-Force -AllowClobber |