AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

azure-cloud-migrate

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.

Original source
microsoft
License
MIT
Pinned revision
3f5b461b2314e01c400564051e92469114c5b68f

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

Ask your assistant

Use Agentic Memory skills to read microsoft--azure-cloud-migrate at revision 3f5b461b2314e01c400564051e92469114c5b68f, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 31

references/services/functions/runtimes/powershell.md

PowerShell — Azure Functions Triggers & Bindings

Model: PowerShell uses function.json for binding definitions + run.ps1 for handler code. Each function lives in its own directory: <FunctionName>/function.json + run.ps1

Project Structure

src/
├── host.json
├── local.settings.json
├── requirements.psd1
├── profile.ps1
├── HttpFunction/
│   ├── function.json
│   └── run.ps1
└── TimerFunction/
    ├── function.json
    └── run.ps1

HTTP Trigger

function.json:

{
  "bindings": [
    { "authLevel": "anonymous", "type": "httpTrigger", "direction": "in",
      "name": "Request", "methods": ["get", "post"] },
    { "type": "http", "direction": "out", "name": "Response" }
  ]
}

run.ps1:

param($Request, $TriggerMetadata)
$name = $Request.Query.Name
Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{
    StatusCode = [HttpStatusCode]::OK
    Body = "Hello, $name!"
})

Blob Storage

function.json:

{
  "bindings": [
    { "name": "InputBlob", "type": "blobTrigger", "direction": "in",
      "path": "samples-workitems/{name}", "connection": "AzureWebJobsStorage" },
    { "name": "OutputBlob", "type": "blob", "direction": "out",
      "path": "output/{name}", "connection": "AzureWebJobsStorage" }
  ]
}

run.ps1:

param($InputBlob, $TriggerMetadata)
Write-Host "Blob: $($TriggerMetadata.Name), Size: $($InputBlob.Length)"
Push-OutputBinding -Name OutputBlob -Value $InputBlob

Queue Storage

function.json:

{
  "bindings": [
    { "name": "QueueItem", "type": "queueTrigger", "direction": "in",
      "queueName": "myqueue-items", "connection": "AzureWebJobsStorage" },
    { "name": "OutputQueue", "type": "queue", "direction": "out",
      "queueName": "outqueue", "connection": "AzureWebJobsStorage" }
  ]
}

run.ps1:

param($QueueItem, $TriggerMetadata)
Write-Host "Queue message: $QueueItem"
Push-OutputBinding -Name OutputQueue -Value "Processed: $QueueItem"

Timer

function.json:

{
  "bindings": [
    { "name": "Timer", "type": "timerTrigger", "direction": "in",
      "schedule": "0 */5 * * * *" }
  ]
}

run.ps1:

param($Timer)
Write-Host "Timer triggered at: $(Get-Date)"

Event Grid

function.json:

{
  "bindings": [
    { "name": "EventGridEvent", "type": "eventGridTrigger", "direction": "in" }
  ]
}

run.ps1:

param($EventGridEvent, $TriggerMetadata)
Write-Host "Event: $($EventGridEvent.subject) - $($EventGridEvent.eventType)"

Cosmos DB

function.json:

{
  "bindings": [
    { "name": "Documents", "type": "cosmosDBTrigger", "direction": "in",
      "connectionStringSetting": "CosmosDBConnection", "databaseName": "mydb",
      "containerName": "mycontainer", "createLeaseContainerIfNotExists": true },
    { "name": "OutputDoc", "type": "cosmosDB", "direction": "out",
      "connectionStringSetting": "CosmosDBConnection", "databaseName": "mydb",
      "containerName": "outcontainer" }
  ]
}

run.ps1:

param($Documents, $TriggerMetadata)
foreach ($doc in $Documents) {
    Write-Host "Changed doc: $($doc.id)"
}

Service Bus

function.json:

{
  "bindings": [
    { "name": "Message", "type": "serviceBusTrigger", "direction": "in",
      "queueName": "myqueue", "connection": "ServiceBusConnection" },
    { "name": "OutputMessage", "type": "serviceBus", "direction": "out",
      "queueName": "outqueue", "connection": "ServiceBusConnection" }
  ]
}

run.ps1:

param($Message, $TriggerMetadata)
Write-Host "Message: $Message"
Push-OutputBinding -Name OutputMessage -Value "Processed: $Message"

Event Hubs

function.json:

{
  "bindings": [
    { "name": "Events", "type": "eventHubTrigger", "direction": "in",
      "eventHubName": "myeventhub", "connection": "EventHubConnection",
      "cardinality": "many" }
  ]
}

Table Storage

function.json:

{
  "bindings": [
    { "name": "TableEntity", "type": "table", "direction": "in",
      "tableName": "mytable", "partitionKey": "{pk}", "rowKey": "{rk}",
      "connection": "AzureWebJobsStorage" },
    { "name": "TableOut", "type": "table", "direction": "out",
      "tableName": "mytable", "connection": "AzureWebJobsStorage" }
  ]
}

SQL

function.json:

{
  "bindings": [
    { "name": "Changes", "type": "sqlTrigger", "direction": "in",
      "tableName": "dbo.MyTable", "connectionStringSetting": "SqlConnection" }
  ]
}

SendGrid

function.json:

{
  "bindings": [
    { "name": "Mail", "type": "sendGrid", "direction": "out",
      "apiKey": "SendGridApiKey", "from": "[email protected]" }
  ]
}

Note: PowerShell always requires function.json — it does not support inline binding definitions.

Full reference: Azure Functions PowerShell developer guide