Tamp.AzureAppService 0.1.0

Prefix Reserved
dotnet add package Tamp.AzureAppService --version 0.1.0
                    
NuGet\Install-Package Tamp.AzureAppService -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Tamp.AzureAppService" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Tamp.AzureAppService" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Tamp.AzureAppService" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Tamp.AzureAppService --version 0.1.0
                    
#r "nuget: Tamp.AzureAppService, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Tamp.AzureAppService@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Tamp.AzureAppService&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Tamp.AzureAppService&version=0.1.0
                    
Install as a Cake Tool

Tamp.AzureAppService

Typed wrappers for Azure App Service slot orchestration + lifecycle verbs. Wraps az webapp so build/deploy scripts get readable slot-swap targets without re-deriving the CLI shape.

Package Status
Tamp.AzureAppService 0.1.0 (initial)

Install

dotnet add package Tamp.AzureAppService

Multi-targets net8 / net9 / net10. Requires the az CLI on PATH (or resolved via Tamp.AzureCli.V2).

Quick start — swap staging into production

using Tamp;
using Tamp.AzureAppService;

class Build : TampBuild
{
    public static int Main(string[] args) => Execute<Build>(args);

    [FromPath("az")] readonly Tool Az = null!;

    Target SwapToProduction => _ => _
        .Description("Swap staging → production for strata-api-prod.")
        .Executes(() => AppService.SlotSwap(Az, s => s
            .SetResourceGroup("rg-strata-prod")
            .SetName("strata-api-prod")
            .SetSlot("staging")));   // TargetSlot defaults to "production"

    Target PreviewSwap => _ => _
        .Description("Stage the swap without performing it (dry-run for slot config).")
        .Executes(() => AppService.SlotSwap(Az, s => s
            .SetResourceGroup("rg-strata-prod")
            .SetName("strata-api-prod")
            .SetSlot("staging")
            .SetPreview()));
}

Verb surface

Tamp method az command Notes
AppService.SlotSwap(...) az webapp deployment slot swap Default target slot is production. Preview and Reset are mutually exclusive.
AppService.SlotList(...) az webapp deployment slot list
AppService.SlotCreate(...) az webapp deployment slot create Optional ConfigurationSource clones config from another slot.
AppService.SlotDelete(...) az webapp deployment slot delete
AppService.Start(...) az webapp start Optional Slot to target a non-production slot.
AppService.Stop(...) az webapp stop
AppService.Restart(...) az webapp restart

Every verb requires ResourceGroup + Name (validated at plan-build time, not runtime). Subscription is optional when the az CLI default is correct.

Auth

This package doesn't manage auth — it inherits from the az CLI's session. Use Tamp.AzureCli.V2's Login verb earlier in your target graph if you need explicit credentials per-build (federated workload identity, service principal, etc.).

JSON output

JsonOutput defaults to true so the CLI emits machine-readable JSON. Disable via SetJsonOutput(false) when you want the default table-format human output.

Releasing

Releases follow the Tamp dogfood pattern: bump <Version> in Directory.Build.props, tag v<X.Y.Z>, GitHub Actions runs dotnet tamp Ci then dotnet tamp Push.

License

MIT. See LICENSE.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 84 5/13/2026