@azure/eventgrid-namespaces 1.0.0-alpha.20240412.4 → 1.0.0-alpha.20240415.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/package.json +1 -1
package/README.md
CHANGED
@@ -6,11 +6,11 @@ Use the client library to Send events to Event Grid Namespaces
|
|
6
6
|
|
7
7
|
Key links:
|
8
8
|
|
9
|
-
- [Source code](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/eventgrid/eventgrid/)
|
9
|
+
- [Source code](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/eventgrid/eventgrid-namespaces/)
|
10
10
|
- [Package (NPM)](https://www.npmjs.com/package/@azure/eventgrid-namespaces)
|
11
11
|
- [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/eventgrid/)
|
12
12
|
- [Product documentation](https://docs.microsoft.com/azure/event-grid/)
|
13
|
-
- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventgrid/eventgrid/samples)
|
13
|
+
- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventgrid/eventgrid-namespaces/samples)
|
14
14
|
|
15
15
|
## Getting started
|
16
16
|
|
@@ -69,9 +69,9 @@ az eventgrid topic key list --resource-group <your-resource-group-name> --name <
|
|
69
69
|
Once you have an API key and endpoint, you can use the `AzureKeyCredential` class to authenticate the client as follows:
|
70
70
|
|
71
71
|
```js
|
72
|
-
const {
|
72
|
+
const { EventGridClient, AzureKeyCredential } = require("@azure/eventgrid-namespaces");
|
73
73
|
|
74
|
-
const client = new
|
74
|
+
const client = new EventGridClient(
|
75
75
|
"<endpoint>",
|
76
76
|
new AzureKeyCredential("<Access Key>")
|
77
77
|
);
|
@@ -86,10 +86,10 @@ With the `@azure/identity` package, you can seamlessly authorize requests in bot
|
|
86
86
|
For example, use can use `DefaultAzureCredential` to construct a client which will authenticate using Azure Active Directory:
|
87
87
|
|
88
88
|
```js
|
89
|
-
const {
|
89
|
+
const { EventGridClient } = require("@azure/eventgrid-namespaces");
|
90
90
|
const { DefaultAzureCredential } = require("@azure/identity");
|
91
91
|
|
92
|
-
const client = new
|
92
|
+
const client = new EventGridClient(
|
93
93
|
"<endpoint>",
|
94
94
|
new DefaultAzureCredential()
|
95
95
|
);
|
@@ -102,7 +102,7 @@ const client = new EventGridNamespacesClient(
|
|
102
102
|
`EventGridNamespacesClient` is used sending events to an Event Grid. You can initialize it as:
|
103
103
|
|
104
104
|
```js
|
105
|
-
const client = new
|
105
|
+
const client = new EventGridClient(
|
106
106
|
"<endpoint>",
|
107
107
|
new AzureKeyCredential("<API Key>")
|
108
108
|
);
|
@@ -121,9 +121,9 @@ This library has been tested and validated on [Kubernetes using Azure Arc][event
|
|
121
121
|
### Publish an Event to an Event Grid Topic
|
122
122
|
|
123
123
|
```js
|
124
|
-
const {
|
124
|
+
const { EventGridClient, AzureKeyCredential } = require("@azure/eventgrid-namespaces");
|
125
125
|
|
126
|
-
const client = new
|
126
|
+
const client = new EventGridClient(
|
127
127
|
"<endpoint>",
|
128
128
|
new AzureKeyCredential("<API key>")
|
129
129
|
);
|
@@ -159,7 +159,7 @@ For more detailed instructions on how to enable the logs, you can look at the [@
|
|
159
159
|
## Next steps
|
160
160
|
|
161
161
|
Please take a look at the
|
162
|
-
[samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventgrid/eventgrid/samples)
|
162
|
+
[samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventgrid/eventgrid-namespaces/samples)
|
163
163
|
directory for detailed examples on how to use this library.
|
164
164
|
|
165
165
|
## Contributing
|
package/package.json
CHANGED