Skip to content

Commit 7337c62

Browse files
author
SDKAuto
committed
CodeGen from PR 34636 in Azure/azure-rest-api-specs
Merge 6820709a834a078814aa5a5fbceac05129e49d5b into a19648565889eaae019e531c15f3045d1244c7ce
1 parent 47033fd commit 7337c62

File tree

175 files changed

+12335
-22
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+12335
-22
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 60 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rush.json

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* This is the main configuration file for Rush.
33
* For full documentation, please see https://rushjs.io
4-
*/ {
4+
*/{
55
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json",
66
/**
77
* (Required) This specifies the version of the Rush engine to be used in this repo.
@@ -555,7 +555,9 @@
555555
"projectFolder": "common/tools/dev-tool",
556556
"versionPolicyName": "utility",
557557
// Add Identity to decoupledLocalDependencies so that dev-tool uses the package from npm, avoiding a cyclic dependency.
558-
"decoupledLocalDependencies": ["@azure/identity"]
558+
"decoupledLocalDependencies": [
559+
"@azure/identity"
560+
]
559561
},
560562
{
561563
"packageName": "@azure/eventgrid",
@@ -595,7 +597,9 @@
595597
{
596598
"packageName": "@azure/identity",
597599
"projectFolder": "sdk/identity/identity",
598-
"decoupledLocalDependencies": ["@azure/keyvault-keys"],
600+
"decoupledLocalDependencies": [
601+
"@azure/keyvault-keys"
602+
],
599603
"versionPolicyName": "client"
600604
},
601605
{
@@ -2367,6 +2371,11 @@
23672371
"packageName": "@azure/arm-carbonoptimization",
23682372
"projectFolder": "sdk/carbonoptimization/arm-carbonoptimization",
23692373
"versionPolicyName": "management"
2374+
},
2375+
{
2376+
"packageName": "@azure/arm-purestorageblock",
2377+
"projectFolder": "sdk/purestorageblock/arm-purestorageblock",
2378+
"versionPolicyName": "management"
23702379
}
23712380
]
2372-
}
2381+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Release History
2+
3+
## 1.0.0-beta.1 (2025-05-13)
4+
5+
### Features Added
6+
7+
The package of @azure/arm-purestorageblock is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart).
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Copyright (c) Microsoft Corporation.
2+
3+
MIT License
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Azure Block client library for JavaScript
2+
3+
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Block client.
4+
5+
6+
7+
Key links:
8+
9+
- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/purestorageblock/arm-purestorageblock)
10+
- [Package (NPM)](https://www.npmjs.com/package/@azure/arm-purestorageblock)
11+
- [API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-purestorageblock?view=azure-node-preview)
12+
- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/purestorageblock/arm-purestorageblock/samples)
13+
14+
## Getting started
15+
16+
### Currently supported environments
17+
18+
- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
19+
- Latest versions of Safari, Chrome, Edge and Firefox.
20+
21+
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
22+
23+
### Prerequisites
24+
25+
- An [Azure subscription][azure_sub].
26+
27+
### Install the `@azure/arm-purestorageblock` package
28+
29+
Install the Azure Block client library for JavaScript with `npm`:
30+
31+
```bash
32+
npm install @azure/arm-purestorageblock
33+
```
34+
35+
### Create and authenticate a `BlockClient`
36+
37+
To create a client object to access the Azure Block API, you will need the `endpoint` of your Azure Block resource and a `credential`. The Azure Block client can use Azure Active Directory credentials to authenticate.
38+
You can find the endpoint for your Azure Block resource in the [Azure Portal][azure_portal].
39+
40+
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).
41+
42+
To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
43+
44+
```bash
45+
npm install @azure/identity
46+
```
47+
48+
You will also need to **register a new AAD application and grant access to Azure Block** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
49+
50+
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).
51+
52+
Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client.
53+
54+
```ts snippet:ReadmeSampleCreateClient_Node
55+
import { BlockClient } from "@azure/arm-purestorageblock";
56+
import { DefaultAzureCredential } from "@azure/identity";
57+
58+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
59+
const client = new BlockClient(new DefaultAzureCredential(), subscriptionId);
60+
```
61+
62+
For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate.
63+
64+
```ts snippet:ReadmeSampleCreateClient_Browser
65+
import { InteractiveBrowserCredential } from "@azure/identity";
66+
import { BlockClient } from "@azure/arm-purestorageblock";
67+
68+
const credential = new InteractiveBrowserCredential({
69+
tenantId: "<YOUR_TENANT_ID>",
70+
clientId: "<YOUR_CLIENT_ID>"
71+
});
72+
const client = new BlockClient(credential, subscriptionId);
73+
```
74+
75+
76+
### JavaScript Bundle
77+
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).
78+
79+
## Key concepts
80+
81+
### BlockClient
82+
83+
`BlockClient` is the primary interface for developers using the Azure Block client library. Explore the methods on this client object to understand the different features of the Azure Block service that you can access.
84+
85+
## Troubleshooting
86+
87+
### Logging
88+
89+
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`:
90+
91+
```ts snippet:SetLogLevel
92+
import { setLogLevel } from "@azure/logger";
93+
94+
setLogLevel("info");
95+
```
96+
97+
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).
98+
99+
## Next steps
100+
101+
Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/purestorageblock/arm-purestorageblock/samples) directory for detailed examples on how to use this library.
102+
103+
## Contributing
104+
105+
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.
106+
107+
## Related projects
108+
109+
- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
110+
111+
[azure_sub]: https://azure.microsoft.com/free/
112+
[azure_portal]: https://portal.azure.com
113+
[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
114+
[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential

0 commit comments

Comments
 (0)