Add Azure Resource Manager (ARM) sample functions#33
Closed
Conversation
Sample HTTP-triggered Azure Functions demonstrating ARM connector operations:
- ListSubscriptions - GET /api/arm/subscriptions
- ListResourceGroups - GET /api/arm/subscriptions/{subscriptionId}/resourcegroups
- ReadResource - GET /api/arm/resource?subscriptionId=...&resourceGroup=...&provider=...&shortResourceId=...&apiVersion=...
- ListResourcesByResourceGroup - GET /api/arm/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/resources
Includes:
- ArmFunctions.cs with 4 sample functions
- ArmOptions configuration class
- DI registration in Program.cs
- local.settings.json.template with ARM connection URL placeholder
- NuGet.config updated for local SDK dev package (temporary for pre-release validation)
- Rename DirectClient namespace to Sdk across all sample files - Replace connector-specific exceptions with ConnectorException - Update azureloganalytics references to azuremonitorlogs - Fix ListResourcesAsync API to match new connector signature - All ARM E2E tests pass after merge
Member
Author
|
Closing — superseded by #40 which consolidates all SDK v0.9.0-preview.1 breaking changes, namespace migrations, and new features into a single PR. |
daviburg
added a commit
that referenced
this pull request
May 9, 2026
* Upgrade to Azure.Connectors.Sdk 0.9.0-preview.1
Breaking changes addressed:
- Package: Microsoft.Azure.Connectors.Sdk -> Azure.Connectors.Sdk
- Namespaces: Microsoft.Azure.Connectors.DirectClient.* -> Azure.Connectors.Sdk.*
- Models sub-namespace: types now in Azure.Connectors.Sdk.{Connector}.Models
- PascalCase client names: SharePointOnlineClient, OneDriveForBusinessClient,
MsGraphGroupsAndUsersClient, AzureBlobClient
- Constructors: removed managedIdentityClientId parameter, use TokenCredential
- Exceptions: per-connector types replaced with unified ConnectorException
(inherits RequestFailedException, .Status instead of .StatusCode)
- IsFatal(): removed (now internal), use plain catch (Exception ex)
- AzureLogAnalytics: replaced with AzureMonitorLogs connector
New capabilities demonstrated:
- DI extension methods (AddOffice365Client, etc.) replace 15+ lines of
boilerplate per connector with one-liner config-driven registration
- DefaultAzureCredential via DI for local dev authentication
- ARM connector added
- local.settings.json.template updated with AzureMonitorLogs + ARM entries
* Add ArmFunctions.cs + update README for v0.9.0 connector lineup
- ARM sample functions (list subscriptions, resource groups, deployments)
ported from PR #33 with namespace updates for v0.9.0
- README table updated: removed Azure Log Analytics, added Azure Monitor
Logs and ARM connectors
- Supersedes PRs #32-#38 (incremental unpublished SDK changes)
* Add local ExceptionExtensions.IsFatal() helper + restore guards
The SDK made IsFatal() internal in v0.9.0. Add a local copy so sample
exception handling follows the recommended pattern of not catching fatal
exceptions (OOM, StackOverflow, AccessViolation, SEH, ThreadAbort).
* Address PR feedback: fix naming, credential scope, stale references
- Fix _SmtpClient/_AzureBlobClient to _smtpClient/_azureBlobClient (camelCase)
- Register DefaultAzureCredential only in Development environment
- Replace all 'DirectClient SDK' doc references with 'Azure Connectors SDK'
- Add remarks to AzureLogAnalyticsFunctions noting Monitor Logs rename
Co-authored-by: Dobby <dobby@microsoft.com>
* Fix using sort order, response naming, unused field
- Sort using directives: System.* first, then alphabetically (9 files)
- AzureLogAnalyticsFunctions: return workspaces= in response body for
backward compatibility with route naming
- ArmFunctions: remove unused JsonOptions field and System.Text.Json using
Co-authored-by: Dobby <dobby@microsoft.com>
* Add missing Configuration using + extract magic string constant
Co-authored-by: Dobby <dobby@microsoft.com>
* Fix README ARM description + ARM response envelopes
Co-authored-by: Dobby <dobby@microsoft.com>
* Prefix ARM function names + fix PR description accuracy
Co-authored-by: Dobby <dobby@microsoft.com>
---------
Co-authored-by: Dobby <dobby@microsoft.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds sample Azure Functions demonstrating the ARM connector from the DirectClient SDK.
Depends on: Azure/Connectors-NET-SDK#91 (ARM connector client)
Sample Functions
Changes
Note
The NuGet package reference and config will be updated once the SDK package with ARM support is released.