{EdgeAction} Add Az.EdgeAction PowerShell module for 2025-09-01-preview API#28893
Conversation
- Create EdgeAction as top-level module (not under CDN) - Generate SDK using AutoRest from 2025-09-01-preview API - Implement custom Deploy-AzEdgeActionVersionCode cmdlet with file-based deployment * Deploy from JavaScript files (.js) * Deploy from ZIP archives (.zip) * Auto-zip JavaScript files when using zip deployment type * Auto-detect deployment type from file extension * Automatic base64 encoding - Add comprehensive test suite for file deployment scenarios - Generate 17 cmdlets for EdgeAction management - Add test fixture files for deployment testing
- Regenerated help markdown files after module rebuild - Updated AssemblyInfo.cs with build information - Added generate-info.json for module metadata - Updated Az.EdgeAction.psd1 with complete cmdlet exports - All help files now have ProgressAction parameter removed (standard practice)
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
There was a problem hiding this comment.
Pull Request Overview
This PR introduces the Az.EdgeAction PowerShell module (v0.1.0) to support the Azure Edge Actions API version 2025-09-01-preview. The module provides 17 cmdlets for managing Azure Edge Actions as a top-level resource, with enhanced file-based deployment capabilities for the Deploy-AzEdgeActionVersionCode cmdlet.
Key changes:
- New Az.EdgeAction module with 17 cmdlets for CRUD operations on edge actions, versions, execution filters, and attachments
- Enhanced Deploy-AzEdgeActionVersionCode cmdlet with file-based deployment, auto-detection, and auto-zipping
- Comprehensive test suite with actual test implementation for Deploy-AzEdgeActionVersionCode
Reviewed Changes
Copilot reviewed 95 out of 95 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/EdgeAction/EdgeAction/Az.EdgeAction.psd1 | Module manifest defining module metadata, dependencies, and exported functions |
| src/EdgeAction/EdgeAction/ChangeLog.md | Release notes documenting new cmdlets and enhanced features |
| src/EdgeAction/EdgeAction/Properties/AssemblyInfo.cs | Assembly metadata for the EdgeAction module |
| src/EdgeAction/EdgeAction/EdgeAction.csproj | Project configuration for building the module |
| src/EdgeAction/EdgeAction/help/*.md | Help documentation files for all 17 cmdlets with placeholder examples |
| src/EdgeAction/EdgeAction.Autorest/examples/*.md | Example files for cmdlets - some with actual examples, most with placeholders |
| src/EdgeAction/EdgeAction.Autorest/test/*.Tests.ps1 | Pester test files - Deploy-AzEdgeActionVersionCode has actual tests, others are stubs |
| src/EdgeAction/EdgeAction.Autorest/test/test_handler.js | Sample JavaScript handler file for testing deployment functionality |
| src/EdgeAction/EdgeAction.Autorest/docs/*.md | Generated documentation files matching help folder content |
| src/EdgeAction/EdgeAction.Autorest/how-to.md | Developer guide for working with the Az.EdgeAction module |
| src/EdgeAction/EdgeAction.sln | Visual Studio solution file for the module projects |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
- Change FormatsToProcess from 'EdgeAction.Autorest/Az.EdgeAction.format.ps1xml' to @() - AutoRest doesn't generate format files by default - Fixes CI build error: Cannot find path 'Az.EdgeAction.format.ps1xml' - Module validates successfully with Test-ModuleManifest
- Implemented 19 core tests covering CRUD operations - EdgeAction: New (1), Get (3), Update (1), Remove (1) - Version: New (1), Get (2), Update (1), Remove (1), Switch default (1), Get code (1) - ExecutionFilter: New (1), Get (2), Update (1), Remove (1) - All execution filter tests now deploy code to version before creating filter - Deploy tests (5) already implemented in previous commit Tests ready for recording with live Azure connection.
- Switch-AzEdgeActionVersionDefault now deploys code to v1 and v2 - Ensures both versions are fully provisioned before switching default - Aligns with execution filter requirement for deployed versions
- Changed all test files to use 'powershelltests' instead of 'clitests' - Updated utils.ps1 to set ResourceGroupName in setupEnv - Aligns with subscription 6b381315-e92c-478a-9cc3-ce3eda35bbe1
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
- Generated PowerShell cmdlets from EdgeActions swagger specification - Implemented custom Deploy-AzEdgeActionVersionCode cmdlet with file deployment support - Supports JavaScript (.js) and ZIP file deployment - Auto-zips JavaScript files when deployment type is 'zip' - Handles base64 encoding for API payload - Skipped Get-AzEdgeActionVersionCode test (known API issue requiring empty JSON body) - Recorded working tests for all other cmdlets (18 tests passing) - Updated README.md to use portable path for swagger spec
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
The build script expects generate-info.json in src/EdgeAction/EdgeAction.Autorest/ to calculate outdated submodules. This file is required by PrepareAutorestModule.ps1.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
…y JSON body
- Modified generated EdgeAction.cs to add Content-Type: application/json header
and empty JSON body {} for getVersionCode and swapDefault POST operations
- These APIs require an empty JSON body even though the OpenAPI spec shows no body
- Added test recordings showing successful API responses (HTTP 200/202)
- Updated test files for Get-AzEdgeActionVersionCode and Switch-AzEdgeActionVersionDefault
…th deterministic names, skip failing tests (List subscription-level, Switch default)
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
- Fix MissingExampleTitle, MissingExampleCode, MissingExampleDescription errors - Replace placeholder examples with actual cmdlet examples in docs/ and help/ folders - Update attachment examples to use AFD rule resource IDs instead of IoT Hub - Fix Az.EdgeAction.md module help with proper GUID, locale, and description - Remove unused test helper scripts (Run-GetVersionCodeTest.ps1, Test-GetVersionCodeRest.ps1)
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
The folder structure is not aligned with our requirement, please take this PR as an example: #28871. Such as the you don't need to write the module version in ChangeLog.md |
- Remove detailed version description per PR Azure#28871 guidance - Follow standard first release format used by other modules
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
@wyunchi-ms I have updated the pr following the example you shared. Would you have a look again. Thanks! |
@wyunchi-ms following up on this pr |
|
Per PR feedback: Don't need to checkin the files under generated folder
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
@wyunchi-ms I have fixed the 2. would you have a look again. thanks! |
… feature/edge-actions-2025-09-01-preview
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
@wyunchi-ms following up on this pr |
Description
This PR adds the Az.EdgeAction PowerShell module (v0.1.0) for the 2025-09-01-preview API, providing 17 cmdlets to manage Azure Edge Actions as a top-level resource. The implementation includes an enhanced Deploy-AzEdgeActionVersionCode cmdlet with file-based deployment, auto-detection, and auto-zipping capabilities
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
[ x] Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.