Skip to content

Commit 472f76f

Browse files
Merge pull request #300227 from zhiyuanliang-ms/zhiyuanliang/update-js-doc
Azure App Configuration - Update JS provider doc for 2.1.0 release
2 parents 6cd0bd8 + 864d88a commit 472f76f

File tree

2 files changed

+77
-3
lines changed

2 files changed

+77
-3
lines changed

articles/azure-app-configuration/configuration-provider-overview.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,16 @@ Configuration Setting Mapping | [GA](./reference-dotnet-provider.md#configuratio
5555
Key Vault References | [GA](./reference-dotnet-provider.md#key-vault-reference) | GA | GA | GA | [GA](./reference-javascript-provider.md#key-vault-reference)
5656
Key Vault Secret Refresh | [GA](./reference-dotnet-provider.md#key-vault-secret-refresh) | WIP | GA | WIP | WIP
5757
Custom Key Vault Secret Resolution | [GA](./reference-dotnet-provider.md#key-vault-reference) | GA | GA | GA | [GA](./reference-javascript-provider.md#key-vault-reference)
58+
Parallel Secret Resolution | WIP | WIP | WIP | WIP | [GA](./reference-javascript-provider.md#parallel-secret-resolution)
5859
Feature Flags | [GA](./reference-dotnet-provider.md#feature-flag) | GA | GA | GA | [GA](./reference-javascript-provider.md#feature-flag)
5960
Variant Feature Flags | [GA](./reference-dotnet-provider.md#feature-flag) | GA | GA | GA | [GA](./reference-javascript-provider.md#feature-flag)
6061
Feature Flag Telemetry | GA | GA | WIP | GA | GA
6162
Key Prefix Trim | [GA](./reference-dotnet-provider.md#trim-prefix-from-keys) | GA | GA | GA | [GA](./reference-javascript-provider.md#trim-prefix-from-keys)
62-
Configurable Startup Time-out | [GA](./reference-dotnet-provider.md#startup-retry) | WIP | N/A | WIP | WIP
63+
Configurable Startup Time-out | [GA](./reference-dotnet-provider.md#startup-retry) | WIP | N/A | WIP | [GA](./reference-javascript-provider.md#startup-retry)
6364
Replica Auto Discovery | [GA](./reference-dotnet-provider.md#geo-replication) | GA | GA | WIP | [GA](./reference-javascript-provider.md#geo-replication)
6465
Replica Failover | [GA](./reference-dotnet-provider.md#geo-replication) | GA | GA | WIP | [GA](./reference-javascript-provider.md#geo-replication)
6566
Replica Load Balancing | [GA](./reference-dotnet-provider.md#geo-replication) | WIP | GA | WIP | [GA](./reference-javascript-provider.md#geo-replication)
66-
Snapshots | [GA](./reference-dotnet-provider.md#snapshot) | GA | GA | WIP | WIP
67+
Snapshots | [GA](./reference-dotnet-provider.md#snapshot) | GA | GA | WIP | [GA](./reference-javascript-provider.md#snapshot)
6768
Distributed tracing | [GA](./reference-dotnet-provider.md#distributed-tracing) | WIP | WIP | WIP | WIP
6869
Health Check | WIP | WIP | WIP | WIP | WIP
6970

articles/azure-app-configuration/reference-javascript-provider.md

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.service: azure-app-configuration
99
ms.devlang: javascript
1010
ms.custom: devx-track-javascript
1111
ms.topic: tutorial
12-
ms.date: 02/02/2025
12+
ms.date: 05/22/2025
1313
#Customer intent: I want to learn how to use Azure App Configuration JavaScript client library.
1414
---
1515

@@ -355,6 +355,79 @@ const appConfig = await load(endpoint, credential, {
355355
});
356356
```
357357

358+
You can also set `clientOptions` property to configure `SecretClientOptions` used to connect to Azure Key Vault that has no registered `SecretClient`.
359+
360+
```typescript
361+
const credential = new DefaultAzureCredential();
362+
const appConfig = await load(endpoint, credential, {
363+
keyVaultOptions: {
364+
credential: credential,
365+
clientOptions: { // configure a custom SecretClientOptions
366+
retryOptions: {
367+
maxRetries: 3,
368+
maxRetryDelayInMs: 1000
369+
}
370+
}
371+
}
372+
});
373+
```
374+
375+
### Parallel secret resolution
376+
377+
Azure Key Vault doesn't provide a batch API for retrieving multiple secrets in a single request. When your application needs to load numerous Key Vault references, you can improve performance by enabling parallel secret resolution using the `parallelSecretResolutionEnabled` property in `KeyVaultOptions`. This allows the provider to fetch multiple secrets in parallel rather than sequentially:
378+
379+
380+
```typescript
381+
const credential = new DefaultAzureCredential();
382+
const appConfig = await load(endpoint, credential, {
383+
keyVaultOptions: {
384+
credential: credential,
385+
parallelSecretResolutionEnabled: true
386+
}
387+
});
388+
```
389+
390+
> [!NOTE]
391+
> When resolving secret in parallel, you may encounter the [service limit](/azure/key-vault/general/service-limits#secrets-managed-storage-account-keys-and-vault-transactions) of Azure Key Vault.
392+
> To handle throttling effectively, implement the [client-side throttling best practices](/azure/key-vault/general/overview-throttling#how-to-throttle-your-app-in-response-to-service-limits) by configuring appropriate retry options for the `SecretClient`. You can either register custom `SecretClient` instances or configure `clientOptions` via the `AzureAppConfigurationOptions.keyVaultOptions`.
393+
394+
395+
## Snapshot
396+
397+
[Snapshot](./concept-snapshots.md) is a named, immutable subset of an App Configuration store's key-values. The key-values that make up a snapshot are chosen during creation time through the usage of key and label filters. Once a snapshot is created, the key-values within are guaranteed to remain unchanged.
398+
399+
You can use snapshot selector to load key-values or feature flags from a snapshot:
400+
401+
```typescript
402+
const appConfig = await load(endpoint, credential, {
403+
selectors: [
404+
{ snapshotName: "MySnapshot" }, // load key-values from snapshot
405+
{ keyFilter: "test*", labelFilter: "test" }
406+
],
407+
featureFlagOptions: {
408+
enabled: true,
409+
selectors: [
410+
{ snapshotName: "MySnapshot" }, // load feature flags from snapshot
411+
{ keyFilter: "*", labelFilter: "test" }
412+
]
413+
}
414+
});
415+
```
416+
417+
## Startup retry
418+
419+
Configuration loading is a critical path operation during application startup. To ensure reliability, the Azure App Configuration provider implements a robust retry mechanism during the initial configuration load. This helps protect your application from transient network issues that might otherwise prevent successful startup.
420+
421+
You can customize this behavior via the `AzureAppConfigurationOptions.startupOptions`:
422+
423+
```typescript
424+
const appConfig = await load(endpoint, credential, {
425+
startupOptions: {
426+
timeoutInMs: 300_000
427+
}
428+
});
429+
```
430+
358431
## Geo-replication
359432

360433
For information about using geo-replication, go to [Enable geo-replication](./howto-geo-replication.md).

0 commit comments

Comments
 (0)