All skills
microsoft avatar

/azure-cloud-migrate

@ae5e585
by microsoftmicrosoft/skills3.1k stars
351

Assess and migrate cross-cloud workloads to Azure with reports and code conversion. Supports Lambda→Functions, Beanstalk/Heroku/App Engine→App Service, Fargate/Kubernetes/Cloud Run/Spring Boot→Container Apps. WHEN: migrate Lambda to Functions, AWS to Azure, migrate Beanstalk, migrate Heroku, migrate App Engine, Cloud Run migration, Fargate to ACA, ECS/Kubernetes/GKE/EKS to Container Apps, Spring Boot to Container Apps, cross-cloud migration.

Use this Skill: https://skilld.dev/gh/microsoft/skills/azure-cloud-migrate

This session only. Nothing lands on disk.

referencesservicesfunctionsruntimescsharp.md

≈1.4k tokens on demand. Your agent reads this file only when SKILL.md points to it.

C# — Azure Functions Isolated Worker Model Triggers & Bindings

Model: .NET isolated worker model (recommended). Uses attributes on methods/parameters. Import: using Microsoft.Azure.Functions.Worker;

HTTP Trigger

[Function("HttpFunction")]
public static HttpResponseData Run(
    [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post")] HttpRequestData req,
    FunctionContext context)
{
    var response = req.CreateResponse(HttpStatusCode.OK);
    response.WriteString("Hello!");
    return response;
}

Blob Storage

// Trigger (EventGrid source)
[Function("BlobTrigger")]
public static void Run(
    [BlobTrigger("samples-workitems/{name}", Source = BlobTriggerSource.EventGrid,
     Connection = "AzureWebJobsStorage")] string blobContent,
    string name, FunctionContext context)
{
    context.GetLogger("BlobTrigger").LogInformation($"Blob: {name}");
}

// Input
[BlobInput("input/{name}", Connection = "AzureWebJobsStorage")] string inputBlob

// Output
[BlobOutput("output/{name}", Connection = "AzureWebJobsStorage")] out string outputBlob

Queue Storage

// Trigger
[Function("QueueTrigger")]
public static void Run(
    [QueueTrigger("myqueue-items", Connection = "AzureWebJobsStorage")] string message,
    FunctionContext context)
{
    context.GetLogger("Queue").LogInformation($"Message: {message}");
}

// Output (via return type)
[Function("QueueOutput")]
[QueueOutput("outqueue", Connection = "AzureWebJobsStorage")]
public static string Run(
    [HttpTrigger(AuthorizationLevel.Anonymous, "post")] HttpRequestData req)
{
    return "queue message";
}

Timer

[Function("TimerFunction")]
public static void Run(
    [TimerTrigger("0 */5 * * * *")] TimerInfo timer,
    FunctionContext context)
{
    context.GetLogger("Timer").LogInformation($"Last: {timer.ScheduleStatus?.Last}");
}

Event Grid

// Trigger
[Function("EventGridTrigger")]
public static void Run(
    [EventGridTrigger] EventGridEvent eventGridEvent,
    FunctionContext context)
{
    context.GetLogger("EG").LogInformation($"Event: {eventGridEvent.Subject}");
}

// Output
[EventGridOutput(TopicEndpointUri = "MyTopicUri", TopicKeySetting = "MyTopicKey")]

Cosmos DB

// Trigger (Change Feed)
[Function("CosmosDBTrigger")]
public static void Run(
    [CosmosDBTrigger("mydb", "mycontainer",
     Connection = "CosmosDBConnection",
     CreateLeaseContainerIfNotExists = true)] IReadOnlyList<MyDocument> documents,
    FunctionContext context)
{
    foreach (var doc in documents)
        context.GetLogger("Cosmos").LogInformation($"Doc: {doc.Id}");
}

// Input
[CosmosDBInput("mydb", "mycontainer", Connection = "CosmosDBConnection",
 Id = "{id}", PartitionKey = "{partitionKey}")] MyDocument doc

// Output
[CosmosDBOutput("mydb", "mycontainer", Connection = "CosmosDBConnection")]

Service Bus

// Queue Trigger
[Function("SBQueueTrigger")]
public static void Run(
    [ServiceBusTrigger("myqueue", Connection = "ServiceBusConnection")] string message,
    FunctionContext context)
{
    context.GetLogger("SB").LogInformation($"Message: {message}");
}

// Topic Trigger
[Function("SBTopicTrigger")]
public static void Run(
    [ServiceBusTrigger("mytopic", "mysubscription",
     Connection = "ServiceBusConnection")] string message,
    FunctionContext context)
{
    context.GetLogger("SB").LogInformation($"Topic: {message}");
}

// Output
[ServiceBusOutput("outqueue", Connection = "ServiceBusConnection")]

Event Hubs

// Trigger
[Function("EventHubTrigger")]
public static void Run(
    [EventHubTrigger("myeventhub", Connection = "EventHubConnection")] EventData[] events,
    FunctionContext context)
{
    foreach (var e in events)
        context.GetLogger("EH").LogInformation($"Event: {e.EventBody}");
}

// Output
[EventHubOutput("outeventhub", Connection = "EventHubConnection")]

Table Storage

// Input
[TableInput("mytable", "{partitionKey}", "{rowKey}",
 Connection = "AzureWebJobsStorage")] TableEntity entity

// Output
[TableOutput("mytable", Connection = "AzureWebJobsStorage")]

SQL

// Trigger
[Function("SqlTrigger")]
public static void Run(
    [SqlTrigger("dbo.MyTable", "SqlConnection")] IReadOnlyList<SqlChange<MyItem>> changes,
    FunctionContext context)
{
    foreach (var change in changes)
        context.GetLogger("SQL").LogInformation($"Change: {change.Item.Id}");
}

// Input
[SqlInput("SELECT * FROM dbo.MyTable WHERE Id = @Id",
 "SqlConnection", parameters: "@Id={id}")] IEnumerable<MyItem> items

// Output
[SqlOutput("dbo.MyTable", "SqlConnection")]

SignalR

// Output
[SignalROutput(HubName = "myhub", ConnectionStringSetting = "AzureSignalRConnectionString")]

SendGrid

[SendGridOutput(ApiKey = "SendGridApiKey", From = "noreply@example.com")]

Multiple Outputs

// Use a custom return type for multiple outputs
public class MultiOutput
{
    [QueueOutput("outqueue", Connection = "AzureWebJobsStorage")]
    public string QueueMessage { get; set; }

    public HttpResponseData HttpResponse { get; set; }
}

[Function("MultiOutput")]
public static MultiOutput Run(
    [HttpTrigger(AuthorizationLevel.Anonymous, "post")] HttpRequestData req)
{
    return new MultiOutput
    {
        QueueMessage = "new item",
        HttpResponse = req.CreateResponse(HttpStatusCode.OK)
    };
}

Full reference: Azure Functions C# isolated worker guide

Source: SKILL.md on GitHub

No alerts15d3 checks · Risk SAFE
  • Gen Agent Trust Hub15d

    This skill facilitates cloud workload migration to Azure with a focus on security best practices. It includes security considerations such as an attack surface for indirect prompt injection during source code analysis and the handling of sensitive credentials. While these warrant review, the skill provides robust patterns for secure secret management and identity-based access. See detailed analysis for context.

  • Socket15d

    No alerts

  • Snyk15d

    Risk: LOW · No issues

Signed by skilld at ae5e585. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last month
metadata
{
  "author": "Microsoft",
  "version": "1.3.2"
}

README badge

README badge for microsoft/skills/azure-cloud-migrate