You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-cache-for-redis/cache-nodejs-get-started.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,14 +51,15 @@ Don't create a new connections for each operation in your code. Instead, reuse c
51
51
52
52
## Create a new Node.js app
53
53
54
-
Create a new script file named *redistest.js*.
54
+
Create a new script file named *redistest.js*. Use the command `npm install redis bluebird` to install required packages.
55
55
56
56
Add the following example JavaScript to the file. This code shows you how to connect to an Azure Cache for Redis instance using the cache host name and key environment variables. The code also stores and retrieves a string value in the cache. The `PING` and `CLIENT LIST` commands are also executed. For more examples of using Redis with the [node_redis](https://github.com/mranney/node_redis) client, see [https://redis.js.org/](https://redis.js.org/).
57
57
58
58
```js
59
59
var redis =require("redis");
60
60
var bluebird =require("bluebird");
61
61
62
+
// Convert Redis client API to use promises, to make it usable with async/await syntax
Copy file name to clipboardExpand all lines: articles/event-grid/event-schema.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,16 +79,16 @@ For example, the schema published for an Azure Blob storage event is:
79
79
80
80
All events have the same following top-level data:
81
81
82
-
| Property | Type | Description |
83
-
| -------- | ---- | ----------- |
84
-
| topic | string | Full resource path to the event source. This field isn't writeable. Event Grid provides this value. |
85
-
| subject | string | Publisher-defined path to the event subject. |
86
-
| eventType | string | One of the registered event types for this event source. |
87
-
| eventTime | string | The time the event is generated based on the provider's UTC time. |
88
-
| id | string | Unique identifier for the event. |
89
-
| data | object | Event data specific to the resource provider. |
90
-
| dataVersion | string | The schema version of the data object. The publisher defines the schema version. |
91
-
| metadataVersion | string | The schema version of the event metadata. Event Grid defines the schema of the top-level properties. Event Grid provides this value. |
82
+
| Property | Type |Required |Description |
83
+
| -------- | ---- | --------| ----------- |
84
+
| topic | string |No, but if included, must match the Event Grid topic Azure Resource Manager ID exactly. If not included, Event Grid will stamp onto the event. |Full resource path to the event source. This field isn't writeable. Event Grid provides this value. |
85
+
| subject | string |Yes |Publisher-defined path to the event subject. |
86
+
| eventType | string |Yes |One of the registered event types for this event source. |
87
+
| eventTime | string |Yes |The time the event is generated based on the provider's UTC time. |
88
+
| id | string |Yes |Unique identifier for the event. |
89
+
| data | object |No |Event data specific to the resource provider. |
90
+
| dataVersion | string |No, but will be stamped with an empty value. |The schema version of the data object. The publisher defines the schema version. |
91
+
| metadataVersion | string |Not required, but if included, must match the Event Grid Schema `metadataVersion` exactly (currently, only `1`). If not included, Event Grid will stamp onto the event. |The schema version of the event metadata. Event Grid defines the schema of the top-level properties. Event Grid provides this value. |
92
92
93
93
To learn about the properties in the data object, see the event source:
0 commit comments