Skip to content

Commit 6aaa945

Browse files
authored
[Event Grid Data Plane] Added GA apiversion 2023-11-01 (#26425)
* Adding the GA api version * Fixing the order of api versions * Fixing build issue
1 parent 0e27444 commit 6aaa945

File tree

16 files changed

+1039
-144
lines changed

16 files changed

+1039
-144
lines changed

specification/eventgrid/Azure.Messaging.EventGrid/examples/2023-10-01-preview/release.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"content-type": "application/json",
99
"authorization": "SharedAccessKey 123",
1010
"api-version": "2023-10-01-preview",
11-
"delayInSeconds": 10,
11+
"releaseDelayInSeconds": 10,
1212
"releaseOptions": {
1313
"lockTokens": [
1414
"CgMKATESCQoHdG9rZW4tMQ=="
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": "2023-06-01-preview",
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": "2023-06-01-preview",
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": "2023-06-01-preview",
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": "2023-06-01-preview",
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: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"operationId": "ReleaseCloudEvents",
3+
"title": "Release 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": "2023-06-01-preview",
11+
"releaseOptions": {
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: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ namespace Microsoft.EventGrid {
4848

4949
#suppress "@azure-tools/typespec-azure-core/documentation-required" "https://github.com/Azure/typespec-azure/issues/3107"
5050
enum ServiceApiVersions {
51+
@useDependency(Azure.Core.Versions.v1_0_Preview_2)
52+
v2023_11_01: "2023-11-01",
53+
5154
@useDependency(Azure.Core.Versions.v1_0_Preview_2)
5255
v2023_06_01_preview: "2023-06-01-preview",
5356

@@ -316,6 +319,7 @@ namespace Microsoft.EventGrid {
316319
@body
317320
releaseOptions: ReleaseOptions;
318321

322+
@added(ServiceApiVersions.v2023_10_01_preview)
319323
@doc("Release cloud events with the specified delay in seconds.")
320324
@query
321325
releaseDelayInSeconds?: ReleaseDelay;
@@ -340,7 +344,7 @@ namespace Microsoft.EventGrid {
340344

341345
// RenewLock Operation:
342346
// POST https://{namespaceName}.{region}.eventgrid.azure.net/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:renewLock?api-version={apiVersion}
343-
347+
@added(ServiceApiVersions.v2023_10_01_preview)
344348
@doc("Renew lock for batch of Cloud Events. The server responds with an HTTP 200 status code if the request is successfully accepted. The response body will include the set of successfully renewed lockTokens, along with other failed lockTokens with their corresponding error information.")
345349
@action("renewLock")
346350
op renewCloudEventLocks is StandardOperations.ResourceAction<

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

Lines changed: 0 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -253,51 +253,6 @@
253253
"required": true,
254254
"type": "string"
255255
},
256-
{
257-
"name": "releaseDelayInSeconds",
258-
"in": "query",
259-
"description": "Release cloud events with the specified delay in seconds.",
260-
"required": false,
261-
"type": "number",
262-
"enum": [
263-
0,
264-
10,
265-
60,
266-
600,
267-
3600
268-
],
269-
"x-ms-enum": {
270-
"name": "ReleaseDelay",
271-
"modelAsString": true,
272-
"values": [
273-
{
274-
"name": "By0Seconds",
275-
"value": 0,
276-
"description": "Release the event after 0 seconds."
277-
},
278-
{
279-
"name": "By10Seconds",
280-
"value": 10,
281-
"description": "Release the event after 10 seconds."
282-
},
283-
{
284-
"name": "By60Seconds",
285-
"value": 60,
286-
"description": "Release the event after 60 seconds."
287-
},
288-
{
289-
"name": "By600Seconds",
290-
"value": 600,
291-
"description": "Release the event after 600 seconds."
292-
},
293-
{
294-
"name": "By3600Seconds",
295-
"value": 3600,
296-
"description": "Release the event after 3600 seconds."
297-
}
298-
]
299-
}
300-
},
301256
{
302257
"name": "releaseOptions",
303258
"in": "body",
@@ -393,60 +348,6 @@
393348
}
394349
}
395350
}
396-
},
397-
"/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:renewLock": {
398-
"post": {
399-
"operationId": "RenewCloudEventLocks",
400-
"description": "Renew lock for batch of Cloud Events. The server responds with an HTTP 200 status code if the request is successfully accepted. The response body will include the set of successfully renewed lockTokens, along with other failed lockTokens with their corresponding error information.",
401-
"parameters": [
402-
{
403-
"$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
404-
},
405-
{
406-
"name": "topicName",
407-
"in": "path",
408-
"description": "Topic Name.",
409-
"required": true,
410-
"type": "string"
411-
},
412-
{
413-
"name": "eventSubscriptionName",
414-
"in": "path",
415-
"description": "Event Subscription Name.",
416-
"required": true,
417-
"type": "string"
418-
},
419-
{
420-
"name": "renewLockOptions",
421-
"in": "body",
422-
"description": "RenewLockOptions",
423-
"required": true,
424-
"schema": {
425-
"$ref": "#/definitions/RenewLockOptions"
426-
}
427-
}
428-
],
429-
"responses": {
430-
"200": {
431-
"description": "The request has succeeded.",
432-
"schema": {
433-
"$ref": "#/definitions/RenewCloudEventLocksResult"
434-
}
435-
},
436-
"default": {
437-
"description": "An unexpected error response.",
438-
"schema": {
439-
"$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse"
440-
},
441-
"headers": {
442-
"x-ms-error-code": {
443-
"type": "string",
444-
"description": "String error code indicating what went wrong."
445-
}
446-
}
447-
}
448-
}
449-
}
450351
}
451352
},
452353
"x-ms-paths": {
@@ -822,47 +723,6 @@
822723
"failedLockTokens",
823724
"succeededLockTokens"
824725
]
825-
},
826-
"RenewCloudEventLocksResult": {
827-
"type": "object",
828-
"description": "The result of the RenewLock operation.",
829-
"properties": {
830-
"failedLockTokens": {
831-
"type": "array",
832-
"description": "Array of FailedLockToken for failed cloud events. Each FailedLockToken includes the lock token along with the related error information (namely, the error code and description).",
833-
"items": {
834-
"$ref": "#/definitions/FailedLockToken"
835-
},
836-
"x-ms-identifiers": []
837-
},
838-
"succeededLockTokens": {
839-
"type": "array",
840-
"description": "Array of lock tokens for the successfully renewed locks.",
841-
"items": {
842-
"type": "string"
843-
}
844-
}
845-
},
846-
"required": [
847-
"failedLockTokens",
848-
"succeededLockTokens"
849-
]
850-
},
851-
"RenewLockOptions": {
852-
"type": "object",
853-
"description": "Array of lock tokens for the corresponding received Cloud Events to be renewed.",
854-
"properties": {
855-
"lockTokens": {
856-
"type": "array",
857-
"description": "Array of lock tokens.",
858-
"items": {
859-
"type": "string"
860-
}
861-
}
862-
},
863-
"required": [
864-
"lockTokens"
865-
]
866726
}
867727
},
868728
"parameters": {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"content-type": "application/json",
99
"authorization": "SharedAccessKey 123",
1010
"api-version": "2023-10-01-preview",
11-
"delayInSeconds": 10,
11+
"releaseDelayInSeconds": 10,
1212
"releaseOptions": {
1313
"lockTokens": [
1414
"CgMKATESCQoHdG9rZW4tMQ=="

0 commit comments

Comments
 (0)