Skip to content

Commit edfaac7

Browse files
batrivedjnlycklama
authored andcommitted
[Azure Event Grid] Adding new public preview api version for new data-plane operations, release with delay and renew lock operations (#25421)
* Adding new api version, release with delay and renew lock operations * Removing unnecessary changes * ran prettier * Changing delay values * Adding the new api version in data-plane * Adding the generated folder * Fixing pr comment * Updating api version and suggestions from api review board * Fixing PR comment * Fixing build errors * Fixing build issue * Fixing a comment * Updating examples * Reverting to FailedLockToken model * Using Azure.Core.Foundations.Error to represent error * Fixing build issue * Renaming Delay to ReleaseDelay
1 parent 41ae284 commit edfaac7

File tree

23 files changed

+1491
-79
lines changed

23 files changed

+1491
-79
lines changed

specification/eventgrid/Azure.Messaging.EventGrid/examples/2023-06-01-preview/ack.json

Lines changed: 5 additions & 3 deletions
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-06-01-preview",
11-
"lockTokens": {
11+
"acknowledgeOptions": {
1212
"lockTokens": [
1313
"CgMKATESCQoHdG9rZW4tMQ=="
1414
]
@@ -20,8 +20,10 @@
2020
"failedLockTokens": [
2121
{
2222
"lockToken": "CgMKATESCQoHdG9rZW4tMQ==",
23-
"errorCode": "BadToken",
24-
"errorDescription": ""
23+
"error": {
24+
"code": "BadToken",
25+
"message": ""
26+
}
2527
}
2628
],
2729
"succeededLockTokens": [

specification/eventgrid/Azure.Messaging.EventGrid/examples/2023-06-01-preview/reject.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-06-01-preview",
11-
"lockTokens": {
11+
"rejectOptions": {
1212
"lockTokens": [
1313
"CgMKATESCQoHdG9rZW4tMQ=="
1414
]

specification/eventgrid/Azure.Messaging.EventGrid/examples/2023-06-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-06-01-preview",
11-
"lockTokens": {
11+
"releaseOptions": {
1212
"lockTokens": [
1313
"CgMKATESCQoHdG9rZW4tMQ=="
1414
]
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-10-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-10-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-10-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-10-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: 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": "2023-10-01-preview",
11+
"delayInSeconds": 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": "2023-10-01-preview",
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+
}

0 commit comments

Comments
 (0)