Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@
# PRLabel: %Mgmt
/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/ @qiaozha @MaryGao @JialinHuang803

# PRLabel: %Mgmt
# PRLabel: %Mgmt %mgmt-review-needed
/sdk/resources-subscriptions/arm-resources-subscriptions/ @qiaozha @MaryGao @JialinHuang803

# PRLabel: %Mgmt
Expand Down
27 changes: 18 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
# Release History

## 2.1.2 (Unreleased)
## 3.0.0-beta.1 (2026-05-26)
Compared with version 2.1.0

### Features Added
- Added Interface Location
- Added Interface PagedAsyncIterableIterator
- Added Interface PageSettings
- Interface ErrorResponse has a new optional parameter error
- Added Type Alias AzureSupportedClouds
- Added Enum AzureClouds
- Added Enum KnownVersions

### Breaking Changes
- Removed Interface ErrorResponseAutoGenerated
- Removed Interface OperationAutoGenerated
- Removed Interface OperationDisplayAutoGenerated
- Removed Interface OperationListResultAutoGenerated
- Interface ErrorResponse no longer has parameter additionalInfo
- Interface ErrorResponse no longer has parameter code
- Interface ErrorResponse no longer has parameter details
- Interface ErrorResponse no longer has parameter message
- Interface ErrorResponse no longer has parameter target

### Bugs Fixed

### Other Changes

## 2.1.1 (2025-08-22)

### Other Changes

- Other fixes


## 2.1.0 (2023-05-24)

### Features Added
Expand Down Expand Up @@ -72,4 +80,4 @@ To understand the detail of the change, please refer to [Changelog](https://aka.

To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).

To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ).
To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart).
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
29 changes: 12 additions & 17 deletions sdk/resources-subscriptions/arm-resources-subscriptions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Subscription client.

All resource groups and resources exist within subscriptions. These operation enable you get information about your subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure AD) for your organization.

[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resources-subscriptions/arm-resources-subscriptions) |
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-resources-subscriptions) |
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-resources-subscriptions) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

Key links:

Comment thread
JialinHuang803 marked this conversation as resolved.
- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resources-subscriptions/arm-resources-subscriptions)
- [Package (NPM)](https://www.npmjs.com/package/@azure/arm-resources-subscriptions)
- [API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-resources-subscriptions?view=azure-node-preview)
- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resources-subscriptions/arm-resources-subscriptions/samples)

## Getting started

Expand Down Expand Up @@ -35,7 +37,7 @@ npm install @azure/arm-resources-subscriptions
To create a client object to access the Azure Subscription API, you will need the `endpoint` of your Azure Subscription resource and a `credential`. The Azure Subscription client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure Subscription resource in the [Azure Portal][azure_portal].

You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).

To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:

Expand All @@ -44,7 +46,6 @@ npm install @azure/identity
```

You will also need to **register a new AAD application and grant access to Azure Subscription** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
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`.

For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).

Expand All @@ -54,8 +55,7 @@ Using Node.js and Node-like environments, you can use the `DefaultAzureCredentia
import { SubscriptionClient } from "@azure/arm-resources-subscriptions";
import { DefaultAzureCredential } from "@azure/identity";

const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new SubscriptionClient(new DefaultAzureCredential(), subscriptionId);
const client = new SubscriptionClient(new DefaultAzureCredential());
```

For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate.
Expand All @@ -64,16 +64,15 @@ For browser environments, use the `InteractiveBrowserCredential` from the `@azur
import { InteractiveBrowserCredential } from "@azure/identity";
import { SubscriptionClient } from "@azure/arm-resources-subscriptions";

const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new InteractiveBrowserCredential({
tenantId: "<YOUR_TENANT_ID>",
clientId: "<YOUR_CLIENT_ID>",
});
const client = new SubscriptionClient(credential, subscriptionId);
const client = new SubscriptionClient(credential);
```

### JavaScript Bundle

### JavaScript Bundle
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).

## Key concepts
Expand All @@ -98,7 +97,7 @@ For more detailed instructions on how to enable logs, you can look at the [@azur

## Next steps

Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library.
Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resources-subscriptions/arm-resources-subscriptions/samples) directory for detailed examples on how to use this library.

## Contributing

Expand All @@ -108,10 +107,6 @@ If you'd like to contribute to this library, please read the [contributing guide

- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)



[azure_cli]: https://learn.microsoft.com/cli/azure
[azure_sub]: https://azure.microsoft.com/free/
[azure_sub]: https://azure.microsoft.com/free/
[azure_portal]: https://portal.azure.com
[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{
"extends": "../../../api-extractor-base.json"
}
{ "extends": "../../../api-extractor-base.json" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "js",
"TagPrefix": "js/resources-subscriptions/arm-resources-subscriptions",
"Tag": "js/resources-subscriptions/arm-resources-subscriptions_f36cdf7caa"
"Tag": "js/resources-subscriptions/arm-resources-subscriptions_4d0f186a7a"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
"extends": "../../../../eng/tsconfigs/samples.json",
"compilerOptions": {
"paths": {
"@azure/arm-resources-subscriptions": [
"../dist/esm"
]
"@azure/arm-resources-subscriptions": ["../dist/esm"]
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"extends": "../../../../eng/tsconfigs/src.browser.json",
"include": [
"../src/index.ts"
]
"include": ["../src/index.ts"]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"extends": "../../../../eng/tsconfigs/src.cjs.json",
"include": [
"../src/index.ts"
]
"include": ["../src/index.ts"]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"extends": "../../../../eng/tsconfigs/src.esm.json",
"include": [
"../src/index.ts"
]
"include": ["../src/index.ts"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../../../../eng/tsconfigs/test.browser.json",
"compilerOptions": {
"paths": {
"@azure/arm-resources-subscriptions": ["../src/index.ts"],
"@azure/arm-resources-subscriptions/*": ["../src/*"],
"$internal/*": ["../src/*"]
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"extends": "../../../../eng/tsconfigs/test.node.json"
"extends": "../../../../eng/tsconfigs/test.node.json",
"compilerOptions": {
"paths": {
"@azure/arm-resources-subscriptions": ["../src/index.ts"],
"@azure/arm-resources-subscriptions/*": ["../src/*"],
"$internal/*": ["../src/*"]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ export default [
"@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
"@azure/azure-sdk/ts-package-json-files-required": "off",
"@azure/azure-sdk/ts-package-json-main-is-cjs": "off",
"tsdoc/syntax": "warn"
}
}
"tsdoc/syntax": "warn",
},
},
]),
{
files: ["src/**/*.ts", "src/**/*.mts", "test/**/*.ts"],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"apiVersions": {
"Microsoft.Resources": "2022-12-01"
},
"emitterVersion": "0.53.3",
"crossLanguageDefinitions": {
"CrossLanguagePackageId": "Microsoft.Resources",
"CrossLanguageDefinitionId": {
"@azure/arm-resources-subscriptions!ResourceName:interface": "Microsoft.Resources.ResourceName",
"@azure/arm-resources-subscriptions!CheckResourceNameResult:interface": "Microsoft.Resources.CheckResourceNameResult",
"@azure/arm-resources-subscriptions!CloudError:interface": "Microsoft.Resources.CloudError",
"@azure/arm-resources-subscriptions!ErrorResponse:interface": "Azure.ResourceManager.CommonTypes.ErrorResponse",
"@azure/arm-resources-subscriptions!ErrorDetail:interface": "Azure.ResourceManager.CommonTypes.ErrorDetail",
"@azure/arm-resources-subscriptions!ErrorAdditionalInfo:interface": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo",
"@azure/arm-resources-subscriptions!OperationListResult:interface": "Azure.ResourceManager.CommonTypes.OperationListResult",
"@azure/arm-resources-subscriptions!Operation:interface": "Azure.ResourceManager.CommonTypes.Operation",
"@azure/arm-resources-subscriptions!OperationDisplay:interface": "Azure.ResourceManager.CommonTypes.OperationDisplay",
"@azure/arm-resources-subscriptions!LocationListResult:interface": "Microsoft.Resources.LocationListResult",
"@azure/arm-resources-subscriptions!Location:interface": "Microsoft.Resources.Location",
"@azure/arm-resources-subscriptions!LocationMetadata:interface": "Microsoft.Resources.LocationMetadata",
"@azure/arm-resources-subscriptions!PairedRegion:interface": "Microsoft.Resources.PairedRegion",
"@azure/arm-resources-subscriptions!AvailabilityZoneMappings:interface": "Microsoft.Resources.AvailabilityZoneMappings",
"@azure/arm-resources-subscriptions!Subscription:interface": "Microsoft.Resources.Subscription",
"@azure/arm-resources-subscriptions!SubscriptionPolicies:interface": "Microsoft.Resources.SubscriptionPolicies",
"@azure/arm-resources-subscriptions!ManagedByTenant:interface": "Microsoft.Resources.ManagedByTenant",
"@azure/arm-resources-subscriptions!SubscriptionListResult:interface": "Microsoft.Resources.SubscriptionListResult",
"@azure/arm-resources-subscriptions!CheckZonePeersRequest:interface": "Microsoft.Resources.CheckZonePeersRequest",
"@azure/arm-resources-subscriptions!CheckZonePeersResult:interface": "Microsoft.Resources.CheckZonePeersResult",
"@azure/arm-resources-subscriptions!AvailabilityZonePeers:interface": "Microsoft.Resources.AvailabilityZonePeers",
"@azure/arm-resources-subscriptions!Peers:interface": "Microsoft.Resources.Peers",
"@azure/arm-resources-subscriptions!TenantListResult:interface": "Microsoft.Resources.TenantListResult",
"@azure/arm-resources-subscriptions!TenantIdDescription:interface": "Microsoft.Resources.TenantIdDescription",
"@azure/arm-resources-subscriptions!KnownResourceNameStatus:enum": "Microsoft.Resources.ResourceNameStatus",
"@azure/arm-resources-subscriptions!KnownOrigin:enum": "Azure.ResourceManager.CommonTypes.Origin",
"@azure/arm-resources-subscriptions!KnownActionType:enum": "Azure.ResourceManager.CommonTypes.ActionType",
"@azure/arm-resources-subscriptions!KnownLocationType:enum": "Microsoft.Resources.LocationType",
"@azure/arm-resources-subscriptions!KnownRegionType:enum": "Microsoft.Resources.RegionType",
"@azure/arm-resources-subscriptions!KnownRegionCategory:enum": "Microsoft.Resources.RegionCategory",
"@azure/arm-resources-subscriptions!KnownSubscriptionState:enum": "Microsoft.Resources.SubscriptionState",
"@azure/arm-resources-subscriptions!KnownSpendingLimit:enum": "Microsoft.Resources.SpendingLimit",
"@azure/arm-resources-subscriptions!KnownTenantCategory:enum": "Microsoft.Resources.TenantCategory",
"@azure/arm-resources-subscriptions!KnownVersions:enum": "Microsoft.Resources.Versions",
"@azure/arm-resources-subscriptions!SubscriptionClient#checkResourceName:member(1)": "Microsoft.Resources.checkResourceName",
"@azure/arm-resources-subscriptions!TenantsOperations#list:member": "Microsoft.Resources.Tenants.list",
"@azure/arm-resources-subscriptions!SubscriptionsOperations#checkZonePeers:member": "Microsoft.Resources.Subscriptions.checkZonePeers",
"@azure/arm-resources-subscriptions!SubscriptionsOperations#list:member": "Microsoft.Resources.Subscriptions.list",
"@azure/arm-resources-subscriptions!SubscriptionsOperations#get:member": "Microsoft.Resources.Subscriptions.get",
"@azure/arm-resources-subscriptions!SubscriptionsOperations#listLocations:member": "Microsoft.Resources.Subscriptions.listLocations",
"@azure/arm-resources-subscriptions!OperationsOperations#list:member": "Azure.ResourceManager.Legacy.Operations.list"
}
}
}
Loading