Skip to content

Commit 07629dc

Browse files
authored
[appconfiguration] Fix snippets generation (Azure#33885)
### Packages impacted by this PR - @azure/appconfiguration ### Issues associated with this PR - Azure#33880 ### Describe the problem that is addressed by this PR Updates the snippets generation and adds an ignore to the CHANGELOG. ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? ### Are there test cases added in this PR? _(If not, why?)_ ### Provide a list of related PRs _(if any)_ ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [ ] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [ ] Added a changelog (if necessary)
1 parent 8961689 commit 07629dc

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

sdk/appconfiguration/app-configuration/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- dev-tool snippets ignore -->
2+
13
# Release History
24

35
## 1.9.1 (Unreleased)

sdk/appconfiguration/app-configuration/README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,19 +80,15 @@ More information about `@azure/identity` can be found [here](https://github.com/
8080
To authenticate with a resource in a [Sovereign Cloud](https://learn.microsoft.com/azure/active-directory/develop/authentication-national-cloud), you will need to set the `audience` in the `AppConfigurationClient` constructor options.
8181

8282
```ts snippet:AuthenticatingWithAzureSovereignCloud
83-
import { AppConfigurationClient } from "@azure/app-configuration";
83+
import { AppConfigurationClient, KnownAppConfigAudience } from "@azure/app-configuration";
8484
import { DefaultAzureCredential } from "@azure/identity";
8585

8686
// The endpoint for your App Configuration resource
8787
const endpoint = "https://example.azconfig.azure.cn";
8888
// Create an AppConfigurationClient that will authenticate through AAD in the China cloud
89-
const client = new AppConfigurationClient(
90-
endpoint,
91-
new DefaultAzureCredential(),
92-
{
93-
audience: KnownAppConfigurationAudience.AzureChina
94-
}
95-
);
89+
const client = new AppConfigurationClient(endpoint, new DefaultAzureCredential(), {
90+
audience: KnownAppConfigAudience.AzureChina,
91+
});
9692
```
9793

9894
Note: When `audience` property is not defined, the SDK will default to Azure Public Cloud.

0 commit comments

Comments
 (0)