Skip to content

Commit e12f3c1

Browse files
batrivedlmazuell0lawrence
authored andcommitted
[Azure Event Grid] Add new data plane GA api-version 2024-06-01 (Azure#29060)
* Add new GA api-version=2024-06-01 * Change ReleaseDelay enum values to string from number * regenerate with newest doc changes --------- Co-authored-by: Laurent Mazuel <[email protected]> Co-authored-by: l0lawrence <[email protected]>
1 parent ed0b726 commit e12f3c1

File tree

15 files changed

+1275
-17
lines changed

15 files changed

+1275
-17
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"operationId": "AcknowledgeCloudEvents",
3+
"title": "Acknowledge Cloud Event",
4+
"parameters": {
5+
"endpoint": "myNamespaceName.westus-1.eventgrid.azure.net",
6+
"topicName": "myTopic",
7+
"eventSubscriptionName": "myEventSubscription",
8+
"content-type": "application/json",
9+
"authorization": "SharedAccessKey 123",
10+
"api-version": "2024-06-01",
11+
"acknowledgeOptions": {
12+
"lockTokens": [
13+
"CgMKATESCQoHdG9rZW4tMQ=="
14+
]
15+
}
16+
},
17+
"responses": {
18+
"200": {
19+
"body": {
20+
"failedLockTokens": [
21+
{
22+
"lockToken": "CgMKATESCQoHdG9rZW4tMQ==",
23+
"error": {
24+
"code": "BadToken",
25+
"message": ""
26+
}
27+
}
28+
],
29+
"succeededLockTokens": [
30+
"CgMKATESCQoHdG9rZW4tMQ=="
31+
]
32+
}
33+
}
34+
}
35+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"operationId": "PublishCloudEvents",
3+
"title": "Publish Cloud Event",
4+
"parameters": {
5+
"endpoint": "myNamespaceName.westus-1.eventgrid.azure.net",
6+
"topicName": "myTopic",
7+
"content-type": "application/cloudevents-batch+json",
8+
"authorization": "SharedAccessKey 123",
9+
"api-version": "2024-06-01",
10+
"events": [
11+
{
12+
"id": "b3ccc7e3-c1cb-49bf-b7c8-0d4e60980616",
13+
"source": "/microsoft/autorest/examples/eventgrid/cloud-events/publish",
14+
"specversion": "1.0",
15+
"data": {
16+
"Property1": "Value1",
17+
"Property2": "Value2"
18+
},
19+
"type": "Microsoft.Contoso.TestEvent",
20+
"time": "2023-05-04T23:06:09.147165Z"
21+
}
22+
]
23+
},
24+
"responses": {
25+
"200": {
26+
"body": {}
27+
}
28+
}
29+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"operationId": "ReceiveCloudEvents",
3+
"title": "Receive Cloud Event",
4+
"parameters": {
5+
"endpoint": "myNamespaceName.westus-1.eventgrid.azure.net",
6+
"topicName": "myTopic",
7+
"eventSubscriptionName": "myEventSubscription",
8+
"content-type": "application/json",
9+
"authorization": "SharedAccessKey 123",
10+
"api-version": "2024-06-01",
11+
"maxEvents": 1,
12+
"maxWaitTime": 60
13+
},
14+
"responses": {
15+
"200": {
16+
"body": {
17+
"value": [
18+
{
19+
"brokerProperties": {
20+
"lockToken": "CgMKATESCQoHdG9rZW4tMQ==",
21+
"deliveryCount": 1
22+
},
23+
"event": {
24+
"specversion": "1.0",
25+
"type": "demo-started",
26+
"source": "/test",
27+
"subject": "all-hands-0405",
28+
"id": "e770f36b-381a-41db-8b2b-b7199daeb202",
29+
"time": "2023-05-05T17:31:00Z",
30+
"datacontenttype": "application/json",
31+
"data": "test"
32+
}
33+
}
34+
]
35+
}
36+
}
37+
}
38+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"operationId": "RejectCloudEvents",
3+
"title": "Reject Cloud Event",
4+
"parameters": {
5+
"endpoint": "myNamespaceName.westus-1.eventgrid.azure.net",
6+
"topicName": "myTopic",
7+
"eventSubscriptionName": "myEventSubscription",
8+
"content-type": "application/json",
9+
"authorization": "SharedAccessKey 123",
10+
"api-version": "2024-06-01",
11+
"rejectOptions": {
12+
"lockTokens": [
13+
"CgMKATESCQoHdG9rZW4tMQ=="
14+
]
15+
}
16+
},
17+
"responses": {
18+
"200": {
19+
"body": {
20+
"failedLockTokens": [],
21+
"succeededLockTokens": [
22+
"CgMKATESCQoHdG9rZW4tMQ=="
23+
]
24+
}
25+
}
26+
}
27+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"operationId": "ReleaseCloudEvents",
3+
"title": "Release Cloud Event with an optional delay.",
4+
"parameters": {
5+
"endpoint": "myNamespaceName.westus-1.eventgrid.azure.net",
6+
"topicName": "myTopic",
7+
"eventSubscriptionName": "myEventSubscription",
8+
"content-type": "application/json",
9+
"authorization": "SharedAccessKey 123",
10+
"api-version": "2024-06-01",
11+
"releaseDelayInSeconds": 10,
12+
"releaseOptions": {
13+
"lockTokens": [
14+
"CgMKATESCQoHdG9rZW4tMQ=="
15+
]
16+
}
17+
},
18+
"responses": {
19+
"200": {
20+
"body": {
21+
"failedLockTokens": [],
22+
"succeededLockTokens": [
23+
"CgMKATESCQoHdG9rZW4tMQ=="
24+
]
25+
}
26+
}
27+
}
28+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"operationId": "RenewCloudEventLocks",
3+
"title": "Renew lock for batch of Cloud Events",
4+
"parameters": {
5+
"endpoint": "myNamespaceName.westus-1.eventgrid.azure.net",
6+
"topicName": "myTopic",
7+
"eventSubscriptionName": "myEventSubscription",
8+
"content-type": "application/json",
9+
"authorization": "SharedAccessKey 123",
10+
"api-version": "2024-06-01",
11+
"renewLockOptions": {
12+
"lockTokens": [
13+
"CgMKATESCQoHdG9rZW4tMQ=="
14+
]
15+
}
16+
},
17+
"responses": {
18+
"200": {
19+
"body": {
20+
"failedLockTokens": [],
21+
"succeededLockTokens": [
22+
"CgMKATESCQoHdG9rZW4tMQ=="
23+
]
24+
}
25+
}
26+
}
27+
}

specification/eventgrid/Azure.Messaging.EventGrid/main.tsp

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ namespace Microsoft.EventGrid {
5555

5656
@useDependency(Azure.Core.Versions.v1_0_Preview_2)
5757
v2023_11_01: "2023-11-01",
58+
59+
@useDependency(Azure.Core.Versions.v1_0_Preview_2)
60+
v2024_06_01: "2024-06-01",
5861
}
5962

6063
alias StandardOperations = Azure.Core.StandardResourceOperations;
@@ -129,22 +132,22 @@ namespace Microsoft.EventGrid {
129132

130133
@doc("Supported delays for release operation.")
131134
union ReleaseDelay {
132-
int32,
135+
string,
133136

134137
@doc("Release the event after 0 seconds.")
135-
By0Seconds: 0,
138+
By0Seconds: "0",
136139

137140
@doc("Release the event after 10 seconds.")
138-
By10Seconds: 10,
141+
By10Seconds: "10",
139142

140143
@doc("Release the event after 60 seconds.")
141-
By60Seconds: 60,
144+
By60Seconds: "60",
142145

143146
@doc("Release the event after 600 seconds.")
144-
By600Seconds: 600,
147+
By600Seconds: "600",
145148

146149
@doc("Release the event after 3600 seconds.")
147-
By3600Seconds: 3600,
150+
By3600Seconds: "3600",
148151
}
149152

150153
@doc("The result of the Publish operation.")
@@ -322,6 +325,7 @@ namespace Microsoft.EventGrid {
322325

323326
@added(ServiceApiVersions.v2023_10_01_preview)
324327
@removed(ServiceApiVersions.v2023_11_01)
328+
@added(ServiceApiVersions.v2024_06_01)
325329
@doc("Release cloud events with the specified delay in seconds.")
326330
@query
327331
releaseDelayInSeconds?: ReleaseDelay;
@@ -348,6 +352,7 @@ namespace Microsoft.EventGrid {
348352
// POST https://{namespaceName}.{region}.eventgrid.azure.net/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:renewLock?api-version={apiVersion}
349353
@added(ServiceApiVersions.v2023_10_01_preview)
350354
@removed(ServiceApiVersions.v2023_11_01)
355+
@added(ServiceApiVersions.v2024_06_01)
351356
@doc("Renew locks for a batch of Cloud Events. The response will include the set of successfully renewed lock tokens, along with other failed lock tokens with their corresponding error information. Successfully renewed locks will ensure that the associated event is only available to the consumer that holds the renewed lock.")
352357
@action("renewLock")
353358
op renewCloudEventLocks is StandardOperations.ResourceAction<

specification/eventgrid/data-plane/Microsoft.EventGrid/preview/2023-10-01-preview/EventGrid.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -258,41 +258,41 @@
258258
"in": "query",
259259
"description": "Release cloud events with the specified delay in seconds.",
260260
"required": false,
261-
"type": "number",
261+
"type": "string",
262262
"enum": [
263-
0,
264-
10,
265-
60,
266-
600,
267-
3600
263+
"0",
264+
"10",
265+
"60",
266+
"600",
267+
"3600"
268268
],
269269
"x-ms-enum": {
270270
"name": "ReleaseDelay",
271271
"modelAsString": true,
272272
"values": [
273273
{
274274
"name": "By0Seconds",
275-
"value": 0,
275+
"value": "0",
276276
"description": "Release the event after 0 seconds."
277277
},
278278
{
279279
"name": "By10Seconds",
280-
"value": 10,
280+
"value": "10",
281281
"description": "Release the event after 10 seconds."
282282
},
283283
{
284284
"name": "By60Seconds",
285-
"value": 60,
285+
"value": "60",
286286
"description": "Release the event after 60 seconds."
287287
},
288288
{
289289
"name": "By600Seconds",
290-
"value": 600,
290+
"value": "600",
291291
"description": "Release the event after 600 seconds."
292292
},
293293
{
294294
"name": "By3600Seconds",
295-
"value": 3600,
295+
"value": "3600",
296296
"description": "Release the event after 3600 seconds."
297297
}
298298
]

0 commit comments

Comments
 (0)