npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@azure/containerapps-sandbox

v1.0.0-beta.1

Published

A generated SDK for ContainerAppsSandboxClient.

Readme

Azure Container Apps Sandbox client library for JavaScript

This package contains an isomorphic SDK for the Azure Container Apps Sandbox API (data plane + control plane).

Azure Container Apps Sandboxes are secure, hardware-isolated microVMs with sub-second startup, snapshot-based suspend/resume, and per-sandbox network egress policy — ideal for running untrusted code, AI agent workspaces, dev environments, and CI runners.

Preview — This package is in preview. The API surface may change without notice. See the CHANGELOG for migration notes when upgrading.

Getting started

Currently supported environments

Prerequisites

Install the @azure/containerapps-sandbox package

Install the client library with npm:

npm install @azure/containerapps-sandbox

Create and authenticate a client

To create a client, you need a TokenCredential from @azure/identity:

npm install @azure/identity

There are two clients:

  • ContainerAppsSandboxManagementClient — the ARM control plane for creating and deleting sandbox groups.
  • SandboxGroupClient — the data plane for a single sandbox group (sandboxes, disk images, snapshots, volumes, secrets, ports, egress, files).
import { DefaultAzureCredential } from "@azure/identity";
import {
  ContainerAppsSandboxManagementClient,
  SandboxGroupClient,
  endpointForRegion,
} from "@azure/containerapps-sandbox";

const credential = new DefaultAzureCredential();
const subscriptionId = "<your-subscription-id>";
const resourceGroupName = "my-rg";
const sandboxGroupName = "my-sandbox-group";
const region = "eastus2";

// 1. Create the sandbox group (ARM control plane).
const mgmt = new ContainerAppsSandboxManagementClient(credential, subscriptionId);
await mgmt.sandboxGroups
  .beginCreateOrUpdate(resourceGroupName, sandboxGroupName, { location: region })
  .then((p) => p.pollUntilDone());

// (Grant yourself the "Container Apps SandboxGroup Data Owner" role on the
//  resource group so the data-plane calls below are authorized.)

// 2. Connect to the data plane and create a sandbox.
const group = new SandboxGroupClient(
  credential,
  endpointForRegion(region),
  subscriptionId,
  resourceGroupName,
  sandboxGroupName,
);
const sandbox = await group.sandboxes.beginCreate({ disk: undefined }).then((p) => p.pollUntilDone());

// 3. Run a command.
const result = await group.sandboxes.exec(sandbox.id, { command: "echo hello && uname -a" });
console.log(result.stdout);

// 4. Clean up.
await group.sandboxes.delete(sandbox.id);
await mgmt.sandboxGroups.beginDelete(resourceGroupName, sandboxGroupName).then((p) => p.pollUntilDone());

Key concepts

Operation groups

Like the generated Azure management SDKs, operations are grouped on the client by resource type, e.g. group.sandboxes.get(...), group.diskImages.list(), mgmt.sandboxGroups.beginCreateOrUpdate(...).

Long-running operations (LRO)

Operations that take more than a few seconds expose a begin* method that returns a PollerLike<OperationState<T>, T> from @azure/core-lro:

const poller = group.sandboxes.beginCreate({ sourcesRef: { diskImage: { name: "ubuntu", isPublic: true } } });
const sandbox = await poller.pollUntilDone();

Paged results

List operations return a PagedAsyncIterableIterator:

for await (const sbx of group.sandboxes.list()) {
  console.log(sbx.id, sbx.state);
}

Port IP access control

PortIpAccessControl is validated client-side before it is sent (the service's bulk ports.update path is not re-validated server-side). CIDRs must be network-aligned, at most 10 rules with 1–10 CIDRs each, unique names and priorities, and priorities in the range 0–1000.

import type { PortIpAccessControl } from "@azure/containerapps-sandbox";

const acl: PortIpAccessControl = {
  defaultAction: "Deny",
  rules: [{ name: "office", action: "Allow", priority: 10, sourceCidrs: ["10.0.0.0/8"] }],
};
await group.ports.add(sandbox.id, 8443, { ipAccessControl: acl });

Troubleshooting

Logging

Enabling logging may help uncover useful information about failures. To see a log of HTTP requests and responses, set the AZURE_LOG_LEVEL environment variable to info. Alternatively, logging can be enabled at runtime by calling setLogLevel in the @azure/logger:

import { setLogLevel } from "@azure/logger";
setLogLevel("info");

Next steps

See the live integration tests for a worked end-to-end example that exercises every operation group.

Contributing

This SDK mirrors the Python and Rust SDKs in this repository.