From 51562947b539551fbba02e85e01c0cdd1aa09c68 Mon Sep 17 00:00:00 2001 From: Paul Van Eck Date: Thu, 5 Oct 2023 13:46:37 -0700 Subject: [PATCH] [Monitor] Add client configuration info to README (#32326) This adds a section to the README about configuring the LogsIngestionClient for non-public clouds. Signed-off-by: Paul Van Eck --- sdk/monitor/azure-monitor-ingestion/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sdk/monitor/azure-monitor-ingestion/README.md b/sdk/monitor/azure-monitor-ingestion/README.md index e3008afd30478..a515c1bca416e 100644 --- a/sdk/monitor/azure-monitor-ingestion/README.md +++ b/sdk/monitor/azure-monitor-ingestion/README.md @@ -64,6 +64,14 @@ credential = DefaultAzureCredential() logs_client = LogsIngestionClient(endpoint, credential) ``` +#### Configure clients for non-public Azure clouds + +By default, `LogsIngestionClient` is configured to connect to the public Azure cloud. To connect to non-public Azure clouds, some additional configuration is required. The appropriate scope for authentication must be provided using the `credential_scopes` keyword argument. The following example shows how to configure the client to connect to Azure US Government: + +```python +logs_client = LogsIngestionClient(endpoint, credential_scopes=["https://monitor.azure.us//.default"]) +``` + ## Key concepts ### Data Collection Endpoint