Skip to content

Commit

Permalink
[Azure Event Grid] Adding new public preview api version for new data…
Browse files Browse the repository at this point in the history
…-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
  • Loading branch information
batrived authored and zman-ms committed Jan 9, 2024
1 parent bb6f669 commit 652dbb5
Show file tree
Hide file tree
Showing 23 changed files with 1,491 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"content-type": "application/json",
"authorization": "SharedAccessKey 123",
"api-version": "2023-06-01-preview",
"lockTokens": {
"acknowledgeOptions": {
"lockTokens": [
"CgMKATESCQoHdG9rZW4tMQ=="
]
Expand All @@ -20,8 +20,10 @@
"failedLockTokens": [
{
"lockToken": "CgMKATESCQoHdG9rZW4tMQ==",
"errorCode": "BadToken",
"errorDescription": ""
"error": {
"code": "BadToken",
"message": ""
}
}
],
"succeededLockTokens": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"content-type": "application/json",
"authorization": "SharedAccessKey 123",
"api-version": "2023-06-01-preview",
"lockTokens": {
"rejectOptions": {
"lockTokens": [
"CgMKATESCQoHdG9rZW4tMQ=="
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"content-type": "application/json",
"authorization": "SharedAccessKey 123",
"api-version": "2023-06-01-preview",
"lockTokens": {
"releaseOptions": {
"lockTokens": [
"CgMKATESCQoHdG9rZW4tMQ=="
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"operationId": "AcknowledgeCloudEvents",
"title": "Acknowledge Cloud Event",
"parameters": {
"endpoint": "myNamespaceName.westus-1.eventgrid.azure.net",
"topicName": "myTopic",
"eventSubscriptionName": "myEventSubscription",
"content-type": "application/json",
"authorization": "SharedAccessKey 123",
"api-version": "2023-10-01-preview",
"acknowledgeOptions": {
"lockTokens": [
"CgMKATESCQoHdG9rZW4tMQ=="
]
}
},
"responses": {
"200": {
"body": {
"failedLockTokens": [
{
"lockToken": "CgMKATESCQoHdG9rZW4tMQ==",
"error": {
"code": "BadToken",
"message": ""
}
}
],
"succeededLockTokens": [
"CgMKATESCQoHdG9rZW4tMQ=="
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"operationId": "PublishCloudEvents",
"title": "Publish Cloud Event",
"parameters": {
"endpoint": "myNamespaceName.westus-1.eventgrid.azure.net",
"topicName": "myTopic",
"content-type": "application/cloudevents-batch+json",
"authorization": "SharedAccessKey 123",
"api-version": "2023-10-01-preview",
"events": [
{
"id": "b3ccc7e3-c1cb-49bf-b7c8-0d4e60980616",
"source": "/microsoft/autorest/examples/eventgrid/cloud-events/publish",
"specversion": "1.0",
"data": {
"Property1": "Value1",
"Property2": "Value2"
},
"type": "Microsoft.Contoso.TestEvent",
"time": "2023-05-04T23:06:09.147165Z"
}
]
},
"responses": {
"200": {
"body": {}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"operationId": "ReceiveCloudEvents",
"title": "Receive Cloud Event",
"parameters": {
"endpoint": "myNamespaceName.westus-1.eventgrid.azure.net",
"topicName": "myTopic",
"eventSubscriptionName": "myEventSubscription",
"content-type": "application/json",
"authorization": "SharedAccessKey 123",
"api-version": "2023-10-01-preview",
"maxEvents": 1,
"maxWaitTime": 60
},
"responses": {
"200": {
"body": {
"value": [
{
"brokerProperties": {
"lockToken": "CgMKATESCQoHdG9rZW4tMQ==",
"deliveryCount": 1
},
"event": {
"specversion": "1.0",
"type": "demo-started",
"source": "/test",
"subject": "all-hands-0405",
"id": "e770f36b-381a-41db-8b2b-b7199daeb202",
"time": "2023-05-05T17:31:00Z",
"datacontenttype": "application/json",
"data": "test"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"operationId": "RejectCloudEvents",
"title": "Reject Cloud Event",
"parameters": {
"endpoint": "myNamespaceName.westus-1.eventgrid.azure.net",
"topicName": "myTopic",
"eventSubscriptionName": "myEventSubscription",
"content-type": "application/json",
"authorization": "SharedAccessKey 123",
"api-version": "2023-10-01-preview",
"rejectOptions": {
"lockTokens": [
"CgMKATESCQoHdG9rZW4tMQ=="
]
}
},
"responses": {
"200": {
"body": {
"failedLockTokens": [],
"succeededLockTokens": [
"CgMKATESCQoHdG9rZW4tMQ=="
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"operationId": "ReleaseCloudEvents",
"title": "Release Cloud Event with an optional delay.",
"parameters": {
"endpoint": "myNamespaceName.westus-1.eventgrid.azure.net",
"topicName": "myTopic",
"eventSubscriptionName": "myEventSubscription",
"content-type": "application/json",
"authorization": "SharedAccessKey 123",
"api-version": "2023-10-01-preview",
"delayInSeconds": 10,
"releaseOptions": {
"lockTokens": [
"CgMKATESCQoHdG9rZW4tMQ=="
]
}
},
"responses": {
"200": {
"body": {
"failedLockTokens": [],
"succeededLockTokens": [
"CgMKATESCQoHdG9rZW4tMQ=="
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"operationId": "RenewCloudEventLocks",
"title": "Renew lock for batch of Cloud Events",
"parameters": {
"endpoint": "myNamespaceName.westus-1.eventgrid.azure.net",
"topicName": "myTopic",
"eventSubscriptionName": "myEventSubscription",
"content-type": "application/json",
"authorization": "SharedAccessKey 123",
"api-version": "2023-10-01-preview",
"renewLockOptions": {
"lockTokens": [
"CgMKATESCQoHdG9rZW4tMQ=="
]
}
},
"responses": {
"200": {
"body": {
"failedLockTokens": [],
"succeededLockTokens": [
"CgMKATESCQoHdG9rZW4tMQ=="
]
}
}
}
}
Loading

0 comments on commit 652dbb5

Please sign in to comment.