Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@azure/arm-resources

Azure849.7kMIT6.1.0TypeScript support: included

A generated SDK for ResourceManagementClient.

node, azure, typescript, browser, isomorphic, cloud

readme

Azure SDK for JavaScript

Packages Dependencies DependencyGraph

This repository is for the Azure SDK for JavaScript (Node.js & Browser). It contains libraries for the breadth of Azure services. Management libraries are packages that you would use to provision and manage Azure resources. Client libraries are packages that you would use to consume these resources and interact with them.

Getting started

A few helpful resources to get started are:

  • The readme for each package contains code samples and package information. This readme can be found in the corresponding package folder under the folder of the service of your choice in the /sdk folder of this repository. The same readme file can be found on the landing page for the package in npm.
  • The API reference documentation of the latest versions of these packages, can be found at our public developer docs.
  • The API reference documentation of older versions, can be found in our versioned developer docs.

Each service might have a number of libraries available from each of the following categories:

NOTE: Some of these packages have beta versions. If you need to ensure your code is ready for production, use one of the stable, non-beta packages.

Client

Given an Azure resource already exists, you would use the client libraries to consume it and interact with it. Most of these libraries follow the Azure SDK Design Guidelines for JavaScript & TypeScript and share a number of core functionalities such as retries, logging, transport protocols, authentication protocols, etc. Others will be updated in the near future to follow the guidelines as well.

To get a list of all client libraries that follow the new guidelines, please visit our Azure SDK releases page.

Management

Management libraries enable you to provision and manage Azure resources via the Azure Resource Manager i.e. ARM. You can recognize these libraries by @azure/arm- in their package names. These are purely auto-generated based on the swagger files that represent the APIs for resource management.

Newer versions of these libraries follow the Azure SDK Design Guidelines for TypeScript. These new versions provide a number of core capabilities that are shared amongst all Azure SDKs, including the intuitive Azure Identity library, an HTTP Pipeline with custom policies, error-handling, distributed tracing, and much more. A few helpful resources to get started with these are:

NOTE: If you are experiencing authentication issues with the management libraries after upgrading certain packages, it's possible that you upgraded to the new versions of SDK without changing the authentication code, please refer to the migration guide mentioned above for proper instructions.

Need help?

Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described below. You can learn more about data collection and use in the help documentation and Microsoft’s privacy statement. For more information on the data collected by the Azure SDK, please visit the Telemetry Guidelines page.

Telemetry Configuration

Telemetry collection is on by default.

To opt out, you can disable telemetry at client construction. Create a custom HTTP pipeline policy that removes the user agent string, and then pass that policy into the additionalPolicies option during client creation. This will disable telemetry for all methods in the client. Do this for every new client.

The example below uses the @azure/keyvault-secrets package. In your code, you can replace @azure/keyvault-secrets with the package you are using.

import { SecretClient } from "@azure/keyvault-secrets";
import { ManagedIdentityCredential } from "@azure/identity";

function removeUserAgentPolicy() {
  return {
    name: "removeUserAgentPolicy",
    sendRequest(request, next) {
      request.headers.delete("User-Agent");
      return next(request);
    },
  };
}

/**
 * Creates a SecretClient with managed identity authentication and empty user agent
 * @param keyvaultUri - The URI of the Azure Key Vault
 * @returns configured SecretClient instance
 */
function createSecretClientWithManagedIdentity(
  keyvaultUri: string
): SecretClient {
  // Create ManagedIdentityCredential for managed identity authentication
  const credential = new ManagedIdentityCredential();

  // Create secret client with managed identity and empty user agent
  const secretClient = new SecretClient(keyvaultUri, credential, {
    additionalPolicies: [
      {
        position: "perCall",
        policy: removeUserAgentPolicy(),
      },
    ],
  });

  return secretClient;
}

// Usage example
const keyvaultUri = "https://your-keyvault-name.vault.azure.net";
const secretClient = createSecretClientWithManagedIdentity(keyvaultUri);

// Now you can use the secret client to perform operations
// For example:
// const secretValue = await secretClient.getSecret("your-secret-name");

Community

Try our community resources.

Reporting security issues and security bugs

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) secure@microsoft.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

Contributing

For details on contributing to this repository, see the contributing guide.

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

changelog

Release History

6.1.0 (2025-05-14)

Features Added

  • Added Interface DeploymentExtensionConfigItem
  • Added Interface DeploymentExtensionDefinition
  • Added Type Alias ExtensionConfigPropertyType
  • Interface DeploymentProperties has a new optional parameter extensionConfigs
  • Interface DeploymentPropertiesExtended has a new optional parameter extensions
  • Interface ResourceReference has a new optional parameter apiVersion
  • Interface ResourceReference has a new optional parameter extension
  • Interface ResourceReference has a new optional parameter identifiers
  • Interface ResourceReference has a new optional parameter resourceType
  • Interface TargetResource has a new optional parameter apiVersion
  • Interface TargetResource has a new optional parameter extension
  • Interface TargetResource has a new optional parameter identifiers
  • Interface TargetResource has a new optional parameter symbolicName
  • Added Enum KnownExtensionConfigPropertyType

6.0.0 (2025-02-19)

Features Added

  • Added operation TagsOperations.beginCreateOrUpdateAtScope
  • Added operation TagsOperations.beginCreateOrUpdateAtScopeAndWait
  • Added operation TagsOperations.beginDeleteAtScope
  • Added operation TagsOperations.beginDeleteAtScopeAndWait
  • Added operation TagsOperations.beginUpdateAtScope
  • Added operation TagsOperations.beginUpdateAtScopeAndWait
  • Added Interface DeploymentDiagnosticsDefinition
  • Added Interface DeploymentParameter
  • Added Interface KeyVaultParameterReference
  • Added Interface KeyVaultReference
  • Added Interface ResourceGroupsDeleteHeaders
  • Added Interface TagsCreateOrUpdateAtScopeHeaders
  • Added Interface TagsDeleteAtScopeHeaders
  • Added Interface TagsUpdateAtScopeHeaders
  • Added Type Alias ExportTemplateOutputFormat
  • Added Type Alias Level
  • Added Type Alias ValidationLevel
  • Interface DeploymentProperties has a new optional parameter validationLevel
  • Interface DeploymentPropertiesExtended has a new optional parameter diagnostics
  • Interface DeploymentPropertiesExtended has a new optional parameter validationLevel
  • Interface DeploymentValidateResult has a new optional parameter id
  • Interface DeploymentValidateResult has a new optional parameter name
  • Interface DeploymentValidateResult has a new optional parameter type
  • Interface ExportTemplateRequest has a new optional parameter outputFormat
  • Interface ResourceGroupExportResult has a new optional parameter output
  • Interface TagsCreateOrUpdateAtScopeOptionalParams has a new optional parameter resumeFrom
  • Interface TagsCreateOrUpdateAtScopeOptionalParams has a new optional parameter updateIntervalInMs
  • Interface TagsDeleteAtScopeOptionalParams has a new optional parameter resumeFrom
  • Interface TagsDeleteAtScopeOptionalParams has a new optional parameter updateIntervalInMs
  • Interface TagsUpdateAtScopeOptionalParams has a new optional parameter resumeFrom
  • Interface TagsUpdateAtScopeOptionalParams has a new optional parameter updateIntervalInMs
  • Interface WhatIfChange has a new optional parameter deploymentId
  • Interface WhatIfChange has a new optional parameter identifiers
  • Interface WhatIfChange has a new optional parameter symbolicName
  • Interface WhatIfOperationResult has a new optional parameter diagnostics
  • Interface WhatIfOperationResult has a new optional parameter potentialChanges
  • Added Enum KnownExportTemplateOutputFormat
  • Added Enum KnownLevel
  • Added Enum KnownValidationLevel

Breaking Changes

  • Removed operation TagsOperations.createOrUpdateAtScope
  • Removed operation TagsOperations.deleteAtScope
  • Removed operation TagsOperations.updateAtScope
  • Class ResourceManagementClient has a new signature
  • Type of parameter parameters of interface DeploymentProperties is changed from Record<string, unknown> to {
    [propertyName: string]: DeploymentParameter;
    }

5.2.0 (2023-03-13)

Features Added

  • Interface DeploymentOperationsListAtManagementGroupScopeNextOptionalParams no longer has parameter top
  • Interface DeploymentOperationsListAtScopeNextOptionalParams no longer has parameter top
  • Interface DeploymentOperationsListAtSubscriptionScopeNextOptionalParams no longer has parameter top
  • Interface DeploymentOperationsListAtTenantScopeNextOptionalParams no longer has parameter top
  • Interface DeploymentOperationsListNextOptionalParams no longer has parameter top
  • Interface DeploymentsListAtManagementGroupScopeNextOptionalParams no longer has parameter filter
  • Interface DeploymentsListAtManagementGroupScopeNextOptionalParams no longer has parameter top
  • Interface DeploymentsListAtScopeNextOptionalParams no longer has parameter filter
  • Interface DeploymentsListAtScopeNextOptionalParams no longer has parameter top
  • Interface DeploymentsListAtSubscriptionScopeNextOptionalParams no longer has parameter filter
  • Interface DeploymentsListAtSubscriptionScopeNextOptionalParams no longer has parameter top
  • Interface DeploymentsListAtTenantScopeNextOptionalParams no longer has parameter filter
  • Interface DeploymentsListAtTenantScopeNextOptionalParams no longer has parameter top
  • Interface DeploymentsListByResourceGroupNextOptionalParams no longer has parameter filter
  • Interface DeploymentsListByResourceGroupNextOptionalParams no longer has parameter top
  • Interface ProvidersListAtTenantScopeNextOptionalParams no longer has parameter expand
  • Interface ProvidersListNextOptionalParams no longer has parameter expand
  • Interface ResourceGroupsListNextOptionalParams no longer has parameter filter
  • Interface ResourceGroupsListNextOptionalParams no longer has parameter top
  • Interface ResourcesListByResourceGroupNextOptionalParams no longer has parameter expand
  • Interface ResourcesListByResourceGroupNextOptionalParams no longer has parameter filter
  • Interface ResourcesListByResourceGroupNextOptionalParams no longer has parameter top
  • Interface ResourcesListNextOptionalParams no longer has parameter expand
  • Interface ResourcesListNextOptionalParams no longer has parameter filter
  • Interface ResourcesListNextOptionalParams no longer has parameter top

5.1.0 (2022-11-10)

Features Added

  • Added Interface DeploymentWhatIfProperties
  • Added Interface GenericResource
  • Added Interface GenericResourceExpanded

5.0.1 (2022-04-18)

Features Added

  • Bug fix

5.0.0 (2021-12-06)

The package of @azure/arm-resources is using our next generation design principles since version 5.0.0, which contains breaking changes.

To understand the detail of the change, please refer to Changelog.

To migrate the existing applications to the latest version, please refer to Migration Guide.

To learn more, please refer to our documentation Quick Start.