{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "Azure EventGrid Management Client",
    "title": "EventGridManagementClient",
    "version": "2017-06-15-preview",
    "x-apisguru-categories": [
      "cloud"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2017-06-15-preview/EventGrid.json",
        "version": "2.0"
      }
    ],
    "x-preferred": false,
    "x-providerName": "azure.com",
    "x-serviceName": "eventgrid-EventGrid",
    "x-tags": [
      "Azure",
      "Microsoft"
    ]
  },
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "azure_auth": {
      "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
      "description": "Azure Active Directory OAuth2 Flow",
      "flow": "implicit",
      "scopes": {
        "user_impersonation": "impersonate your user account"
      },
      "type": "oauth2"
    }
  },
  "parameters": {
    "ApiVersionParameter": {
      "description": "Version of the API to be used with the client request.",
      "in": "query",
      "name": "api-version",
      "required": true,
      "type": "string"
    },
    "SubscriptionIdParameter": {
      "description": "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
      "in": "path",
      "name": "subscriptionId",
      "required": true,
      "type": "string"
    }
  },
  "paths": {
    "/providers/Microsoft.EventGrid/operations": {
      "get": {
        "consumes": [],
        "description": "List the available operations supported by the Microsoft.EventGrid resource provider",
        "operationId": "Operations_List",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/OperationsListResult"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "List available operations",
        "tags": [
          "Operations"
        ],
        "x-ms-examples": {
          "Operations_List": {
            "parameters": {
              "api-version": "2017-06-15-preview"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "display": {
                        "description": "Registers the eventSubscription for the EventGrid resource provider and enables the creation of Event Grid subscriptions.",
                        "operation": "Registers the EventGrid Resource Provider",
                        "provider": "Microsoft Event Grid",
                        "resource": "EventGrid Resource Provider"
                      },
                      "name": "Microsoft.EventGrid/register/action",
                      "origin": "UserAndSystem"
                    },
                    {
                      "display": {
                        "description": "Create or update a eventSubscription",
                        "operation": "Write EventSubscription",
                        "provider": "Microsoft Event Grid",
                        "resource": "eventSubscriptions"
                      },
                      "name": "Microsoft.EventGrid/eventSubscriptions/write",
                      "origin": "UserAndSystem"
                    },
                    {
                      "display": {
                        "description": "Read a eventSubscription",
                        "operation": "Read EventSubscription",
                        "provider": "Microsoft Event Grid",
                        "resource": "eventSubscriptions"
                      },
                      "name": "Microsoft.EventGrid/eventSubscriptions/read",
                      "origin": "UserAndSystem"
                    },
                    {
                      "display": {
                        "description": "Delete a eventSubscription",
                        "operation": "Delete EventSubscription",
                        "provider": "Microsoft Event Grid",
                        "resource": "eventSubscriptions"
                      },
                      "name": "Microsoft.EventGrid/eventSubscriptions/delete",
                      "origin": "UserAndSystem"
                    },
                    {
                      "display": {
                        "description": "Create or update a topic",
                        "operation": "Write Topic",
                        "provider": "Microsoft Event Grid",
                        "resource": "topics"
                      },
                      "name": "Microsoft.EventGrid/topics/write",
                      "origin": "UserAndSystem"
                    },
                    {
                      "display": {
                        "description": "Read a topic",
                        "operation": "Read Topic",
                        "provider": "Microsoft Event Grid",
                        "resource": "topics"
                      },
                      "name": "Microsoft.EventGrid/topics/read",
                      "origin": "UserAndSystem"
                    },
                    {
                      "display": {
                        "description": "Delete a topic",
                        "operation": "Delete Topic",
                        "provider": "Microsoft Event Grid",
                        "resource": "topics"
                      },
                      "name": "Microsoft.EventGrid/topics/delete",
                      "origin": "UserAndSystem"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": null
        }
      }
    },
    "/providers/Microsoft.EventGrid/topicTypes": {
      "get": {
        "consumes": [],
        "description": "List all registered topic types",
        "operationId": "TopicTypes_List",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TopicTypesListResult"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 404 Not Found.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "List topic types",
        "tags": [
          "TopicTypes"
        ],
        "x-ms-examples": {
          "TopicTypes_List": {
            "parameters": {
              "api-version": "2017-06-15-preview"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "providers/Microsoft.EventGrid/topicTypes/Microsoft.Eventhub.Namespaces",
                      "name": "Microsoft.Eventhub.Namespaces",
                      "properties": {
                        "description": "Microsoft EventHubs service events.",
                        "displayName": "EventHubs Namespace",
                        "provider": "Microsoft.Eventhub",
                        "provisioningState": "Succeeded",
                        "resourceRegionType": "RegionalResource"
                      },
                      "type": "Microsoft.EventGrid/topicTypes"
                    },
                    {
                      "id": "providers/Microsoft.EventGrid/topicTypes/Microsoft.Storage.StorageAccounts",
                      "name": "Microsoft.Storage.StorageAccounts",
                      "properties": {
                        "description": "Microsoft Storage service events.",
                        "displayName": "Storage Accounts",
                        "provider": "Microsoft.Storage",
                        "provisioningState": "Succeeded",
                        "resourceRegionType": "RegionalResource"
                      },
                      "type": "Microsoft.EventGrid/topicTypes"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": null
        }
      }
    },
    "/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}": {
      "get": {
        "consumes": [],
        "description": "Get information about a topic type",
        "operationId": "TopicTypes_Get",
        "parameters": [
          {
            "description": "Name of the topic type",
            "in": "path",
            "name": "topicTypeName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TopicTypeInfo"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 404 Not Found.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "Get a topic type",
        "tags": [
          "TopicTypes"
        ],
        "x-ms-examples": {
          "TopicTypes_Get": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "topicTypeName": "Microsoft.Storage.StorageAccounts"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "providers/Microsoft.EventGrid/topicTypes/Microsoft.Storage.StorageAccounts",
                  "name": "Microsoft.Storage.StorageAccounts",
                  "properties": {
                    "description": "Microsoft Storage service events.",
                    "displayName": "Storage Accounts",
                    "provider": "Microsoft.Storage",
                    "provisioningState": "Succeeded",
                    "resourceRegionType": "RegionalResource"
                  },
                  "type": "Microsoft.EventGrid/topicTypes"
                }
              }
            }
          }
        }
      }
    },
    "/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventTypes": {
      "get": {
        "consumes": [],
        "description": "List event types for a topic type",
        "operationId": "TopicTypes_ListEventTypes",
        "parameters": [
          {
            "description": "Name of the topic type",
            "in": "path",
            "name": "topicTypeName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/EventTypesListResult"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 404 Not Found.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "List event types",
        "tags": [
          "TopicTypes"
        ],
        "x-ms-examples": {
          "TopicTypes_ListEventTypes": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "topicTypeName": "Microsoft.Storage.StorageAccounts"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "providers/Microsoft.EventGrid/topicTypes/Microsoft.Storage.StorageAccounts/eventTypes/Microsoft.Storage.BlobCreated",
                      "name": "Microsoft.Storage.BlobCreated",
                      "properties": {
                        "description": "Raised when a blob is created.",
                        "displayName": "Blob Created",
                        "schemaUrl": "tbd"
                      },
                      "type": "Microsoft.EventGrid/topicTypes/eventTypes"
                    },
                    {
                      "id": "providers/Microsoft.EventGrid/topicTypes/Microsoft.Storage.StorageAccounts/eventTypes/Microsoft.Storage.BlobDeleted",
                      "name": "Microsoft.Storage.BlobDeleted",
                      "properties": {
                        "description": "Raised when a blob is deleted.",
                        "displayName": "Blob Deleted",
                        "schemaUrl": "tbd"
                      },
                      "type": "Microsoft.EventGrid/topicTypes/eventTypes"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": null
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/eventSubscriptions": {
      "get": {
        "consumes": [],
        "description": "List all aggregated global event subscriptions under a specific Azure subscription",
        "operationId": "EventSubscriptions_ListGlobalBySubscription",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/EventSubscriptionsListResult"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "Get an aggregated list of all global event subscriptions under an Azure subscription",
        "tags": [
          "EventSubscriptions"
        ],
        "x-ms-examples": {
          "EventSubscriptions_ListGlobalBySubscription": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "subscriptionId": "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription2",
                      "name": "examplesubscription2",
                      "properties": {
                        "destination": {
                          "endpointType": "WebHook",
                          "properties": {
                            "endpointBaseUrl": "https://requestb.in/15ksip71"
                          }
                        },
                        "filter": {
                          "includedEventTypes": [
                            "All"
                          ],
                          "isSubjectCaseSensitive": false,
                          "subjectBeginsWith": "",
                          "subjectEndsWith": ""
                        },
                        "provisioningState": "Succeeded",
                        "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"
                      },
                      "type": "Microsoft.EventGrid/eventSubscriptions"
                    },
                    {
                      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription4",
                      "name": "examplesubscription4",
                      "properties": {
                        "destination": {
                          "endpointType": "WebHook",
                          "properties": {
                            "endpointBaseUrl": "https://requestb.in/15ksip71"
                          }
                        },
                        "filter": {
                          "includedEventTypes": [
                            "All"
                          ],
                          "isSubjectCaseSensitive": false,
                          "subjectBeginsWith": "",
                          "subjectEndsWith": ""
                        },
                        "provisioningState": "Succeeded",
                        "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"
                      },
                      "type": "Microsoft.EventGrid/eventSubscriptions"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": null
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions": {
      "get": {
        "consumes": [],
        "description": "List all event subscriptions from the given location under a specific Azure subscription",
        "operationId": "EventSubscriptions_ListRegionalBySubscription",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "description": "Name of the location",
            "in": "path",
            "name": "location",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/EventSubscriptionsListResult"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "List all regional event subscriptions under an Azure subscription",
        "tags": [
          "EventSubscriptions"
        ],
        "x-ms-examples": {
          "EventSubscriptions_ListRegionalBySubscription": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "location": "westus2",
              "subscriptionId": "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription10",
                      "name": "examplesubscription10",
                      "properties": {
                        "destination": {
                          "endpointType": "WebHook",
                          "properties": {
                            "endpointBaseUrl": "https://requestb.in/15ksip71"
                          }
                        },
                        "filter": {
                          "includedEventTypes": [
                            "All"
                          ],
                          "isSubjectCaseSensitive": false,
                          "subjectBeginsWith": "ExamplePrefix",
                          "subjectEndsWith": "ExampleSuffix"
                        },
                        "labels": [
                          "Finance",
                          "HR"
                        ],
                        "provisioningState": "Succeeded",
                        "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventhub/namespaces/examplenamespace1"
                      },
                      "type": "Microsoft.EventGrid/eventSubscriptions"
                    },
                    {
                      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription11",
                      "name": "examplesubscription11",
                      "properties": {
                        "destination": {
                          "endpointType": "WebHook",
                          "properties": {
                            "endpointBaseUrl": "https://requestb.in/15ksip71"
                          }
                        },
                        "filter": {
                          "includedEventTypes": [
                            "All"
                          ],
                          "isSubjectCaseSensitive": false,
                          "subjectBeginsWith": "ExamplePrefix",
                          "subjectEndsWith": "ExampleSuffix"
                        },
                        "labels": [
                          "Finance",
                          "HR"
                        ],
                        "provisioningState": "Succeeded",
                        "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventhub/namespaces/examplenamespace1"
                      },
                      "type": "Microsoft.EventGrid/eventSubscriptions"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": null
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions": {
      "get": {
        "consumes": [],
        "description": "List all event subscriptions from the given location under a specific Azure subscription and topic type.",
        "operationId": "EventSubscriptions_ListRegionalBySubscriptionForTopicType",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "description": "Name of the location",
            "in": "path",
            "name": "location",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the topic type",
            "in": "path",
            "name": "topicTypeName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/EventSubscriptionsListResult"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "List all regional event subscriptions under an Azure subscription for a topic type",
        "tags": [
          "EventSubscriptions"
        ],
        "x-ms-examples": {
          "EventSubscriptions_ListRegionalBySubscriptionForTopicType": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "location": "westus2",
              "subscriptionId": "5b4b650e-28b9-4790-b3ab-ddbd88d727c4",
              "topicTypeName": "Microsoft.EventHub.namespaces"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription10",
                      "name": "examplesubscription10",
                      "properties": {
                        "destination": {
                          "endpointType": "WebHook",
                          "properties": {
                            "endpointBaseUrl": "https://requestb.in/15ksip71"
                          }
                        },
                        "filter": {
                          "includedEventTypes": [
                            "All"
                          ],
                          "isSubjectCaseSensitive": false,
                          "subjectBeginsWith": "ExamplePrefix",
                          "subjectEndsWith": "ExampleSuffix"
                        },
                        "labels": [
                          "Finance",
                          "HR"
                        ],
                        "provisioningState": "Succeeded",
                        "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventhub/namespaces/examplenamespace1"
                      },
                      "type": "Microsoft.EventGrid/eventSubscriptions"
                    },
                    {
                      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription11",
                      "name": "examplesubscription11",
                      "properties": {
                        "destination": {
                          "endpointType": "WebHook",
                          "properties": {
                            "endpointBaseUrl": "https://requestb.in/15ksip71"
                          }
                        },
                        "filter": {
                          "includedEventTypes": [
                            "All"
                          ],
                          "isSubjectCaseSensitive": false,
                          "subjectBeginsWith": "ExamplePrefix",
                          "subjectEndsWith": "ExampleSuffix"
                        },
                        "labels": [
                          "Finance",
                          "HR"
                        ],
                        "provisioningState": "Succeeded",
                        "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventhub/namespaces/examplenamespace1"
                      },
                      "type": "Microsoft.EventGrid/eventSubscriptions"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": null
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions": {
      "get": {
        "consumes": [],
        "description": "List all global event subscriptions under an Azure subscription for a topic type.",
        "operationId": "EventSubscriptions_ListGlobalBySubscriptionForTopicType",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "description": "Name of the topic type",
            "in": "path",
            "name": "topicTypeName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/EventSubscriptionsListResult"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "List all global event subscriptions for a topic type",
        "tags": [
          "EventSubscriptions"
        ],
        "x-ms-examples": {
          "EventSubscriptions_ListGlobalBySubscriptionForTopicType": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "subscriptionId": "5b4b650e-28b9-4790-b3ab-ddbd88d727c4",
              "topicTypeName": "Microsoft.Resources.Subscriptions"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription3",
                      "name": "examplesubscription3",
                      "properties": {
                        "destination": {
                          "endpointType": "WebHook",
                          "properties": {
                            "endpointBaseUrl": "https://requestb.in/15ksip71"
                          }
                        },
                        "filter": {
                          "includedEventTypes": [
                            "All"
                          ],
                          "isSubjectCaseSensitive": false,
                          "subjectBeginsWith": "ExamplePrefix",
                          "subjectEndsWith": "ExampleSuffix"
                        },
                        "labels": [
                          "Finance",
                          "HR"
                        ],
                        "provisioningState": "Succeeded",
                        "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4"
                      },
                      "type": "Microsoft.EventGrid/eventSubscriptions"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": null
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics": {
      "get": {
        "consumes": [],
        "description": "List all the topics under an Azure subscription",
        "operationId": "Topics_ListBySubscription",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TopicsListResult"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "List topics under an Azure subscription",
        "tags": [
          "Topics"
        ],
        "x-ms-examples": {
          "Topics_ListBySubscription": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "subscriptionId": "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1",
                      "location": "westus2",
                      "name": "exampletopic1",
                      "properties": {
                        "endpoint": "https://exampletopic1.westus2-1.eventgrid.azure.net/api/events",
                        "provisioningState": "Succeeded"
                      },
                      "tags": {
                        "tag1": "value1",
                        "tag2": "value2"
                      },
                      "type": "Microsoft.EventGrid/topics"
                    },
                    {
                      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2",
                      "location": "westcentralus",
                      "name": "exampletopic2",
                      "properties": {
                        "endpoint": "https://exampletopic2.westcentralus-1.eventgrid.azure.net/api/events",
                        "provisioningState": "Succeeded"
                      },
                      "tags": {
                        "tag1": "value1",
                        "tag2": "value2"
                      },
                      "type": "Microsoft.EventGrid/topics"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": null
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/eventSubscriptions": {
      "get": {
        "consumes": [],
        "description": "List all global event subscriptions under a specific Azure subscription and resource group",
        "operationId": "EventSubscriptions_ListGlobalByResourceGroup",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "description": "The name of the resource group within the user's subscription.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/EventSubscriptionsListResult"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "List all global event subscriptions under an Azure subscription and resource group",
        "tags": [
          "EventSubscriptions"
        ],
        "x-ms-examples": {
          "EventSubscriptions_ListGlobalByResourceGroup": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "resourceGroupName": "examplerg",
              "subscriptionId": "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription2",
                      "name": "examplesubscription2",
                      "properties": {
                        "destination": {
                          "endpointType": "WebHook",
                          "properties": {
                            "endpointBaseUrl": "https://requestb.in/15ksip71"
                          }
                        },
                        "filter": {
                          "includedEventTypes": [
                            "All"
                          ],
                          "isSubjectCaseSensitive": false,
                          "subjectBeginsWith": "",
                          "subjectEndsWith": ""
                        },
                        "provisioningState": "Succeeded",
                        "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"
                      },
                      "type": "Microsoft.EventGrid/eventSubscriptions"
                    },
                    {
                      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription4",
                      "name": "examplesubscription4",
                      "properties": {
                        "destination": {
                          "endpointType": "WebHook",
                          "properties": {
                            "endpointBaseUrl": "https://requestb.in/15ksip71"
                          }
                        },
                        "filter": {
                          "includedEventTypes": [
                            "All"
                          ],
                          "isSubjectCaseSensitive": false,
                          "subjectBeginsWith": "",
                          "subjectEndsWith": ""
                        },
                        "provisioningState": "Succeeded",
                        "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"
                      },
                      "type": "Microsoft.EventGrid/eventSubscriptions"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": null
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions": {
      "get": {
        "consumes": [],
        "description": "List all event subscriptions from the given location under a specific Azure subscription and resource group",
        "operationId": "EventSubscriptions_ListRegionalByResourceGroup",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "description": "The name of the resource group within the user's subscription.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the location",
            "in": "path",
            "name": "location",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/EventSubscriptionsListResult"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "List all regional event subscriptions under an Azure subscription and resource group",
        "tags": [
          "EventSubscriptions"
        ],
        "x-ms-examples": {
          "EventSubscriptions_ListRegionalByResourceGroup": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "location": "westus2",
              "resourceGroupName": "examplerg",
              "subscriptionId": "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription10",
                      "name": "examplesubscription10",
                      "properties": {
                        "destination": {
                          "endpointType": "WebHook",
                          "properties": {
                            "endpointBaseUrl": "https://requestb.in/15ksip71"
                          }
                        },
                        "filter": {
                          "includedEventTypes": [
                            "All"
                          ],
                          "isSubjectCaseSensitive": false,
                          "subjectBeginsWith": "ExamplePrefix",
                          "subjectEndsWith": "ExampleSuffix"
                        },
                        "labels": [
                          "Finance",
                          "HR"
                        ],
                        "provisioningState": "Succeeded",
                        "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventhub/namespaces/examplenamespace1"
                      },
                      "type": "Microsoft.EventGrid/eventSubscriptions"
                    },
                    {
                      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription11",
                      "name": "examplesubscription11",
                      "properties": {
                        "destination": {
                          "endpointType": "WebHook",
                          "properties": {
                            "endpointBaseUrl": "https://requestb.in/15ksip71"
                          }
                        },
                        "filter": {
                          "includedEventTypes": [
                            "All"
                          ],
                          "isSubjectCaseSensitive": false,
                          "subjectBeginsWith": "ExamplePrefix",
                          "subjectEndsWith": "ExampleSuffix"
                        },
                        "labels": [
                          "Finance",
                          "HR"
                        ],
                        "provisioningState": "Succeeded",
                        "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventhub/namespaces/examplenamespace1"
                      },
                      "type": "Microsoft.EventGrid/eventSubscriptions"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": null
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions": {
      "get": {
        "consumes": [],
        "description": "List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type",
        "operationId": "EventSubscriptions_ListRegionalByResourceGroupForTopicType",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "description": "The name of the resource group within the user's subscription.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the location",
            "in": "path",
            "name": "location",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the topic type",
            "in": "path",
            "name": "topicTypeName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/EventSubscriptionsListResult"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "List all regional event subscriptions under an Azure subscription and resource group for a topic type",
        "tags": [
          "EventSubscriptions"
        ],
        "x-ms-examples": {
          "EventSubscriptions_ListRegionalByResourceGroupForTopicType": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "location": "westus2",
              "resourceGroupName": "examplerg",
              "subscriptionId": "5b4b650e-28b9-4790-b3ab-ddbd88d727c4",
              "topicTypeName": "Microsoft.EventHub.namespaces"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription10",
                      "name": "examplesubscription10",
                      "properties": {
                        "destination": {
                          "endpointType": "WebHook",
                          "properties": {
                            "endpointBaseUrl": "https://requestb.in/15ksip71"
                          }
                        },
                        "filter": {
                          "includedEventTypes": [
                            "All"
                          ],
                          "isSubjectCaseSensitive": false,
                          "subjectBeginsWith": "ExamplePrefix",
                          "subjectEndsWith": "ExampleSuffix"
                        },
                        "labels": [
                          "Finance",
                          "HR"
                        ],
                        "provisioningState": "Succeeded",
                        "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventhub/namespaces/examplenamespace1"
                      },
                      "type": "Microsoft.EventGrid/eventSubscriptions"
                    },
                    {
                      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription11",
                      "name": "examplesubscription11",
                      "properties": {
                        "destination": {
                          "endpointType": "WebHook",
                          "properties": {
                            "endpointBaseUrl": "https://requestb.in/15ksip71"
                          }
                        },
                        "filter": {
                          "includedEventTypes": [
                            "All"
                          ],
                          "isSubjectCaseSensitive": false,
                          "subjectBeginsWith": "ExamplePrefix",
                          "subjectEndsWith": "ExampleSuffix"
                        },
                        "labels": [
                          "Finance",
                          "HR"
                        ],
                        "provisioningState": "Succeeded",
                        "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventhub/namespaces/examplenamespace1"
                      },
                      "type": "Microsoft.EventGrid/eventSubscriptions"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": null
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions": {
      "get": {
        "consumes": [],
        "description": "List all global event subscriptions under a resource group for a specific topic type.",
        "operationId": "EventSubscriptions_ListGlobalByResourceGroupForTopicType",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "description": "The name of the resource group within the user's subscription.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the topic type",
            "in": "path",
            "name": "topicTypeName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/EventSubscriptionsListResult"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "List all global event subscriptions under a resource group for a topic type",
        "tags": [
          "EventSubscriptions"
        ],
        "x-ms-examples": {
          "EventSubscriptions_ListGlobalByResourceGroupForTopicType": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "resourceGroupName": "examplerg",
              "subscriptionId": "5b4b650e-28b9-4790-b3ab-ddbd88d727c4",
              "topicTypeName": "Microsoft.Resources.ResourceGroups"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription3",
                      "name": "examplesubscription3",
                      "properties": {
                        "destination": {
                          "endpointType": "WebHook",
                          "properties": {
                            "endpointBaseUrl": "https://requestb.in/15ksip71"
                          }
                        },
                        "filter": {
                          "includedEventTypes": [
                            "All"
                          ],
                          "isSubjectCaseSensitive": false,
                          "subjectBeginsWith": "ExamplePrefix",
                          "subjectEndsWith": "ExampleSuffix"
                        },
                        "labels": [
                          "Finance",
                          "HR"
                        ],
                        "provisioningState": "Succeeded",
                        "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"
                      },
                      "type": "Microsoft.EventGrid/eventSubscriptions"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": null
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics": {
      "get": {
        "consumes": [],
        "description": "List all the topics under a resource group",
        "operationId": "Topics_ListByResourceGroup",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "description": "The name of the resource group within the user's subscription.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TopicsListResult"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "List topics under a resource group",
        "tags": [
          "Topics"
        ],
        "x-ms-examples": {
          "Topics_ListByResourceGroup": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "resourceGroupName": "examplerg",
              "subscriptionId": "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1",
                      "location": "westus2",
                      "name": "exampletopic1",
                      "properties": {
                        "endpoint": "https://exampletopic1.westus2-1.eventgrid.azure.net/api/events",
                        "provisioningState": "Succeeded"
                      },
                      "tags": {
                        "tag1": "value1",
                        "tag2": "value2"
                      },
                      "type": "Microsoft.EventGrid/topics"
                    },
                    {
                      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2",
                      "location": "westcentralus",
                      "name": "exampletopic2",
                      "properties": {
                        "endpoint": "https://exampletopic2.westcentralus-1.eventgrid.azure.net/api/events",
                        "provisioningState": "Succeeded"
                      },
                      "tags": {
                        "tag1": "value1",
                        "tag2": "value2"
                      },
                      "type": "Microsoft.EventGrid/topics"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": null
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}": {
      "delete": {
        "consumes": [],
        "description": "Delete existing topic",
        "operationId": "Topics_Delete",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "description": "The name of the resource group within the user's subscription.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the topic",
            "in": "path",
            "name": "topicName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted"
          },
          "204": {
            "description": "NoContent"
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 404 Not Found.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "Delete a topic",
        "tags": [
          "Topics"
        ],
        "x-ms-examples": {
          "Topics_Delete": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "resourceGroupName": "examplerg",
              "subscriptionId": "5b4b650e-28b9-4790-b3ab-ddbd88d727c4",
              "topicName": "exampletopic1"
            },
            "responses": {
              "202": {},
              "204": {}
            }
          }
        },
        "x-ms-long-running-operation": true
      },
      "get": {
        "consumes": [],
        "description": "Get properties of a topic",
        "operationId": "Topics_Get",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "description": "The name of the resource group within the user's subscription.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the topic",
            "in": "path",
            "name": "topicName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Topic"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "Get a topic",
        "tags": [
          "Topics"
        ],
        "x-ms-examples": {
          "Topics_Get": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "resourceGroupName": "examplerg",
              "subscriptionId": "5b4b650e-28b9-4790-b3ab-ddbd88d727c4",
              "topicName": "exampletopic2"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2",
                  "location": "westcentralus",
                  "name": "exampletopic2",
                  "properties": {
                    "endpoint": "https://exampletopic2.westcentralus-1.eventgrid.azure.net/api/events",
                    "provisioningState": "Succeeded"
                  },
                  "tags": {
                    "tag1": "value1",
                    "tag2": "value2"
                  },
                  "type": "Microsoft.EventGrid/topics"
                }
              }
            }
          }
        }
      },
      "put": {
        "description": "Asynchronously creates a new topic with the specified parameters.",
        "operationId": "Topics_CreateOrUpdate",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "description": "The name of the resource group within the user's subscription.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the topic",
            "in": "path",
            "name": "topicName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Topic information",
            "in": "body",
            "name": "topicInfo",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Topic"
            }
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/Topic"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "Create a topic",
        "tags": [
          "Topics"
        ],
        "x-ms-examples": {
          "Topics_CreateOrUpdate": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "resourceGroupName": "examplerg",
              "subscriptionId": "5b4b650e-28b9-4790-b3ab-ddbd88d727c4",
              "topicInfo": {
                "location": "westus2",
                "tags": {
                  "tag1": "value1",
                  "tag2": "value2"
                }
              },
              "topicName": "exampletopic1"
            },
            "responses": {
              "201": {
                "body": {
                  "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1",
                  "location": "westus2",
                  "name": "exampletopic1",
                  "properties": {
                    "endpoint": "https://exampletopic1.westus2-1.eventgrid.azure.net/api/events",
                    "provisioningState": "Succeeded"
                  },
                  "tags": {
                    "tag1": "value1",
                    "tag2": "value2"
                  },
                  "type": "Microsoft.EventGrid/topics"
                }
              }
            }
          }
        },
        "x-ms-long-running-operation": true
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/listKeys": {
      "post": {
        "consumes": [],
        "description": "List the two keys used to publish to a topic",
        "operationId": "Topics_ListSharedAccessKeys",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "description": "The name of the resource group within the user's subscription.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the topic",
            "in": "path",
            "name": "topicName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TopicSharedAccessKeys"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "List keys for a topic",
        "tags": [
          "Topics"
        ],
        "x-ms-examples": {
          "Topics_ListSharedAccessKeys": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "resourceGroupName": "examplerg",
              "subscriptionId": "5b4b650e-28b9-4790-b3ab-ddbd88d727c4",
              "topicName": "exampletopic2"
            },
            "responses": {
              "200": {
                "body": {
                  "key1": "Rqfq5wWxtQnIQJyswP0Uh/hqQfDDMUOYyQSYEpx5e5g=",
                  "key2": "sesymbkIXMtZVqXEFHarJmdGmZjjnY+BZC8yRD/FeuA="
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/regenerateKey": {
      "post": {
        "description": "Regenerate a shared access key for a topic",
        "operationId": "Topics_RegenerateKey",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "description": "The name of the resource group within the user's subscription.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the topic",
            "in": "path",
            "name": "topicName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Request body to regenerate key",
            "in": "body",
            "name": "regenerateKeyRequest",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TopicRegenerateKeyRequest"
            }
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TopicSharedAccessKeys"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "Regenerate key for a topic",
        "tags": [
          "Topics"
        ],
        "x-ms-examples": {
          "Topics_RegenerateKey": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "regenerateKeyRequest": {
                "keyName": "key1"
              },
              "resourceGroupName": "examplerg",
              "subscriptionId": "5b4b650e-28b9-4790-b3ab-ddbd88d727c4",
              "topicName": "exampletopic2"
            },
            "responses": {
              "200": {
                "body": {
                  "key1": "Rqfq5wWxtQnIQJyswP0Uh/hqQfDDMUOYyQSYEpx5e5g=",
                  "key2": "sesymbkIXMtZVqXEFHarJmdGmZjjnY+BZC8yRD/FeuA="
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventSubscriptions": {
      "get": {
        "consumes": [],
        "description": "List all event subscriptions that have been created for a specific topic",
        "operationId": "EventSubscriptions_ListByResource",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "description": "The name of the resource group within the user's subscription.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Namespace of the provider of the topic",
            "in": "path",
            "name": "providerNamespace",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the resource type",
            "in": "path",
            "name": "resourceTypeName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the resource",
            "in": "path",
            "name": "resourceName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/EventSubscriptionsListResult"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "List all event subscriptions for a specific topic",
        "tags": [
          "EventSubscriptions"
        ],
        "x-ms-examples": {
          "EventSubscriptions_ListByResource": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "providerNamespace": "Microsoft.EventGrid",
              "resourceGroupName": "examplerg",
              "resourceName": "exampletopic2",
              "resourceTypeName": "topics",
              "subscriptionId": "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1",
                      "name": "examplesubscription1",
                      "properties": {
                        "destination": {
                          "endpointType": "WebHook",
                          "properties": {
                            "endpointBaseUrl": "https://requestb.in/15ksip71"
                          }
                        },
                        "filter": {
                          "includedEventTypes": [
                            "All"
                          ],
                          "isSubjectCaseSensitive": false,
                          "subjectBeginsWith": "",
                          "subjectEndsWith": ""
                        },
                        "provisioningState": "Succeeded",
                        "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic2"
                      },
                      "type": "Microsoft.EventGrid/eventSubscriptions"
                    },
                    {
                      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription2",
                      "name": "examplesubscription2",
                      "properties": {
                        "destination": {
                          "endpointType": "WebHook",
                          "properties": {
                            "endpointBaseUrl": "https://requestb.in/15ksip71"
                          }
                        },
                        "filter": {
                          "includedEventTypes": [
                            "All"
                          ],
                          "isSubjectCaseSensitive": false,
                          "subjectBeginsWith": "",
                          "subjectEndsWith": ""
                        },
                        "provisioningState": "Succeeded",
                        "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic2"
                      },
                      "type": "Microsoft.EventGrid/eventSubscriptions"
                    },
                    {
                      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription3",
                      "name": "examplesubscription3",
                      "properties": {
                        "destination": {
                          "endpointType": "WebHook",
                          "properties": {
                            "endpointBaseUrl": "https://requestb.in/15ksip71"
                          }
                        },
                        "filter": {
                          "includedEventTypes": [
                            "All"
                          ],
                          "isSubjectCaseSensitive": false,
                          "subjectBeginsWith": "",
                          "subjectEndsWith": ""
                        },
                        "labels": [],
                        "provisioningState": "Succeeded",
                        "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic2"
                      },
                      "type": "Microsoft.EventGrid/eventSubscriptions"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": null
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventTypes": {
      "get": {
        "consumes": [],
        "description": "List event types for a topic",
        "operationId": "Topics_ListEventTypes",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "description": "The name of the resource group within the user's subscription.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Namespace of the provider of the topic",
            "in": "path",
            "name": "providerNamespace",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the topic type",
            "in": "path",
            "name": "resourceTypeName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the topic",
            "in": "path",
            "name": "resourceName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/EventTypesListResult"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "List topic event types",
        "tags": [
          "Topics"
        ],
        "x-ms-examples": {
          "Topics_ListEventTypes": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "providerNamespace": "Microsoft.Storage",
              "resourceGroupName": "examplerg",
              "resourceName": "ExampleStorageAccount",
              "resourceTypeName": "storageAccounts",
              "subscriptionId": "5b4b650e-28b9-4790-b3ab-ddbd88d727c4"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "providers/Microsoft.EventGrid/topicTypes/Microsoft.Storage.StorageAccounts/eventTypes/Microsoft.Storage.BlobCreated",
                      "name": "Microsoft.Storage.BlobCreated",
                      "properties": {
                        "description": "Raised when a blob is created.",
                        "displayName": "Blob Created",
                        "schemaUrl": "tbd"
                      },
                      "type": "Microsoft.EventGrid/topicTypes/eventTypes"
                    },
                    {
                      "id": "providers/Microsoft.EventGrid/topicTypes/Microsoft.Storage.StorageAccounts/eventTypes/Microsoft.Storage.BlobDeleted",
                      "name": "Microsoft.Storage.BlobDeleted",
                      "properties": {
                        "description": "Raised when a blob is deleted.",
                        "displayName": "Blob Deleted",
                        "schemaUrl": "tbd"
                      },
                      "type": "Microsoft.EventGrid/topicTypes/eventTypes"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": null
        }
      }
    },
    "/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}": {
      "delete": {
        "consumes": [],
        "description": "Delete an existing event subscription",
        "operationId": "EventSubscriptions_Delete",
        "parameters": [
          {
            "description": "The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.",
            "in": "path",
            "name": "scope",
            "required": true,
            "type": "string",
            "x-ms-skip-url-encoding": true
          },
          {
            "description": "Name of the event subscription",
            "in": "path",
            "name": "eventSubscriptionName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "202": {
            "description": "Accepted"
          },
          "204": {
            "description": "NoContent"
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 404 Not Found.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "Delete an event subscription",
        "tags": [
          "EventSubscriptions"
        ],
        "x-ms-examples": {
          "EventSubscriptions_DeleteForCustomTopic": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "eventSubscriptionName": "examplesubscription1",
              "scope": "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"
            },
            "responses": {
              "200": {},
              "202": {},
              "204": {}
            }
          },
          "EventSubscriptions_DeleteForResource": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "eventSubscriptionName": "examplesubscription10",
              "scope": "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"
            },
            "responses": {
              "200": {},
              "202": {},
              "204": {}
            }
          },
          "EventSubscriptions_DeleteForResourceGroup": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "eventSubscriptionName": "examplesubscription2",
              "scope": "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"
            },
            "responses": {
              "200": {},
              "202": {},
              "204": {}
            }
          },
          "EventSubscriptions_DeleteForSubscription": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "eventSubscriptionName": "examplesubscription3",
              "scope": "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4"
            },
            "responses": {
              "200": {},
              "202": {},
              "204": {}
            }
          }
        },
        "x-ms-long-running-operation": true
      },
      "get": {
        "consumes": [],
        "description": "Get properties of an event subscription",
        "operationId": "EventSubscriptions_Get",
        "parameters": [
          {
            "description": "The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.",
            "in": "path",
            "name": "scope",
            "required": true,
            "type": "string",
            "x-ms-skip-url-encoding": true
          },
          {
            "description": "Name of the event subscription",
            "in": "path",
            "name": "eventSubscriptionName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/EventSubscription"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "Get an event subscription",
        "tags": [
          "EventSubscriptions"
        ],
        "x-ms-examples": {
          "EventSubscriptions_GetForCustomTopic": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "eventSubscriptionName": "examplesubscription1",
              "scope": "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1",
                  "name": "examplesubscription1",
                  "properties": {
                    "destination": {
                      "endpointType": "WebHook",
                      "properties": {
                        "endpointBaseUrl": "https://requestb.in/15ksip71"
                      }
                    },
                    "filter": {
                      "includedEventTypes": [
                        "All"
                      ],
                      "isSubjectCaseSensitive": false,
                      "subjectBeginsWith": "ExamplePrefix",
                      "subjectEndsWith": "ExampleSuffix"
                    },
                    "labels": [
                      "label1",
                      "label2"
                    ],
                    "provisioningState": "Succeeded",
                    "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic2"
                  },
                  "type": "Microsoft.EventGrid/eventSubscriptions"
                }
              }
            }
          },
          "EventSubscriptions_GetForResource": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "eventSubscriptionName": "examplesubscription1",
              "scope": "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1",
                  "name": "examplesubscription1",
                  "properties": {
                    "destination": {
                      "endpointType": "WebHook",
                      "properties": {
                        "endpointBaseUrl": "https://requestb.in/15ksip71"
                      }
                    },
                    "filter": {
                      "includedEventTypes": [
                        "All"
                      ],
                      "isSubjectCaseSensitive": false,
                      "subjectBeginsWith": "ExamplePrefix",
                      "subjectEndsWith": "ExampleSuffix"
                    },
                    "labels": [
                      "label1",
                      "label2"
                    ],
                    "provisioningState": "Succeeded",
                    "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"
                  },
                  "type": "Microsoft.EventGrid/eventSubscriptions"
                }
              }
            }
          },
          "EventSubscriptions_GetForResourceGroup": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "eventSubscriptionName": "examplesubscription2",
              "scope": "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription2",
                  "name": "examplesubscription2",
                  "properties": {
                    "destination": {
                      "endpointType": "WebHook",
                      "properties": {
                        "endpointBaseUrl": "https://requestb.in/15ksip71"
                      }
                    },
                    "filter": {
                      "includedEventTypes": [
                        "All"
                      ],
                      "isSubjectCaseSensitive": false,
                      "subjectBeginsWith": "ExamplePrefix",
                      "subjectEndsWith": "ExampleSuffix"
                    },
                    "labels": [
                      "label1",
                      "label2"
                    ],
                    "provisioningState": "Succeeded",
                    "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"
                  },
                  "type": "Microsoft.EventGrid/eventSubscriptions"
                }
              }
            }
          },
          "EventSubscriptions_GetForSubscription": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "eventSubscriptionName": "examplesubscription3",
              "scope": "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription3",
                  "name": "examplesubscription3",
                  "properties": {
                    "destination": {
                      "endpointType": "WebHook",
                      "properties": {
                        "endpointBaseUrl": "https://requestb.in/15ksip71"
                      }
                    },
                    "filter": {
                      "includedEventTypes": [
                        "All"
                      ],
                      "isSubjectCaseSensitive": false,
                      "subjectBeginsWith": "ExamplePrefix",
                      "subjectEndsWith": "ExampleSuffix"
                    },
                    "labels": [
                      "label1",
                      "label2"
                    ],
                    "provisioningState": "Succeeded",
                    "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4"
                  },
                  "type": "Microsoft.EventGrid/eventSubscriptions"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Asynchronously updates an existing event subscription.",
        "operationId": "EventSubscriptions_Update",
        "parameters": [
          {
            "description": "The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.",
            "in": "path",
            "name": "scope",
            "required": true,
            "type": "string",
            "x-ms-skip-url-encoding": true
          },
          {
            "description": "Name of the event subscription to be created",
            "in": "path",
            "name": "eventSubscriptionName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Updated event subscription information",
            "in": "body",
            "name": "eventSubscriptionUpdateParameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/EventSubscriptionUpdateParameters"
            }
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/EventSubscription"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "Update an event subscription",
        "tags": [
          "EventSubscriptions"
        ],
        "x-ms-examples": {
          "EventSubscriptions_UpdateForCustomTopic": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "eventSubscriptionName": "examplesubscription1",
              "eventSubscriptionUpdateParameters": {
                "destination": {
                  "endpointType": "WebHook",
                  "properties": {
                    "endpointUrl": "https://requestb.in/15ksip71"
                  }
                },
                "filter": {
                  "isSubjectCaseSensitive": true,
                  "subjectBeginsWith": "existingPrefix",
                  "subjectEndsWith": "newSuffix"
                },
                "labels": [
                  "label1",
                  "label2"
                ]
              },
              "scope": "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"
            },
            "responses": {
              "201": {
                "body": {
                  "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1",
                  "name": "examplesubscription1",
                  "properties": {
                    "destination": {
                      "endpointType": "WebHook",
                      "properties": {
                        "endpointBaseUrl": "https://requestb.in/15ksip71"
                      }
                    },
                    "filter": {
                      "includedEventTypes": [
                        "All"
                      ],
                      "isSubjectCaseSensitive": true,
                      "subjectBeginsWith": "existingPrefix",
                      "subjectEndsWith": "newSuffix"
                    },
                    "labels": [
                      "label1",
                      "label2"
                    ],
                    "provisioningState": "Succeeded",
                    "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic2"
                  },
                  "type": "Microsoft.EventGrid/eventSubscriptions"
                }
              }
            }
          },
          "EventSubscriptions_UpdateForResource": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "eventSubscriptionName": "examplesubscription1",
              "eventSubscriptionUpdateParameters": {
                "destination": {
                  "endpointType": "WebHook",
                  "properties": {
                    "endpointUrl": "https://requestb.in/15ksip71"
                  }
                },
                "filter": {
                  "isSubjectCaseSensitive": true,
                  "subjectBeginsWith": "existingPrefix",
                  "subjectEndsWith": "newSuffix"
                },
                "labels": [
                  "label1",
                  "label2"
                ]
              },
              "scope": "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"
            },
            "responses": {
              "201": {
                "body": {
                  "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1",
                  "name": "examplesubscription1",
                  "properties": {
                    "destination": {
                      "endpointType": "WebHook",
                      "properties": {
                        "endpointBaseUrl": "https://requestb.in/15ksip71"
                      }
                    },
                    "filter": {
                      "includedEventTypes": [
                        "All"
                      ],
                      "isSubjectCaseSensitive": true,
                      "subjectBeginsWith": "existingPrefix",
                      "subjectEndsWith": "newSuffix"
                    },
                    "labels": [],
                    "provisioningState": "Succeeded",
                    "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"
                  },
                  "type": "Microsoft.EventGrid/eventSubscriptions"
                }
              }
            }
          },
          "EventSubscriptions_UpdateForResourceGroup": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "eventSubscriptionName": "examplesubscription2",
              "eventSubscriptionUpdateParameters": {
                "destination": {
                  "endpointType": "WebHook",
                  "properties": {
                    "endpointUrl": "https://requestb.in/15ksip71"
                  }
                },
                "filter": {
                  "isSubjectCaseSensitive": true,
                  "subjectBeginsWith": "existingPrefix",
                  "subjectEndsWith": "newSuffix"
                },
                "labels": [
                  "label1",
                  "label2"
                ]
              },
              "scope": "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"
            },
            "responses": {
              "201": {
                "body": {
                  "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription2",
                  "name": "examplesubscription2",
                  "properties": {
                    "destination": {
                      "endpointType": "WebHook",
                      "properties": {
                        "endpointBaseUrl": "https://requestb.in/15ksip71"
                      }
                    },
                    "filter": {
                      "includedEventTypes": [
                        "All"
                      ],
                      "isSubjectCaseSensitive": true,
                      "subjectBeginsWith": "existingPrefix",
                      "subjectEndsWith": "newSuffix"
                    },
                    "labels": [],
                    "provisioningState": "Succeeded",
                    "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"
                  },
                  "type": "Microsoft.EventGrid/eventSubscriptions"
                }
              }
            }
          },
          "EventSubscriptions_UpdateForSubscription": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "eventSubscriptionName": "examplesubscription3",
              "eventSubscriptionUpdateParameters": {
                "destination": {
                  "endpointType": "WebHook",
                  "properties": {
                    "endpointUrl": "https://requestb.in/15ksip71"
                  }
                },
                "filter": {
                  "isSubjectCaseSensitive": true,
                  "subjectBeginsWith": "existingPrefix",
                  "subjectEndsWith": "newSuffix"
                },
                "labels": [
                  "label1",
                  "label2"
                ]
              },
              "scope": "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4"
            },
            "responses": {
              "201": {
                "body": {
                  "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription3",
                  "name": "examplesubscription3",
                  "properties": {
                    "destination": {
                      "endpointType": "WebHook",
                      "properties": {
                        "endpointBaseUrl": "https://requestb.in/15ksip71"
                      }
                    },
                    "filter": {
                      "includedEventTypes": [
                        "All"
                      ],
                      "isSubjectCaseSensitive": true,
                      "subjectBeginsWith": "existingPrefix",
                      "subjectEndsWith": "newSuffix"
                    },
                    "labels": [],
                    "provisioningState": "Succeeded",
                    "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4"
                  },
                  "type": "Microsoft.EventGrid/eventSubscriptions"
                }
              }
            }
          }
        },
        "x-ms-long-running-operation": true
      },
      "put": {
        "description": "Asynchronously creates a new event subscription to the specified scope. Existing event subscriptions cannot be updated with this API and should instead use the Update event subscription API.",
        "operationId": "EventSubscriptions_Create",
        "parameters": [
          {
            "description": "The scope of the resource to which the event subscription needs to be created. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.",
            "in": "path",
            "name": "scope",
            "required": true,
            "type": "string",
            "x-ms-skip-url-encoding": true
          },
          {
            "description": "Name of the event subscription to be created. Event subscription names must be between 3 and 64 characters in length and use alphanumeric letters only.",
            "in": "path",
            "name": "eventSubscriptionName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Event subscription properties containing the destination and filter information",
            "in": "body",
            "name": "eventSubscriptionInfo",
            "required": true,
            "schema": {
              "$ref": "#/definitions/EventSubscription"
            }
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/EventSubscription"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "Create an event subscription",
        "tags": [
          "EventSubscriptions"
        ],
        "x-ms-examples": {
          "EventSubscriptions_CreateForCustomTopic": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "eventSubscriptionInfo": {
                "properties": {
                  "destination": {
                    "endpointType": "WebHook",
                    "properties": {
                      "endpointUrl": "https://requestb.in/15ksip71"
                    }
                  },
                  "filter": {
                    "isSubjectCaseSensitive": false,
                    "subjectBeginsWith": "ExamplePrefix",
                    "subjectEndsWith": "ExampleSuffix"
                  }
                }
              },
              "eventSubscriptionName": "examplesubscription1",
              "scope": "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"
            },
            "responses": {
              "201": {
                "body": {
                  "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1",
                  "name": "examplesubscription1",
                  "properties": {
                    "destination": {
                      "endpointType": "WebHook",
                      "properties": {
                        "endpointBaseUrl": "https://requestb.in/15ksip71"
                      }
                    },
                    "filter": {
                      "includedEventTypes": [
                        "All"
                      ],
                      "isSubjectCaseSensitive": false,
                      "subjectBeginsWith": "ExamplePrefix",
                      "subjectEndsWith": "ExampleSuffix"
                    },
                    "provisioningState": "Succeeded",
                    "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic1"
                  },
                  "type": "Microsoft.EventGrid/eventSubscriptions"
                }
              }
            }
          },
          "EventSubscriptions_CreateForResource": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "eventSubscriptionInfo": {
                "properties": {
                  "destination": {
                    "endpointType": "WebHook",
                    "properties": {
                      "endpointUrl": "https://requestb.in/15ksip71"
                    }
                  },
                  "filter": {
                    "isSubjectCaseSensitive": false,
                    "subjectBeginsWith": "ExamplePrefix",
                    "subjectEndsWith": "ExampleSuffix"
                  }
                }
              },
              "eventSubscriptionName": "examplesubscription10",
              "scope": "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"
            },
            "responses": {
              "201": {
                "body": {
                  "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription10",
                  "name": "examplesubscription10",
                  "properties": {
                    "destination": {
                      "endpointType": "WebHook",
                      "properties": {
                        "endpointBaseUrl": "https://requestb.in/15ksip71"
                      }
                    },
                    "filter": {
                      "includedEventTypes": [
                        "All"
                      ],
                      "isSubjectCaseSensitive": false,
                      "subjectBeginsWith": "ExamplePrefix",
                      "subjectEndsWith": "ExampleSuffix"
                    },
                    "provisioningState": "Succeeded",
                    "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"
                  },
                  "type": "Microsoft.EventGrid/eventSubscriptions"
                }
              }
            }
          },
          "EventSubscriptions_CreateForResourceGroup": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "eventSubscriptionInfo": {
                "properties": {
                  "destination": {
                    "endpointType": "WebHook",
                    "properties": {
                      "endpointUrl": "https://requestb.in/15ksip71"
                    }
                  },
                  "filter": {
                    "isSubjectCaseSensitive": false,
                    "subjectBeginsWith": "ExamplePrefix",
                    "subjectEndsWith": "ExampleSuffix"
                  }
                }
              },
              "eventSubscriptionName": "examplesubscription2",
              "scope": "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"
            },
            "responses": {
              "201": {
                "body": {
                  "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription2",
                  "name": "examplesubscription2",
                  "properties": {
                    "destination": {
                      "endpointType": "WebHook",
                      "properties": {
                        "endpointBaseUrl": "https://requestb.in/15ksip71"
                      }
                    },
                    "filter": {
                      "includedEventTypes": [
                        "All"
                      ],
                      "isSubjectCaseSensitive": false,
                      "subjectBeginsWith": "ExamplePrefix",
                      "subjectEndsWith": "ExampleSuffix"
                    },
                    "provisioningState": "Succeeded",
                    "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"
                  },
                  "type": "Microsoft.EventGrid/eventSubscriptions"
                }
              }
            }
          },
          "EventSubscriptions_CreateForSubscription": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "eventSubscriptionInfo": {
                "properties": {
                  "destination": {
                    "endpointType": "WebHook",
                    "properties": {
                      "endpointUrl": "https://requestb.in/15ksip71"
                    }
                  },
                  "filter": {
                    "isSubjectCaseSensitive": false
                  }
                }
              },
              "eventSubscriptionName": "examplesubscription3",
              "scope": "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4"
            },
            "responses": {
              "201": {
                "body": {
                  "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription3",
                  "name": "examplesubscription3",
                  "properties": {
                    "destination": {
                      "endpointType": "WebHook",
                      "properties": {
                        "endpointBaseUrl": "https://requestb.in/15ksip71"
                      }
                    },
                    "filter": {
                      "includedEventTypes": [
                        "All"
                      ],
                      "isSubjectCaseSensitive": false,
                      "subjectBeginsWith": "",
                      "subjectEndsWith": ""
                    },
                    "provisioningState": "Succeeded",
                    "topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4"
                  },
                  "type": "Microsoft.EventGrid/eventSubscriptions"
                }
              }
            }
          }
        },
        "x-ms-long-running-operation": true
      }
    },
    "/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getFullUrl": {
      "post": {
        "consumes": [],
        "description": "Get the full endpoint URL for an event subscription",
        "operationId": "EventSubscriptions_GetFullUrl",
        "parameters": [
          {
            "description": "The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.",
            "in": "path",
            "name": "scope",
            "required": true,
            "type": "string",
            "x-ms-skip-url-encoding": true
          },
          {
            "description": "Name of the event subscription",
            "in": "path",
            "name": "eventSubscriptionName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/EventSubscriptionFullUrl"
            }
          },
          "default": {
            "description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
          }
        },
        "summary": "Get full URL of an event subscription",
        "tags": [
          "EventSubscriptions"
        ],
        "x-ms-examples": {
          "EventSubscriptions_GetFullUrlForCustomTopic": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "eventSubscriptionName": "examplesubscription1",
              "scope": "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"
            },
            "responses": {
              "200": {
                "body": {
                  "endpointUrl": "https://requestb.in/15ksip71"
                }
              }
            }
          },
          "EventSubscriptions_GetFullUrlForResource": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "eventSubscriptionName": "examplesubscription1",
              "scope": "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"
            },
            "responses": {
              "200": {
                "body": {
                  "endpointUrl": "https://requestb.in/15ksip71"
                }
              }
            }
          },
          "EventSubscriptions_GetFullUrlForResourceGroup": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "eventSubscriptionName": "examplesubscription2",
              "scope": "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"
            },
            "responses": {
              "200": {
                "body": {
                  "endpointUrl": "https://requestb.in/15ksip71"
                }
              }
            }
          },
          "EventSubscriptions_GetFullUrlForSubscription": {
            "parameters": {
              "api-version": "2017-06-15-preview",
              "eventSubscriptionName": "examplesubscription3",
              "scope": "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4"
            },
            "responses": {
              "200": {
                "body": {
                  "endpointUrl": "https://requestb.in/15ksip71"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "EventSubscription": {
      "allOf": [
        {
          "$ref": "#/definitions/Resource"
        }
      ],
      "description": "Event Subscription",
      "properties": {
        "properties": {
          "$ref": "#/definitions/EventSubscriptionProperties",
          "description": "Properties of the event subscription",
          "x-ms-client-flatten": true
        }
      },
      "type": "object"
    },
    "EventSubscriptionDestination": {
      "description": "Information about the destination for an event subscription",
      "properties": {
        "endpointType": {
          "description": "Type of the endpoint for the event subscription destination",
          "enum": [
            "WebHook"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "EndpointType"
          }
        },
        "properties": {
          "$ref": "#/definitions/EventSubscriptionDestinationProperties",
          "description": "Properties of the event subscription destination",
          "x-ms-client-flatten": true
        }
      },
      "type": "object"
    },
    "EventSubscriptionDestinationProperties": {
      "description": "Properties of the event subscription destination",
      "properties": {
        "endpointBaseUrl": {
          "description": "The base URL that represents the endpoint of the destination of an event subscription.",
          "readOnly": true,
          "type": "string"
        },
        "endpointUrl": {
          "description": "The URL that represents the endpoint of the destination of an event subscription.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "EventSubscriptionFilter": {
      "description": "Filter for the Event Subscription",
      "properties": {
        "includedEventTypes": {
          "description": "A list of applicable event types that need to be part of the event subscription. \r\nIf it is desired to subscribe to all event types, the string \"all\" needs to be specified as an element in this list.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "isSubjectCaseSensitive": {
          "default": false,
          "description": "Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the filter \r\nshould be compared in a case sensitive manner.",
          "type": "boolean"
        },
        "subjectBeginsWith": {
          "description": "An optional string to filter events for an event subscription based on a resource path prefix.\r\nThe format of this depends on the publisher of the events. \r\nWildcard characters are not supported in this path.",
          "type": "string"
        },
        "subjectEndsWith": {
          "description": "An optional string to filter events for an event subscription based on a resource path suffix.\r\nWildcard characters are not supported in this path.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "EventSubscriptionFullUrl": {
      "description": "Full endpoint url of an event subscription",
      "properties": {
        "endpointUrl": {
          "description": "The URL that represents the endpoint of the destination of an event subscription.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "EventSubscriptionProperties": {
      "description": "Properties of the Event Subscription",
      "properties": {
        "destination": {
          "$ref": "#/definitions/EventSubscriptionDestination",
          "description": "Information about the destination where events have to be delivered for the event subscription."
        },
        "filter": {
          "$ref": "#/definitions/EventSubscriptionFilter",
          "description": "Information about the filter for the event subscription."
        },
        "labels": {
          "description": "List of user defined labels.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "provisioningState": {
          "description": "Provisioning state of the event subscription.",
          "enum": [
            "Creating",
            "Updating",
            "Deleting",
            "Succeeded",
            "Canceled",
            "Failed"
          ],
          "readOnly": true,
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "EventSubscriptionProvisioningState"
          }
        },
        "topic": {
          "description": "Name of the topic of the event subscription.",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "EventSubscriptionUpdateParameters": {
      "description": "Properties of the Event Subscription update",
      "properties": {
        "destination": {
          "$ref": "#/definitions/EventSubscriptionDestination",
          "description": "Information about the destination where events have to be delivered for the event subscription."
        },
        "filter": {
          "$ref": "#/definitions/EventSubscriptionFilter",
          "description": "Information about the filter for the event subscription."
        },
        "labels": {
          "description": "List of user defined labels.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "EventSubscriptionsListResult": {
      "description": "Result of the List EventSubscriptions operation",
      "properties": {
        "value": {
          "description": "A collection of EventSubscriptions",
          "items": {
            "$ref": "#/definitions/EventSubscription"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "EventType": {
      "allOf": [
        {
          "$ref": "#/definitions/Resource"
        }
      ],
      "description": "Event Type for a subject under a topic",
      "properties": {
        "properties": {
          "$ref": "#/definitions/EventTypeProperties",
          "description": "Properties of the event type.",
          "x-ms-client-flatten": true
        }
      },
      "type": "object"
    },
    "EventTypeProperties": {
      "description": "Properties of the event type",
      "properties": {
        "description": {
          "description": "Description of the event type.",
          "type": "string"
        },
        "displayName": {
          "description": "Display name of the event type.",
          "type": "string"
        },
        "schemaUrl": {
          "description": "Url of the schema for this event type.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "EventTypesListResult": {
      "description": "Result of the List Event Types operation",
      "properties": {
        "value": {
          "description": "A collection of event types",
          "items": {
            "$ref": "#/definitions/EventType"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "Operation": {
      "description": "Represents an operation returned by the GetOperations request",
      "properties": {
        "display": {
          "$ref": "#/definitions/OperationInfo",
          "description": "Display name of the operation"
        },
        "name": {
          "description": "Name of the operation",
          "type": "string"
        },
        "origin": {
          "description": "Origin of the operation",
          "enum": [
            "User",
            "System",
            "UserAndSystem"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "OperationOrigin"
          }
        },
        "properties": {
          "description": "Properties of the operation",
          "type": "object",
          "x-ms-client-flatten": true
        }
      },
      "type": "object"
    },
    "OperationInfo": {
      "description": "Information about an operation",
      "properties": {
        "description": {
          "description": "Description of the operation",
          "type": "string"
        },
        "operation": {
          "description": "Name of the operation",
          "type": "string"
        },
        "provider": {
          "description": "Name of the provider",
          "type": "string"
        },
        "resource": {
          "description": "Name of the resource type",
          "type": "string"
        }
      },
      "type": "object"
    },
    "OperationsListResult": {
      "description": "Result of the List Operations operation",
      "properties": {
        "value": {
          "description": "A collection of operations",
          "items": {
            "$ref": "#/definitions/Operation"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "Resource": {
      "description": "Definition of a Resource",
      "properties": {
        "id": {
          "description": "Fully qualified identifier of the resource",
          "readOnly": true,
          "type": "string"
        },
        "name": {
          "description": "Name of the resource",
          "readOnly": true,
          "type": "string"
        },
        "type": {
          "description": "Type of the resource",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object",
      "x-ms-azure-resource": true
    },
    "Topic": {
      "allOf": [
        {
          "$ref": "#/definitions/TrackedResource"
        }
      ],
      "description": "EventGrid Topic",
      "properties": {
        "properties": {
          "$ref": "#/definitions/TopicProperties",
          "description": "Properties of the topic",
          "x-ms-client-flatten": true
        }
      },
      "type": "object"
    },
    "TopicProperties": {
      "description": "Properties of the Topic",
      "properties": {
        "endpoint": {
          "description": "Endpoint for the topic.",
          "readOnly": true,
          "type": "string"
        },
        "provisioningState": {
          "description": "Provisioning state of the topic.",
          "enum": [
            "Creating",
            "Updating",
            "Deleting",
            "Succeeded",
            "Canceled",
            "Failed"
          ],
          "readOnly": true,
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "TopicProvisioningState"
          }
        }
      },
      "type": "object"
    },
    "TopicRegenerateKeyRequest": {
      "description": "Topic regenerate share access key request",
      "properties": {
        "keyName": {
          "description": "Key name to regenerate key1 or key2",
          "type": "string"
        }
      },
      "required": [
        "keyName"
      ],
      "type": "object"
    },
    "TopicSharedAccessKeys": {
      "description": "Shared access keys of the Topic",
      "properties": {
        "key1": {
          "description": "Shared access key1 for the topic.",
          "type": "string"
        },
        "key2": {
          "description": "Shared access key2 for the topic.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "TopicTypeInfo": {
      "allOf": [
        {
          "$ref": "#/definitions/Resource"
        }
      ],
      "description": "Properties of a topic type info.",
      "properties": {
        "properties": {
          "$ref": "#/definitions/TopicTypeProperties",
          "description": "Properties of the topic type info",
          "x-ms-client-flatten": true
        }
      },
      "type": "object"
    },
    "TopicTypeProperties": {
      "description": "Properties of a topic type.",
      "properties": {
        "description": {
          "description": "Description of the topic type.",
          "type": "string"
        },
        "displayName": {
          "description": "Display Name for the topic type.",
          "type": "string"
        },
        "provider": {
          "description": "Namespace of the provider of the topic type.",
          "type": "string"
        },
        "provisioningState": {
          "description": "Provisioning state of the topic type",
          "enum": [
            "Creating",
            "Updating",
            "Deleting",
            "Succeeded",
            "Canceled",
            "Failed"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "TopicTypeProvisioningState"
          }
        },
        "resourceRegionType": {
          "description": "Region type of the resource.",
          "enum": [
            "RegionalResource",
            "GlobalResource"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "ResourceRegionType"
          }
        }
      },
      "type": "object"
    },
    "TopicTypesListResult": {
      "description": "Result of the List Topic Types operation",
      "properties": {
        "value": {
          "description": "A collection of topic types",
          "items": {
            "$ref": "#/definitions/TopicTypeInfo"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "TopicsListResult": {
      "description": "Result of the List Topics operation",
      "properties": {
        "value": {
          "description": "A collection of Topics",
          "items": {
            "$ref": "#/definitions/Topic"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "TrackedResource": {
      "allOf": [
        {
          "$ref": "#/definitions/Resource"
        }
      ],
      "description": "Definition of a Tracked Resource",
      "properties": {
        "location": {
          "description": "Location of the resource",
          "type": "string",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Tags of the resource",
          "type": "object"
        }
      },
      "required": [
        "location"
      ],
      "type": "object"
    }
  }
}