Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventGrid: New preview API version with support for additional destination types, CloudEvents 1.0, and batching support. #7527

Merged
merged 7 commits into from
Oct 23, 2019
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"version": "2019-02-01-preview",
"version": "2020-01-01-preview",
"title": "EventGridManagementClient",
"description": "Azure EventGrid Management Client"
},
Expand Down Expand Up @@ -816,8 +816,17 @@
"EventSubscriptions_CreateOrUpdateForResource": {
"$ref": "./examples/EventSubscriptions_CreateOrUpdateForResource.json"
},
"EventSubscriptions_CreateOrUpdateForCustomTopic": {
"$ref": "./examples/EventSubscriptions_CreateOrUpdateForCustomTopic.json"
"EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination": {
"$ref": "./examples/EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination.json"
},
"EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination": {
"$ref": "./examples/EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination.json"
},
"EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination": {
"$ref": "./examples/EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination.json"
},
"EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination": {
"$ref": "./examples/EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination.json"
}
},
"x-ms-long-running-operation": true
Expand Down Expand Up @@ -1036,9 +1045,6 @@
},
{
"$ref": "#/parameters/TopParameter"
},
{
"$ref": "#/parameters/LabelFilterParameter"
}
],
"responses": {
Expand Down Expand Up @@ -1093,9 +1099,6 @@
},
{
"$ref": "#/parameters/TopParameter"
},
{
"$ref": "#/parameters/LabelFilterParameter"
}
],
"responses": {
Expand Down Expand Up @@ -1150,9 +1153,6 @@
},
{
"$ref": "#/parameters/TopParameter"
},
{
"$ref": "#/parameters/LabelFilterParameter"
}
],
"responses": {
Expand Down Expand Up @@ -1214,9 +1214,6 @@
},
{
"$ref": "#/parameters/TopParameter"
},
{
"$ref": "#/parameters/LabelFilterParameter"
}
],
"responses": {
Expand Down Expand Up @@ -1271,9 +1268,6 @@
},
{
"$ref": "#/parameters/TopParameter"
},
{
"$ref": "#/parameters/LabelFilterParameter"
}
],
"responses": {
Expand Down Expand Up @@ -1335,9 +1329,6 @@
},
{
"$ref": "#/parameters/TopParameter"
},
{
"$ref": "#/parameters/LabelFilterParameter"
}
],
"responses": {
Expand Down Expand Up @@ -1399,9 +1390,6 @@
},
{
"$ref": "#/parameters/TopParameter"
},
{
"$ref": "#/parameters/LabelFilterParameter"
}
],
"responses": {
Expand Down Expand Up @@ -1470,9 +1458,6 @@
},
{
"$ref": "#/parameters/TopParameter"
},
{
"$ref": "#/parameters/LabelFilterParameter"
}
],
"responses": {
Expand Down Expand Up @@ -1548,9 +1533,6 @@
},
{
"$ref": "#/parameters/TopParameter"
},
{
"$ref": "#/parameters/LabelFilterParameter"
}
],
"responses": {
Expand Down Expand Up @@ -1619,9 +1601,6 @@
},
{
"$ref": "#/parameters/TopParameter"
},
{
"$ref": "#/parameters/LabelFilterParameter"
}
],
"responses": {
Expand Down Expand Up @@ -2353,7 +2332,7 @@
"enum": [
"EventGridSchema",
"CustomEventSchema",
"CloudEventV01Schema"
"CloudEventSchemaV1_0"
],
"type": "string",
"x-ms-enum": {
Expand All @@ -2365,6 +2344,11 @@
"inputSchemaMapping": {
"$ref": "#/definitions/InputSchemaMapping",
"description": "Information about the InputSchemaMapping which specified the info about mapping event payload."
},
"metricResourceId": {
"description": "Metric resource id for the domain.",
"type": "string",
"readOnly": true
}
}
},
Expand Down Expand Up @@ -2687,8 +2671,8 @@
"description": "The event delivery schema for the event subscription.",
"enum": [
"EventGridSchema",
"CloudEventV01Schema",
"CustomInputSchema"
"CustomInputSchema",
"CloudEventSchemaV1_0"
],
"type": "string",
"x-ms-enum": {
Expand Down Expand Up @@ -2767,6 +2751,20 @@
"description": "The base URL that represents the endpoint of the destination of an event subscription.",
"type": "string",
"readOnly": true
},
"maxEventsPerBatch": {
"format": "int32",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are there min/max values that could be defined in swagger?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review! Currently the limits are enforced by our RP. Once we close on the exact values, we will add the min/max values in swagger for our stable version.

"description": "Maximum number of events per batch.",
"type": "integer"
},
"preferredBatchSizeInKilobytes": {
"format": "int32",
"description": "Preferred batch size in Kilobytes.",
"type": "integer"
},
"azureActiveDirectoryApplicationObjectId": {
"description": "The active directory application id to get access token that is included as the bearer token in delivery requests.",
"type": "string"
}
}
},
Expand Down Expand Up @@ -3206,6 +3204,70 @@
},
"x-ms-discriminator-value": "ServiceBusQueue"
},
"ServiceBusTopicEventSubscriptionDestinationProperties": {
"description": "The properties that represent the Service Bus Topic destination of an event subscription.",
"type": "object",
"properties": {
"resourceId": {
"description": "The Azure Resource Id that represents the endpoint of the Service Bus Topic destination of an event subscription.",
"type": "string"
}
}
},
"ServiceBusTopicEventSubscriptionDestination": {
"description": "Information about the service bus topic destination for an event subscription.",
"type": "object",
"allOf": [
{
"$ref": "#/definitions/EventSubscriptionDestination"
}
],
"properties": {
"properties": {
"$ref": "#/definitions/ServiceBusTopicEventSubscriptionDestinationProperties",
"description": "Service Bus Topic Properties of the event subscription destination.",
"x-ms-client-flatten": true
}
},
"x-ms-discriminator-value": "ServiceBusTopic"
},
"AzureFunctionEventSubscriptionDestinationProperties": {
"description": "The properties that represent the Azure Function destination of an event subscription.",
"type": "object",
"properties": {
"resourceId": {
"description": "The Azure Resource Id that represents the endpoint of the Azure Function destination of an event subscription.",
"type": "string"
},
"maxEventsPerBatch": {
"format": "int32",
"description": "Maximum number of events per batch.",
"type": "integer"
},
"preferredBatchSizeInKilobytes": {
"format": "int32",
"description": "Preferred batch size in Kilobytes.",
"type": "integer"
}
}
},
"AzureFunctionEventSubscriptionDestination": {
"description": "Information about the azure function destination for an event subscription.",
"type": "object",
"allOf": [
{
"$ref": "#/definitions/EventSubscriptionDestination"
}
],
"properties": {
"properties": {
"$ref": "#/definitions/AzureFunctionEventSubscriptionDestinationProperties",
"description": "Azure Function Properties of the event subscription destination.",
"x-ms-client-flatten": true
}
},
"x-ms-discriminator-value": "AzureFunction"
},
"EventSubscriptionDestination": {
"description": "Information about the destination for an event subscription",
"required": [
Expand All @@ -3220,7 +3282,9 @@
"EventHub",
"StorageQueue",
"HybridConnection",
"ServiceBusQueue"
"ServiceBusQueue",
"ServiceBusTopic",
"AzureFunction"
],
"type": "string",
"x-ms-enum": {
Expand Down Expand Up @@ -3275,8 +3339,8 @@
"description": "The event delivery schema for the event subscription.",
"enum": [
"EventGridSchema",
"CloudEventV01Schema",
"CustomInputSchema"
"CustomInputSchema",
"CloudEventSchemaV1_0"
],
"type": "string",
"x-ms-enum": {
Expand Down Expand Up @@ -3410,7 +3474,7 @@
"enum": [
"EventGridSchema",
"CustomEventSchema",
"CloudEventV01Schema"
"CloudEventSchemaV1_0"
],
"type": "string",
"x-ms-enum": {
Expand All @@ -3422,6 +3486,11 @@
"inputSchemaMapping": {
"$ref": "#/definitions/InputSchemaMapping",
"description": "This enables publishing using custom event schemas. An InputSchemaMapping can be specified to map various properties of a source schema to various required properties of the EventGridEvent schema."
},
"metricResourceId": {
"description": "Metric resource id for the topic.",
"type": "string",
"readOnly": true
}
}
},
Expand Down Expand Up @@ -3650,26 +3719,18 @@
"FilterParameter": {
"name": "$filter",
"in": "query",
"description": "Filter the results using OData syntax.",
"description": "The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'.",
"required": false,
"type": "string",
"x-ms-parameter-location": "method"
},
"TopParameter": {
"name": "$top",
"in": "query",
"description": "The number of results to return.",
"description": "The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page.",
"required": false,
"type": "integer",
"x-ms-parameter-location": "method"
},
"LabelFilterParameter": {
"name": "label",
"in": "query",
"description": "The label used to filter the results for event subscriptions list.",
"required": false,
"type": "string",
"x-ms-parameter-location": "method"
}
},
"securityDefinitions": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"resourceGroupName": "examplerg",
"domainName": "exampledomain1",
"domainTopicName": "exampledomaintopic1",
"api-version": "2019-02-01-preview"
"api-version": "2020-01-01-preview"
},
"responses": {
"201": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"resourceGroupName": "examplerg",
"domainName": "exampledomain1",
"domainTopicName": "exampledomaintopic1",
"api-version": "2019-02-01-preview"
"api-version": "2020-01-01-preview"
},
"responses": {
"202": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
"subscriptionId": "5b4b650e-28b9-4790-b3ab-ddbd88d727c4",
"resourceGroupName": "examplerg",
"domainName": "exampledomain2",
"topicName": "topic1",
"api-version": "2019-02-01-preview"
"domainTopicName": "topic1",
"api-version": "2020-01-01-preview"
},
"responses": {
"200": {
"body": {
"properties": {},
"id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/domains/exampledomain2/topics/topic1",
"location": "westcentralus",
"name": "topic1",
"properties": {
"provisioningState": "Succeeded"
},
"type": "Microsoft.EventGrid/domains/topics"
}
}
Expand Down
Loading