Skip to content

Commit

Permalink
CodeGen from PR 32288 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge cc4d66a845afee3a3c20338826124b038c952fdb into c39f72c162b0ca345a4745cdfc9a1e276a725d5d
  • Loading branch information
SDKAuto committed Feb 27, 2025
1 parent 2388847 commit 4cae02e
Show file tree
Hide file tree
Showing 106 changed files with 2,239 additions and 4,362 deletions.
14 changes: 7 additions & 7 deletions common/config/rush/pnpm-lock.yaml

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

47 changes: 40 additions & 7 deletions sdk/standbypool/arm-standbypool/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,48 @@
# Release History

## 1.0.2 (Unreleased)

## 2.0.0 (2025-02-27)
### Features Added

### Breaking Changes
- Added Interface ErrorAdditionalInfo
- Added Interface ErrorDetail
- Added Interface ErrorResponse
- Added Interface PoolContainerGroupStateCount
- Added Interface PoolStatus
- Added Interface PoolVirtualMachineStateCount
- Added Interface StandbyContainerGroupPoolForecastValues
- Added Interface StandbyContainerGroupPoolPrediction
- Added Interface StandbyVirtualMachinePoolForecastValues
- Added Interface StandbyVirtualMachinePoolPrediction
- Added Type Alias HealthStateCode
- Added Type Alias PoolContainerGroupState
- Added Type Alias PoolVirtualMachineState
- Interface ContainerGroupInstanceCountSummary has a new optional parameter zone
- Interface StandbyContainerGroupPoolResourceProperties has a new optional parameter zones
- Interface StandbyContainerGroupPoolResourceUpdateProperties has a new optional parameter zones
- Interface StandbyContainerGroupPoolRuntimeViewResourceProperties has a new optional parameter prediction
- Interface StandbyContainerGroupPoolRuntimeViewResourceProperties has a new optional parameter status
- Interface StandbyVirtualMachinePoolRuntimeViewResourceProperties has a new optional parameter prediction
- Interface StandbyVirtualMachinePoolRuntimeViewResourceProperties has a new optional parameter status
- Added Enum KnownHealthStateCode
- Added Enum KnownPoolContainerGroupState
- Added Enum KnownPoolVirtualMachineState
- Added Enum KnownVersions
- Enum KnownOrigin has a new value "user,system"
- Enum KnownOrigin has a new value system
- Enum KnownOrigin has a new value user
- Enum KnownRefillPolicy has a new value always
- Enum KnownVirtualMachineState has a new value Hibernated

### Bugs Fixed

### Other Changes
### Breaking Changes

- Type of parameter instanceCountsByState of interface ContainerGroupInstanceCountSummary is changed from PoolResourceStateCount[] to PoolContainerGroupStateCount[]
- Type of parameter instanceCountsByState of interface VirtualMachineInstanceCountSummary is changed from PoolResourceStateCount[] to PoolVirtualMachineStateCount[]
- Enum KnownOrigin no longer has value System
- Enum KnownOrigin no longer has value User
- Enum KnownOrigin no longer has value UserSystem
- Enum KnownRefillPolicy no longer has value Always

## 1.0.1 (2024-11-04)

### Bugs Fixed
Expand Down
8 changes: 4 additions & 4 deletions sdk/standbypool/arm-standbypool/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Copyright (c) Microsoft Corporation.
The MIT License (MIT)

MIT License
Copyright (c) 2025 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -12,10 +12,10 @@ furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
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.
66 changes: 30 additions & 36 deletions sdk/standbypool/arm-standbypool/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Azure StandbyPoolManagement client library for JavaScript
# Azure StandbyPool client library for JavaScript

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

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


Key links:

- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/standbypool/arm-standbypool)
- [Package (NPM)](https://www.npmjs.com/package/@azure/arm-standbypool)
- [API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-standbypool?view=azure-node-preview)

## Getting started

Expand All @@ -22,16 +25,16 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP

### Install the `@azure/arm-standbypool` package

Install the Azure StandbyPoolManagement client library for JavaScript with `npm`:
Install the Azure StandbyPool client library for JavaScript with `npm`:

```bash
npm install @azure/arm-standbypool
```

### Create and authenticate a `StandbyPoolManagementClient`
### Create and authenticate a `StandbyPoolClient`

To create a client object to access the Azure StandbyPoolManagement API, you will need the `endpoint` of your Azure StandbyPoolManagement resource and a `credential`. The Azure StandbyPoolManagement client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure StandbyPoolManagement resource in the [Azure Portal][azure_portal].
To create a client object to access the Azure StandbyPool API, you will need the `endpoint` of your Azure StandbyPool resource and a `credential`. The Azure StandbyPool client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure StandbyPool 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).

Expand All @@ -42,58 +45,49 @@ npm install @azure/identity
```

You will also need to **register a new AAD application and grant access to Azure StandbyPool** 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).

Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client.

```ts snippet:ReadmeSampleCreateClient_Node
import { StandbyPoolManagementClient } from "@azure/arm-standbypool";
import { DefaultAzureCredential } from "@azure/identity";
```javascript
const { StandbyPoolClient } = require("@azure/arm-standbypool");
const { DefaultAzureCredential } = require("@azure/identity");
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.

const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StandbyPoolManagementClient(new DefaultAzureCredential(), subscriptionId);
const client = new StandbyPoolClient(new DefaultAzureCredential(), subscriptionId);

// For client-side applications running in the browser, use this code instead:
// const credential = new InteractiveBrowserCredential({
// tenantId: "<YOUR_TENANT_ID>",
// clientId: "<YOUR_CLIENT_ID>"
// });
// const client = new StandbyPoolClient(credential, subscriptionId);
```

For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate.

```ts snippet:ReadmeSampleCreateClient_Browser
import { InteractiveBrowserCredential } from "@azure/identity";
import { StandbyPoolManagementClient } from "@azure/arm-standbypool";

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

### 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

### StandbyPoolManagementClient
### StandbyPoolClient

`StandbyPoolManagementClient` is the primary interface for developers using the Azure StandbyPoolManagement client library. Explore the methods on this client object to understand the different features of the Azure StandbyPoolManagement service that you can access.
`StandbyPoolClient` is the primary interface for developers using the Azure StandbyPool client library. Explore the methods on this client object to understand the different features of the Azure StandbyPool service that you can access.

## 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`:

```ts snippet:SetLogLevel
import { setLogLevel } from "@azure/logger";

```javascript
const { setLogLevel } = require("@azure/logger");
setLogLevel("info");
```

For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).


## Contributing

If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
Expand Down
6 changes: 0 additions & 6 deletions sdk/standbypool/arm-standbypool/assets.json

This file was deleted.

16 changes: 16 additions & 0 deletions sdk/standbypool/arm-standbypool/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
"@azure/azure-sdk/ts-apiextractor-json-types": "warn",
"@azure/azure-sdk/ts-package-json-types": "warn",
"@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
"@azure/azure-sdk/ts-package-json-module": "off",
"@azure/azure-sdk/ts-package-json-files-required": "off",
"@azure/azure-sdk/ts-package-json-main-is-cjs": "off",
"tsdoc/syntax": "warn",
},
},
]);
Loading

0 comments on commit 4cae02e

Please sign in to comment.