diff --git a/custom-words.txt b/custom-words.txt index 9bb7e88f4e12..cb78e1563e4d 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -741,6 +741,7 @@ eventhubconnections eventhubs eventroutes eventstream +eventsubscriptions eventtime eventtypes evpn diff --git a/specification/eventgrid/Azure.Messaging.EventGrid/main.tsp b/specification/eventgrid/Azure.Messaging.EventGrid/main.tsp new file mode 100644 index 000000000000..2ccee59e62f9 --- /dev/null +++ b/specification/eventgrid/Azure.Messaging.EventGrid/main.tsp @@ -0,0 +1,293 @@ +import "@typespec/http"; +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; + +@useAuth( + ApiKeyAuth +) + +@service({ + title: "Azure.Messaging.EventGridClient", +}) + +// +// Supported operations. +// +// POST https://{namespaceName}.{region}.eventgrid.azure.net/topics/{topicName}:publish?api-version={apiVersion} +// POST https://{namespaceName}.{region}.eventgrid.azure.net/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:receive?api-Version={apiVersion}&maxWaitTime=60&maxEvents={maxEvents} +// POST https://{namespaceName}.{region}.eventgrid.azure.net/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:acknowledge?api-Version={apiVersion} +// POST https://{namespaceName}.{region}.eventgrid.azure.net/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:release?api-version={apiVersion} +// POST https://{namespaceName}.{region}.eventgrid.azure.net/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:reject?api-version={apiVersion} + + +@server( + "{endpoint}", + "The host name of the namespace", + { + @doc("The host name of the namespace, e.g. namespaceName1.westus-1.eventgrid.azure.net") + endpoint: url, + } +) + +@doc("Azure Messaging EventGrid Client") +@versioned(ServiceApiVersions) +namespace Azure.Messaging.EventGrid { + using TypeSpec.Http; + using TypeSpec.Rest; + using TypeSpec.Versioning; + using Azure.Core; + using Azure.Core.Foundations; + + enum ServiceApiVersions { + @useDependency(Azure.Core.Versions.v1_0_Preview_2) + v2023_06_01_preview: "2023-06-01-preview" + } + + @doc("Properties of an event published to an Azure Messaging EventGrid Namespace topic using the CloudEvent 1.0 Schema.") + model CloudEvent { + @doc("An identifier for the event. The combination of id and source must be unique for each distinct event.") + id: string; + + @doc("Identifies the context in which an event happened. The combination of id and source must be unique for each distinct event.") + source: string; + + @doc("Event data specific to the event type.") + data?: unknown; + + @doc("Event data specific to the event type, encoded as a base64 string.") + data_base64?: bytes; + + @doc("Type of event related to the originating occurrence.") + type: string; + + @doc("The time (in UTC) the event was generated, in RFC3339 format.") + time?: utcDateTime; + + @doc("The version of the CloudEvents specification which the event uses.") + specversion: string; + + @doc("Identifies the schema that data adheres to.") + dataschema?: string; + + @doc("Content type of data value.") + datacontenttype?: string; + + @doc("This describes the subject of the event in the context of the event producer (identified by source).") + subject?: string; + } + + @doc("Properties of the Event Broker operation.") + model BrokerProperties { + @doc("The token used to lock the event.") + lockToken: string; + + @doc("The attempt count for delivering the event.") + deliveryCount: int32; + } + + @doc("Receive operation details per Cloud Event.") + model ReceiveDetails { + @doc("The Event Broker details.") + brokerProperties: BrokerProperties; + + @doc("Cloud Event details.") + event: CloudEvent; + } + + @doc("Details of the Receive operation response.") + model ReceiveResult { + @doc("Array of receive responses, one per cloud event.") + value: ReceiveDetails[]; + } + + @doc("Failed LockToken information.") + model FailedLockToken { + @doc("LockToken value") + lockToken: string; + + @doc("Error code related to the token. Example of such error codes are BadToken: which indicates the Token is not formatted correctly, TokenLost: which indicates that token is not found, and InternalServerError: For any internal server errors.") + errorCode: string; + + @doc("Description of the token error.") + errorDescription: string; + } + + @doc("The result of the Publish operation.") + model PublishResult {} + + @doc("The result of the Acknowledge operation.") + model AcknowledgeResult { + @doc("Array of LockToken values for failed cloud events. Each LockToken includes the lock token value along with the related error information (namely, the error code and description).") + failedLockTokens: FailedLockToken[]; + + @doc("Array of lock tokens values for the successfully acknowledged cloud events.") + succeededLockTokens: string[]; + } + + @doc("The result of the Release operation.") + model ReleaseResult { + @doc("Array of LockToken values for failed cloud events. Each LockToken includes the lock token value along with the related error information (namely, the error code and description).") + failedLockTokens: FailedLockToken[]; + + @doc("Array of lock tokens values for the successfully released cloud events.") + succeededLockTokens: string[]; + } + + @doc("The result of the Reject operation.") + model RejectResult { + @doc("Array of LockToken values for failed cloud events. Each LockToken includes the lock token value along with the related error information (namely, the error code and description).") + failedLockTokens: FailedLockToken[]; + + @doc("Array of lock tokens values for the successfully rejected cloud events.") + succeededLockTokens: string[]; + } + + @doc("Array of lock token strings for the corresponding received Cloud Events to be released.") + model ReleaseOptions { + @doc("String array of lock tokens.") + lockTokens: string[]; + } + + @doc("Array of lock token strings for the corresponding received Cloud Events to be acknowledged.") + model AcknowledgeOptions { + @doc("String array of lock tokens.") + lockTokens: string[]; + } + + @doc("Array of lock token strings for the corresponding received Cloud Events to be rejected.") + model RejectOptions { + @doc("String array of lock tokens.") + lockTokens: string[]; + } + + // Publish Operation: + // POST https://{namespaceName}.{region}.eventgrid.azure.net/topics/{topicName}:publish?api-version={apiVersion}} + + @doc("Publish Single Cloud Event to namespace topic. In case of success, the server responds with an HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return various error codes. For example, 401: which indicates authorization failure, 403: which indicates quota exceeded or message is too large, 410: which indicates that specific topic is not found, 400: for bad request, and 500: for internal server error. ") + @route("/topics/{topicName}:publish", {shared: true}) + @post op PublishCloudEvent is Azure.Core.RpcOperation<{ + @doc("content type") + @header("content-type") + contentType: "application/cloudevents+json; charset=utf-8"; + + @doc("Topic Name.") + @path + topicName: string; + + @doc("Single Cloud Event being published.") + @body + event: CloudEvent; + }, PublishResult>; + + + @doc("Publish Batch Cloud Event to namespace topic. In case of success, the server responds with an HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return various error codes. For example, 401: which indicates authorization failure, 403: which indicates quota exceeded or message is too large, 410: which indicates that specific topic is not found, 400: for bad request, and 500: for internal server error. ") + @route("/topics/{topicName}:publish", {shared: true}) + @post op PublishCloudEvents is Azure.Core.RpcOperation<{ + @doc("content type") + @header("content-type") + contentType: "application/cloudevents-batch+json; charset=utf-8"; + + @doc("Topic Name.") + @path + topicName: string; + + @doc("Array of Cloud Events being published.") + @body + events: CloudEvent[]; + }, PublishResult>; + + // Receive Operation: + // POST https://{namespaceName}.{region}.eventgrid.azure.net/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:receive?api-Version={apiVersion}&maxWaitTime=60&maxEvents={maxEvents} + + @doc("Receive Batch of Cloud Events from the Event Subscription.") + @route("/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:receive") + @post op ReceiveCloudEvents is Azure.Core.RpcOperation<{ + @doc("Topic Name.") + @path + topicName: string; + + @doc("Event Subscription Name.") + @path + eventSubscriptionName: string; + + @doc("Max Events count to be received. Minimum value is 1, while maximum value is 100 events. If not specified, the default value is 1.") + @query + maxEvents?: int32 = 1; + + @doc("Max wait time value for receive operation in Seconds. It is the time in seconds that the server approximately waits for the availability of an event and responds to the request. If an event is available, the broker responds immediately to the client. Minimum value is 10 seconds, while maximum value is 120 seconds. If not specified, the default value is 60 seconds.") + @encode("seconds", int32) + @query + maxWaitTime?: duration; + }, ReceiveResult>; + + // Acknowledge Operation: + // POST https://{namespaceName}.{region}.eventgrid.azure.net/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:acknowledge&apiVersion={apiVersion} + + @doc("Acknowledge batch of Cloud Events. The server responds with an HTTP 200 status code if at least one event is successfully acknowledged. The response body will include the set of successfully acknowledged lockTokens, along with other failed lockTokens with their corresponding error information. Successfully acknowledged events will no longer be available to any consumer.") + + @route("/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:acknowledge") + @post op AcknowledgeCloudEvents is Azure.Core.RpcOperation<{ + @doc("content type") + @header("content-type") + contentType: "application/json; charset=utf-8"; + + @doc("Topic Name.") + @path + topicName: string; + + @doc("Event Subscription Name.") + @path + eventSubscriptionName: string; + + @doc("AcknowledgeOptions.") + @body + lockTokens: AcknowledgeOptions; + }, AcknowledgeResult>; + + // Release Operation: + // POST https://{namespaceName}.{region}.eventgrid.azure.net/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:release?api-version={apiVersion} + + @doc("Release batch of Cloud Events. The server responds with an HTTP 200 status code if at least one event is successfully released. The response body will include the set of successfully released lockTokens, along with other failed lockTokens with their corresponding error information.") + @route("/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:release") + @post op ReleaseCloudEvents is Azure.Core.RpcOperation<{ + @doc("content type") + @header("content-type") + contentType: "application/json; charset=utf-8"; + + @doc("Topic Name.") + @path + topicName: string; + + @doc("Event Subscription Name.") + @path + eventSubscriptionName: string; + + @doc("ReleaseOptions") + @body + lockTokens : ReleaseOptions; + }, ReleaseResult>; + + // Reject Operation: + // POST https://{namespaceName}.{region}.eventgrid.azure.net/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:reject?api-version={apiVersion} + + @doc("Reject batch of Cloud Events.") + @route("/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:reject") + @post op RejectCloudEvents is Azure.Core.RpcOperation<{ + @doc("content type") + @header("content-type") + contentType: "application/json; charset=utf-8"; + + @doc("Topic Name.") + @path + topicName: string; + + @doc("Event Subscription Name.") + @path + eventSubscriptionName: string; + + @doc("RejectOptions") + @body + lockTokens : RejectOptions; + }, RejectResult>; +} diff --git a/specification/eventgrid/Azure.Messaging.EventGrid/tspconfig.yaml b/specification/eventgrid/Azure.Messaging.EventGrid/tspconfig.yaml new file mode 100644 index 000000000000..0a4a34857529 --- /dev/null +++ b/specification/eventgrid/Azure.Messaging.EventGrid/tspconfig.yaml @@ -0,0 +1,25 @@ +parameters: + "python-sdk-folder": + default: "{project-root}/azure-sdk-for-python/" + "service-directory-name": + default: "eventgrid" +emit: [ + "@azure-tools/typespec-autorest", +] +options: + "@azure-tools/typespec-autorest": + examples-directory: ./examples + omit-unreachable-types: true + output-file: EventGrid.json + emitter-output-dir: "{project-root}/../data-plane/Microsoft.EventGrid/preview/2023-06-01-preview" + "@azure-tools/typespec-python": + "package-pprint-name": "\"Azure Event Grid\"" + "package-mode": "dataplane" + "package-version": 4.12.0b1 + "package-name": "azure-eventgrid" + "emitter-output-dir": "{python-sdk-folder}/sdk/{service-directory-name}/{package-name}" + # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code + "@azure-tools/typespec-csharp": + model-namespace: false + generate-convenience-methods: false + namespace: Azure.Messaging.EventGrid.Namespaces \ No newline at end of file diff --git a/specification/eventgrid/data-plane/Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json b/specification/eventgrid/data-plane/Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json new file mode 100644 index 000000000000..c7a945b67c4a --- /dev/null +++ b/specification/eventgrid/data-plane/Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json @@ -0,0 +1,689 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure.Messaging.EventGridClient", + "version": "2023-06-01-preview", + "description": "Azure Messaging EventGrid Client", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}", + "useSchemePrefix": false, + "parameters": [ + { + "name": "endpoint", + "in": "path", + "required": true, + "description": "The host name of the namespace, e.g. namespaceName1.westus-1.eventgrid.azure.net", + "type": "string", + "format": "uri", + "x-ms-skip-url-encoding": true + } + ] + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "in": "header", + "name": "SharedAccessKey" + } + }, + "tags": [], + "paths": { + "/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:receive": { + "post": { + "operationId": "ReceiveCloudEvents", + "description": "Receive Batch of Cloud Events from the Event Subscription.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "topicName", + "in": "path", + "required": true, + "description": "Topic Name.", + "type": "string" + }, + { + "name": "eventSubscriptionName", + "in": "path", + "required": true, + "description": "Event Subscription Name.", + "type": "string" + }, + { + "name": "maxEvents", + "in": "query", + "required": false, + "description": "Max Events count to be received. Minimum value is 1, while maximum value is 100 events. If not specified, the default value is 1.", + "default": 1, + "type": "integer", + "format": "int32" + }, + { + "name": "maxWaitTime", + "in": "query", + "required": false, + "description": "Max wait time value for receive operation in Seconds. It is the time in seconds that the server approximately waits for the availability of an event and responds to the request. If an event is available, the broker responds immediately to the client. Minimum value is 10 seconds, while maximum value is 120 seconds. If not specified, the default value is 60 seconds.", + "type": "integer", + "format": "int32" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReceiveResult" + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "description": "String error code indicating what went wrong.", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:acknowledge": { + "post": { + "operationId": "AcknowledgeCloudEvents", + "description": "Acknowledge batch of Cloud Events. The server responds with an HTTP 200 status code if at least one event is successfully acknowledged. The response body will include the set of successfully acknowledged lockTokens, along with other failed lockTokens with their corresponding error information. Successfully acknowledged events will no longer be available to any consumer.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "topicName", + "in": "path", + "required": true, + "description": "Topic Name.", + "type": "string" + }, + { + "name": "eventSubscriptionName", + "in": "path", + "required": true, + "description": "Event Subscription Name.", + "type": "string" + }, + { + "name": "lockTokens", + "in": "body", + "required": true, + "description": "AcknowledgeOptions.", + "schema": { + "$ref": "#/definitions/AcknowledgeOptions" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/AcknowledgeResult" + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "description": "String error code indicating what went wrong.", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + } + } + }, + "consumes": [ + "application/json; charset=utf-8" + ] + } + }, + "/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:release": { + "post": { + "operationId": "ReleaseCloudEvents", + "description": "Release batch of Cloud Events. The server responds with an HTTP 200 status code if at least one event is successfully released. The response body will include the set of successfully released lockTokens, along with other failed lockTokens with their corresponding error information.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "topicName", + "in": "path", + "required": true, + "description": "Topic Name.", + "type": "string" + }, + { + "name": "eventSubscriptionName", + "in": "path", + "required": true, + "description": "Event Subscription Name.", + "type": "string" + }, + { + "name": "lockTokens", + "in": "body", + "required": true, + "description": "ReleaseOptions", + "schema": { + "$ref": "#/definitions/ReleaseOptions" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReleaseResult" + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "description": "String error code indicating what went wrong.", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + } + } + }, + "consumes": [ + "application/json; charset=utf-8" + ] + } + }, + "/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:reject": { + "post": { + "operationId": "RejectCloudEvents", + "description": "Reject batch of Cloud Events.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "topicName", + "in": "path", + "required": true, + "description": "Topic Name.", + "type": "string" + }, + { + "name": "eventSubscriptionName", + "in": "path", + "required": true, + "description": "Event Subscription Name.", + "type": "string" + }, + { + "name": "lockTokens", + "in": "body", + "required": true, + "description": "RejectOptions", + "schema": { + "$ref": "#/definitions/RejectOptions" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/RejectResult" + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "description": "String error code indicating what went wrong.", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + } + } + }, + "consumes": [ + "application/json; charset=utf-8" + ] + } + } + }, + "x-ms-paths": { + "/topics/{topicName}:publish?api-version={apiVersion}": { + "post": { + "operationId": "PublishCloudEvents", + "description": "Publish Batch Cloud Event to namespace topic. In case of success, the server responds with an HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return various error codes. For example, 401: which indicates authorization failure, 403: which indicates quota exceeded or message is too large, 410: which indicates that specific topic is not found, 400: for bad request, and 500: for internal server error. ", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "topicName", + "in": "path", + "required": true, + "description": "Topic Name.", + "type": "string" + }, + { + "name": "events", + "in": "body", + "required": true, + "description": "Array of Cloud Events being published.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudEvent" + }, + "x-typespec-name": "CloudEvent[]" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PublishResult" + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "description": "String error code indicating what went wrong.", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + } + } + }, + "consumes": [ + "application/cloudevents-batch+json; charset=utf-8" + ] + } + } + }, + "definitions": { + "AcknowledgeOptions": { + "type": "object", + "properties": { + "lockTokens": { + "type": "array", + "items": { + "type": "string" + }, + "x-typespec-name": "string[]", + "description": "String array of lock tokens." + } + }, + "description": "Array of lock token strings for the corresponding received Cloud Events to be acknowledged.", + "required": [ + "lockTokens" + ] + }, + "AcknowledgeResult": { + "type": "object", + "properties": { + "failedLockTokens": { + "type": "array", + "items": { + "$ref": "#/definitions/FailedLockToken" + }, + "x-ms-identifiers": [], + "x-typespec-name": "FailedLockToken[]", + "description": "Array of LockToken values for failed cloud events. Each LockToken includes the lock token value along with the related error information (namely, the error code and description)." + }, + "succeededLockTokens": { + "type": "array", + "items": { + "type": "string" + }, + "x-typespec-name": "string[]", + "description": "Array of lock tokens values for the successfully acknowledged cloud events." + } + }, + "description": "The result of the Acknowledge operation.", + "required": [ + "failedLockTokens", + "succeededLockTokens" + ] + }, + "Azure.Core.Foundations.Error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "The target of the error." + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/Azure.Core.Foundations.Error" + }, + "x-ms-identifiers": [], + "x-typespec-name": "Azure.Core.Foundations.Error[]", + "description": "An array of details about specific errors that led to this reported error." + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "An object containing more specific information than the current object about the error." + } + }, + "description": "The error object.", + "required": [ + "code", + "message", + "details" + ] + }, + "Azure.Core.Foundations.ErrorResponse": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "The error object." + } + }, + "description": "A response containing error details.", + "required": [ + "error" + ] + }, + "Azure.Core.Foundations.InnerError": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "Inner error." + } + }, + "description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", + "required": [ + "code" + ] + }, + "BrokerProperties": { + "type": "object", + "properties": { + "lockToken": { + "type": "string", + "description": "The token used to lock the event." + }, + "deliveryCount": { + "type": "integer", + "format": "int32", + "description": "The attempt count for delivering the event." + } + }, + "description": "Properties of the Event Broker operation.", + "required": [ + "lockToken", + "deliveryCount" + ] + }, + "CloudEvent": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "An identifier for the event. The combination of id and source must be unique for each distinct event." + }, + "source": { + "type": "string", + "description": "Identifies the context in which an event happened. The combination of id and source must be unique for each distinct event." + }, + "data": { + "description": "Event data specific to the event type." + }, + "data_base64": { + "type": "string", + "format": "byte", + "description": "Event data specific to the event type, encoded as a base64 string." + }, + "type": { + "type": "string", + "description": "Type of event related to the originating occurrence." + }, + "time": { + "type": "string", + "format": "date-time", + "description": "The time (in UTC) the event was generated, in RFC3339 format." + }, + "specversion": { + "type": "string", + "description": "The version of the CloudEvents specification which the event uses." + }, + "dataschema": { + "type": "string", + "description": "Identifies the schema that data adheres to." + }, + "datacontenttype": { + "type": "string", + "description": "Content type of data value." + }, + "subject": { + "type": "string", + "description": "This describes the subject of the event in the context of the event producer (identified by source)." + } + }, + "description": "Properties of an event published to an Azure Messaging EventGrid Namespace topic using the CloudEvent 1.0 Schema.", + "required": [ + "id", + "source", + "type", + "specversion" + ] + }, + "FailedLockToken": { + "type": "object", + "properties": { + "lockToken": { + "type": "string", + "description": "LockToken value" + }, + "errorCode": { + "type": "string", + "description": "Error code related to the token. Example of such error codes are BadToken: which indicates the Token is not formatted correctly, TokenLost: which indicates that token is not found, and InternalServerError: For any internal server errors." + }, + "errorDescription": { + "type": "string", + "description": "Description of the token error." + } + }, + "description": "Failed LockToken information.", + "required": [ + "lockToken", + "errorCode", + "errorDescription" + ] + }, + "PublishResult": { + "type": "object", + "properties": {}, + "description": "The result of the Publish operation." + }, + "ReceiveDetails": { + "type": "object", + "properties": { + "brokerProperties": { + "$ref": "#/definitions/BrokerProperties", + "description": "The Event Broker details." + }, + "event": { + "$ref": "#/definitions/CloudEvent", + "description": "Cloud Event details." + } + }, + "description": "Receive operation details per Cloud Event.", + "required": [ + "brokerProperties", + "event" + ] + }, + "ReceiveResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ReceiveDetails" + }, + "x-ms-identifiers": [], + "x-typespec-name": "ReceiveDetails[]", + "description": "Array of receive responses, one per cloud event." + } + }, + "description": "Details of the Receive operation response.", + "required": [ + "value" + ] + }, + "RejectOptions": { + "type": "object", + "properties": { + "lockTokens": { + "type": "array", + "items": { + "type": "string" + }, + "x-typespec-name": "string[]", + "description": "String array of lock tokens." + } + }, + "description": "Array of lock token strings for the corresponding received Cloud Events to be rejected.", + "required": [ + "lockTokens" + ] + }, + "RejectResult": { + "type": "object", + "properties": { + "failedLockTokens": { + "type": "array", + "items": { + "$ref": "#/definitions/FailedLockToken" + }, + "x-ms-identifiers": [], + "x-typespec-name": "FailedLockToken[]", + "description": "Array of LockToken values for failed cloud events. Each LockToken includes the lock token value along with the related error information (namely, the error code and description)." + }, + "succeededLockTokens": { + "type": "array", + "items": { + "type": "string" + }, + "x-typespec-name": "string[]", + "description": "Array of lock tokens values for the successfully rejected cloud events." + } + }, + "description": "The result of the Reject operation.", + "required": [ + "failedLockTokens", + "succeededLockTokens" + ] + }, + "ReleaseOptions": { + "type": "object", + "properties": { + "lockTokens": { + "type": "array", + "items": { + "type": "string" + }, + "x-typespec-name": "string[]", + "description": "String array of lock tokens." + } + }, + "description": "Array of lock token strings for the corresponding received Cloud Events to be released.", + "required": [ + "lockTokens" + ] + }, + "ReleaseResult": { + "type": "object", + "properties": { + "failedLockTokens": { + "type": "array", + "items": { + "$ref": "#/definitions/FailedLockToken" + }, + "x-ms-identifiers": [], + "x-typespec-name": "FailedLockToken[]", + "description": "Array of LockToken values for failed cloud events. Each LockToken includes the lock token value along with the related error information (namely, the error code and description)." + }, + "succeededLockTokens": { + "type": "array", + "items": { + "type": "string" + }, + "x-typespec-name": "string[]", + "description": "Array of lock tokens values for the successfully released cloud events." + } + }, + "description": "The result of the Release operation.", + "required": [ + "failedLockTokens", + "succeededLockTokens" + ] + } + }, + "parameters": { + "Azure.Core.Foundations.ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "description": "The API version to use for this operation.", + "x-ms-client-name": "apiVersion", + "minLength": 1, + "type": "string", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/eventgrid/data-plane/readme.md b/specification/eventgrid/data-plane/readme.md index f9b4f85f5a52..bd96408a73ef 100644 --- a/specification/eventgrid/data-plane/readme.md +++ b/specification/eventgrid/data-plane/readme.md @@ -142,6 +142,37 @@ input-file: ``` +### Tag: package-2023-06-01-preview + +These settings apply only when `--tag=package-2023-06-01-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2023-06-01-preview' +input-file: +- Microsoft.Storage/stable/2018-01-01/Storage.json +- Microsoft.EventHub/stable/2018-01-01/EventHub.json +- Microsoft.Resources/stable/2018-01-01/Resources.json +- Microsoft.EventGrid/stable/2018-01-01/EventGrid.json +- Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json +- Microsoft.DataBox/stable/2018-01-01/DataBox.json +- Microsoft.Devices/stable/2018-01-01/IotHub.json +- Microsoft.ContainerRegistry/stable/2018-01-01/ContainerRegistry.json +- Microsoft.ServiceBus/stable/2018-01-01/ServiceBus.json +- Microsoft.Media/stable/2018-01-01/MediaServices.json +- Microsoft.Maps/stable/2018-01-01/Maps.json +- Microsoft.AppConfiguration/stable/2018-01-01/AppConfiguration.json +- Microsoft.SignalRService/stable/2018-01-01/SignalRService.json +- Microsoft.KeyVault/stable/2018-01-01/KeyVault.json +- Microsoft.MachineLearningServices/stable/2018-01-01/MachineLearningServices.json +- Microsoft.Cache/stable/2018-01-01/RedisCache.json +- Microsoft.Web/stable/2018-01-01/Web.json +- Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json +- Microsoft.PolicyInsights/stable/2018-01-01/PolicyInsights.json +- Microsoft.ContainerService/stable/2018-01-01/ContainerService.json +- Microsoft.ApiManagement/stable/2018-01-01/APIManagement.json +- Microsoft.HealthcareApis/stable/2018-01-01/HealthcareApis.json + +``` + ### Suppression ``` yaml directive: