diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridRestClient.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridRestClient.cs index 1d0527215cb2..4f4c87154945 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridRestClient.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridRestClient.cs @@ -36,7 +36,7 @@ public EventGridRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pip _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreatePublishEventsRequest(string topicHostname, IEnumerable events) + internal HttpMessage CreatePublishEventGridEventsRequest(string topicHostname, IEnumerable events) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -44,7 +44,6 @@ internal HttpMessage CreatePublishEventsRequest(string topicHostname, IEnumerabl var uri = new RawRequestUriBuilder(); uri.AppendRaw("https://", false); uri.AppendRaw(topicHostname, false); - uri.AppendPath("/api/events", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Content-Type", "application/json"); @@ -64,7 +63,7 @@ internal HttpMessage CreatePublishEventsRequest(string topicHostname, IEnumerabl /// An array of events to be published to Event Grid. /// The cancellation token to use. /// or is null. - public async Task PublishEventsAsync(string topicHostname, IEnumerable events, CancellationToken cancellationToken = default) + public async Task PublishEventGridEventsAsync(string topicHostname, IEnumerable events, CancellationToken cancellationToken = default) { if (topicHostname == null) { @@ -75,7 +74,7 @@ public async Task PublishEventsAsync(string topicHostname, IEnumerable throw new ArgumentNullException(nameof(events)); } - using var message = CreatePublishEventsRequest(topicHostname, events); + using var message = CreatePublishEventGridEventsRequest(topicHostname, events); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -91,7 +90,7 @@ public async Task PublishEventsAsync(string topicHostname, IEnumerable /// An array of events to be published to Event Grid. /// The cancellation token to use. /// or is null. - public Response PublishEvents(string topicHostname, IEnumerable events, CancellationToken cancellationToken = default) + public Response PublishEventGridEvents(string topicHostname, IEnumerable events, CancellationToken cancellationToken = default) { if (topicHostname == null) { @@ -102,7 +101,7 @@ public Response PublishEvents(string topicHostname, IEnumerable