1.0.0-beta.3 • Published 3 days ago

@azure-rest/developer-devcenter v1.0.0-beta.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 days ago

AzureDevCenter client library for JavaScript

The Azure DevCenter library provides access to manage resources for Microsoft Dev Box and Azure Deployment Environments. This package enables managing developer machines and environments in Azure.

Use the package for Azure DevCenter to:

Create, access, manage, and delete Dev Box resources Create, deploy, manage, and delete Environment resources

Please rely heavily on our REST client docs to use this library

Key links:

Getting started

Currently supported environments

  • Node.js version 14.x.x or higher

Prerequisites

  • You must have an Azure subscription to use this package.
  • You must have configured a DevCenter, Project, Network Connection, Dev Box Definition, and Pool before you can create Dev Boxes
  • You must have configured a DevCenter, Project, Catalog, and Environment Type before you can create Environments

Install the @azure-rest/developer-devcenter package

Install the AzureDevCenter client REST client library for JavaScript with npm:

npm install @azure-rest/developer-devcenter

Create and authenticate to the Azure DevCenter service

To use an Azure Active Directory (AAD) token credential, provide an instance of the desired credential type obtained from the @azure/identity library.

To authenticate with AAD, you must first npm install @azure/identity

After setup, you can choose which type of credential from @azure/identity to use. As an example, DefaultAzureCredential can be used to authenticate the client.

Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET

Key Concepts

REST Client

This client is one of our REST clients. We highly recommend you read how to use a REST client here.

DevCenter Concepts

Dev Boxes refer to managed developer machines running in Azure. Dev Boxes are provisioned in Pools, which define the network and image used for a Dev Box.

Environments refer to templated developer environments, which combine a template (Catalog Item) and parameters, as well as an Environment Type which defines permissions and where the resources are deployed.

Troubleshooting

Logging

Enabling logging may help uncover useful information about failures. In order 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");

For more detailed instructions on how to enable logs, you can look at the @azure/logger package docs.