Skip to content

Commit 4ae4237

Browse files
authored
Merge pull request #183157 from robece/master
Updated Event Grid articles
2 parents 11015f3 + 563d822 commit 4ae4237

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

articles/event-grid/authenticate-with-active-directory.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,19 @@ Following are the prerequisites to authenticate to Event Grid.
8383

8484
### Publish events using Azure AD Authentication
8585

86-
To send events to a topic, domain, or partner namespace, you can build the client in the following way. The api version that first provided support for Azure AD authentication is ``2021-06-01-preview``. Use that API version or a more recent version in your application.
87-
88-
```java
89-
DefaultAzureCredential credential = new DefaultAzureCredentialBuilder().build();
90-
EventGridPublisherClient cloudEventClient = new EventGridPublisherClientBuilder()
91-
.endpoint("<your-event-grid-topic-domain-or-partner-namespace-endpoint>?api-version=2021-06-01-preview")
92-
.credential(credential)
93-
.buildCloudEventPublisherClient();
94-
```
95-
If you're using a security principal associated with a client publishing application, you have to configure environmental variables as shown in the [Java SDK readme article](/java/api/overview/azure/identity-readme#environment-variables). The `DefaultCredentialBuilder` reads those environment variables to use the right identity. For more information, see [Java API overview](/java/api/overview/azure/identity-readme#defaultazurecredential).
86+
To send events to a topic, domain, or partner namespace, you can build the client in the following way. The api version that first provided support for Azure AD authentication is ``2018-01-01``. Use that API version or a more recent version in your application.
87+
88+
Sample:
89+
90+
This C# snippet creates an Event Grid publisher client using an Application (Service Principal) with a client secret, to enable the DefaultAzureCredential method you will need to add the [Azure.Identity library](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md). If you are using the official SDK it will handle the version for you.
9691

92+
```csharp
93+
Environment.SetEnvironmentVariable("AZURE_CLIENT_ID", "");
94+
Environment.SetEnvironmentVariable("AZURE_TENANT_ID", "");
95+
Environment.SetEnvironmentVariable("AZURE_CLIENT_SECRET", "");
96+
97+
EventGridPublisherClient client = new EventGridPublisherClient(new Uri("your-event-grid-topic-domain-or-partner-namespace-endpoint"), new DefaultAzureCredential());
98+
```
9799

98100
For more information, see the following articles:
99101

articles/event-grid/enable-diagnostic-logs-topic.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ ms.date: 11/11/2021
99

1010
This article provides step-by-step instructions for enabling diagnostic settings for Event Grid resources. These settings allow you to capture and view diagnostic information so that you can troubleshoot any failures. The following table shows the settings available for different types of Event Grid resources - custom topics, system topics, and domains.
1111

12-
| Diagnostic setting | Event Grid topics | Event Grid system topics | Event Grid domains |
13-
| ------------- | --------- | ----------- | ----------- |
14-
| [DeliveryFailures](diagnostic-logs.md#schema-for-publishdelivery-failure-logs) | Yes | Yes | Yes |
15-
| [PublishFailures](diagnostic-logs.md#schema-for-publishdelivery-failure-logs) | Yes | No | Yes |
16-
| [DataPlaneRequests](diagnostic-logs.md#schema-for-data-plane-requests) | Yes | No | Yes |
12+
| Diagnostic setting | Event Grid topics | Event Grid system topics | Event domains | Event Grid partner namespaces |
13+
| ------------- | --------- | ----------- | ----------- | ----------- |
14+
| [DeliveryFailures](diagnostic-logs.md#schema-for-publishdelivery-failure-logs) | Yes | Yes | Yes | No |
15+
| [PublishFailures](diagnostic-logs.md#schema-for-publishdelivery-failure-logs) | Yes | No | Yes | Yes |
16+
| [DataPlaneRequests](diagnostic-logs.md#schema-for-data-plane-requests) | Yes | No | Yes | Yes |
1717

1818
> [!IMPORTANT]
1919
> For schemas of delivery failures, publish failures, and data plane requests, see [Diagnostic logs](diagnostic-logs.md).
@@ -202,7 +202,7 @@ Then, it creates a diagnostic setting on the topic to send diagnostic informatio
202202

203203
Event Grid can publish audit traces for data plane operations. To enable the feature, select **audit** in the **Category groups** section or select **DataPlaneRequests** in the **Categories** section.
204204

205-
The audit trace can be used to ensure that data access is allowed only for authorized purposes. It collects information about security control such as resource name, operation type, network access, level, region and more. For more information about how to enable the diagnostic setting, see [Diagnostic logs in Event Grid topics and Event Grid domains](enable-diagnostic-logs-topic.md#enable-diagnostic-logs-for-event-grid-topics-and-domains).
205+
The audit trace can be used to ensure that data access is allowed only for authorized purposes. It collects information about security control such as resource name, operation type, network access, level, region and more. For more information about how to enable the diagnostic setting, see [Diagnostic logs in Event Grid topics and Event domains](enable-diagnostic-logs-topic.md#enable-diagnostic-logs-for-event-grid-topics-and-domains).
206206
![Select the audit traces](./media/enable-diagnostic-logs-topic/enable-audit-logs.png)
207207

208208
> [!IMPORTANT]

articles/event-grid/post-to-custom-topic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ For custom topics, the top-level data contains the same fields as standard resou
6969
]
7070
```
7171

72-
For a description of these properties, see [Azure Event Grid event schema](event-schema.md). When posting events to an event grid topic, the array can have a total size of up to 1 MB. The maximum allowed size for an event is also 1 MB. Events over 64 KB are charged in 64-KB increments.
72+
For a description of these properties, see [Azure Event Grid event schema](event-schema.md). When posting events to an event grid topic, the array can have a total size of up to 1 MB. The maximum allowed size for an event is also 1 MB. Events over 64 KB are charged in 64-KB increments. When receiving events in a batch, the maximum allowed number of events is 5,000 per batch.
7373

7474
For example, a valid event data schema is:
7575

0 commit comments

Comments
 (0)